/* Help centre (help.html). Class prefix .hc-. Load after fonts.css, tokens.css, base.css, chrome.css.
   Colour comes only from tokens.css. Only transform and opacity animate. Every box that JS or Peep fills has its size
   reserved up front, so nothing shifts on load (CLS 0). Filtering hides whole cards; the articles always stay. */

/* ---------- Hero: copy on the left, the search card on the right (stacked on phones) ---------- */
.hc-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); gap: clamp(28px, 5vw, 72px); align-items: end; }
.hc-hero h1 { max-width: 12ch; }
@media (max-width: 900px) { .hc-hero__grid { grid-template-columns: minmax(0, 1fr); } }

/* The search card. Peep peeks over its top edge and holds it with both mittens (the ledge, D32: hands only when needed). */
/* Not a .tt-card: cards lift on hover site-wide, and a search box that moves under the pointer feels wrong. */
.hc-search { position: relative; margin-top: 72px; padding: clamp(18px, 2.4vw, 24px); background: var(--tt-surface); border-radius: var(--r-2); box-shadow: var(--shadow-2); }
/* Host classes c-peep--peek c-peep--rise (chrome.css) give the rise from behind the ledge; the clip is repeated here so his
   feet never hang over the card even if those shared classes change. */
.hc-peep { position: absolute; right: clamp(18px, 3vw, 30px); bottom: 100%; width: 96px; aspect-ratio: 140 / 98; display: block; pointer-events: none;
  clip-path: polygon(-60% -80%, 160% -80%, 160% 100%, -60% 100%); }
.hc-peep > svg { display: block; width: 100%; height: 100%; }
.hc-search__l { display: block; font-size: .9375rem; font-weight: var(--w-semi); color: var(--tt-ink); }
.hc-search__row { position: relative; margin-top: 10px; }
.hc-search__row > svg { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; translate: 0 -50%; color: var(--tt-ink-3); pointer-events: none; }
.hc-search input { width: 100%; height: 52px; padding: 0 16px 0 46px; border-radius: var(--r-pill); border: 1px solid var(--tt-line-2);
  background: var(--tt-bg); color: var(--tt-ink); font: inherit; font-size: 1.0625rem; }
.hc-search input::placeholder { color: var(--tt-ink-3); opacity: 1; }
.hc-search input:hover { border-color: var(--tt-brand-line); }
.hc-search input:focus-visible { outline: 2px solid var(--tt-brand); outline-offset: 2px; border-color: var(--tt-brand); border-radius: var(--r-pill); }
.hc-search__hint { margin-top: 10px; font-size: .875rem; line-height: 1.45; color: var(--tt-ink-3); }
/* Without JS the box would do nothing, so it is not shown; the topic cards below still work. */
html:not(.js) .hc-search { display: none; }

/* ---------- Topic cards ---------- */
.hc-topics { padding-top: clamp(16px, 2vw, 24px); }
.hc-topics__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin-bottom: 20px; }
.hc-count { min-height: 1.5em; font-size: .9375rem; color: var(--tt-ink-2); }
.hc-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 264px), 1fr)); gap: 16px; }
.hc-card[hidden] { display: none; }
.hc-card__a { display: flex; flex-direction: column; height: 100%; padding: 22px 22px 18px; text-decoration: none; color: var(--tt-ink); border-radius: var(--r-2); }
.hc-card__n { color: var(--tt-brand); }
.hc-card__t { margin-top: 12px; font-size: 1.1875rem; font-weight: var(--w-semi); line-height: 1.3; letter-spacing: -.01em; }
.hc-card__p { margin-top: 8px; flex: 1; font-size: .9375rem; line-height: 1.5; color: var(--tt-ink-2); }
.hc-card__go { margin-top: 16px; display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; font-weight: var(--w-semi); color: var(--tt-brand); }
.hc-card__go svg { width: 16px; height: 16px; transition: transform var(--d-ui, 200ms) var(--ease-ui, ease); }
.hc-card__a:is(:hover, :focus-visible) .hc-card__go svg { transform: translateX(3px); }
.hc-card__a:focus-visible { outline-offset: 3px; border-radius: var(--r-2); }

.hc-none { margin-top: 4px; padding: 20px 22px; border: 1px dashed var(--tt-line-2); border-radius: var(--r-2); color: var(--tt-ink-2); line-height: 1.55; }
.hc-none[hidden] { display: none; }
.hc-none b { color: var(--tt-ink); }
.hc-none a { color: var(--tt-brand); font-weight: var(--w-semi); }

/* ---------- Articles ---------- */
.hc-arts { padding-bottom: clamp(32px, 4vw, 56px); }
.hc-art { max-width: 760px; padding-block: clamp(40px, 5vw, 64px); border-top: 1px solid var(--tt-line); } /* html scroll-padding-top (chrome.css) clears the sticky nav */
.hc-art__n { display: inline-flex; align-items: center; gap: 10px; }
.hc-art__n .tt-eyelet { border-color: var(--tt-brand); }
.hc-art:target .hc-art__n .tt-eyelet { background: var(--tt-accent); }
.hc-art h2 { margin-top: 12px; font-family: var(--f-display); font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.375rem); font-weight: 720; line-height: 1.08; letter-spacing: -.025em; text-wrap: balance; }
.hc-art h3 { margin-top: 28px; font-size: 1.125rem; font-weight: var(--w-semi); line-height: 1.35; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.hc-art p, .hc-art li { font-size: var(--t-body); line-height: 1.6; color: var(--tt-ink-2); }
.hc-art p { margin-top: 14px; max-width: 64ch; }
.hc-art h2 + p { margin-top: 18px; }
.hc-art b, .hc-art strong { color: var(--tt-ink); font-weight: var(--w-semi); }
.hc-art a:not(.hc-top) { color: var(--tt-brand); font-weight: var(--w-medium); }
.hc-art .c-status { vertical-align: 2px; }

.hc-list, .hc-steps { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; max-width: 64ch; }
.hc-list > li { position: relative; padding-left: 24px; }
.hc-list > li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--tt-brand); }
.hc-steps { counter-reset: hc-step; }
.hc-steps > li { position: relative; padding-left: 40px; counter-increment: hc-step; }
.hc-steps > li::before { content: counter(hc-step); position: absolute; left: 0; top: .1em; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--tt-brand-soft); color: var(--tt-brand); font: var(--w-semi) .8125rem/1 var(--f-ui); font-variant-numeric: tabular-nums; }

/* "The one thing to remember" and similar: a quiet callout with the accent edge. */
.hc-note { margin-top: 22px; padding: 16px 18px; border-radius: var(--r-1); background: var(--tt-brand-soft); border-left: 3px solid var(--tt-brand); max-width: 64ch; }
.hc-art .hc-note p { margin-top: 0; color: var(--tt-ink); }

.hc-art__foot { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding-top: 18px; border-top: 1px dashed var(--tt-line-2); }
.hc-art .hc-art__help { margin-top: 0; max-width: 52ch; font-size: .9375rem; line-height: 1.5; }
.hc-top { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--tt-line-2);
  color: var(--tt-ink); text-decoration: none; font-size: .875rem; font-weight: var(--w-semi); white-space: nowrap; transition: border-color var(--d-fast), color var(--d-fast); }
.hc-top svg { width: 16px; height: 16px; transition: transform var(--d-ui, 200ms) var(--ease-ui, ease); }
.hc-top:is(:hover, :focus-visible) { border-color: var(--tt-brand); color: var(--tt-brand); }
.hc-top:is(:hover, :focus-visible) svg { transform: translateY(-2px); }

/* ---------- Still stuck? ---------- */
.hc-stuck { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 40px; align-items: center; padding: clamp(24px, 4vw, 44px); }
.hc-stuck h2 { font-family: var(--f-display); font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); font-weight: 720; line-height: 1.05; letter-spacing: -.025em; }
.hc-stuck h2 em { font-style: normal; color: var(--tt-brand); }
.hc-stuck p { margin-top: 12px; max-width: 56ch; color: var(--tt-ink-2); line-height: 1.55; }
.hc-stuck .tt-btn { white-space: nowrap; }
.hc-stuck .tt-btn svg { width: 18px; height: 18px; }
@media (max-width: 760px) { .hc-stuck { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .hc-stuck .tt-btn { width: 100%; white-space: normal; overflow-wrap: anywhere; } }

/* Reduced motion: colour changes only. */
@media (prefers-reduced-motion: reduce) { .hc-card__go svg, .hc-top svg { transition: none; transform: none !important; } }
html.calm .hc-card__go svg, html.calm .hc-top svg { transition: none; transform: none !important; }
