/* gateway-v2/assets/how.css — STOCKERTIM HOW (7 Nov 2026). Prefix hw-. Learn's visual language: the design tokens (st-tokens.css)
   switch dark/light via :root[data-theme="light"] only (never prefers-color-scheme); gold accent from the tokens (#ffcf5e dark,
   #7a5600 light); golden-black buttons with white text. Mobile first; fixed boxes for everything above the fold (no layout shift). */
.hw-body { background: var(--st-page); color: var(--st-text); font-family: var(--st-ui, system-ui, sans-serif); }
.hw [hidden] { display: none !important; }
.hw { display: block; min-height: 60vh; }
.hw-wrap { max-width: 1180px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); }
.hw-sr, .hw-hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hw-ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }

/* the How bar (Learn's bar, How's lockup) */
.hw-bar .lrn-bar-in { display: flex; align-items: center; min-height: 52px; max-width: 1180px; margin: 0 auto; }
.hw-lock { display: inline-flex; align-items: center; gap: 8px; color: var(--st-text); text-decoration: none; font: 600 16px/1 var(--st-ui); white-space: nowrap; }
.hw-lock b { color: var(--st-accent); font-weight: 750; }
.hw-lock img { border-radius: 6px; }
.hw-bar-nav { display: flex; gap: 2px; margin-left: 8px; }
.hw-bar-nav a { padding: 8px 12px; border-radius: 999px; color: var(--st-text-2); text-decoration: none; font: 550 14px/1 var(--st-ui); }
.hw-bar-nav a[aria-current] { color: var(--st-accent); background: var(--st-accent-soft); }
.hw-bar .hw-sf { flex: 1 1 260px; max-width: 420px; margin-left: auto; }
.hw-bar .lrh-bar-search { display: none !important; }
@media (max-width: 860px) { .hw-bar-nav, .hw-bar .hw-sf { display: none; } }

.hw-top { padding: 14px 0 4px; }
.hw-kicker { margin: 0 0 8px; font: 700 12px/1.3 var(--st-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--st-accent); }
.hw-kicker a { color: inherit; text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }
.hw-kicker a:hover { text-decoration: underline; }
.hw-dek { margin: 0 0 16px; max-width: 70ch; color: var(--st-text-2); font: 400 17px/1.55 var(--st-sans); }

/* buttons: the golden-black standard, white text */
.hw-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; font: 650 15px/1 var(--st-ui); cursor: pointer; text-decoration: none; white-space: nowrap;
  color: var(--st-btn-ink, #fff) !important; background: var(--st-btn-bg); border: 1px solid var(--st-btn-line); box-shadow: var(--st-btn-glow); }
.hw-btn:hover { background: var(--st-btn-bg-hov); border-color: #ffcf5e; }
.hw-btn--sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.hw-btn:focus-visible, .hw-tool:focus-visible, .hw-card:focus-visible, .hw-cat:focus-visible, .hw-cty:focus-visible { outline: 2px solid var(--st-focus, #ffcf5e); outline-offset: 2px; }

/* search */
.hw-sf { position: relative; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 4px 0 12px; border: 1px solid var(--st-control-line, var(--st-line)); border-radius: 999px; background: var(--st-surface); }
.hw-sf > .hw-ic { color: var(--st-text-3); }
.hw-sf input[type=search] { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--st-text); font: 400 16px/1 var(--st-ui); outline: none; }
.hw-sf--big { height: 56px; max-width: 720px; padding-left: 16px; }
.hw-sf--big input[type=search] { font-size: 17px; }
.hw-ac { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60; max-height: 60vh; overflow: auto; border: 1px solid var(--st-line); border-radius: 14px; background: var(--st-surface); box-shadow: var(--st-shadow-pop); padding: 6px; }
.hw-ac a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--st-text); text-decoration: none; }
.hw-ac a small { display: block; color: var(--st-text-3); font-size: 12.5px; margin-top: 2px; }
.hw-ac a[aria-selected="true"], .hw-ac a:hover { background: var(--st-accent-soft); }
.hw-ac p { margin: 8px 12px; color: var(--st-text-3); font-size: 14px; }

/* landing */
.hw-hero { padding: 28px 0 8px; }
.hw-hero h1 { margin: 0 0 12px; max-width: 22ch; font: 700 clamp(30px, 6vw, 52px)/1.08 var(--st-serif, var(--st-sans)); letter-spacing: -.01em; }
.hw-ccsel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 16px 0 6px; }
.hw-ccsel label { font: 600 14px/1 var(--st-ui); color: var(--st-text-2); }
.hw-ccsel select, .hw-rep select, .hw-rep textarea { min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--st-control-line, var(--st-line)); background: var(--st-surface); color: var(--st-text); font: 400 15px/1.3 var(--st-ui); }
.hw-trust { display: flex; gap: 8px; align-items: center; margin: 14px 0 0; color: var(--st-text-2); font-size: 14px; }
.hw-trust .hw-ic { color: var(--st-accent); }
.hw-sec { margin: 34px 0 0; }
.hw-sec > h2, .hw-phead h1 { margin: 0 0 14px; font: 700 22px/1.25 var(--st-sans); }
.hw-phead { padding: 18px 0 4px; }
.hw-phead h1 { font-size: clamp(26px, 5vw, 40px); }
.hw-phead .hw-sf { max-width: 620px; }
.hw-cats, .hw-ctys, .hw-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .hw-cats, .hw-grid { grid-template-columns: repeat(2, 1fr); } .hw-ctys { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .hw-cats, .hw-grid { grid-template-columns: repeat(3, 1fr); } .hw-ctys { grid-template-columns: repeat(5, 1fr); } }
.hw-cat, .hw-cty, .hw-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--st-line); border-radius: 16px; background: var(--st-card, var(--st-surface)); color: var(--st-text); text-decoration: none; transition: border-color var(--st-dur-2, .2s); }
.hw-cat:hover, .hw-cty:hover, .hw-card:hover { border-color: var(--st-accent-line, #ffcf5e); }
.hw-cat b, .hw-cty b, .hw-card-t { font: 650 16.5px/1.3 var(--st-sans); }
.hw-cat span, .hw-card-d { color: var(--st-text-2); font: 400 14.5px/1.45 var(--st-ui, system-ui, sans-serif); }
.hw-cat small, .hw-cty small, .hw-card-m { color: var(--st-text-3); font-size: 13px; margin-top: auto; }
.hw-cty { flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px 14px; }
.hw-cty small { width: 100%; }
.hw-cc { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 5px; border-radius: 6px; background: var(--st-accent-soft); color: var(--st-accent); font: 700 11.5px/1 var(--st-mono, monospace); letter-spacing: .04em; margin-right: 6px; }
.hw-card-k { display: flex; align-items: center; color: var(--st-text-3); font: 600 12.5px/1.2 var(--st-ui); text-transform: uppercase; letter-spacing: .05em; }
.hw-pillars { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .hw-pillars { grid-template-columns: repeat(4, 1fr); } }
.hw-pillars li { padding: 14px 16px; border-left: 3px solid var(--st-accent); background: var(--st-surface); border-radius: 0 12px 12px 0; }
.hw-pillars b { display: block; margin-bottom: 4px; }
.hw-pillars span { color: var(--st-text-2); font-size: 14.5px; line-height: 1.45; }
.hw-also { margin-top: 16px; color: var(--st-text-2); }
.hw-also a { color: var(--st-accent); }

/* the guide */
.hw-gh { padding: 14px 0 6px; border-bottom: 1px solid var(--st-rule, var(--st-line)); }
.hw-gh h1 { margin: 0 0 10px; font: 700 clamp(28px, 5.4vw, 44px)/1.12 var(--st-serif, var(--st-sans)); max-width: 30ch; }
.hw-facts { list-style: none; margin: 4px 0 14px; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px; }
@media (min-width: 760px) { .hw-facts { grid-template-columns: repeat(5, auto); justify-content: start; } }
.hw-facts span { display: block; color: var(--st-text-3); font: 600 11.5px/1.2 var(--st-ui); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.hw-facts b { font: 600 14.5px/1.35 var(--st-ui); }
.hw-status { display: inline-flex; gap: 5px; align-items: center; color: var(--st-up, #4ade80); }
.hw-status.is-pending { color: var(--st-accent); }
.hw-note { margin: 10px 0; padding: 10px 14px; border-radius: 12px; background: var(--st-accent-soft); border: 1px solid var(--st-accent-line, transparent); color: var(--st-text); font-size: 14.5px; }
.hw-langs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 10px; }
.hw-langs-k { color: var(--st-text-3); font: 600 13px/1 var(--st-ui); margin-right: 2px; }
.hw-langs a { padding: 6px 10px; border-radius: 999px; border: 1px solid var(--st-line); color: var(--st-text-2); text-decoration: none; font-size: 13.5px; }
.hw-langs a[aria-current] { border-color: var(--st-accent); color: var(--st-accent); }
.hw-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 12px; }
.hw-tool { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--st-line); background: transparent; color: var(--st-text-2); font: 550 13.5px/1 var(--st-ui); text-decoration: none; cursor: pointer; }
.hw-tool:hover { color: var(--st-text); border-color: var(--st-accent-line, var(--st-line-2)); }
.hw-prog { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; color: var(--st-text-2); font-size: 13.5px; }
.hw-prog-bar { width: 96px; height: 6px; border-radius: 99px; background: var(--st-line); overflow: hidden; }
.hw-prog-bar i { display: block; height: 100%; background: var(--st-accent); transition: width .3s; }
.hw-gbody { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 1000px) { .hw-gbody { grid-template-columns: 220px minmax(0, 1fr); gap: 40px; } .hw-toc { position: sticky; top: 76px; align-self: start; } }
.hw-toc { padding-top: 18px; }
.hw-toc-h { margin: 0 0 6px; font: 700 12px/1 var(--st-ui); text-transform: uppercase; letter-spacing: .08em; color: var(--st-text-3); }
.hw-toc ol { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 6px; }
@media (min-width: 1000px) { .hw-toc ol { display: block; } .hw-toc li a { display: block; padding: 6px 0; } }
.hw-toc a { color: var(--st-text-2); text-decoration: none; font-size: 14px; }
@media (max-width: 999px) { .hw-toc a { display: inline-block; padding: 6px 10px; border: 1px solid var(--st-line); border-radius: 999px; } }
.hw-toc a:hover { color: var(--st-accent); }
.hw-gmain { min-width: 0; max-width: 760px; }
.hw-gmain .hw-sec { margin-top: 28px; scroll-margin-top: 80px; }
.hw-gmain p, .hw-gmain li, .hw-gmain dd { font: 400 16.5px/1.6 var(--st-sans); }
.hw-hint { color: var(--st-text-3); font-size: 14px !important; margin: -6px 0 12px; }
.hw-cite { font-size: 11px; margin-left: 1px; }
.hw-cite a { color: var(--st-accent); text-decoration: none; padding: 0 2px; }
/* Dictionary links in the guide's prose (11 Nov 2026): the reading colour with a gold dotted underline, so the official links stay the strong ones */
.hw-sec a.st-dict-link { color: inherit; text-decoration: underline dotted var(--st-accent); text-underline-offset: 3px; }
.hw-sec a.st-dict-link:hover, .hw-sec a.st-dict-link:focus-visible { color: var(--st-accent); text-decoration-style: solid; }
.hw-fig { font-weight: 650; color: var(--st-text); }
.hw-check { list-style: none; margin: 0; padding: 0; }
.hw-check li { padding: 6px 0; border-bottom: 1px solid var(--st-rule, var(--st-line)); }
.hw-check label, .hw-done { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.hw-check input, .hw-done input { width: 20px; height: 20px; margin-top: 4px; accent-color: #ffcf5e; flex: none; }
.hw-steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.hw-step { margin: 0 0 16px; padding: 16px; border: 1px solid var(--st-line); border-radius: 16px; background: var(--st-card, var(--st-surface)); scroll-margin-top: 80px; }
.hw-step.is-done { border-color: var(--st-accent-line, #ffcf5e); }
.hw-step-h { display: flex; align-items: flex-start; gap: 12px; }
.hw-step-h h3 { flex: 1; margin: 4px 0 0; font: 650 18px/1.3 var(--st-sans); }
.hw-step-n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--st-btn-bg); border: 1px solid var(--st-btn-line); color: #fff; font: 700 15px/1 var(--st-ui); flex: none; }
.hw-step.is-done .hw-step-n { background: #ffcf5e; color: #111; }
.hw-done { margin-left: auto; font: 550 13.5px/1 var(--st-ui); color: var(--st-text-2); align-items: center; }
.hw-done input { margin-top: 0; }
.hw-step-d { margin: 10px 0 0; display: grid; gap: 10px; }
.hw-step-d > div { display: grid; grid-template-columns: 1fr; gap: 2px; }
@media (min-width: 640px) { .hw-step-d > div { grid-template-columns: 150px 1fr; gap: 12px; } }
.hw-step-d dt { color: var(--st-text-3); font: 650 12.5px/1.6 var(--st-ui); text-transform: uppercase; letter-spacing: .05em; }
.hw-step-d dd { margin: 0; }
.hw-step-d ul, .hw-mist ul, .hw-list { margin: 0; padding-left: 20px; }
.hw-off { display: inline-flex; gap: 6px; align-items: center; color: var(--st-accent); font-weight: 600; word-break: break-all; }
.hw-mist { margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--st-dn, #f87171) 9%, transparent); }
.hw-mist-h { margin: 0 0 4px !important; font: 700 13px/1.3 var(--st-ui) !important; color: var(--st-text-2); }
.hw-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font: 650 11.5px/1.5 var(--st-ui); white-space: nowrap; vertical-align: 1px; border: 1px solid transparent; }
.hw-badge--official { color: var(--st-up, #4ade80); border-color: currentColor; }
.hw-badge--institutional { color: var(--st-text-2); border-color: var(--st-line-2, var(--st-line)); }
.hw-badge--estimated { color: var(--st-accent); border-color: currentColor; }
.hw-badge--awaiting { color: var(--st-text-3); border-color: var(--st-line); border-style: dashed; }
.hw-tbl-w { overflow-x: auto; }
.hw-tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.hw-tbl th, .hw-tbl td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--st-rule, var(--st-line)); vertical-align: top; }
.hw-tbl th { color: var(--st-text-3); font: 650 12.5px/1.3 var(--st-ui); text-transform: uppercase; letter-spacing: .05em; }
.hw-tbl small, .hw-list small, .hw-src small { display: block; color: var(--st-text-3); font-size: 12.5px; }
.hw-probs div { padding: 10px 0; border-bottom: 1px solid var(--st-rule, var(--st-line)); }
.hw-probs dt { font-weight: 650; }
.hw-probs dd { margin: 4px 0 0; color: var(--st-text-2); }
.hw-faq { padding: 10px 0; border-bottom: 1px solid var(--st-rule, var(--st-line)); }
.hw-faq summary { cursor: pointer; font: 650 16.5px/1.4 var(--st-sans); }
.hw-faq p { margin: 8px 0 0; color: var(--st-text-2); }
.hw-src { padding-left: 22px; }
.hw-src li { margin: 0 0 10px; }
.hw-src a { color: var(--st-accent); font-weight: 600; }
.hw-src-p { color: var(--st-text-2); font-size: 14px; }
.hw-disc { margin-top: 28px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--st-line); background: var(--st-surface); }
.hw-disc p { margin: 0; font-size: 14.5px !important; color: var(--st-text-2); }
.hw-learn a { color: var(--st-accent); }
.hw-rep { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; max-width: 560px; }
.hw-rep label, .hw-rep select, .hw-rep textarea { min-width: 0; max-width: 100%; width: 100%; box-sizing: border-box; }
.hw-rep label { display: grid; gap: 6px; font: 600 14px/1.3 var(--st-ui); color: var(--st-text-2); }
.hw-rep textarea { padding: 10px 12px; min-height: 90px; resize: vertical; }
.hw-rep .hw-btn { justify-self: start; }
.hw-rep-ok { margin: 0; color: var(--st-text-2); font-size: 14px; min-height: 1.4em; }
[dir="rtl"] .hw-done, [dir="rtl"] .hw-prog { margin-left: 0; margin-right: auto; }
[dir="rtl"] .hw-pillars li { border-left: 0; border-right: 3px solid var(--st-accent); border-radius: 12px 0 0 12px; }
[dir="rtl"] .hw-tbl th, [dir="rtl"] .hw-tbl td { text-align: right; }
[dir="rtl"] .hw-src, [dir="rtl"] .hw-list, [dir="rtl"] .hw-step-d ul, [dir="rtl"] .hw-mist ul { padding-left: 0; padding-right: 20px; }

@media print {
  .site-header, .lrn-bar, .hw-toc, .hw-tools, .hw-report, .hw-langs, footer, .st-footer, .hw-sf, #h-menu, .hw-related, [data-hw-print-hide] { display: none !important; }
  .hw-body { background: #fff; color: #000; }
  .hw-step, .hw-disc { border-color: #999; background: #fff; break-inside: avoid; }
  .hw-gbody { display: block; }
  .hw-off::after { content: " (" attr(href) ")"; font-weight: 400; color: #333; }
  a { color: #000 !important; }
}
.hw-rep .hw-hp, .hw-rep .hw-hp input { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden; clip: rect(0 0 0 0); left: 0; }
/* right-to-left (Arabic): <html dir="rtl"> for the language, but the shared site chrome (skip link, drawer, cookie banner, footer) is
   English and positioned for left-to-right (large negative offsets that RTL would turn into a sideways scroll): it stays LTR, and
   How's own content reads right to left */
html[dir="rtl"] body { direction: ltr; }
html[dir="rtl"] .hw-wrap { direction: rtl; }

/* Korean and Japanese pages (8 Nov 2026): no tracking on CJK labels, Korean breaks between words, Japanese with strict kinsoku. */
html[lang="ja"] body *, html[lang="ko"] body * { letter-spacing: 0 !important; }
html[lang="ko"] body { word-break: keep-all; overflow-wrap: anywhere; }
html[lang="ja"] body { line-break: strict; overflow-wrap: anywhere; }
