/*
 * Quantum Jobs USA help center (Plan 5). Colours, fonts and light/dark come from portal.css tokens.
 * Diagrams are inline SVG; their classes below map shapes and text to theme tokens.
 */
.h-wrap { max-width: 1120px; margin: 0 auto; padding: var(--sp-6) var(--sp-4) var(--sp-7); display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: var(--sp-7); }
.h-nav { position: sticky; top: 84px; align-self: start; display: grid; gap: 2px; }
.h-nav a { color: var(--text-muted); text-decoration: none; padding: 7px 10px; border-radius: 6px; font-size: 14px; }
.h-nav a:hover { background: var(--hover); color: var(--text); }
.h-nav a[aria-current='true'] { background: var(--raised); color: var(--text); font-weight: 600; }
.h-main { min-width: 0; max-width: 780px; }
.h-lede { color: var(--text-muted); font-size: var(--fs-3); margin: var(--sp-2) 0 var(--sp-3); max-width: 62ch; }
.h-sec { padding: var(--sp-6) 0; border-bottom: 1px solid var(--border); scroll-margin-top: 80px; }
.h-sec:last-of-type { border-bottom: 0; }
.h-sec > h2 { font: 700 var(--fs-4)/1.25 var(--font-head); margin: 0 0 var(--sp-1); }
.h-say { color: var(--text-muted); margin: 0 0 var(--sp-5); max-width: 62ch; }
.h-note { color: var(--text-subtle); font-size: var(--fs-1); margin: var(--sp-3) 0 0; max-width: 70ch; }

/* Topic 1: price cards + chooser */
.h-compare { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.h-plan { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-5); background: var(--surface); display: grid; gap: 14px; align-content: start; }
.h-plan--ppc { border-color: color-mix(in srgb, var(--chart-counted) 55%, var(--border)); }
.h-plan h3 { margin: 0; font: 600 var(--fs-3)/1.2 var(--font-head); }
.h-price { font: 700 30px/1 var(--font-head); color: var(--text); font-variant-numeric: tabular-nums; }
.h-price small { font: 500 14px var(--font-body); color: var(--text-subtle); }
.h-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.h-facts li { display: grid; grid-template-columns: 22px 1fr; gap: var(--sp-2); align-items: start; color: var(--text-muted); font-size: 14px; }
.h-icon svg { width: 20px; height: 20px; color: var(--text-subtle); display: block; }
.h-best { font-size: var(--fs-1); color: var(--text-subtle); border-top: 1px solid var(--raised); padding-top: var(--sp-3); }
.h-best strong { color: var(--text); font-weight: 600; }
.h-new { display: inline-block; font: 600 11px/1 var(--font-body); padding: 4px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-subtle); margin-left: var(--sp-2); vertical-align: 3px; }
.h-chooser { margin-top: var(--sp-4); border: 1px dashed var(--border); border-radius: var(--radius-lg); padding: var(--sp-4) var(--sp-5); display: grid; gap: var(--sp-3); }
.h-chooser h3 { margin: 0; font: 600 var(--fs-2)/1.3 var(--font-head); }
.h-step { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); color: var(--text-muted); }
.h-step p { margin: 0; }
.h-step small { color: var(--text-subtle); }
.h-result { display: grid; gap: var(--sp-3); justify-items: start; }
.h-result p { margin: 0; color: var(--text-muted); }
.h-result strong { color: var(--text); }

/* Diagrams */
.h-fig { margin: 0; }
.h-fig svg { width: 100%; height: auto; display: block; overflow: visible; }
.h-fig figcaption { color: var(--text-subtle); font-size: var(--fs-1); margin-top: var(--sp-3); }
.h-phone { display: none; }
.h-fig .t { font-family: var(--font-body); }
.h-fig .ink { fill: var(--text); }
.h-fig .ink2 { fill: var(--text-muted); }
.h-fig .ink3 { fill: var(--text-subtle); }
.h-fig .acc { fill: var(--accent); }
.h-fig .ln { stroke: var(--text-subtle); fill: none; }
.h-fig .box { fill: var(--surface); stroke: var(--border); }
.h-fig .soft { fill: var(--raised); }
.h-fig .good { fill: color-mix(in srgb, var(--chart-counted) 14%, var(--surface)); stroke: var(--chart-counted); }
.h-fig .goodln { stroke: var(--chart-counted); fill: none; }
.h-fig .gooddot { fill: var(--chart-counted); }
.h-fig .warn { fill: color-mix(in srgb, var(--warning) 12%, var(--surface)); stroke: color-mix(in srgb, var(--warning) 60%, transparent); }
.h-fig .bad { stroke: var(--danger); fill: none; }
.h-fig .grid { stroke: var(--chart-grid); }
.h-fig .area { fill: color-mix(in srgb, var(--chart-counted) 18%, transparent); }
.h-fig .num { fill: var(--text); }
.h-fig .numc { fill: var(--accent-fill); }
.h-fig .numt { fill: var(--on-accent); }

/* Topic 4: slider */
.h-calc { margin-top: var(--sp-4); display: grid; grid-template-columns: 1fr auto; gap: var(--sp-2) var(--sp-5); align-items: center; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-4) var(--sp-5); background: var(--surface); }
.h-calc label { margin: 0; }
.h-calc input { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); }
.h-calc output { font: 700 var(--fs-3)/1.3 var(--font-head); color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }

/* Topic 5: numbered callouts */
.h-callouts { margin: var(--sp-4) 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2) var(--sp-5); counter-reset: c; }
.h-callouts li { counter-increment: c; display: grid; grid-template-columns: 24px 1fr; gap: var(--sp-2); color: var(--text-muted); font-size: 14px; }
.h-callouts li::before { content: counter(c); width: 22px; height: 22px; border-radius: 50%; background: var(--accent-fill); color: var(--on-accent); font: 700 12px/22px var(--font-body); text-align: center; }
.h-callouts strong { color: var(--text); font-weight: 600; }
/* "Why we leave some clicks out" (owner, 2026-11-16). */
.h-why { margin-top: var(--sp-5); }
.h-why h3 { margin: 0 0 var(--sp-2); font: 600 var(--fs-2)/1.3 var(--font-head); }
.h-why .h-say { margin-bottom: var(--sp-3); }
.h-rules { margin: 0; padding-left: 1.2em; display: grid; gap: var(--sp-2); color: var(--text-muted); font-size: 14px; max-width: 70ch; }
.h-rules strong { color: var(--text); font-weight: 600; }

/* Topic 8: FAQ */
.h-faq { display: grid; gap: var(--sp-2); }
.h-faq details { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.h-faq summary { cursor: pointer; padding: var(--sp-3) var(--sp-4); font-weight: 600; color: var(--text); list-style: none; display: flex; justify-content: space-between; gap: var(--sp-3); }
.h-faq summary::-webkit-details-marker { display: none; }
.h-faq summary::after { content: '+'; color: var(--text-subtle); font-weight: 400; }
.h-faq details[open] summary::after { content: '\2212'; }
.h-faq details p { margin: 0; padding: 0 var(--sp-4) var(--sp-4); color: var(--text-muted); max-width: 70ch; }
.h-help { margin-top: var(--sp-6); color: var(--text-muted); }

/* Setup guide (help-ats) */
.h-where { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.h-where div { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-4); background: var(--surface); }
.h-where h3 { margin: 0 0 var(--sp-1); font: 600 var(--fs-2)/1.3 var(--font-head); }
.h-where p { margin: 0; color: var(--text-muted); font-size: 14px; }
.h-guide summary { cursor: pointer; font-weight: 600; color: var(--text); }
.h-md { margin-top: var(--sp-4); color: var(--text-muted); font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.h-md h1, .h-md h2, .h-md h3 { color: var(--text); font-family: var(--font-head); margin: var(--sp-5) 0 var(--sp-2); }
.h-md h1 { font-size: var(--fs-4); } .h-md h2 { font-size: var(--fs-3); } .h-md h3 { font-size: var(--fs-2); }
.h-md pre { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-3); overflow-x: auto; }
.h-md code { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 13px; }
.h-md table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.h-md th, .h-md td { border-bottom: 1px solid var(--border); padding: var(--sp-2); text-align: left; }
.h-md blockquote { margin: 0; padding: var(--sp-2) var(--sp-4); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }

/* One fade-in per diagram where the browser supports scroll-linked animation; none for reduced motion. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .h-fig { animation: h-in linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
    @keyframes h-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
  }
}

@media (max-width: 860px) {
  .h-wrap { grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); padding-top: var(--sp-4); }
  .h-nav { position: static; display: flex; overflow-x: auto; gap: 6px; padding-bottom: var(--sp-1); }
  .h-nav a { white-space: nowrap; border: 1px solid var(--border); border-radius: 999px; }
  .h-compare, .h-where, .h-callouts { grid-template-columns: minmax(0, 1fr); }
  .h-desk { display: none; }
  .h-phone { display: block; }
  .h-calc { grid-template-columns: minmax(0, 1fr); }
  .h-calc output { text-align: left; }
}
