/* ==========================================================================
   score8-m.org — Score8 Gaming Knowledge (Indonesia)
   Knowledge-base design system written for this site only.
   Same Score8 colour family; documentation-style composition:
   taxonomy band, three-column docs layout, monospace labels,
   definition boxes, comparison / myth modules, glossary entries.

   1 Tokens  2 Base  3 Header & taxonomy  4 Drawer  5 Buttons & links
   6 Home  7 Docs layout  8 Components  9 Footer  10 Utilities & print
   ========================================================================== */

/* 1 Tokens ---------------------------------------------------------------- */
:root {
  --bg: #05070B;
  --bg-deep: #020305;
  --surface: #090E18;
  --surface-2: #0D1420;
  --navy: #071A33;
  --navy-light: #0D2A4D;
  --red: #E31B23;
  --red-hover: #FF2D35;
  --red-ink: #FF6A6F;           /* red for small text on dark, AA contrast */
  --text: #FFFFFF;
  --text-secondary: #B7C0CC;
  --muted: #8C97A7;             /* lifted from #7F8A99 for AA on surfaces */
  --border: rgba(255, 255, 255, .08);
  --line: rgba(255, 255, 255, .13);
  --blue-ink: #8FB7FF;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;

  --wrap: 1360px;
  --pad: clamp(16px, 4vw, 40px);
  --gap: clamp(16px, 2.4vw, 28px);
  --r: 6px;
  --header-h: 64px;
  color-scheme: dark;
}

/* 2 Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 130px; }
body {
  margin: 0; min-width: 320px;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--text); font: 400 1rem/1.7 var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
p, ul, ol, dl, figure, h1, h2, h3, h4 { margin: 0; }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.015em; line-height: 1.2; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--red-hover); outline-offset: 3px; border-radius: 2px; }
main:focus { outline: none; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--red); color: #fff; font-weight: 700; border-radius: var(--r); text-decoration: none; }
.skip:focus { top: 12px; }
.lbl {
  display: block; font: 600 .7rem/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--red-ink);
}
.ico { width: 1em; height: 1em; flex: none; }
code, kbd { font-family: var(--mono); font-size: .92em; }

/* 3 Header & taxonomy band ------------------------------------------------ */
.top { position: sticky; top: 0; z-index: 50; background: rgba(5, 7, 11, .97); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(8px)) {
  .top { background: rgba(5, 7, 11, .9); }
  .top::before { content: ""; position: absolute; inset: 0; z-index: -1; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
}
.top__bar { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand img { width: auto; height: 28px; }
.brand__tag {
  font: 600 .66rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-secondary);
  border: 1px solid var(--line); border-radius: 4px; padding: 4px 6px;
}
.primary { display: none; margin-left: auto; }
.primary ul { list-style: none; padding: 0; display: flex; gap: 2px; }
.primary a {
  display: block; padding: 8px 11px; border-radius: var(--r); text-decoration: none;
  font-size: .9rem; font-weight: 500; color: var(--text-secondary);
}
.primary a:hover { color: var(--text); background: var(--surface-2); }
.primary a[aria-current] { color: var(--text); box-shadow: inset 0 -2px 0 var(--red); border-radius: var(--r) var(--r) 0 0; }
.guide-btn {
  display: none; align-items: center; gap: 8px; padding: 9px 14px; border-radius: var(--r);
  background: var(--navy-light); border: 1px solid rgba(143, 183, 255, .28); color: var(--text);
  font-size: .88rem; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.guide-btn .ico { color: var(--red-ink); width: 18px; height: 18px; }
.guide-btn:hover { background: #12355F; border-color: rgba(143, 183, 255, .5); }
.account-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 11px;
  border: 1px solid transparent; border-radius: var(--r); font-size: .82rem; font-weight: 700;
  text-decoration: none; white-space: nowrap;
}
.account-btn--register { background: var(--red); border-color: var(--red); color: #fff; }
.account-btn--register:hover { background: var(--red-hover); border-color: var(--red-hover); }
.account-btn--login { background: var(--surface); border-color: var(--line); color: var(--text); }
.account-btn--login:hover { background: var(--surface-2); border-color: rgba(255, 255, 255, .35); }
.menu-btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: var(--r);
  font: 600 .85rem/1 var(--sans); cursor: pointer;
}
.menu-btn__icon, .menu-btn__icon::before, .menu-btn__icon::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s; }
.menu-btn__icon { position: relative; }
.menu-btn__icon::before, .menu-btn__icon::after { content: ""; position: absolute; left: 0; }
.menu-btn__icon::before { top: -6px; }
.menu-btn__icon::after { top: 6px; }
.drawer-open .menu-btn__icon { background: transparent; }
.drawer-open .menu-btn__icon::before { transform: translateY(6px) rotate(45deg); }
.drawer-open .menu-btn__icon::after { transform: translateY(-6px) rotate(-45deg); }
.no-js .menu-btn { display: none; }

.concepts { border-top: 1px solid var(--border); background: var(--bg-deep); }
.concepts__in { display: flex; align-items: center; gap: 14px; }
.concepts__label { flex: none; font: 600 .68rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-right: 14px; border-right: 1px solid var(--line); }
.concepts ul {
  list-style: none; padding: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
  padding-right: 40px; min-width: 0;
}
.concepts ul::-webkit-scrollbar { display: none; }
.concepts a {
  display: block; white-space: nowrap; padding: 10px 10px; font: 500 .78rem/1.2 var(--mono); color: var(--text-secondary); text-decoration: none;
  border-bottom: 2px solid transparent;
}
.concepts a:hover { color: var(--text); }
.concepts a[aria-current] { color: var(--text); border-bottom-color: var(--red); }

@media (min-width: 1140px) {
  .primary { display: block; }
  .guide-btn { display: inline-flex; }
  .menu-btn { display: none; }
  .concepts ul { -webkit-mask-image: none; mask-image: none; padding-right: 0; flex-wrap: wrap; }
}

/* 4 Drawer ---------------------------------------------------------------- */
.drawer { display: none; }
html.js.drawer-open .drawer {
  display: block; position: fixed; inset: var(--header-h) 0 0; z-index: 49; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); border-top: 1px solid var(--line);
}
html.drawer-open body { overflow: hidden; }
html.js.drawer-open .concepts { display: none; }
.drawer__in { display: grid; gap: 22px; padding-block: 22px 48px; grid-template-columns: 1fr; }
.drawer__home { font-weight: 700; text-decoration: none; padding: 10px 0; border-bottom: 1px solid var(--line); }
.drawer__group ul { list-style: none; padding: 0; margin-top: 6px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 16px; }
.drawer__group a { display: block; padding: 10px 0; text-decoration: none; color: var(--text-secondary); border-bottom: 1px solid var(--border); }
.drawer__group a[aria-current="page"] { color: var(--text); font-weight: 600; box-shadow: inset 3px 0 0 var(--red); padding-left: 10px; }
@media (min-width: 1140px) { html.js.drawer-open .drawer { display: none; } }

/* 5 Buttons & links ------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: var(--r); font-weight: 600; font-size: .95rem; text-decoration: none; border: 1px solid transparent;
  transition: background-color .15s, border-color .15s;
}
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-hover); }
.btn--ghost { border-color: var(--line); color: var(--text); background: var(--surface); }
.btn--ghost:hover { border-color: rgba(255, 255, 255, .35); }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .92rem; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--red); padding-bottom: 2px; }
.more .ico { color: var(--red-ink); transition: transform .15s; }
.more:hover .ico { transform: translateX(3px); }

/* 6 Home ------------------------------------------------------------------ */
.hero { padding-block: clamp(36px, 6vw, 80px) clamp(40px, 6vw, 72px); border-bottom: 1px solid var(--line); }
.hero__grid { display: grid; gap: clamp(28px, 4vw, 56px); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 600 .74rem/1 var(--mono); letter-spacing: .16em; color: var(--text-secondary); }
.eyebrow::before { content: ""; width: 8px; height: 8px; background: var(--red); border-radius: 50%; }
.hero h1 { margin-top: 18px; font-size: clamp(2rem, 1.2rem + 3.4vw, 3.5rem); line-height: 1.08; letter-spacing: -.03em; }
.hero h1 span { color: var(--text-secondary); font-weight: 600; }
.hero__lead { margin-top: 18px; font-size: clamp(1.02rem, .95rem + .3vw, 1.15rem); color: var(--text-secondary); max-width: 60ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero__scope { margin-top: 26px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.hero__scope div { padding: 12px 14px; background: var(--surface); border-right: 1px solid var(--border); }
.hero__scope dt { font: 600 .66rem/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hero__scope dd { margin: 4px 0 0; font-size: .9rem; font-weight: 600; }
.hero__fig { position: relative; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--navy); }
.hero__fig figcaption { padding: 10px 14px; font: 500 .74rem/1.4 var(--mono); color: var(--muted); border-top: 1px solid var(--line); background: var(--surface); }
@media (min-width: 640px) {
  .hero__account-actions, .hero__learning-actions { display: contents; }
}
@media (max-width: 639px) {
  .hero { padding-block: 28px 40px; }
  .hero h1 { margin-top: 14px; font-size: clamp(1.9rem, 7.5vw, 2.35rem); }
  .hero__lead { margin-top: 14px; font-size: 1rem; line-height: 1.55; }
  .hero__actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 20px; }
  .hero__account-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hero__learning-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .hero__actions .btn { width: 100%; min-width: 0; min-height: 46px; padding-inline: 12px; }
  .hero__scope { grid-template-columns: 1fr; margin-top: 20px; }
  .hero__scope div { display: grid; grid-template-columns: 78px minmax(0, 1fr); align-items: baseline; gap: 10px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--border); }
  .hero__scope div:last-child { border-bottom: 0; }
  .hero__scope dd { margin: 0; font-size: .88rem; }
}
@media (min-width: 980px) { .hero__grid { grid-template-columns: 1.05fr .95fr; } }

.module { padding-block: clamp(48px, 7vw, 88px); border-bottom: 1px solid var(--border); }
.module--alt { background: linear-gradient(180deg, rgba(7, 26, 51, .45), rgba(7, 26, 51, .1)); }
.mhead { display: grid; gap: 10px 32px; margin-bottom: clamp(24px, 3vw, 36px); }
.mhead__idx { font: 600 .74rem/1 var(--mono); letter-spacing: .12em; color: var(--red-ink); display: flex; gap: 10px; align-items: center; }
.mhead__idx::after { content: ""; height: 1px; width: 48px; background: var(--line); }
.mhead h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); }
.mhead p { color: var(--text-secondary); max-width: 64ch; }
@media (min-width: 900px) {
  .mhead { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
  .mhead__idx { grid-column: 1 / -1; }
}
.split { display: grid; gap: clamp(24px, 4vw, 48px); align-items: start; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--wide { grid-template-columns: 1.2fr .8fr; }
}
.split__text > * + * { margin-top: 14px; }
.split__text p { color: var(--text-secondary); }
.split__text h3 { font-size: 1.15rem; margin-top: 22px; }

.dgrid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; grid-template-columns: 1fr; }
.dgrid > div { background: var(--surface); padding: 20px 22px; }
.dgrid dt { font-weight: 700; font-size: 1.05rem; display: flex; align-items: baseline; gap: 10px; }
.dgrid dt .lbl { color: var(--muted); }
.dgrid dd { margin: 8px 0 0; color: var(--text-secondary); font-size: .95rem; }
.dgrid dd a { color: var(--text); }
@media (min-width: 640px) { .dgrid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .dgrid--3 { grid-template-columns: repeat(3, 1fr); } }

.edstd { display: grid; gap: 16px; counter-reset: ed; }
.edstd li { list-style: none; counter-increment: ed; padding: 18px 20px 18px 64px; position: relative; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.edstd li::before { content: counter(ed, decimal-leading-zero); position: absolute; left: 20px; top: 18px; font: 600 .85rem/1.5 var(--mono); color: var(--red-ink); }
.edstd strong { display: block; }
.edstd span { color: var(--text-secondary); font-size: .95rem; }
@media (min-width: 800px) { .edstd { grid-template-columns: 1fr 1fr; } }
.edstd { padding: 0; }

/* 7 Docs layout ----------------------------------------------------------- */
.doc { display: grid; gap: 32px; padding-block: 24px 72px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "body" "aside" "nav"; }
.doc-body { grid-area: body; min-width: 0; }
.doc-aside { grid-area: aside; }
.doc-nav { grid-area: nav; }
@media (min-width: 1000px) {
  .doc { grid-template-columns: 220px minmax(0, 1fr); grid-template-areas: "nav body" "nav aside"; column-gap: 48px; padding-top: 32px; }
}
@media (min-width: 1300px) {
  .doc { grid-template-columns: 220px minmax(0, 1fr) 240px; grid-template-areas: "nav body aside"; }
}
.tree { border: 1px solid var(--line); border-radius: var(--r); padding: 18px; background: var(--surface); align-self: start; }
.tree__group + .tree__group { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.tree ul { list-style: none; padding: 0; margin-top: 6px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tree a { display: block; padding: 7px 10px; margin-left: -10px; font-size: .9rem; text-decoration: none; color: var(--text-secondary); border-radius: 4px; }
.tree a:hover { color: var(--text); background: var(--surface-2); }
.tree a[aria-current="page"] { color: var(--text); background: var(--navy-light); box-shadow: inset 3px 0 0 var(--red); font-weight: 600; }
@media (min-width: 1000px) {
  .tree { position: sticky; top: 130px; max-height: calc(100vh - 150px); overflow-y: auto; background: transparent; border: 0; padding: 0; }
  .tree ul { grid-template-columns: 1fr; }
}

.doc-head { padding-bottom: 24px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.crumbs ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; font: 500 .76rem/1.5 var(--mono); color: var(--muted); }
.crumbs li + li::before { content: "/"; margin: 0 8px; color: var(--line); }
.crumbs a { color: var(--text-secondary); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs [aria-current] { color: var(--text); }
.doc-head .lbl { margin-top: 22px; }
.doc-head h1 { margin-top: 10px; font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.9rem); letter-spacing: -.025em; line-height: 1.1; }
.doc-head .lead { margin-top: 14px; font-size: clamp(1.03rem, .98rem + .25vw, 1.15rem); color: var(--text-secondary); max-width: 68ch; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding: 0; list-style: none; }
.doc-meta li { font: 500 .74rem/1 var(--mono); color: var(--text-secondary); border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px; }
.doc-meta b { color: var(--muted); font-weight: 500; margin-right: 4px; }

.doc-aside__in { border: 1px solid var(--line); border-radius: var(--r); padding: 18px; background: var(--surface); }
@media (min-width: 1300px) { .doc-aside__in { position: sticky; top: 130px; } }
.toc { list-style: none; padding: 0; margin-top: 10px; counter-reset: t; }
.toc li { counter-increment: t; }
.toc a { display: grid; grid-template-columns: 26px 1fr; padding: 6px 0; font-size: .88rem; color: var(--text-secondary); text-decoration: none; line-height: 1.4; }
.toc a::before { content: counter(t, decimal-leading-zero); font: 500 .74rem/1.6 var(--mono); color: var(--muted); }
.toc a:hover { color: var(--text); }
.facts { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.facts dt { font: 600 .66rem/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-size: .88rem; }

/* Prose */
.prose { max-width: 74ch; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { margin-top: 2.2em; font-size: clamp(1.35rem, 1.15rem + .8vw, 1.7rem); scroll-margin-top: 130px; display: flex; gap: 12px; align-items: baseline; }
.prose h2::before { content: "§"; font: 600 .95rem/1 var(--mono); color: var(--red-ink); }
.prose h3 { margin-top: 1.6em; font-size: 1.12rem; }
.prose p, .prose li { color: #D3D9E2; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--red-ink); }
.prose a { color: var(--text); text-decoration-color: var(--red); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong { color: var(--text); }
.prose .answer { font-size: 1.07rem; color: var(--text); padding-left: 16px; border-left: 3px solid var(--red); }
.prose .fig, .prose .tbl, .prose .defbox, .prose .callout, .prose .formula, .prose .myth, .prose .compare, .prose .keypoints, .prose .steps, .prose .gloss { margin-top: 1.6em; margin-bottom: 1.6em; }

/* 8 Components ------------------------------------------------------------ */
.fig { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--navy); }
.fig figcaption { padding: 10px 14px; font-size: .84rem; color: var(--text-secondary); background: var(--surface); border-top: 1px solid var(--line); }
.fig figcaption .lbl { display: inline; margin-right: 6px; }

.defbox { position: relative; border: 1px solid rgba(143, 183, 255, .25); border-radius: var(--r); padding: 18px 20px 18px 22px; background: linear-gradient(135deg, var(--navy), var(--surface)); }
.defbox::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; background: var(--red); border-radius: 0 3px 3px 0; }
.defbox .lbl { color: var(--blue-ink); }
.defbox__term { margin-top: 6px; font-size: 1.2rem; font-weight: 700; }
.defbox__term dfn { font-style: normal; }
.defbox__sub { font-weight: 400; color: var(--text-secondary); font-size: 1rem; }
.defbox__text { margin-top: 6px; color: var(--text) !important; }

.keypoints { border: 1px dashed var(--line); border-radius: var(--r); padding: 16px 18px; background: rgba(9, 14, 24, .7); }
.keypoints ul { margin-top: 8px; padding-left: 0; list-style: none; }
.keypoints li { position: relative; padding-left: 22px; font-size: .96rem; }
.keypoints li::before { content: "→"; position: absolute; left: 0; color: var(--red-ink); font-family: var(--mono); }

.callout { display: grid; grid-template-columns: 22px 1fr; gap: 12px; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; background: var(--surface); }
.callout__ico { width: 22px; height: 22px; color: var(--blue-ink); margin-top: 2px; }
.callout--warn { border-color: rgba(227, 27, 35, .45); background: linear-gradient(135deg, rgba(227, 27, 35, .1), var(--surface)); }
.callout--warn .callout__ico { color: var(--red-ink); }
.callout--law { border-color: rgba(255, 255, 255, .22); }
.callout--law .callout__ico { color: var(--text-secondary); }
.callout__title { font-weight: 700; margin-bottom: 4px; }
.callout p { color: var(--text-secondary); font-size: .95rem; }
.callout p + p { margin-top: 8px; }
.callout a { color: var(--text); }

.formula { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-deep); padding: 16px 18px; display: grid; gap: 6px; overflow-x: auto; }
.formula code { display: block; font-size: .92rem; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }

.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.tbl table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 520px; }
.tbl--narrow table { min-width: 0; }
.tbl th, .tbl td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl thead th { font: 600 .7rem/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
.tbl tbody th { font-weight: 600; color: var(--text); }
.tbl td { color: var(--text-secondary); }
.tbl tr:last-child th, .tbl tr:last-child td { border-bottom: 0; }
.tbl .num { font-family: var(--mono); color: var(--text); white-space: nowrap; }

.myth { display: grid; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.myth > div { padding: 18px 20px; }
.myth__m { background: linear-gradient(135deg, rgba(227, 27, 35, .14), rgba(227, 27, 35, .04)); border-bottom: 1px solid var(--line); }
.myth__f { background: var(--surface); }
.myth__f .lbl { color: var(--blue-ink); }
.myth__q { margin-top: 6px; font-size: 1.08rem; font-weight: 600; color: var(--text) !important; }
.myth__f p:not(.lbl) { margin-top: 6px; }
.myth__link { margin-top: 12px !important; }
@media (min-width: 760px) {
  .myth { grid-template-columns: 2fr 3fr; }
  .myth__m { border-bottom: 0; border-right: 1px solid var(--line); }
}
.myths { display: grid; gap: 14px; }

.compare { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.compare__col { background: var(--surface); padding: 18px 20px; }
.compare__col h3 { margin-top: 6px !important; font-size: 1.08rem; }
.compare__col ul { margin-top: 10px; padding-left: 1.1em; }
.compare__col li { font-size: .93rem; }
@media (min-width: 700px) { .compare { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } }

.steps { list-style: none; padding: 0 !important; counter-reset: s; display: grid; gap: 0; border-left: 1px solid var(--line); margin-left: 14px; }
.steps li { counter-increment: s; position: relative; padding: 0 0 18px 28px; margin: 0 !important; }
.steps li::before { content: counter(s); position: absolute; left: -15px; top: 0; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--navy-light); border: 1px solid rgba(143, 183, 255, .35); font: 600 .8rem/1 var(--mono); color: var(--text); }
.steps strong { display: block; color: var(--text); line-height: 1.9; }
.steps span { display: block; color: var(--text-secondary); font-size: .95rem; }

.cards { list-style: none; padding: 0; display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .cards--3 { grid-template-columns: repeat(3, 1fr); } .cards--4 { grid-template-columns: repeat(4, 1fr); } }
.card {
  position: relative; display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px 44px 18px 18px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); text-decoration: none; transition: border-color .15s, background-color .15s;
}
.card:hover { border-color: rgba(255, 255, 255, .3); background: var(--surface-2); }
.card__t { font-weight: 700; font-size: 1.04rem; line-height: 1.3; }
.card__d { color: var(--text-secondary); font-size: .9rem; line-height: 1.55; }
.card__go { position: absolute; right: 16px; top: 18px; width: 18px; height: 18px; color: var(--red-ink); transition: transform .15s; }
.card:hover .card__go { transform: translateX(3px); }
.prose .cards { padding-left: 0; }
.prose .cards li + li { margin-top: 0; }

.related { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.related h2 { font-size: 1.3rem; margin-bottom: 18px; }
.related h2 .lbl { margin-bottom: 6px; }

.gloss { display: grid; gap: 0; border-top: 1px solid var(--line); }
.gloss__item { display: grid; gap: 4px 24px; padding: 18px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 130px; }
.gloss dt { font-weight: 700; font-size: 1.08rem; }
.gloss dfn { font-style: normal; }
.gloss__en { display: block; font: 500 .74rem/1.5 var(--mono); color: var(--muted); letter-spacing: .04em; }
.gloss dd { margin: 0; color: #D3D9E2; }
.gloss dd a { color: var(--text); text-decoration-color: var(--red); text-underline-offset: 3px; white-space: nowrap; }
@media (min-width: 760px) { .gloss__item { grid-template-columns: 200px 1fr; } }
.alpha { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 6px; }
.alpha li { margin: 0 !important; }
.alpha a { display: block; padding: 6px 10px; border: 1px solid var(--line); border-radius: 4px; font: 500 .8rem/1 var(--mono); text-decoration: none !important; }
.alpha a:hover { border-color: var(--red); }

.byline { margin-top: 40px; display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--r); background: rgba(9, 14, 24, .7); font-size: .9rem; color: var(--text-secondary); }
.byline img { width: 40px; height: 40px; border-radius: 8px; flex: none; }
.byline a { color: var(--text); }

.hub-intro { display: grid; gap: 20px; }

/* 404 */
.nf { padding-block: clamp(56px, 10vw, 120px); }
.nf__code { font: 700 clamp(4rem, 12vw, 8rem)/1 var(--mono); color: var(--navy-light); -webkit-text-stroke: 1px rgba(143, 183, 255, .5); }
.nf h1 { margin-top: 16px; font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); }
.nf p { margin-top: 12px; color: var(--text-secondary); max-width: 60ch; }
.nf .cards { margin-top: 28px; }

/* 9 Footer ---------------------------------------------------------------- */
.foot { background: var(--bg-deep); border-top: 1px solid var(--line); padding-block: 48px 28px; }
.foot__top { display: grid; gap: 28px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
.foot__id img { width: auto; height: 28px; }
.foot__id p { margin-top: 14px; color: var(--text-secondary); max-width: 52ch; font-size: .95rem; }
.foot__chips ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.foot__chips a { display: block; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; font: 500 .76rem/1 var(--mono); color: var(--text-secondary); text-decoration: none; }
.foot__chips a:hover { color: var(--text); border-color: rgba(255, 255, 255, .35); }
@media (min-width: 900px) { .foot__top { grid-template-columns: 1fr 1fr; align-items: end; } }
.foot__cols { display: grid; gap: 28px 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-block: 32px; }
@media (min-width: 760px) { .foot__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .foot__cols { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.foot__cols h2 { font: 600 .72rem/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--red-ink); }
.foot__cols ul { list-style: none; padding: 0; margin-top: 12px; }
.foot__cols a { display: inline-block; padding: 5px 0; font-size: .92rem; color: var(--text-secondary); text-decoration: none; }
.foot__cols a:hover { color: var(--text); text-decoration: underline; }
.foot__legal { border-top: 1px solid var(--border); padding-top: 22px; display: grid; gap: 10px; font-size: .84rem; color: var(--muted); }
.foot__legal a { color: var(--text-secondary); }
@media (min-width: 900px) { .foot__legal { grid-template-columns: 1fr auto; gap: 40px; } }

/* 10 Utilities, motion & print -------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  body { background: #fff; color: #000; }
  .top, .drawer, .doc-nav, .doc-aside, .foot, .related, .skip { display: none !important; }
  .doc { display: block; }
  .prose p, .prose li, .tbl td { color: #000; }
  a { color: #000; }
}

/* Home helpers */
.mt { margin-top: 22px; }
.mhead--inline { display: block; margin-bottom: 0; }
.mhead--inline h2 { margin-top: 12px; }
.split__text .keypoints ul { margin-top: 0; }
@media (max-width: 419px) { .brand__tag { display: none; } .top__bar { gap: 6px; } .account-btn { min-height: 40px; padding-inline: 7px; font-size: .76rem; } .menu-btn { gap: 6px; padding-inline: 9px; } }
/* Without JavaScript the full topic menu is shown in the page flow on small screens */
@media (max-width: 1139px) { .no-js .drawer { display: block; border-bottom: 1px solid var(--line); background: var(--bg-deep); } }
