/* Help center home and category pages (HELP-CENTER-PORT-PLAN-2026-10-23 G2):
   the v1 hero, popular cards, topic grid, category side nav, header, rows and
   "Next topic" card (helpcanvas-v1 templates/kb/home.html.twig and
   category.html.twig). Loaded on every help center page, so every rule is scoped
   to .hc-home, .hc-cat or a G2 component class. Tokens come from help.css. */

/* ============ Home: hero ============ */
.hc-hero {
  position: relative; overflow: hidden;
  background: var(--hero-bg); color: var(--hero-ink);
  border-bottom: 1px solid var(--line);
}
.hc-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 30%, var(--bg) 100%);
}
.hc-hero-in { position: relative; z-index: 1; padding-top: 72px; padding-bottom: 84px; text-align: center; }
.hc-hero-badge {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 22px;
  padding: 6px 14px; border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--card); color: var(--body); box-shadow: var(--shadow-sm);
  font-size: 12.5px; font-weight: 600; line-height: 1.4;
}
.hc-hero-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.hc-hero h1 {
  font-size: clamp(34px, 4.6vw, 48px); line-height: 1.12; letter-spacing: -1.2px;
  color: var(--hero-ink); font-weight: 800; margin-bottom: 14px;
}
.hc-hero-lede { max-width: 560px; margin: 0 auto 30px; font-size: 16.5px; color: color-mix(in srgb, var(--hero-ink) 70%, var(--body)); }
.hc-hero-chips { margin-top: 18px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; font-size: 13px; }
.hc-hero-chips-label { color: var(--muted); align-self: center; }
.hc-hero-chips .hc-chip { max-width: 100%; }

/* ============ Home: sections ============ */
.hc-home .hc-main { padding-bottom: 56px; }
.hc-home-section { padding: 52px 0 8px; scroll-margin-top: 72px; }
.hc-home-section:focus { outline: none; }
.hc-home-empty { margin-top: 52px; }

/* Popular cards: 3, 2 and 1 columns (v1 .popular-grid). Also the subtopic cards of a category. */
.hc-popular { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
@media (max-width: 900px) { .hc-popular { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .hc-popular { grid-template-columns: minmax(0, 1fr); } }
.hc-popular > li { display: flex; min-width: 0; }
.hc-popular > li > .hc-popular-card { flex: 1; }
.hc-popular-card, .hc a.hc-popular-card {
  display: flex; align-items: center; gap: 14px; min-width: 0;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--ink);
  transition: border-color .16s, box-shadow .16s, transform .16s;
}
.hc-popular-card:hover, .hc a.hc-popular-card:hover { border-color: color-mix(in srgb, var(--brand-ink) 24%, var(--bg)); box-shadow: var(--shadow-md); transform: translateY(-1px); color: var(--ink); }
.hc-popular-icon { width: 38px; height: 38px; }
.hc-popular-icon svg { width: 18px; height: 18px; }
.hc-popular-body { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.hc-popular-title { font-weight: 650; font-size: 15px; color: var(--ink); line-height: 1.35; }
.hc-popular-cat { font-size: 13px; color: var(--muted); margin-top: 2px; }
.hc-popular-arrow { margin-left: auto; color: var(--muted); flex: none; transition: transform .16s, color .16s; }
.hc-popular-card:hover .hc-popular-arrow { transform: translateX(3px); color: var(--brand-deep); }

/* Topic grid: two columns, three at 1100px and up when the count divides by three, one at 860px. */
.hc-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.hc-topics--single { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .hc-topics--thirds { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .hc-topics { grid-template-columns: minmax(0, 1fr); } }
.hc-topic {
  display: flex; flex-direction: column; min-width: 0;
  padding: 22px 22px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
  transition: border-color .16s, box-shadow .16s;
}
.hc-topic:hover { border-color: color-mix(in srgb, var(--brand-ink) 24%, var(--bg)); box-shadow: var(--shadow-md); }
.hc-topic-head { display: flex; align-items: center; gap: 13px; margin-bottom: 6px; }
.hc-topic-head .hc-icon-tile { border-radius: 11px; }
.hc-topic-head .hc-icon-tile svg { width: 19px; height: 19px; }
.hc-topic-name { min-width: 0; }
.hc-topic h3 { font-size: 16px; color: var(--ink); font-weight: 700; letter-spacing: -.2px; line-height: 1.35; }
.hc-topic h3 a { color: inherit; }
.hc-topic h3 a:hover { color: var(--brand-deep); }
.hc-topic-desc { font-size: 13px; color: var(--muted); margin-top: 1px; overflow-wrap: anywhere; line-height: 1.5; }
.hc-topic-head .hc-pill { margin-left: auto; color: var(--brand-ink); }
.hc-topic-links { list-style: none; margin: 10px 0 0; padding: 0; }
.hc-topic-links li { border-top: 1px solid var(--line-soft); }
.hc-topic-links a {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10.5px 2px;
  color: var(--body); font-size: 14px; font-weight: 500; overflow-wrap: anywhere;
}
.hc-topic-links a:hover { color: var(--brand-deep); }
.hc-topic-links a svg { margin-left: auto; color: color-mix(in srgb, var(--brand-ink) 30%, var(--bg)); transition: transform .15s, color .15s; }
.hc-topic-links a:hover svg { color: var(--brand-deep); transform: translateX(2px); }
.hc-topic-more, .hc a.hc-topic-more {
  display: inline-flex; align-items: center; gap: 6px; width: 100%; margin-top: auto;
  padding: 12px 2px 14px; border-top: 1px solid var(--line-soft);
  font-size: 13.5px; font-weight: 650; color: var(--brand-deep);
}
.hc-topic-more:hover { color: var(--brand-ink); }

@media (max-width: 480px) {
  .hc-hero-in { padding-top: 48px; padding-bottom: 56px; }
  .hc-home-section { padding-top: 40px; }
  .hc-topic { padding: 18px 16px 0; }
}

/* ============ Category page ============ */
.hc-cat-layout {
  display: grid; grid-template-columns: 256px minmax(0, 1fr); gap: 48px;
  padding: 26px 0 70px; align-items: start;
}
@media (max-width: 940px) { .hc-cat-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; } .hc-side-nav { display: none; } }

.hc-side-nav { position: sticky; top: 88px; }
.hc-side-nav-label {
  font-size: 11.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px; padding-left: 12px;
}
.hc-side-nav ul { list-style: none; margin: 0; padding: 0; }
.hc-side-nav li a {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 9px;
  color: var(--body); font-size: 13.5px; font-weight: 550; line-height: 1.3;
  transition: background .12s, color .12s;
}
.hc-side-nav li a:hover { background: var(--wash); color: var(--ink); }
.hc-side-nav li a svg { width: 15px; height: 15px; color: var(--faint); }
.hc-side-nav li a.is-active { background: var(--mint); color: var(--brand-ink); font-weight: 700; }
.hc-side-nav li a.is-active svg { color: var(--brand-deep); }
.hc-side-nav-name { min-width: 0; overflow-wrap: anywhere; }
.hc-side-nav-count { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.hc-side-nav li a.is-active .hc-side-nav-count { color: var(--brand-deep); }

.hc-cat-main { min-width: 0; }
.hc-cat-head { display: flex; gap: 18px; align-items: flex-start; padding: 10px 0 26px; border-bottom: 1px solid var(--line); }
.hc-cat-head > div { min-width: 0; }
.hc-cat-head .hc-icon-tile--lg { border-radius: 15px; }
.hc-cat-head h1 { font-size: 29px; letter-spacing: -.7px; color: var(--ink); font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
/* v1 repo .cat-header sizes: description 15px, meta 13px. */
.hc-cat-desc { margin-top: 6px; font-size: 15px; color: var(--body); max-width: 560px; }
.hc-cat-meta { margin-top: 10px; display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.hc-cat-meta > span { display: inline-flex; align-items: center; gap: 6px; }

.hc-subcats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 22px 0 4px; }
@media (max-width: 640px) { .hc-subcats { grid-template-columns: minmax(0, 1fr); } }
.hc-subcats .hc-popular-icon { width: 34px; height: 34px; }
/* Live v1: each subtopic card shows its description (two lines at most), and an "Articles" label opens the rows. */
.hc-subcat-desc { margin-top: 2px; font-size: 13px; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hc-cat-label { margin-top: 30px; }
.hc-cat-label + .hc-rows { margin-top: 12px; }

.hc-rows { list-style: none; margin: 22px 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.hc-rows li + li { border-top: 1px solid var(--line-soft); }
.hc-row, .hc a.hc-row { display: flex; gap: 18px; align-items: flex-start; padding: 18px 22px; color: inherit; transition: background .13s; }
.hc-row:hover { background: var(--mint-soft); }
.hc-row:focus-visible { outline-offset: -3px; }
.hc-row-num {
  display: grid; place-items: center; flex: none; width: 30px; height: 30px; margin-top: 2px;
  border-radius: 8px; background: var(--mint); color: var(--brand-deep);
  font-size: 12.5px; font-weight: 750; font-variant-numeric: tabular-nums;
}
.hc-row-body { display: flex; flex-direction: column; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.hc-row-title { font-size: 16px; color: var(--ink); font-weight: 680; letter-spacing: -.15px; line-height: 1.35; }
.hc-row:hover .hc-row-title { color: var(--brand-deep); }
.hc-row-excerpt {
  margin-top: 4px; font-size: 14px; color: var(--muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hc-row-meta { margin-top: 6px; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.hc-row-chev { flex: none; align-self: center; color: var(--muted); transition: transform .15s, color .15s; }
.hc-row:hover .hc-row-chev { transform: translateX(3px); color: var(--brand-deep); }
@media (max-width: 640px) {
  .hc-row, .hc a.hc-row { gap: 12px; padding: 16px; }
  .hc-row-num { width: 26px; height: 26px; font-size: 12px; margin-top: 1px; }
  .hc-row-chev { display: none; }
}
/* v1 .cat-empty: a faint document icon over the text, centred, no box. */
.hc-cat-empty { padding: 64px 0; text-align: center; color: var(--faint); font-size: 14px; }
.hc-cat-empty svg { margin: 0 auto 12px; opacity: .4; }

.hc-next-topic { margin-top: 26px; display: flex; justify-content: flex-end; }
.hc-next-card, .hc a.hc-next-card {
  display: flex; align-items: center; gap: 16px; text-align: right;
  min-width: min(300px, 100%); max-width: 100%; padding: 16px 20px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: inherit;
  transition: border-color .16s, box-shadow .16s;
}
.hc-next-card:hover { border-color: color-mix(in srgb, var(--brand-ink) 24%, var(--bg)); box-shadow: var(--shadow-md); }
.hc-next-body { display: flex; flex-direction: column; margin-left: auto; min-width: 0; }
.hc-next-label { font-size: 11.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.hc-next-title { font-size: 15px; font-weight: 700; color: var(--ink); margin-top: 2px; overflow-wrap: anywhere; }
.hc-next-card:hover .hc-next-title { color: var(--brand-deep); }
.hc-next-card svg { color: var(--muted); }
.hc-next-card:hover svg { color: var(--brand-deep); }

@media (max-width: 480px) {
  .hc-cat-head { gap: 14px; padding-bottom: 20px; }
  .hc-cat-head .hc-icon-tile--lg { width: 44px; height: 44px; }
  .hc-cat-head .hc-icon-tile--lg svg { width: 22px; height: 22px; }
  .hc-cat-head h1 { font-size: 24px; letter-spacing: -.4px; }
  .hc-next-card, .hc a.hc-next-card { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .hc-row:hover .hc-row-chev, .hc-popular-card:hover .hc-popular-arrow { transform: none; } }
@media print {
  .hc-side-nav, .hc-next-topic, .hc-hero-chips { display: none !important; }
  .hc-cat-layout { display: block; padding: 0; }
}
