/* Help Center (help/*.html, written by tools/build-help.mjs). Builds on site.css tokens. */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.help-hero { padding-bottom: 6px; }
.help-hero .lead-in { margin: 0 0 22px; color: var(--muted); font-size: 17px; }

/* Search box */
.help-search { display: flex; align-items: center; gap: 12px; padding: 0 20px; min-height: 62px; border-radius: var(--r-pill); color: var(--faint); }
.help-search:focus-within { box-shadow: var(--shadow-card), 0 0 0 3px var(--accent); }
.help-search svg { flex: none; }
.help-search input { flex: 1; min-width: 0; height: 60px; border: 0; outline: 0; background: transparent; color: var(--ink); font: 600 17px/1.2 var(--font-body); }
.help-search input::placeholder { color: var(--faint); font-weight: 500; }
.help-search input::-webkit-search-cancel-button { cursor: pointer; }
.help-search.small { min-height: 48px; margin: 6px 0 0; padding: 0 16px; }
.help-search.small input { height: 46px; font-size: 15.5px; }

/* Results */
.results { margin-top: 22px; }
.result-status { margin: 0 0 12px 6px; color: var(--faint); font-size: 14px; font-weight: 700; }
.results ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.results a { display: grid; gap: 3px; padding: 16px 20px; border-radius: 20px; background: var(--glass-strong); box-shadow: var(--shadow-card); text-decoration: none; transition: transform .15s ease; }
.results a:hover { transform: translateY(-1px); }
.r-cat { color: var(--accent); font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.r-title { color: var(--ink); font-family: var(--font-display); font-size: 18px; font-weight: 900; line-height: 1.25; }
.r-sum { color: var(--muted); font-size: 14.5px; }

/* Topic grid */
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 26px; }
.cat { padding: 22px 24px 18px; scroll-margin-top: 20px; }
.cat h2 { margin: 0; font-size: 20px; line-height: 1.25; font-weight: 800; }
.cat > p { margin: 2px 0 10px; color: var(--faint); font-size: 14px; }
.cat ul { list-style: none; margin: 0; padding: 0; }
.doc .cat li { margin: 0; }
.cat li a { display: block; padding: 9px 0; border-top: 1px solid var(--line); color: var(--link); font-weight: 700; font-size: 15.5px; text-decoration: none; }
.cat li a:hover { text-decoration: underline; }

/* Article */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 8px; font-size: 14px; font-weight: 700; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs span { color: var(--faint); }
.help .doc-head h1 { font-size: clamp(32px, 6.4vw, 50px); line-height: 1.08; }
.help .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.article { margin-top: 18px; font-size: 16.5px; }
.article > p:first-child, .article > ol:first-child, .article > h2:first-child { margin-top: 0; }
.article h2 { font-size: 20px; margin-top: 28px; }
.article code { padding: 2px 7px; border-radius: 8px; background: var(--surface-alt); color: var(--ink); font-size: .9em; word-break: break-all; }
.doc .article ul { padding-left: 20px; }
.doc .article ul li { margin-bottom: 6px; }

/* Numbered steps with brand-coloured counters */
.steps { list-style: none; counter-reset: step; margin: 16px 0; padding: 0; }
.doc .steps li { counter-increment: step; position: relative; margin: 0 0 12px; padding-left: 44px; min-height: 30px; color: var(--ink); }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--grad); color: #fff; font: 900 14px/1 var(--font-display); }

.note { margin: 18px 0; padding: 14px 18px; border-radius: 16px; background: var(--accent-soft); color: var(--ink); font-size: 15px; }
.note a { font-weight: 700; }

.related { margin-top: 26px; padding: 0 6px; }
.related h2 { margin: 0 0 8px; font-size: 18px; }
.related ul { margin: 0; padding-left: 20px; }
.related a { font-weight: 700; }

.help-contact { margin-top: 26px; padding: 22px 24px; }
.help-contact h2 { margin: 0 0 6px; font-size: 20px; }
.help-contact p { margin: 0; }

/* Language switcher (only on the Help Center pages, once there's more than one language) */
.lang-switch { position: relative; }
.lang-switch summary { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: var(--r-pill); color: var(--muted); font-size: 14px; font-weight: 700; cursor: pointer; list-style: none; }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover, .lang-switch[open] summary { color: var(--ink); background: var(--glass); }
.lang-switch .lang-code { display: none; }
.lang-switch ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; min-width: 200px; margin: 0; padding: 6px; list-style: none; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-raised); }
.site-header nav .lang-switch li a { display: block; padding: 10px 12px; border-radius: 12px; color: var(--ink); font-size: 15px; }
.site-header nav .lang-switch li a:hover { background: var(--surface-alt); }
.site-header nav .lang-switch li a[aria-current] { color: var(--accent); }
.lang-note { margin-top: 14px; }

@media (max-width: 720px) {
  .cat-grid { grid-template-columns: 1fr; }
  .cat, .help-contact { padding: 20px; }
}
@media (max-width: 620px) {
  .help-search { padding: 0 16px; }
  .help-search input { font-size: 16px; }
  .doc .steps li { padding-left: 40px; }
  .lang-switch .lang-name { display: none; }
  .lang-switch .lang-code { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  .results a { transition: none; }
}
