/* HELP CENTER
 * ============================================================
 * Built on the existing emerald/champagne token system rather than beside it:
 * every colour, radius and type choice below resolves to a variable declared
 * in style.css, so the Help Center inherits light/dark and RTL for free and
 * cannot drift into a second design language.
 *
 * The one structural decision worth stating: documentation is read, not
 * browsed. So this leans on long measure, generous line height and a quiet
 * palette — the accent appears on interactive elements and nowhere else. A
 * help page that competes with its own content for attention is a help page
 * people leave.
 */

.hc-shell {
  --hc-measure: 68ch;
  --hc-rail: 268px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem 5rem;
}

/* ---------- Search-led hero ---------------------------------------------
 * The first thing someone in difficulty wants is a search box, not a value
 * proposition. It gets the top of the page and the largest touch target. */
.hc-hero {
  padding: 3.25rem 1.25rem 2.5rem;
  background:
    radial-gradient(120% 140% at 50% -20%, var(--surface-champagne-soft) 0%, transparent 62%),
    var(--surface);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.hc-hero .eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: .74rem;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--vi-emerald-700);
  margin-bottom: .85rem;
}
.hc-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 2.9rem);
  line-height: 1.12;
  text-wrap: balance;
  margin: 0 0 .7rem;
  color: var(--text);
}
.hc-hero p.lead {
  max-width: 56ch;
  margin: 0 auto 1.9rem;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.hc-search {
  display: flex;
  gap: .55rem;
  max-width: 640px;
  margin: 0 auto;
}
.hc-search input {
  flex: 1 1 auto;
  min-width: 0;
  padding: .95rem 1.1rem;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
}
.hc-search input::placeholder { color: var(--text-muted); opacity: .85; }
.hc-search input:focus-visible {
  outline: 3px solid var(--vi-emerald-400);
  outline-offset: 2px;
  border-color: var(--vi-emerald-600);
}

/* ---------- Category grid ---------------------------------------------- */
.hc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 1rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}
.hc-card {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: 1.25rem 1.3rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.hc-card:hover,
.hc-card:focus-visible {
  border-color: var(--vi-emerald-400);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 78, 59, .09);
}
.hc-card:focus-visible { outline: 3px solid var(--vi-emerald-400); outline-offset: 2px; }
.hc-card h2 {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 620;
  margin: 0;
  color: var(--text);
}
.hc-card p {
  margin: 0;
  font-size: .89rem;
  line-height: 1.55;
  color: var(--text-muted);
}
.hc-card .hc-count {
  margin-top: .35rem;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--vi-emerald-700);
}
.hc-card-icon {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  margin-bottom: .35rem;
  border-radius: 8px;
  background: var(--surface-champagne-soft);
  color: var(--vi-emerald-800);
}
.hc-card-icon svg { width: 19px; height: 19px; }

/* ---------- Article layout ---------------------------------------------
 * Rail beside prose on desktop; rail collapses above the prose on smaller
 * screens rather than disappearing, because the contents list is how someone
 * decides they are on the wrong page. */
.hc-article-layout {
  display: grid;
  grid-template-columns: var(--hc-rail) minmax(0, 1fr);
  gap: 2.75rem;
  align-items: start;
  margin-top: 2.25rem;
}
.hc-rail {
  position: sticky;
  top: 1.5rem;
  padding: 0;
  list-style: none;
  border-inline-start: 2px solid var(--border);
}
.hc-rail li { margin: 0; }
.hc-rail a {
  display: block;
  padding: .42rem 0 .42rem .95rem;
  margin-inline-start: -2px;
  border-inline-start: 2px solid transparent;
  font-size: .88rem;
  line-height: 1.45;
  color: var(--text-muted);
  text-decoration: none;
}
.hc-rail a:hover { color: var(--text); }
.hc-rail a[aria-current="true"] {
  color: var(--vi-emerald-700);
  border-inline-start-color: var(--vi-emerald-600);
  font-weight: 600;
}

.hc-prose { max-width: var(--hc-measure); }
.hc-prose h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 2.4rem 0 .7rem;
  text-wrap: balance;
  color: var(--text);
}
.hc-prose h2:first-child { margin-top: 0; }
.hc-prose h3 {
  font-family: var(--font-body);
  font-size: 1.04rem;
  font-weight: 650;
  margin: 1.7rem 0 .5rem;
  color: var(--text);
}
.hc-prose p,
.hc-prose li {
  font-size: .97rem;
  line-height: 1.72;
  color: var(--text);
}
.hc-prose p { margin: 0 0 1rem; }
.hc-prose ul, .hc-prose ol { margin: 0 0 1.2rem; padding-inline-start: 1.35rem; }
.hc-prose li { margin-bottom: .4rem; }
.hc-prose code {
  font-family: var(--font-mono);
  font-size: .87em;
  padding: .12em .38em;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}
.hc-prose a { color: var(--vi-emerald-700); text-underline-offset: 3px; }

/* A note that carries a real limitation. Deliberately quiet: it is
 * information, not a warning banner. */
.hc-note {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  border-inline-start: 3px solid var(--vi-emerald-600);
  background: var(--surface-2);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.hc-note p:last-child { margin-bottom: 0; }
.hc-note strong { color: var(--vi-emerald-800); }

/* Capability state chips. The Help Center must be able to say "this is
 * registered but not validated" without a paragraph of hedging. */
.hc-state {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .16rem .55rem;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 650;
  letter-spacing: .03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.hc-state-verified   { background: var(--vi-emerald-100); color: var(--vi-emerald-900); }
.hc-state-supported  { background: var(--vi-champagne-100); color: #6B4E16; }
.hc-state-registered { background: var(--surface-3); color: var(--text-muted); }
.hc-state-none       { background: var(--surface-3); color: var(--text-muted); text-decoration: line-through; }

.hc-breadcrumb {
  display: flex; flex-wrap: wrap; gap: .4rem;
  margin: 1.75rem 0 0;
  padding: 0; list-style: none;
  font-size: .84rem; color: var(--text-muted);
}
.hc-breadcrumb a { color: var(--text-muted); }
.hc-breadcrumb li + li::before { content: "/"; margin-inline-end: .4rem; opacity: .55; }

.hc-table-wrap { overflow-x: auto; margin: 1.3rem 0; }
.hc-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.hc-table th, .hc-table td {
  padding: .62rem .8rem;
  text-align: start;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.hc-table th {
  font-weight: 650;
  color: var(--text);
  background: var(--surface-2);
  white-space: nowrap;
}
.hc-table td { color: var(--text); }
.hc-table tbody tr:hover { background: var(--surface-2); }

.hc-foot-help {
  margin-top: 3rem;
  padding: 1.5rem;
  background: var(--surface-2);
  border-radius: var(--radius);
  text-align: center;
}
.hc-foot-help h2 { font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 .4rem; }
.hc-foot-help p { margin: 0 0 1rem; color: var(--text-muted); font-size: .93rem; }

/* ---------- Responsive ---------------------------------------------------
 * Deliberate breakpoints, not a shrunken desktop: the rail moves above the
 * prose and loses its sticky behaviour, because a sticky rail on a short
 * viewport eats the content it is meant to index. */
@media (max-width: 900px) {
  .hc-article-layout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .hc-rail {
    position: static;
    border-inline-start: none;
    border-block-end: 1px solid var(--border);
    padding-bottom: 1rem;
    display: flex; flex-wrap: wrap; gap: .3rem .9rem;
  }
  .hc-rail a { border-inline-start: none; padding: .3rem 0; }
  .hc-rail a[aria-current="true"] { border-inline-start: none; text-decoration: underline; }
}
@media (max-width: 620px) {
  .hc-hero { padding: 2.25rem 1rem 1.9rem; }
  .hc-search { flex-direction: column; }
  .hc-search .btn { width: 100%; }
  .hc-grid { grid-template-columns: 1fr; }
  .hc-shell { padding-inline: 1rem; }
}

/* Touch targets stay at 44px on coarse pointers regardless of viewport. */
@media (pointer: coarse) {
  .hc-rail a { min-height: 44px; display: flex; align-items: center; }
  .hc-card { padding: 1.35rem 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hc-card { transition: none; }
  .hc-card:hover, .hc-card:focus-visible { transform: none; }
}

@media print {
  .hc-hero, .hc-rail, .hc-foot-help, .hc-search { display: none; }
  .hc-article-layout { grid-template-columns: 1fr; }
  .hc-prose { max-width: none; }
}

/* ---------- Corrections found by looking at the screenshots -------------
 * Two defects that DOM metrics could not see and a rendered page showed
 * immediately.
 *
 * 1. Every card's prose was underlined. style.css underlines `main li > a`
 *    for readability in body copy, and a whole-card link is an `li > a` — so
 *    the title, the description and the topic count all picked it up. The card
 *    is a surface, not a sentence; the underline belongs to prose links only.
 *
 * 2. The filter label rendered as visible text beside the input. It was marked
 *    `sr-only`, which is not a class this site defines — the convention here is
 *    `visually-hidden`, and it lives in components.css which this page does not
 *    load. Defining it here keeps the page self-contained.
 */
.hc-card,
.hc-card * { text-decoration: none; }
.hc-card h2 { text-decoration: none; }

.hc-shell .visually-hidden,
.hc-hero .visually-hidden,
.hc-shell .sr-only,
.hc-hero .sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
