/* ==========================================================================
   Chen Commercial Law — base.css
   The client's original design (Chateau + Newsreader, paper / ink / chartreuse /
   brown / lavender, dark bar, square edges, hairlines) with a tightened system.
   Read DESIGN.md before using. Shared by every page; edit only additively.
   ========================================================================== */

@font-face { font-family: 'Chateau'; src: url(../assets/fonts/ChateauRegular.otf) format('opentype'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Chateau Caps'; src: url(../assets/fonts/Chateau-Bold.otf) format('opentype'); font-weight: 400 700; font-display: swap; }
/* Newsreader is loaded per page from Google Fonts (see DESIGN.md for the <link>). */

:root {
  /* Palette — values from the original source */
  --paper: #f1ece0;
  --paper-light: #fbf8f1;
  --paper-deep: #e7dccb;
  --ink: #151412;
  --ink-raised: #1f1d1a;
  --ink-hover: #2b2925;
  --text-2: #2f2c27;       /* secondary body on paper */
  --muted: #5b564c;        /* captions, labels on paper */
  --faint: #9a9384;        /* separators, placeholder */
  --line: #cdc4b2;         /* hairline on paper */
  --line-ink: #151412;     /* strong rule on paper */
  --chartreuse: #cfcc3c;
  --chartreuse-hover: #dedb52;
  --chartreuse-tint: #ecead0;
  --brown: #6e3b24;
  --brown-hover: #5a2f1c;
  --brown-tint: #ead9cc;
  --lavender: #dcdaf3;
  --lavender-tint: #ebe9f8;
  --mauve: #ddd3dc;        /* hero wall behind the photo */
  --dark-line: #34312c;    /* hairline on ink */
  --dark-line-2: #3a3731;
  --dark-text-2: #c4beb1;  /* secondary text on ink */
  --dark-muted: #a9a294;

  /* Type */
  --font-display: 'Chateau', 'Futura', 'Avenir Next', sans-serif;
  --font-caps: 'Chateau Caps', 'Chateau', 'Futura', sans-serif;
  --font-serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;

  --fs-display: clamp(52px, 7.2vw, 104px); /* hero h1 */
  --fs-h1: clamp(48px, 6vw, 88px);         /* inner-page h1 */
  --fs-h2: clamp(40px, 4.9vw, 70px);       /* section heading */
  --fs-h3: clamp(26px, 2.2vw, 30px);       /* item titles */
  --fs-h4: 22px;
  --fs-lede: clamp(20px, 1.7vw, 23px);
  --fs-body: 19px;
  --fs-small: 17px;
  --fs-xs: 15px;
  --fs-label: 13px;                        /* letterspaced caps */
  --fs-label-sm: 12px;

  /* Space — 4px base */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --gutter: clamp(20px, 4vw, 56px);
  --section-y: clamp(72px, 8.4vw, 120px);
  --container: 1440px;
  --header-h: 72px;

  /* Tracking — only two letterspaced-caps styles: actions (.08em) and labels (.14em) */
  --track-action: .08em;
  --track-label: .14em;

  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (max-width: 1080px) { :root { --header-h: 64px; } }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  font-family: var(--font-serif); font-size: var(--fs-body); line-height: 1.55;
  font-optical-sizing: auto; font-variation-settings: 'opsz' 12; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility; overflow-x: clip;
}
main { flex: 1 0 auto; display: block; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
address { font-style: normal; }
::selection { background: var(--chartreuse); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.on-dark :focus-visible, .on-dark:focus-visible { outline-color: var(--chartreuse); }
[hidden] { display: none !important; }

.sr-only { 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-link { position: absolute; left: var(--gutter); top: -200px; z-index: 100; background: var(--chartreuse); color: var(--ink); padding: 10px 16px; font: 14px/1 var(--font-caps); letter-spacing: .1em; text-transform: uppercase; transition: top .15s; }
.skip-link:focus { top: 12px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.section--rule { border-top: 1px solid var(--line-ink); }
.dark { background: var(--ink); color: var(--paper); }
.band-chartreuse { background: var(--chartreuse); color: var(--ink); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 6.6vw, 96px); }
@media (max-width: 900px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.stack > * + * { margin-top: var(--stack, var(--s-5)); }

/* ---------- Type ---------- */
.display, .h1, .h2, .h3, .h4 { font-family: var(--font-display); font-weight: 400; text-wrap: balance; }
.display { font-size: var(--fs-display); line-height: .96; letter-spacing: -.015em; }
.h1 { font-size: var(--fs-h1); line-height: .98; letter-spacing: -.015em; }
.h2 { font-size: var(--fs-h2); line-height: 1.02; letter-spacing: -.01em; }
.h3 { font-size: var(--fs-h3); line-height: 1.1; letter-spacing: -.005em; }
.h4 { font-size: var(--fs-h4); line-height: 1.2; }
/* Italic Newsreader accent word inside a Chateau headline — the signature move. */
.accent { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-variation-settings: normal; letter-spacing: -.02em; font-size: 1.06em; white-space: nowrap; }
.display .accent { font-size: 1.1em; letter-spacing: -.03em; }
.lede { font-size: var(--fs-lede); line-height: 1.45; text-wrap: pretty; }
.body { font-size: var(--fs-body); line-height: 1.55; text-wrap: pretty; }
.body-2 { font-size: var(--fs-body); line-height: 1.55; color: var(--text-2); text-wrap: pretty; }
.small { font-size: var(--fs-small); line-height: 1.5; }
.muted { color: var(--muted); }
.dark .muted, .on-dark .muted { color: var(--dark-text-2); }
.measure { max-width: 34em; }
.prose > * + * { margin-top: 1em; }
.prose a { border-bottom: 1px solid currentColor; }
.prose a:hover { color: var(--brown); }

/* Letterspaced caps: eyebrows, labels, meta */
.eyebrow { font-family: var(--font-caps); font-size: var(--fs-label); line-height: 1.2; letter-spacing: .14em; text-transform: uppercase; color: var(--brown); }
.dark .eyebrow, .on-dark .eyebrow { color: var(--chartreuse); }
.eyebrow .num { font-variant-numeric: tabular-nums; }
.label { font-family: var(--font-caps); font-size: var(--fs-label-sm); line-height: 1.2; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.dark .label, .on-dark .label { color: var(--dark-text-2); }

/* Section head: eyebrow + h2, optional link aligned to the heading baseline */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-5) var(--s-6); flex-wrap: wrap; }
.section-head__text { display: flex; flex-direction: column; gap: 20px; }
.section-head .link { margin-bottom: .55em; }

/* Breadcrumb (inner pages) */
.crumbs { display: flex; gap: 10px; font-family: var(--font-caps); font-size: var(--fs-label); letter-spacing: .14em; text-transform: uppercase; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { color: var(--faint); }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  height: 52px; padding: 0 24px; border: 0; border-radius: 0;
  font-family: var(--font-caps); font-size: 15px; line-height: 1; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  transition: background-color .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.btn .arr { font-family: var(--font-serif); font-size: 22px; line-height: 1; margin-top: -2px; transition: transform .2s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn--brown { background: var(--brown); color: var(--paper); }
.btn--brown:hover { background: var(--brown-hover); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--ink-hover); }
.btn--chartreuse { background: var(--chartreuse); color: var(--ink); }
.btn--chartreuse:hover { background: var(--chartreuse-hover); }
.btn--outline { background: transparent; color: currentColor; box-shadow: inset 0 0 0 1px currentColor; }
.btn--outline:hover { background: var(--ink); color: var(--paper); box-shadow: inset 0 0 0 1px var(--ink); }
.btn--sm { height: 40px; padding: 0 18px; font-size: 14px; }
.btn--lg { height: 56px; padding: 0 26px; }
.btn--block { width: 100%; }
.btn:focus-visible { outline-offset: 3px; }

/* Underlined caps text link — the original's secondary action */
.link {
  display: inline-block; font-family: var(--font-caps); font-size: 15px; line-height: 1.2; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  padding-bottom: 4px; background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;
  transition: color .15s, background-size .25s var(--ease);
}
.link:hover { color: var(--brown); }
.dark .link:hover, .on-dark .link:hover { color: var(--chartreuse); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .field-label { font-family: var(--font-caps); font-size: var(--fs-label-sm); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.field .hint { font-size: 15px; line-height: 1.45; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-height: 52px; padding: 12px 16px; border: 1px solid var(--ink); border-radius: 0;
  background: var(--paper-light); color: var(--ink); font-family: var(--font-serif); font-size: 19px; line-height: 1.3;
  transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
.textarea { min-height: 160px; resize: vertical; line-height: 1.5; }
.select { padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%23151412' stroke-width='1.6'%3E%3Cpath d='M2 4.5 6 8.5l4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--brown); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--chartreuse); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: #a3341c; }
.field .error { font-size: 15px; color: #a3341c; }
/* Segmented choice (radio pills, square) */
.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label { display: inline-flex; align-items: center; height: 44px; padding: 0 16px; border: 1px solid var(--ink); background: transparent; cursor: pointer; font-family: var(--font-caps); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; transition: background .15s, color .15s; }
.choice label:hover { background: var(--paper-deep); }
.choice input:checked + label { background: var(--ink); color: var(--paper); }
.choice input:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- Hairline list rows (steps, credentials, guides) ---------- */
.rows { border-bottom: 1px solid var(--line-ink); }
.row { border-top: 1px solid var(--line-ink); padding: 28px 0; }
.dark .rows, .dark .row { border-color: var(--dark-line-2); }

/* ---------- Tool cards: the colour-block resource cards ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1000px) { .tool-grid { grid-template-columns: minmax(0, 1fr); } }
.tool-card {
  position: relative; display: flex; flex-direction: column; gap: 28px; min-height: 420px; padding: 28px 28px 26px;
  color: var(--ink); transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.tool-card:hover { transform: translateY(-4px); box-shadow: 0 18px 30px -22px rgba(21, 20, 18, .55); }
.tool-card--brown { background: var(--brown); color: var(--paper); }
.tool-card--lavender { background: var(--lavender); }
.tool-card--chartreuse { background: var(--chartreuse); }
.tool-card__meta { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-caps); font-size: var(--fs-label-sm); letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.tool-card__title { min-height: 2.3em; font-family: var(--font-caps); font-size: 26px; line-height: 1.15; letter-spacing: .02em; text-transform: uppercase; text-wrap: balance; }
.tool-card__title em { font-family: var(--font-serif); font-style: italic; font-size: 1.24em; letter-spacing: -.01em; text-transform: none; line-height: 1; }
.tool-card__preview { margin-top: auto; }
.tool-card__foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-top: 18px; border-top: 1px solid currentColor; border-top-color: color-mix(in srgb, currentColor 35%, transparent); }
.tool-card__desc { font-size: 18px; line-height: 1.4; max-width: 30ch; text-wrap: balance; }
.tool-card--brown .tool-card__desc { color: var(--brown-tint); }
.tool-card__arrow { font-size: 30px; line-height: 1; transition: transform .25s var(--ease); flex: none; }
.tool-card:hover .tool-card__arrow { transform: translateX(5px); }
.tool-card:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

/* Paper slip: a tiny, real-looking preview of each tool, set inside a tool card.
   Markup uses <span>s (it lives inside an <a>); everything is display:block here. */
.slip__label, .slip__value, .slip__sub, .slip__rule, .slip-checks, .slip-scale .seg > * { display: block; }
.slip { display: flex; flex-direction: column; min-height: 168px; background: var(--paper-light); color: var(--ink); padding: 16px 18px 18px; box-shadow: 0 1px 0 rgba(21, 20, 18, .08), 0 12px 24px -18px rgba(21, 20, 18, .5); }
.slip__label { font-family: var(--font-caps); font-size: 11px; line-height: 1.2; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.slip__value { margin-top: 8px; font-family: var(--font-display); font-size: 26px; line-height: 1.05; letter-spacing: -.01em; }
.slip__sub { margin-top: 4px; font-size: 15px; color: var(--muted); }
.slip__rule { height: 1px; background: var(--line); margin: 14px 0 12px; }
.slip__value + .slip__rule, .slip__label + .slip-checks, .slip__value + .slip-scale { margin-top: auto; }
/* timeline (calculator) */
.slip-timeline { position: relative; display: flex; justify-content: space-between; font-family: var(--font-caps); font-size: 10.5px; line-height: 1; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-top: 18px; }
.slip-timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 2px; background: var(--ink); }
.slip-timeline::after { content: ""; position: absolute; right: 0; top: 0; width: 10px; height: 10px; background: var(--chartreuse); box-shadow: 0 0 0 1.5px var(--ink); }
.slip-timeline > :first-child::before { content: ""; position: absolute; left: 0; top: 0; width: 10px; height: 10px; background: var(--ink); }
/* checklist rows */
.slip-checks > * { display: flex; align-items: center; gap: 12px; padding: 8px 0; font-size: 16px; line-height: 1.2; border-top: 1px solid var(--line); }
.slip-checks { padding-top: 8px; }
.slip-checks > :first-child { border-top: 0; }
.slip-checks > :last-child { padding-bottom: 0; }
.slip-checks .box { flex: none; width: 16px; height: 16px; border: 1.5px solid var(--ink); display: grid; place-items: center; }
.slip-checks .box.is-on { background: var(--ink); }
.slip-checks .box.is-on::after { content: ""; width: 8px; height: 4px; border: solid var(--chartreuse); border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.slip-checks .is-done { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
/* threshold scale (which court) */
.slip-scale { display: grid; grid-template-columns: 1fr 1.35fr; margin-top: 12px; }
.slip-scale .seg { padding: 10px 12px 11px; }
.slip-scale .seg:first-child { background: var(--ink); color: var(--paper); }
.slip-scale .seg:last-child { box-shadow: inset 0 0 0 1.5px var(--ink); }
.slip-scale b { font-family: var(--font-caps); font-weight: 400; font-size: 11px; line-height: 1.2; letter-spacing: .14em; text-transform: uppercase; }
.slip-scale .seg > span { margin-top: 4px; font-size: 15px; line-height: 1.2; }
.slip-scale .seg:first-child > span { color: var(--dark-text-2); }

/* Resource mark tile (square colour block holding a brand mark; nav menu, lists) */
.mark-tile { flex: none; width: 56px; height: 56px; display: grid; place-items: center; }
.mark-tile svg { width: 40px; height: 40px; }
.mark-tile--brown { background: var(--brown); }
.mark-tile--lavender { background: var(--lavender); }
.mark-tile--chartreuse { background: var(--chartreuse); }

/* ---------- Figures / illustrations ---------- */
.illo { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.photo { position: relative; overflow: hidden; background: var(--brown); }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.caption { margin-top: 12px; font-family: var(--font-caps); font-size: var(--fs-label-sm); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ==========================================================================
   Site header (injected by js/site.js)
   ========================================================================== */
#site-header { position: sticky; top: 0; z-index: 50; display: block; }
.site-header { position: relative; background: var(--ink); color: var(--paper); }
.site-header .bar { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.wordmark { font-family: var(--font-caps); font-size: 22px; line-height: 1; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; padding: 6px 0; }
.wordmark:hover { color: var(--chartreuse); }
.nav-wrap { display: flex; align-items: center; gap: 40px; }
.nav { display: flex; align-items: center; gap: 32px; height: var(--header-h); }
.nav > li { height: 100%; display: flex; align-items: center; }
.nav-link {
  position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 6px 0;
  font-family: var(--font-caps); font-size: 14px; line-height: 1; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  transition: color .15s;
}
.nav-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--chartreuse); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav-link:hover { color: var(--chartreuse); }
.nav-link.is-active::after { transform: scaleX(1); }
.nav-link .chev { width: 10px; height: 10px; transition: transform .2s var(--ease); }
.has-menu.is-open .nav-link .chev { transform: rotate(180deg); }
.has-menu.is-open > .nav-link { color: var(--chartreuse); }
.menu-toggle { display: none; height: 40px; padding: 0 16px; background: transparent; color: var(--paper); border: 1px solid var(--paper); border-radius: 0; font-family: var(--font-caps); font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
.menu-toggle:hover { background: var(--paper); color: var(--ink); }

/* Resources dropdown — the original's dark four-column panel */
.menu-panel {
  position: absolute; left: 0; right: 0; top: var(--header-h);
  visibility: hidden; opacity: 0; transform: translateY(-6px);
  transition: opacity .18s var(--ease), transform .18s var(--ease), visibility 0s linear .18s;
}
.has-menu.is-open .menu-panel { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.menu-scrim { position: fixed; inset: var(--header-h) 0 0 0; background: rgba(21, 20, 18, .42); opacity: 0; visibility: hidden; transition: opacity .18s, visibility 0s linear .18s; pointer-events: none; z-index: -1; }
.site-header.menu-is-open .menu-scrim { opacity: 1; visibility: visible; transition-delay: 0s; }
.menu-grid { display: grid; grid-template-columns: 280px repeat(3, minmax(0, 1fr)); background: var(--ink); border-top: 1px solid var(--dark-line); box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .55); }
.menu-intro { padding: 32px 30px 30px; display: flex; flex-direction: column; justify-content: space-between; gap: 36px; border-right: 1px solid var(--dark-line); }
.menu-intro__title { margin-top: 14px; font-family: var(--font-display); font-size: 28px; line-height: 1.1; text-wrap: balance; }
.menu-intro .link { align-self: flex-start; font-size: 14px; }
.menu-item { position: relative; display: flex; flex-direction: column; gap: 18px; padding: 30px 28px 32px; border-right: 1px solid var(--dark-line); transition: background .15s; }
.menu-item:last-child { border-right: 0; }
.menu-item:hover, .menu-item:focus-visible { background: var(--ink-raised); }
.menu-item:focus-visible { outline: 2px solid var(--chartreuse); outline-offset: -2px; }
.menu-item__title { min-height: 2.5em; font-family: var(--font-caps); font-size: 19px; line-height: 1.18; letter-spacing: .02em; text-transform: uppercase; }
.menu-item__title em { font-family: var(--font-serif); font-style: italic; font-size: 1.26em; text-transform: none; letter-spacing: -.01em; }
.menu-item__desc { font-size: 17px; line-height: 1.45; color: var(--dark-text-2); max-width: 30ch; }
.menu-item__go { position: absolute; top: 30px; right: 28px; font-size: 22px; line-height: 1; color: var(--chartreuse); opacity: 0; transform: translateX(-6px); transition: opacity .18s, transform .18s var(--ease); }
.menu-item:hover .menu-item__go, .menu-item:focus-visible .menu-item__go { opacity: 1; transform: none; }
.menu-item[aria-current="page"] .menu-item__title { color: var(--chartreuse); }

/* Mobile menu */
.mobile-menu { display: none; border-top: 1px solid var(--dark-line); max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
.site-header.is-open .mobile-menu { display: block; }
.mobile-nav { padding: 8px 0 28px; }
.mobile-nav a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 12px 0; border-bottom: 1px solid var(--dark-line); font-family: var(--font-caps); font-size: 18px; letter-spacing: .08em; text-transform: uppercase; }
.mobile-nav a[aria-current="page"] { color: var(--chartreuse); }
.mobile-nav .sub a { justify-content: flex-start; gap: 14px; min-height: 64px; padding-left: 0; font-size: 15px; color: var(--dark-text-2); }
.mobile-nav .sub .mark-tile { width: 40px; height: 40px; }
.mobile-nav .sub .mark-tile svg { width: 28px; height: 28px; }
.mobile-nav .btn { margin-top: 24px; height: 52px; font-size: 15px; border-bottom: 0; justify-content: center; color: var(--ink); }

@media (max-width: 1080px) {
  .nav-wrap { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; }
  .wordmark { font-size: 19px; }
}
@media (max-width: 400px) { .wordmark { font-size: 16px; letter-spacing: .07em; } .menu-toggle { padding: 0 12px; } }
body.menu-open { overflow: hidden; }

/* ==========================================================================
   CTA band (injected into <div id="site-cta"></div> by js/site.js)
   ========================================================================== */
.cta-band { background: var(--chartreuse); color: var(--ink); }
.cta-band .container { padding-top: clamp(64px, 7.4vw, 104px); padding-bottom: clamp(64px, 7.4vw, 104px); display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap; }
.cta-band .h2 { max-width: 13em; font-size: clamp(40px, 5vw, 72px); line-height: 1; }
.cta-band__side { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.cta-band__note { font-size: 16px; line-height: 1.4; color: var(--text-2); }

/* ==========================================================================
   Footer (injected by js/site.js)
   ========================================================================== */
.site-footer { background: var(--ink); color: var(--paper); }
.site-footer .container { padding-top: clamp(56px, 6vw, 80px); padding-bottom: 32px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 32px; }
.footer-col h2 { font-family: var(--font-caps); font-weight: 400; font-size: var(--fs-label-sm); letter-spacing: .14em; text-transform: uppercase; color: var(--chartreuse); margin-bottom: 16px; }
.footer-col li + li { margin-top: 8px; }
.footer-col a, .footer-col address, .footer-col p { font-size: 18px; line-height: 1.5; }
.footer-col a { background: linear-gradient(var(--chartreuse), var(--chartreuse)) left bottom / 0 1px no-repeat; transition: color .15s, background-size .25s var(--ease); }
.footer-col a:hover { color: var(--chartreuse); background-size: 100% 1px; }
.footer-col .dim { color: var(--dark-muted); }
.footer-mark { margin-top: clamp(64px, 7vw, 104px); display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.footer-wordmark { font-family: var(--font-display); font-size: clamp(56px, 9.6vw, 140px); line-height: .94; letter-spacing: -.02em; }
.footer-wordmark > span { display: block; white-space: nowrap; }
.footer-mark__side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; padding-bottom: .9em; font-family: var(--font-caps); font-size: var(--fs-label-sm); letter-spacing: .14em; text-transform: uppercase; color: var(--dark-muted); text-align: right; }
.footer-mark__side .sq { width: 10px; height: 10px; background: var(--chartreuse); margin-bottom: 6px; }
.footer-wordmark .accent { font-size: 1.04em; letter-spacing: -.03em; }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--dark-line-2); display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; font-size: 15px; line-height: 1.45; color: var(--dark-muted); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1180px) { .footer-mark__side { display: none; } }
@media (max-width: 640px) { .footer-wordmark { font-size: clamp(32px, 10.4vw, 88px); } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

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

/* Newsreader: body copy uses a sturdier text optical size ('opsz' 12, set on body);
   large italic accents return to automatic optical sizing. */
.tool-card__title em, .menu-item__title em, .display em, .h1 em, .h2 em { font-variation-settings: normal; }

/* Small-screen fit fixes */
@media (max-width: 480px) {
  .site-header .bar { gap: 16px; }
  .wordmark { font-size: 17px; letter-spacing: .07em; }
  .menu-toggle { padding: 0 12px; flex-shrink: 0; }
  .cta-band__side { max-width: 100%; }
  .cta-band__side .btn { max-width: 100%; white-space: normal; text-align: left; line-height: 1.2; }
}
@media (max-width: 350px) { .wordmark { font-size: 14px; letter-spacing: .04em; } .menu-toggle { padding: 0 10px; font-size: 13px; } }

/* Demo notice banner (dismissible) */
.demo-banner { background: var(--chartreuse); color: var(--ink); }
.demo-banner__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; padding-top: 8px; padding-bottom: 8px; }
.demo-banner p { margin: 0; font-size: 14px; line-height: 1.4; }
.demo-banner strong { font-family: var(--font-caps); font-weight: 400; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; margin-right: 6px; }
.demo-banner__close { flex-shrink: 0; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 2px; background: transparent; color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }
.demo-banner__close:hover { background: rgba(21,20,18,.1); }
.demo-banner__close:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
