/* ==========================================================================
   SuperTax  |  supertax.co.il
   Design system: "Fiscal clarity"  -  deep royal ink + refund gold
   RTL-first, Hebrew typography, no framework.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --ink-900: #0F1533;
  --ink-800: #171F45;
  --ink-700: #1F2A5E;
  --ink-600: #2C3A77;
  --ink-400: #5B6796;
  --ink-300: #8A93B5;

  --brand-900: #10193F;
  --brand-700: #1B2A6B;
  --brand-600: #26399A;
  --brand-500: #3A51C6;
  --brand-100: #E7EAFA;
  --brand-050: #F2F4FD;

  --gold-600: #8A5A00;
  --gold-500: #E39A0B;
  --gold-400: #F5B233;
  --gold-100: #FDF1DA;

  --mint-700: #06795A;
  --mint-500: #0EA47A;
  --mint-100: #DDF5EC;

  --rose-600: #B3364B;
  --rose-100: #FBE6EA;

  --paper: #FBFAF7;
  --surface: #FFFFFF;
  --surface-2: #F4F5FA;
  --line: #E3E2DC;
  --line-strong: #CFCEC6;

  --text: #16193A;
  --text-soft: #4A5075;
  --text-mute: #63698C;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(16, 25, 63, .06), 0 2px 6px rgba(16, 25, 63, .05);
  --shadow: 0 4px 10px rgba(16, 25, 63, .07), 0 14px 34px rgba(16, 25, 63, .07);
  --shadow-lg: 0 10px 24px rgba(16, 25, 63, .10), 0 30px 70px rgba(16, 25, 63, .12);

  --font-head: "Heebo", "Arial Hebrew", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Assistant", "Heebo", "Arial Hebrew", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1180px;
  --wrap-narrow: 760px;
  --header-h: 72px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0C1024;
    --surface: #141935;
    --surface-2: #1A2043;
    --line: #262D53;
    --line-strong: #343C69;

    --text: #ECEEF8;
    --text-soft: #B7BEDC;
    --text-mute: #8E96BE;

    --brand-100: #232C5E;
    --brand-050: #1A2046;
    --brand-700: #9BAAFF;
    --brand-600: #8394FF;
    --brand-500: #A7B4FF;

    --gold-100: #3A2C0C;
    --gold-600: #F5B233;

    --mint-100: #0E3A2E;
    --mint-700: #57D8B0;

    --rose-100: #3B1620;
    --rose-600: #FF8DA1;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 4px 10px rgba(0, 0, 0, .35), 0 14px 34px rgba(0, 0, 0, .35);
    --shadow-lg: 0 10px 24px rgba(0, 0, 0, .45), 0 30px 70px rgba(0, 0, 0, .45);
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17.5px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 800; line-height: 1.22; color: var(--text); margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 1.35rem + 2.6vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 1.16rem + 1.35vw, 2.15rem); margin-top: 2.2em; }
h3 { font-size: clamp(1.18rem, 1.05rem + .55vw, 1.45rem); font-weight: 700; margin-top: 1.9em; }
h4 { font-size: 1.06rem; font-weight: 700; margin-top: 1.5em; }
p { margin: 0 0 1.15em; }
ul, ol { margin: 0 0 1.3em; padding-inline-start: 1.4em; }
li { margin-bottom: .5em; }
li::marker { color: var(--brand-600); font-weight: 700; }
strong { font-weight: 700; color: var(--text); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
small { font-size: .84em; color: var(--text-mute); }

/* ---------- Layout ---------- */
.wrap { width: min(100% - 2.4rem, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.4rem, var(--wrap-narrow)); margin-inline: auto; }
.section { padding: clamp(3rem, 6vw, 5.5rem) 0; }
.section--tint { background: var(--surface-2); }
.section--ink { background: var(--brand-900); color: #fff; }
.section--ink h2, .section--ink h3 { color: #fff; }
.section--ink p { color: #C4CBEC; }
.skip-link {
  position: absolute; inset-inline-start: 1rem; top: -100px; z-index: 999;
  background: var(--brand-700); color: #fff; padding: .8rem 1.2rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm); transition: top .15s ease;
}
.skip-link:focus { top: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: 1.1rem; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--font-head); font-weight: 800; font-size: 1.28rem; color: var(--text); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__sup { color: var(--gold-600); }

.nav { margin-inline-start: auto; display: flex; align-items: center; gap: .35rem; }
.nav__list { display: flex; align-items: center; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.nav__link {
  display: block; padding: .5rem .72rem; border-radius: var(--radius-sm);
  color: var(--text-soft); font-weight: 600; font-size: .96rem; white-space: nowrap;
}
.nav__link:hover, .nav__link[aria-current="page"] { background: var(--brand-050); color: var(--brand-700); text-decoration: none; }

.has-sub { position: relative; }
/* Physical borders on purpose: this chevron must point down in an RTL page,
   and logical sides would flip it sideways. */
.has-sub > .nav__link::after { content: ""; display: inline-block; width: .38em; height: .38em; margin-inline-start: .45em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); }
.subnav {
  position: absolute; inset-inline-end: 0; top: calc(100% + .4rem);
  min-width: 290px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: .5rem;
  list-style: none; margin: 0; opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.has-sub:hover .subnav, .has-sub:focus-within .subnav { opacity: 1; visibility: visible; transform: translateY(0); }
.subnav a { display: block; padding: .5rem .7rem; border-radius: var(--radius-sm); color: var(--text-soft); font-weight: 600; font-size: .93rem; }
.subnav a:hover { background: var(--brand-050); color: var(--brand-700); text-decoration: none; }

.nav-toggle {
  display: none; margin-inline-start: auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); width: 44px; height: 40px; cursor: pointer; color: var(--text);
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 19px; height: 2px; background: currentColor; border-radius: 2px; position: relative;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-head); font-weight: 700; font-size: 1rem; line-height: 1;
  padding: .85rem 1.4rem; border-radius: var(--radius-pill); border: 1.5px solid transparent;
  cursor: pointer; transition: transform .12s ease, box-shadow .16s ease, background .16s ease;
  text-align: center;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--brand-700); color: #fff; box-shadow: 0 6px 16px rgba(27, 42, 107, .28); }
.btn--primary:hover { background: var(--brand-600); }
.btn--gold { background: var(--gold-500); color: #2A1C00; box-shadow: 0 6px 16px rgba(227, 154, 11, .32); }
.btn--gold:hover { background: var(--gold-400); }
.btn--ghost { background: transparent; color: var(--brand-700); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--brand-600); background: var(--brand-050); }
.btn--light { background: #fff; color: var(--brand-900); }
.btn--sm { padding: .6rem 1rem; font-size: .92rem; }
.btn--block { width: 100%; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--brand-900) 0%, var(--ink-700) 58%, #2B2153 100%); color: #fff; }
.hero::after {
  content: ""; position: absolute; inset-inline-start: -14%; top: -34%; width: 62%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(245, 178, 51, .30), transparent 62%); pointer-events: none;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 4vw, 3.6rem); align-items: center; padding: clamp(3rem, 6vw, 5.4rem) 0 clamp(3.4rem, 6vw, 5.6rem); }
.hero h1 { color: #fff; margin-bottom: .5em; }
.hero h1 em { font-style: normal; color: var(--gold-400); }
.hero__lead { font-size: clamp(1.06rem, 1rem + .35vw, 1.28rem); color: #CBD2F0; max-width: 46ch; margin-bottom: 1.7em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2rem; }
.hero__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1.5rem 1.8rem; padding-top: 1.6rem; border-top: 1px solid rgba(255, 255, 255, .16); }
.hero__fact b { display: block; font-family: var(--font-head); font-size: 1.55rem; font-weight: 800; color: var(--gold-400); line-height: 1.2; }
.hero__fact span { font-size: .9rem; color: #AEB6DE; }

.hero-card { background: var(--surface); color: var(--text); border-radius: var(--radius-lg); padding: 1.6rem; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.hero-card h2 { margin: 0 0 .2em; font-size: 1.24rem; }
.hero-card p.hint { font-size: .92rem; color: var(--text-mute); margin-bottom: 1.1rem; }

/* ---------- Eyebrow / badges ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .45rem; font-family: var(--font-head);
  font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: none;
  color: var(--gold-600); background: var(--gold-100); padding: .35rem .8rem; border-radius: var(--radius-pill);
  margin-bottom: 1rem;
}
.hero .eyebrow { color: var(--gold-400); background: rgba(245, 178, 51, .14); border: 1px solid rgba(245, 178, 51, .3); }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: .2rem .6rem; border-radius: var(--radius-pill); background: var(--brand-100); color: var(--brand-700); }
.badge--mint { background: var(--mint-100); color: var(--mint-700); }
.badge--gold { background: var(--gold-100); color: var(--gold-600); }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 1.15rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-sm); transition: transform .16s ease, box-shadow .18s ease, border-color .18s ease;
}
.card h3 { margin-top: 0; margin-bottom: .4rem; font-size: 1.12rem; }
.card p { margin-bottom: 0; color: var(--text-soft); font-size: .97rem; }
a.card { display: block; color: inherit; }
a.card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-500); }
a.card h3 { color: var(--brand-700); }
.card__icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-050); color: var(--brand-600); margin-bottom: .9rem; }
.card__icon svg { width: 22px; height: 22px; }
.card--gold .card__icon { background: var(--gold-100); color: var(--gold-600); }
.card--mint .card__icon { background: var(--mint-100); color: var(--mint-700); }
.card__more { display: inline-block; margin-top: .9rem; font-weight: 700; font-size: .93rem; color: var(--brand-600); }
.card__more::after { content: " ‹"; }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 1.1rem; }
.steps > li {
  counter-increment: step; position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem 1.5rem; padding-inline-end: 4.4rem;
  box-shadow: var(--shadow-sm); margin: 0;
}
.steps > li::before {
  content: counter(step); position: absolute; inset-inline-end: 1.3rem; top: 1.25rem;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-700); color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 1.1rem;
}
.steps h3 { margin: 0 0 .3rem; font-size: 1.1rem; }
.steps p { margin: 0; color: var(--text-soft); font-size: .97rem; }

/* ---------- Callouts ---------- */
.callout {
  border-inline-start: 4px solid var(--brand-500); background: var(--brand-050);
  border-radius: var(--radius-sm); padding: 1.1rem 1.3rem; margin: 1.8rem 0;
}
.callout > :last-child { margin-bottom: 0; }
.callout__title { font-family: var(--font-head); font-weight: 800; display: block; margin-bottom: .3rem; color: var(--brand-700); }
.callout--gold { border-color: var(--gold-500); background: var(--gold-100); }
.callout--gold .callout__title { color: var(--gold-600); }
.callout--mint { border-color: var(--mint-500); background: var(--mint-100); }
.callout--mint .callout__title { color: var(--mint-700); }
.callout--warn { border-color: var(--rose-600); background: var(--rose-100); }
.callout--warn .callout__title { color: var(--rose-600); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 1.6rem 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 460px; }
caption { caption-side: top; text-align: start; padding: .9rem 1.1rem .2rem; font-weight: 700; font-family: var(--font-head); color: var(--text-soft); font-size: .95rem; }
th, td { padding: .72rem 1.1rem; text-align: start; border-bottom: 1px solid var(--line); }
thead th { background: var(--surface-2); font-family: var(--font-head); font-weight: 700; color: var(--text); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--brand-050); }
td.num, th.num { font-variant-numeric: tabular-nums; }

/* ---------- Article ---------- */
.page-head { padding: clamp(2.2rem, 4vw, 3.4rem) 0 1.6rem; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.page-head h1 { margin-bottom: .35em; }
.page-head__lead { font-size: 1.12rem; color: var(--text-soft); max-width: 62ch; margin-bottom: 0; }
.crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0 0 1rem; font-size: .87rem; color: var(--text-mute); }
.crumbs li + li::before { content: "‹"; margin-inline-end: .4rem; color: var(--line-strong); }
.crumbs a { color: var(--text-mute); }

/* Content column sits on the reading edge (right in RTL); the TOC follows it.
   DOM order keeps the TOC first so it lands above the article on narrow screens. */
.article-layout { display: grid; grid-template-columns: 1fr 260px; gap: clamp(1.6rem, 3vw, 3.2rem); padding: clamp(2rem, 4vw, 3.2rem) 0 4rem; align-items: start; }
.article-layout > .toc { grid-column: 2; grid-row: 1; }
.article-layout > .prose { grid-column: 1; grid-row: 1; }
/* Grid items default to min-width:auto, which lets a long table or a multicol
   list push the track wider than the viewport. */
.article-layout > * { min-width: 0; }
.toc { position: sticky; top: calc(var(--header-h) + 1.2rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; box-shadow: var(--shadow-sm); }
.toc h2 { font-size: .95rem; margin: 0 0 .7rem; font-family: var(--font-head); text-transform: none; letter-spacing: .02em; color: var(--text-mute); }
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.toc li { margin-bottom: .12rem; }
.toc a { display: block; padding: .35rem .5rem; border-radius: 6px; font-size: .93rem; font-weight: 600; color: var(--text-soft); border-inline-start: 2px solid transparent; }
.toc a:hover, .toc a.is-active { background: var(--brand-050); color: var(--brand-700); border-inline-start-color: var(--brand-500); text-decoration: none; }

/* Text stays at a readable measure; tables, figure strips and grids use the
   full column so wide data does not get squeezed into a scrollbar. */
.prose { max-width: 900px; }
.prose > p, .prose > ul, .prose > ol, .prose > h2, .prose > h3, .prose > h4,
.prose > .callout, .prose > .faq, .prose > blockquote { max-width: 74ch; }
.prose > h2:first-child, .prose > h3:first-child { margin-top: 0; }
.prose a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, var(--brand-600) 40%, transparent); }
.prose a:hover { text-decoration-color: currentColor; }
.lede { font-size: 1.1rem; color: var(--text-soft); }

.meta-line { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; font-size: .87rem; color: var(--text-mute); margin-bottom: 1.6rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }

/* ---------- Key figures strip ---------- */
.figs { list-style: none; padding: 0; margin: 1.8rem 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .9rem; }
.figs li { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.figs b { display: block; font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; color: var(--brand-700); line-height: 1.15; font-variant-numeric: tabular-nums; }
.figs span { font-size: .87rem; color: var(--text-mute); }

/* ---------- Checklist ---------- */
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-inline-start: 2rem; margin-bottom: .7rem; }
.checklist li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .5em;
  width: 1.15rem; height: 1.15rem; border-radius: 5px; background: var(--mint-100);
  border: 1.5px solid var(--mint-500);
}
.checklist li::after {
  content: ""; position: absolute; inset-inline-start: .42rem; top: .74em;
  width: .3rem; height: .58rem; border: solid var(--mint-700); border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ---------- FAQ ---------- */
.faq { display: grid; gap: .7rem; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.faq details[open] { border-color: var(--brand-500); box-shadow: var(--shadow-sm); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.05rem 1.3rem; font-family: var(--font-head);
  font-weight: 700; font-size: 1.02rem; display: flex; align-items: center; gap: .8rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; margin-inline-start: auto; flex: none; width: .55rem; height: .55rem;
  border-right: 2.5px solid var(--brand-600); border-bottom: 2.5px solid var(--brand-600);
  transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq .faq__body { padding: 0 1.3rem 1.15rem; color: var(--text-soft); }
.faq .faq__body > :last-child { margin-bottom: 0; }

/* ---------- Calculator ---------- */
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.calc__body { padding: 1.5rem; display: grid; gap: 1.1rem; }
.field { display: grid; gap: .35rem; }
.field label { font-family: var(--font-head); font-weight: 700; font-size: .95rem; }
.field .help { font-size: .84rem; color: var(--text-mute); }
.field input, .field select {
  font: inherit; font-size: 1rem; padding: .7rem .9rem; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--text); width: 100%;
  font-variant-numeric: tabular-nums;
}
.field input:focus, .field select:focus { border-color: var(--brand-500); outline: none; box-shadow: 0 0 0 3px var(--brand-100); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.calc__result { background: var(--brand-900); color: #fff; padding: 1.5rem; }
.calc__result h3 { color: #fff; margin: 0 0 .6rem; font-size: 1.05rem; }
.calc__amount { font-family: var(--font-head); font-size: clamp(2rem, 1.4rem + 2.4vw, 2.9rem); font-weight: 800; color: var(--gold-400); line-height: 1.1; font-variant-numeric: tabular-nums; }
.calc__note { font-size: .9rem; color: #B7C0E6; margin: .7rem 0 0; }
.calc__break { list-style: none; padding: 0; margin: 1.1rem 0 0; border-top: 1px solid rgba(255, 255, 255, .16); }
.calc__break li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; margin: 0; border-bottom: 1px solid rgba(255, 255, 255, .1); font-size: .93rem; color: #CBD2F0; }
.calc__break li:last-child { border-bottom: 0; }
.calc__break b { color: #fff; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .8rem; border: 1.5px solid var(--line-strong); border-radius: var(--radius-pill); font-size: .9rem; font-weight: 600; cursor: pointer; user-select: none; background: var(--surface); }
.chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip:has(input:checked) { background: var(--brand-100); border-color: var(--brand-500); color: var(--brand-700); }
.chip:has(input:focus-visible) { outline: 3px solid var(--gold-500); outline-offset: 2px; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(135deg, var(--brand-700), var(--ink-700) 70%, #3B2C63); color: #fff; border-radius: var(--radius-lg); padding: clamp(2rem, 4vw, 3rem); text-align: center; }
.cta-band h2 { color: #fff; margin-top: 0; }
.cta-band p { color: #CBD2F0; max-width: 60ch; margin-inline: auto; }
.cta-band .btn-row { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-top: 1.4rem; }

/* ---------- Related ---------- */
.related { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.related h2 { margin-top: 0; font-size: 1.25rem; }
.related ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .7rem; }
.related a { display: block; padding: .8rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); font-weight: 600; font-size: .95rem; }
.related a:hover { border-color: var(--brand-500); background: var(--brand-050); text-decoration: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-900); color: #AEB6DE; padding: 3.4rem 0 2rem; font-size: .95rem; }
.site-footer a { color: #C9D0EF; }
/* brand block + the four link columns */
.site-footer__grid { display: grid; grid-template-columns: 1.45fr repeat(4, 1fr); gap: 1.8rem; }
.site-footer h3 { color: #fff; font-size: .95rem; margin: 0 0 .9rem; font-family: var(--font-head); letter-spacing: .02em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer__brand .brand { color: #fff; margin-bottom: .8rem; }
.site-footer__bottom { margin-top: 2.6rem; padding-top: 1.4rem; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; flex-wrap: wrap; gap: .8rem 1.6rem; justify-content: space-between; font-size: .87rem; color: #8B93BE; }
.disclaimer { font-size: .85rem; color: #8B93BE; max-width: 62ch; margin-top: 1rem; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: 1rem; }
.section__head { max-width: 66ch; margin-bottom: 2.2rem; }
.section__head h2 { margin-top: 0; }
.section__head p { color: var(--text-soft); font-size: 1.05rem; margin-bottom: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-layout > .toc, .article-layout > .prose { grid-column: auto; grid-row: auto; }
  .toc { position: static; }
  .toc ol { columns: 2; column-gap: 1.4rem; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 780px) {
  body { font-size: 17px; }
  .nav-toggle { display: flex; }
  .nav {
    display: none; position: absolute; inset-inline: 0; top: 100%; flex-direction: column; align-items: stretch;
    background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: .8rem 1.2rem 1.2rem; gap: .3rem;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .nav.is-open { display: flex; }
  .nav__list { flex-direction: column; align-items: stretch; gap: .1rem; }
  .nav__link { padding: .7rem .6rem; font-size: 1rem; }
  .subnav { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; border-inline-start: 2px solid var(--line); border-radius: 0; margin-inline-start: .6rem; padding: .2rem 0 .4rem; min-width: 0; display: none; }
  .has-sub.is-open .subnav { display: block; }
  .nav .btn { margin-top: .6rem; }
  .site-header__inner { position: relative; }
}
@media (max-width: 620px) {
  .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .toc ol { columns: 1; }
  .steps > li { padding: 1.2rem 1.2rem 1.2rem 1.2rem; }
  .steps > li::before { position: static; margin-bottom: .7rem; }
}

@media print {
  .site-header, .site-footer, .toc, .cta-band, .related { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .article-layout { grid-template-columns: 1fr; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
