/* THE HELP CENTER (dist/help/), on the tokens ks-tokens.v1.css publishes and
 * the section, shell, button and type classes ks-home-v20.v1.css already
 * defines. Only what is new to a help page lives here: the search, the
 * audience tabs, the answer lists, and an article's reading column.
 *
 * Linked directly by every page tools/lib/help-center.mjs generates, so it is
 * registered in tests/repo/every-stylesheet-is-reachable.spec.ts.
 *
 * MOBILE FIRST: base rules are the phone; media queries widen. NO COLOUR IS
 * DEFINED HERE — every value is a token, so the page follows the platform
 * palette and its contrast clamps. No decorative boxes (the owner's direction
 * of 2026-09-25): structure comes from type, space and hairlines. */

/* ── 1 · the head: what this place is, and the search ─────────────────── */

.hc-hero {
  padding-block: clamp(2.25rem, 6vw, 4.5rem) clamp(1.75rem, 4vw, 2.75rem);
  background: var(--surface-sunken);
  border-bottom: 1px solid var(--line);
}
.hc-hero-in { max-width: 52rem; }
.hc-h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: var(--ks-track-hero);
  margin: 0 0 var(--ks-s-3);
}
.hc-lede {
  margin: 0 0 var(--ks-s-5);
  font-size: var(--ks-t-lead);
  color: var(--ink-2);
  max-width: 38em;
}

.hc-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--ks-s-2);
  max-width: 44rem;
}
.hc-search-ico {
  position: absolute;
  left: var(--ks-s-4);
  width: 1.25rem;
  height: 1.25rem;
  fill: var(--ink-3);
  pointer-events: none;
}
.hc-search-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 3.25rem;
  padding: var(--ks-s-3) var(--ks-s-4) var(--ks-s-3) calc(var(--ks-s-4) * 2 + 1.25rem);
  font: inherit;
  font-size: 1.0625rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--ks-r-control);
  box-shadow: var(--ks-e1);
  -webkit-appearance: none;
  appearance: none;
}
.hc-search-input::placeholder { color: var(--ink-3); }
.hc-search-input:focus-visible {
  outline: 3px solid color-mix(in oklab, var(--accent) 35%, transparent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.hc-search-input::-webkit-search-cancel-button { cursor: pointer; }
/* The submit button: the search runs as you type, so on a phone the
   keyboard's own Search key is the action and the button gives the field
   its width back. */
.hc-search-go { display: none; }

/* ── 2 · who the answers are for ───────────────────────────────────────── */

.hc-body { padding-block: var(--ks-s-5) var(--ks-s-7); }
.hc-tabs {
  display: flex;
  gap: var(--ks-s-2);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: var(--ks-s-1);
  margin-bottom: var(--ks-s-4);
}
.hc-tabs::-webkit-scrollbar { display: none; }
.hc-tab {
  flex: 0 0 auto;
  min-height: 2.5rem;
  padding: 0 var(--ks-s-4);
  font: inherit;
  font-size: var(--ks-t-sm);
  font-weight: 600;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--ks-r-pill);
  cursor: pointer;
  white-space: nowrap;
}
.hc-tab:hover { color: var(--ink); border-color: var(--ink-3); }
.hc-tab[aria-selected="true"] {
  color: var(--ink-inverse);
  background: var(--surface-inverse);
  border-color: var(--surface-inverse);
}
.hc-tab:focus-visible { outline: 3px solid color-mix(in oklab, var(--accent) 45%, transparent); outline-offset: 2px; }

.hc-status { margin: 0 0 var(--ks-s-3); min-height: 1.4em; font-size: var(--ks-t-sm); color: var(--ink-2); }
.hc-status:empty { min-height: 0; margin: 0; }

/* ── 3 · lists of answers: one row each, title over summary ────────────── */

.hc-cats { display: grid; gap: var(--ks-s-6); }
/* The page's own display rules must never outrank [hidden]: the topics are
   hidden while results show, and a rule above (display: grid) would otherwise
   keep them on screen under the answers. One rule for the whole page. */
.hc [hidden] { display: none !important; }
.hc-cat-h {
  font-size: var(--ks-t-h3);
  font-weight: 800;
  margin: 0 0 var(--ks-s-2);
}
.hc-list, .hc-results { list-style: none; margin: 0; padding: 0; }
.hc-item { border-top: 1px solid var(--line); }
.hc-item:last-child { border-bottom: 1px solid var(--line); }
.hc-item-link {
  display: grid;
  gap: var(--ks-s-1);
  padding: var(--ks-s-3) 0;
  color: inherit;
  text-decoration: none;
}
.hc-item-title { font-weight: 700; color: var(--ink); }
.hc-item-sum { font-size: var(--ks-t-sm); color: var(--ink-2); line-height: 1.5; }
.hc-item-link:hover .hc-item-title,
.hc-item-link:focus-visible .hc-item-title { color: var(--accent-on-surface); text-decoration: underline; text-underline-offset: 3px; }
.hc-item-link:focus-visible { outline: 3px solid color-mix(in oklab, var(--accent) 45%, transparent); outline-offset: 2px; border-radius: var(--ks-r-control-sm); }

/* ── 4 · an article: one reading column ────────────────────────────────── */

.hc-article-shell { max-width: 46rem; padding-block: var(--ks-s-5) var(--ks-s-7); }
.hc-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ks-s-2);
  margin-bottom: var(--ks-s-4);
  font-size: var(--ks-t-sm);
  color: var(--ink-2);
}
.hc-crumbs a { color: var(--accent-on-surface); }
.hc-title {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: var(--ks-track-h2);
  margin: 0 0 var(--ks-s-2);
}
.hc-for { margin: 0 0 var(--ks-s-5); font-size: var(--ks-t-sm); color: var(--ink-2); }

/* The short answer: the line a reader came for, set apart by a rule, not a
   box. It is also, word for word, what the Sensei says. */
.hc-answer {
  margin: 0 0 var(--ks-s-6);
  padding: var(--ks-s-1) 0 var(--ks-s-1) var(--ks-s-4);
  border-left: 3px solid var(--accent);
}
.hc-answer-label {
  margin: 0 0 var(--ks-s-1);
  font-family: var(--ks-display);
  font-size: var(--ks-t-label);
  font-weight: 800;
  letter-spacing: var(--ks-track-label);
  text-transform: uppercase;
  color: var(--accent-on-surface);
}
.hc-answer-text { margin: 0; font-size: var(--ks-t-lead); line-height: 1.55; color: var(--ink); }
.hc-where { margin: var(--ks-s-3) 0 0; font-size: var(--ks-t-sm); color: var(--ink-2); }
.hc-where-label { font-weight: 700; color: var(--ink); }
.hc-place { font-weight: 600; color: var(--ink); }

.hc-prose { line-height: 1.65; }
.hc-prose h2 {
  font-size: var(--ks-t-h3);
  font-weight: 800;
  margin: var(--ks-s-6) 0 var(--ks-s-3);
  scroll-margin-top: calc(var(--ks-nav-h, 72px) + var(--ks-s-4));
}
.hc-prose h3 { font-size: 1.05rem; font-weight: 800; margin: var(--ks-s-5) 0 var(--ks-s-2); }
.hc-prose p { margin: 0 0 var(--ks-s-4); }
.hc-prose ul, .hc-prose ol { margin: 0 0 var(--ks-s-4); padding-left: 1.4rem; }
.hc-prose li { margin-bottom: var(--ks-s-2); }
.hc-prose li::marker { color: var(--ink-3); }
.hc-prose ol li::marker { font-weight: 700; color: var(--ink-2); }
.hc-prose a { color: var(--accent-on-surface); text-underline-offset: 3px; }

/* A quotation from the Terms or the Privacy Policy: the legal page's own
   words, word for word, with where they come from. */
.hc-quote {
  margin: 0 0 var(--ks-s-5);
  padding: 0 0 0 var(--ks-s-4);
  border-left: 2px solid var(--line-strong);
  color: var(--ink-2);
}
.hc-quote p { margin: 0 0 var(--ks-s-2); }
.hc-quote footer { font-size: var(--ks-t-sm); }

.hc-table-wrap { overflow-x: auto; margin: 0 0 var(--ks-s-5); }
.hc-table { width: 100%; min-width: 30rem; border-collapse: collapse; font-size: var(--ks-t-sm); }
.hc-table th, .hc-table td { padding: var(--ks-s-2) var(--ks-s-3) var(--ks-s-2) 0; text-align: left; border-bottom: 1px solid var(--line); }
.hc-table thead th { font-weight: 700; color: var(--ink-2); }
.hc-table tbody th { font-weight: 700; }

.hc-updated { margin: var(--ks-s-6) 0 0; font-size: var(--ks-t-sm); color: var(--ink-2); }

.hc-related { margin-top: var(--ks-s-7); }
.hc-related-h { font-size: var(--ks-t-h3); font-weight: 800; margin: 0 0 var(--ks-s-2); }
.hc-search-again { margin-top: var(--ks-s-7); }

/* ── 5 · the way out ───────────────────────────────────────────────────── */

.hc-more {
  padding-block: var(--ks-s-6);
  background: var(--surface-sunken);
  border-top: 1px solid var(--line);
}
.hc-more-in { max-width: 46rem; }
.hc-more-h { font-size: var(--ks-t-h3); font-weight: 800; margin: 0 0 var(--ks-s-2); }
.hc-more p { margin: 0; color: var(--ink-2); }
.hc-more a { color: var(--accent-on-surface); }

/* ── wider screens ─────────────────────────────────────────────────────── */

@media (min-width: 640px) {
  .hc-search-go { display: inline-flex; }
}

@media (min-width: 900px) {
  .hc-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--ks-s-7); row-gap: var(--ks-s-6); }
}
