/*
 * Staunch Fintech design system (2026-11-27)
 * Dark cinematic page heroes + white, ledger-style content sections.
 * One family (DM Sans), one accent per surface, 8px spacing grid.
 */

/* ============================ Tokens ============================ */
:root {
  /* Dark scene */
  --bg: #070b1f;
  --bg-2: #0b1230;
  --line: rgba(196, 210, 255, 0.12);
  --line-strong: rgba(196, 210, 255, 0.24);
  --text: #eef1fa;          /* 17.6:1 on --bg */
  --muted: #a9b3cf;         /* 8.9:1 on --bg */
  --accent: #9db8ff;        /* 9.6:1 on --bg */
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.10);
  --white: #ffffff;
  --black: #03050d;

  /* Light sections */
  --paper: #ffffff;
  --paper-2: #f6f8fc;
  --ink: #0b1230;           /* 18.4:1 on white */
  --ink-2: #3f4866;         /* 9.3:1 */
  --ink-3: #5d6684;         /* 5.9:1 */
  --rule-l: #e2e6ef;
  --grid: #eceff6;
  --accent-l: #2b49b0;      /* 7.3:1 */
  --ok: #1d7a4f;
  --error: #b42318;
  --double: 3px double var(--ink);

  /* Type: 14/17/22/32/56 + hero */
  --font: "DM Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-xs: 0.875rem;
  --fs-sm: 1.0625rem;
  --fs-md: 1.375rem;
  --fs-lg: 2rem;
  --fs-xl: 3.5rem;
  --fs-hero: clamp(2.75rem, 7.4vw, 6.75rem);
  --fs-page: clamp(2.5rem, 5.6vw, 4.75rem);
  --lh-tight: 0.98;
  --lh-snug: 1.2;
  --lh-body: 1.6;
  --track-tight: -0.035em;
  --track-head: -0.02em;

  /* Spacing (8px grid) */
  --s-1: 0.5rem; --s-2: 1rem; --s-3: 1.5rem; --s-4: 2rem; --s-5: 2.5rem;
  --s-6: 3rem; --s-8: 4rem; --s-10: 5rem; --s-12: 6rem; --s-16: 8rem;

  /* Shape & motion */
  --max: 80rem;
  --measure: 36rem;
  --prose: 44rem;
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --pill: 999px;
  --ease: 220ms cubic-bezier(.2, .7, .2, 1);
}

/* ============================ Base ============================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink-2); font: 400 var(--fs-sm)/var(--lh-body) var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-l); text-underline-offset: 0.2em; transition: color var(--ease); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent-l); outline-offset: 4px; border-radius: var(--radius-sm); }
.scene :focus-visible { outline-color: var(--accent); }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: var(--track-head); color: var(--ink); }
p { margin: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--s-3); }
@media (min-width: 960px) { .wrap { padding: 0 var(--s-8); } }
.label { font-size: var(--fs-xs); color: var(--accent-l); letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.scene .label { color: var(--accent); }
.num { font-variant-numeric: tabular-nums lining-nums; }
.sr-only { position: absolute; 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: var(--s-2); top: -100px; background: var(--white); color: var(--black); padding: var(--s-1) var(--s-2); border-radius: var(--radius-sm); z-index: 50; }
.skip:focus { top: var(--s-2); }

/* ============================ Buttons ============================ */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-2) var(--s-3); border-radius: var(--radius-sm); border: 1px solid transparent;
  font: 500 var(--fs-sm)/1 var(--font); text-decoration: none; cursor: pointer;
  transition: background var(--ease), color var(--ease), transform var(--ease), border-color var(--ease);
}
.btn .chev { width: 1.375rem; height: 1.375rem; border-radius: 50%; display: inline-grid; place-items: center; transition: transform var(--ease); flex: none; }
.btn .chev svg { width: 0.625rem; height: 0.625rem; }
.btn:hover .chev { transform: translateX(3px); }
.btn[disabled] { opacity: 0.6; cursor: wait; }
.btn-light { background: var(--white); color: var(--black); }
.btn-light .chev { background: var(--black); color: var(--white); }
.btn-light:hover { background: #dfe6ff; color: var(--black); }
.btn-ghost { background: var(--glass); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--glass-strong); border-color: var(--line-strong); color: var(--text); }
.btn-dark { background: var(--black); color: var(--white); }
.btn-dark .chev { background: var(--white); color: var(--black); }
.btn-dark:hover { background: #000; color: var(--white); transform: translateY(-1px); }
.btn-ink { background: var(--ink); color: var(--white); }
.btn-ink .chev { background: var(--white); color: var(--ink); }
.btn-ink:hover { background: #1b2550; color: var(--white); transform: translateY(-1px); }
.btn-outline { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.actions { margin-top: var(--s-4); display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* ============================ Dark scene (heroes) ============================ */
.scene {
  position: relative; isolation: isolate; overflow: hidden; color: var(--text);
  background:
    radial-gradient(70% 60% at 80% 85%, #16214d 0%, transparent 60%),
    radial-gradient(90% 70% at 15% 10%, #121c45 0%, transparent 65%),
    var(--bg);
  display: flex; flex-direction: column;
}
.scene h1, .scene h2, .scene h3 { color: var(--text); }
.scene a:not(.btn) { color: var(--text); }
.grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.16; mix-blend-mode: overlay; z-index: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.scene .ribs {
  position: absolute; z-index: -3; inset: 0 35% 25% 0;
  background:
    linear-gradient(152deg, rgba(150, 175, 235, 0.55) 0%, rgba(90, 115, 190, 0.28) 28%, rgba(20, 30, 70, 0) 52%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.07) 0, rgba(255,255,255,0.015) 14px, rgba(0,0,0,0.30) 30px, rgba(255,255,255,0.10) 31px, rgba(255,255,255,0.07) 34px);
  -webkit-mask-image: linear-gradient(205deg, #000 0%, #000 38%, transparent 66%);
          mask-image: linear-gradient(205deg, #000 0%, #000 38%, transparent 66%);
}
.scene .ribs::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(200deg, transparent 46%, rgba(4, 7, 22, 0.85) 47%, rgba(4,7,22,0.6) 60%, transparent 80%); }
.scene .sphere {
  position: absolute; z-index: -2;
  width: clamp(18rem, 34vw, 32rem); aspect-ratio: 1; border-radius: 50%;
  top: calc(-1 * clamp(6rem, 12vw, 12rem)); right: clamp(2rem, 9vw, 10rem);
  background: radial-gradient(circle at 45% 70%, #0a102b 0%, #0c1434 55%, #182451 100%);
  box-shadow: inset -18px 14px 30px -6px rgba(170, 195, 245, 0.55), inset 0 -40px 80px rgba(3, 5, 13, 0.6), 0 30px 90px rgba(3, 5, 13, 0.7);
}
.scene .arc {
  position: absolute; z-index: -1; width: 150vmax; aspect-ratio: 1; border-radius: 50%; left: 58%; top: 42%;
  border: 1.5px solid rgba(200, 218, 255, 0.75);
  box-shadow: 0 0 34px rgba(130, 160, 235, 0.6), inset 0 0 120px rgba(90, 120, 200, 0.22);
  background: radial-gradient(circle at 30% 30%, rgba(30, 44, 95, 0.55), rgba(7, 11, 31, 0) 60%);
  -webkit-mask-image: linear-gradient(140deg, #000 10%, transparent 45%);
          mask-image: linear-gradient(140deg, #000 10%, transparent 45%);
}
.scene .vignette { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(7,11,31,0.85) 0%, rgba(7,11,31,0) 45%); pointer-events: none; }

/* Inner-page variant: shorter, sphere smaller, arc lower */
.scene--page { min-height: 0; }
.scene--page .sphere { width: clamp(14rem, 24vw, 22rem); top: calc(-1 * clamp(5rem, 9vw, 9rem)); }
.scene--page .arc { top: 62%; left: 64%; }
.scene--page .ribs { inset: 0 45% 10% 0; }

/* ============================ Header / nav ============================ */
.topbar { position: relative; z-index: 30; padding-top: var(--s-4); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.brand { display: inline-flex; align-items: center; gap: var(--s-1); text-decoration: none; font-weight: 500; font-size: var(--fs-md); letter-spacing: var(--track-head); white-space: nowrap; color: var(--text); }
.brand:hover { color: var(--text); }
.brand .mark { display: block; width: 1.25rem; height: 2rem; overflow: hidden; flex: none; }
.brand .mark img { height: 2rem; width: auto; max-width: none; filter: brightness(0) invert(1); }
.navpill {
  display: flex; align-items: center; gap: var(--s-1);
  padding: var(--s-1); border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.nav-link, .nav-drop > button {
  text-decoration: none; padding: var(--s-1) var(--s-2); border-radius: var(--radius-sm);
  font: 400 var(--fs-sm)/1.5 var(--font); color: var(--text); background: none; border: 0; cursor: pointer;
  transition: background var(--ease);
}
.nav-link:hover, .nav-drop > button:hover, .nav-drop.open > button, .nav-link[aria-current="page"] { background: var(--glass-strong); color: var(--text); }
.nav-drop { position: relative; }
.nav-drop > button svg { width: 0.625rem; height: 0.625rem; margin-left: 0.25rem; transform: rotate(90deg); transition: transform var(--ease); }
.nav-drop.open > button svg { transform: rotate(-90deg); }
.nav-menu {
  position: absolute; top: calc(100% + var(--s-1)); left: 0; min-width: 19rem;
  list-style: none; margin: 0; padding: var(--s-1);
  background: var(--paper); border: 1px solid var(--rule-l); border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(3, 5, 13, 0.35);
  display: none;
}
.nav-drop.open .nav-menu { display: block; }
.nav-menu a { display: block; padding: var(--s-1) var(--s-2); border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; font-size: var(--fs-sm); }
.nav-menu a:hover, .nav-menu a:focus-visible { background: var(--paper-2); color: var(--ink); }
.menu-toggle { display: none; }
@media (max-width: 900px) {
  .navpill { background: transparent; border: 0; padding: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .navpill .nav-link, .navpill .nav-drop { display: none; }
  .menu-toggle { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: var(--radius-sm); background: var(--glass); border: 1px solid var(--line); color: var(--text); cursor: pointer; }
  .menu-toggle svg { width: 1.25rem; height: 1.25rem; }
  .navpill .btn-dark .chev { display: none; }
  .navpill .btn-dark { padding: var(--s-1) var(--s-2); }
}
@media (max-width: 420px) { .topbar .brand span:last-child { font-size: var(--fs-sm); } }
.drawer { position: fixed; inset: 0; z-index: 60; background: var(--bg); color: var(--text); padding: var(--s-4) var(--s-3); overflow-y: auto; display: none; }
.drawer.open { display: block; }
.drawer .drawer-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s-4); }
.drawer ul { list-style: none; margin: 0; padding: 0; }
.drawer li a { display: block; padding: var(--s-2) 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: var(--fs-md); }
.drawer .drawer-sub a { font-size: var(--fs-sm); color: var(--muted); padding: var(--s-1) 0 var(--s-1) var(--s-2); border-bottom: 0; }
.drawer .drawer-label { color: var(--accent); font-size: var(--fs-xs); margin: var(--s-3) 0 var(--s-1); }
body.no-scroll { overflow: hidden; }

/* ============================ Home hero ============================ */
.scene--home { min-height: 100vh; min-height: 100svh; }
.hero-body { margin-top: auto; padding-top: var(--s-12); padding-bottom: var(--s-10); }
.hero-body .wrap { display: grid; grid-template-columns: 1fr; gap: var(--s-6); align-items: end; }
@media (min-width: 1024px) { .hero-body .wrap { grid-template-columns: 7fr 5fr; gap: var(--s-8); } .hero-right { padding-bottom: var(--s-1); } }
.scene--home h1 { font-size: var(--fs-hero); line-height: var(--lh-tight); letter-spacing: var(--track-tight); }
.scene--home h1 span { display: block; white-space: nowrap; }
.scene .tag { margin-top: var(--s-4); font-size: var(--fs-md); }
.tools { margin: var(--s-3) 0 0; display: flex; flex-wrap: wrap; gap: var(--s-1); list-style: none; padding: 0; }
.tools li { font-size: var(--fs-xs); color: var(--muted); padding: 0.375rem var(--s-2); border-radius: var(--pill); border: 1px solid var(--line); background: rgba(255,255,255,0.03); }
.scene .lede { font-size: var(--fs-md); line-height: 1.45; max-width: var(--measure); color: var(--text); }

/* Inner page hero content */
.page-head { padding: var(--s-12) 0 var(--s-10); }
.page-head .wrap { display: grid; grid-template-columns: 1fr; gap: var(--s-4); align-items: end; }
@media (min-width: 1024px) { .page-head .wrap.split { grid-template-columns: 7fr 5fr; gap: var(--s-8); } }
.page-head h1 { font-size: var(--fs-page); line-height: 1.02; letter-spacing: var(--track-tight); max-width: 20ch; margin-top: var(--s-2); }
.page-head .lede { margin-top: var(--s-3); }
.page-head.article h1 { font-size: clamp(2.125rem, 4.4vw, 3.5rem); max-width: 26ch; line-height: 1.08; }
.crumbs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-1); font-size: var(--fs-xs); color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: var(--s-1); color: var(--line-strong); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs [aria-current] { color: var(--text); }
.meta-line { margin-top: var(--s-3); display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); font-size: var(--fs-xs); color: var(--muted); }
.meta-line a { color: var(--text); }

/* ============================ Light sections ============================ */
section.block { padding: var(--s-12) 0; }
section.block + section.block { border-top: 1px solid var(--rule-l); }
.head { display: grid; grid-template-columns: 1fr; gap: var(--s-3); margin-bottom: var(--s-8); }
@media (min-width: 960px) { .head { grid-template-columns: 6fr 5fr; align-items: end; gap: var(--s-8); } }
.head h2 { font-size: var(--fs-xl); line-height: 1.04; letter-spacing: var(--track-tight); margin-top: var(--s-1); }
.head p { color: var(--ink-2); max-width: var(--measure); }
@media (max-width: 600px) { .head h2 { font-size: var(--fs-lg); } }
.more-link { color: var(--accent-l); }

/* Ledger table */
.ledger-t { border-top: 2px solid var(--ink); }
.ledger-t .tr { display: grid; grid-template-columns: 1fr; text-decoration: none; color: inherit; border-bottom: 1px solid var(--rule-l); transition: background var(--ease); }
@media (min-width: 860px) {
  .ledger-t .tr { grid-template-columns: 4.5rem 5fr 7fr 4rem; }
  .ledger-t.cols-3 .tr { grid-template-columns: 5fr 4fr 5fr; }
  .ledger-t .tr > * { display: flex; align-items: center; padding: var(--s-3); border-left: 1px solid var(--rule-l); }
  .ledger-t .tr > *:first-child { border-left: 0; padding-left: 0; }
  .ledger-t .tr > .c-go { padding-left: 0; padding-right: 0; justify-content: center; }
}
@media (max-width: 859px) { .ledger-t .tr { padding: var(--s-3) 0; gap: var(--s-1); } .ledger-t .c-no, .ledger-t .c-go, .ledger-t .th { display: none !important; } }
.ledger-t .th { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; border-bottom: 1px solid var(--ink); }
.ledger-t .th > * { padding-top: var(--s-2) !important; padding-bottom: var(--s-2) !important; }
.ledger-t a.tr:hover { background: var(--paper-2); color: inherit; }
.ledger-t a.tr:hover .c-go span { background: var(--ink); color: var(--white); border-color: var(--ink); }
.ledger-t .c-no { color: var(--ink-3); font-size: var(--fs-xs); }
.ledger-t .c-name { font-size: var(--fs-md); font-weight: 500; color: var(--ink); letter-spacing: var(--track-head); }
.ledger-t .c-desc { color: var(--ink-2); }
.ledger-t .c-go { display: flex; justify-content: center; align-items: center; }
.ledger-t .c-go span { flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%; border: 1px solid var(--rule-l); display: grid; place-items: center; color: var(--ink); transition: background var(--ease), color var(--ease), border-color var(--ease); }
.ledger-t .c-go svg { width: 0.75rem; height: 0.75rem; }
.ledger-total { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2); border-top: var(--double); margin-top: -1px; padding-top: var(--s-2); font-size: var(--fs-xs); color: var(--ink-3); }
.ledger-total strong { color: var(--ink); font-weight: 600; }

/* Fact sheet (key / value ledger) */
.facts { border-top: 2px solid var(--ink); margin: 0; }
.facts > div { display: grid; grid-template-columns: 1fr; gap: var(--s-1); padding: var(--s-2) 0; border-bottom: 1px solid var(--rule-l); }
@media (min-width: 700px) { .facts > div { grid-template-columns: 14rem 1fr; gap: var(--s-3); } }
.facts dt { color: var(--ink-3); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.04em; padding-top: 0.2rem; }
.facts dd { margin: 0; color: var(--ink); }
.facts + .ledger-total { margin-top: -1px; }

/* T-account */
.t-account { display: grid; grid-template-columns: 1fr; border-top: 2px solid var(--ink); }
@media (min-width: 860px) { .t-account { grid-template-columns: 1fr 1fr; } .t-account > article + article { border-left: 2px solid var(--ink); } }
@media (max-width: 859px) { .t-account > article + article { border-top: 2px solid var(--ink); } }
.t-account article { padding: var(--s-4) 0 var(--s-2); }
@media (min-width: 860px) { .t-account article { padding: var(--s-4) var(--s-6) var(--s-2); } .t-account article:first-child { padding-left: 0; } }
.t-account .side { font-size: var(--fs-xs); color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; }
.t-account h3 { font-size: var(--fs-lg); line-height: var(--lh-snug); margin: var(--s-1) 0 var(--s-2); }
@media (max-width: 600px) { .t-account h3 { font-size: var(--fs-md); } }
.t-account p { max-width: var(--measure); }
.t-account ul { list-style: none; margin: var(--s-4) 0 0; padding: 0; }
.tick-list li, .t-account li { display: grid; grid-template-columns: 1fr auto; gap: var(--s-2); padding: var(--s-2) 0; border-bottom: 1px solid var(--rule-l); color: var(--ink); }
.tick-list li::after, .t-account li::after { content: "\2713"; color: var(--accent-l); font-weight: 600; }
.tick-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
@media (min-width: 860px) { .tick-list.two { columns: 2; column-gap: var(--s-6); } .tick-list.two li { break-inside: avoid; } }
.side-note { margin-top: var(--s-3); color: var(--ink-3); font-size: var(--fs-xs); }

/* Numbered schedule */
.track { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: var(--s-4); counter-reset: s; }
@media (min-width: 860px) {
  .track { grid-template-columns: repeat(4, 1fr); gap: 0; }
  .track.five { grid-template-columns: repeat(5, 1fr); }
  .track li + li { border-left: 1px solid var(--rule-l); }
  .track li { padding-left: var(--s-3); padding-right: var(--s-3); }
  .track li:first-child { padding-left: 0; }
}
.track li { counter-increment: s; padding-top: var(--s-3); border-top: 2px solid var(--ink); }
.track li::before { content: counter(s, decimal-leading-zero); display: block; font-size: var(--fs-xl); line-height: 1; letter-spacing: var(--track-tight); color: var(--ink); font-variant-numeric: tabular-nums; margin-bottom: var(--s-3); }
.track.five li::before { font-size: var(--fs-lg); }
.track h3 { font-size: var(--fs-md); margin-bottom: var(--s-1); }
.track p { color: var(--ink-2); }

/* Grid-paper band with audit ticks */
.gridpaper {
  background-color: var(--paper-2);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: var(--s-3) var(--s-3);
}
section.block.gridpaper { border-top: 1px solid var(--rule-l); border-bottom: 1px solid var(--rule-l); }
.big { font-size: clamp(2.5rem, 6vw, 4.75rem); line-height: 1.02; letter-spacing: var(--track-tight); max-width: 14ch; margin-top: var(--s-1); }
.keys { margin-top: var(--s-8); display: grid; grid-template-columns: 1fr; gap: var(--s-3); }
@media (min-width: 860px) { .keys { grid-template-columns: repeat(4, 1fr); } .keys.three { grid-template-columns: repeat(3, 1fr); } }
.keys > div { background: var(--paper); border: 1px solid var(--rule-l); border-radius: var(--radius-sm); padding: var(--s-3); }
.keys h3 { display: flex; align-items: center; gap: var(--s-1); font-size: var(--fs-sm); font-weight: 600; margin-bottom: var(--s-1); }
.keys h3::before { content: "\2713"; display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 1.5px solid var(--accent-l); color: var(--accent-l); font-size: var(--fs-xs); flex: none; }
.keys p { color: var(--ink-2); font-size: var(--fs-xs); line-height: var(--lh-body); }

/* Cards (guides) */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: var(--s-3); }
@media (min-width: 700px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { display: flex; flex-direction: column; height: 100%; border-radius: var(--radius-sm); border: 1px solid var(--rule-l); border-top: 2px solid var(--ink); background: var(--paper); text-decoration: none; overflow: hidden; transition: box-shadow var(--ease), transform var(--ease); }
.card:hover { box-shadow: 0 12px 32px rgba(11, 18, 48, 0.08); transform: translateY(-3px); }
.card .thumb { aspect-ratio: 16 / 9; background: var(--paper-2); overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .body { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-3); flex: 1; }
.card .k { font-size: var(--fs-xs); color: var(--accent-l); }
.card .t { font-size: var(--fs-md); line-height: var(--lh-snug); letter-spacing: var(--track-head); color: var(--ink); }
.card .d { color: var(--ink-3); font-size: var(--fs-xs); margin-top: auto; }

/* FAQ as ruled rows */
.faq { border-top: 2px solid var(--ink); max-width: 56rem; }
.faq details { border-bottom: 1px solid var(--rule-l); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { font-size: var(--fs-md); line-height: var(--lh-snug); }
.faq summary::after { content: "+"; flex: none; width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--rule-l); display: grid; place-items: center; color: var(--ink); font-size: var(--fs-md); transition: transform var(--ease), background var(--ease); }
.faq details[open] summary::after { content: "\2212"; background: var(--ink); color: var(--white); border-color: var(--ink); }
.faq summary:hover h3 { color: var(--accent-l); }
.faq .ans { padding: 0 0 var(--s-3); max-width: var(--measure); color: var(--ink-2); }

/* Closing CTA */
.closing { padding: 0 0 var(--s-12); }
.closing.spaced { padding-top: var(--s-12); }
.closing .wrap { display: grid; grid-template-columns: 1fr; gap: var(--s-4); align-items: end; }
@media (min-width: 960px) { .closing .wrap { grid-template-columns: 8fr 4fr; } .closing .cta { justify-self: end; } }
.closing .rule-off { grid-column: 1 / -1; border-top: var(--double); margin-bottom: var(--s-6); }
.closing h2 { font-size: var(--fs-xl); line-height: 1.04; letter-spacing: var(--track-tight); max-width: 16ch; }
.closing p { margin-top: var(--s-3); color: var(--ink-2); max-width: var(--measure); }
@media (max-width: 600px) { .closing h2 { font-size: var(--fs-lg); } }

/* Split layout (content + aside) */
.split-2 { display: grid; grid-template-columns: 1fr; gap: var(--s-8); }
@media (min-width: 960px) { .split-2 { grid-template-columns: 7fr 5fr; gap: var(--s-10); } }
.aside-card { border: 1px solid var(--rule-l); border-top: 2px solid var(--ink); border-radius: var(--radius-sm); padding: var(--s-4); background: var(--paper-2); align-self: start; }
.aside-card h2 { font-size: var(--fs-md); margin-bottom: var(--s-2); }
.aside-card dl { margin: 0; }
.aside-card dt { font-size: var(--fs-xs); color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; margin-top: var(--s-3); }
.aside-card dd { margin: var(--s-1) 0 0; color: var(--ink); }
.aside-card address { font-style: normal; }

/* Forms */
.form { display: grid; grid-template-columns: 1fr; gap: var(--s-3); }
@media (min-width: 640px) { .form { grid-template-columns: 1fr 1fr; } .form .full { grid-column: 1 / -1; } }
.field label { display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--ink); margin-bottom: var(--s-1); }
.field input, .field select, .field textarea {
  width: 100%; font: 400 var(--fs-sm)/1.4 var(--font); color: var(--ink);
  padding: 0.875rem var(--s-2); border: 1px solid #c9cfdd; border-radius: var(--radius-sm); background: var(--paper);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.field textarea { min-height: 10rem; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-3); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent-l); box-shadow: 0 0 0 3px rgba(43, 73, 176, 0.18); }
.field input::placeholder, .field textarea::placeholder { color: #7a829c; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { min-height: 1.5rem; font-size: var(--fs-sm); }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--error); }
.form-note { font-size: var(--fs-xs); color: var(--ink-3); }

/* Article prose */
.article-wrap { display: grid; grid-template-columns: 1fr; gap: var(--s-8); padding: var(--s-10) 0 var(--s-12); }
.article-figure { margin: 0 0 var(--s-6); border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--rule-l); }
.prose { max-width: var(--prose); margin: 0 auto; color: var(--ink-2); font-size: 1.125rem; line-height: 1.75; }
.prose > * + * { margin-top: var(--s-3); }
.prose h2 { font-size: var(--fs-lg); line-height: var(--lh-snug); margin-top: var(--s-8); padding-top: var(--s-3); border-top: 1px solid var(--rule-l); }
.prose h3 { font-size: var(--fs-md); line-height: var(--lh-snug); margin-top: var(--s-5); }
.prose h4 { font-size: var(--fs-sm); font-weight: 600; margin-top: var(--s-4); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--accent-l); }
.prose ul, .prose ol { padding-left: var(--s-3); }
.prose li + li { margin-top: var(--s-1); }
.prose blockquote { margin: var(--s-4) 0; padding: var(--s-2) var(--s-3); border-left: 3px solid var(--ink); background: var(--paper-2); color: var(--ink); }
.prose img { border-radius: var(--radius-sm); }
.prose .table-scroll, .prose table { width: 100%; }
.prose table { border-collapse: collapse; font-size: var(--fs-xs); line-height: 1.5; border-top: 2px solid var(--ink); border-bottom: var(--double); display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 0.75rem var(--s-2); border: 0; border-bottom: 1px solid var(--rule-l); min-width: 8rem; }
.prose th, .prose tr:first-child td { color: var(--ink); font-weight: 600; background: var(--paper-2); }
.prose #key-takeaways + ul, .prose h2#key-takeaways + ul { background: var(--paper-2); border: 1px solid var(--rule-l); border-radius: var(--radius-sm); padding: var(--s-3) var(--s-3) var(--s-3) var(--s-5); }
.prose hr { border: 0; border-top: 1px solid var(--rule-l); margin: var(--s-6) 0; }
.post-nav { max-width: var(--prose); margin: var(--s-8) auto 0; display: grid; grid-template-columns: 1fr; gap: var(--s-2); border-top: var(--double); padding-top: var(--s-3); }
@media (min-width: 700px) { .post-nav { grid-template-columns: 1fr 1fr; } .post-nav .next { text-align: right; } }
.post-nav a { text-decoration: none; color: var(--ink); }
.post-nav a:hover { color: var(--accent-l); }
.post-nav small { display: block; color: var(--ink-3); font-size: var(--fs-xs); }

/* ============================ Footer ============================ */
.foot { background: var(--paper-2); border-top: 1px solid var(--rule-l); padding: var(--s-8) 0 var(--s-6); font-size: var(--fs-xs); color: var(--ink-2); }
.foot .wrap { display: grid; grid-template-columns: 1fr; gap: var(--s-4); }
@media (min-width: 900px) { .foot .wrap { grid-template-columns: 2.2fr 1.2fr 1fr 1.2fr; } }
.foot h2 { font-size: var(--fs-xs); font-weight: 600; color: var(--ink); margin-bottom: var(--s-2); letter-spacing: 0; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { padding: 0.25rem 0; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--accent-l); text-decoration: underline; }
.foot address { font-style: normal; margin-top: var(--s-2); }
.foot .brand { color: var(--ink); }
.foot .brand .mark img { filter: none; }
.foot .legal { grid-column: 1 / -1; border-top: 1px solid var(--rule-l); padding-top: var(--s-3); color: var(--ink-3); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2); }
.subscribe { margin-top: var(--s-3); max-width: 22rem; }
.subscribe label { display: block; font-weight: 600; color: var(--ink); margin-bottom: var(--s-1); }
.subscribe .row { display: flex; gap: var(--s-1); }
.subscribe input { flex: 1; min-width: 0; font: 400 var(--fs-xs)/1.4 var(--font); padding: 0.75rem var(--s-2); border: 1px solid #c9cfdd; border-radius: var(--radius-sm); background: var(--paper); color: var(--ink); }
.subscribe input:focus { outline: none; border-color: var(--accent-l); box-shadow: 0 0 0 3px rgba(43, 73, 176, 0.18); }
.subscribe .btn { padding: 0.75rem var(--s-2); font-size: var(--fs-xs); }
.subscribe .form-status { font-size: var(--fs-xs); margin-top: var(--s-1); }

/* Not found */
.nf-links { list-style: none; padding: 0; margin: var(--s-4) 0 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .scene .ribs, .scene .sphere, .scene .arc, .grain::after, .topbar, .foot, .closing { display: none !important; } .scene { background: none; color: #000; } .scene h1 { color: #000; } }

/* Button colours always win over link colour rules (white-text-on-white fix) */
a.btn.btn-light, .scene a.btn.btn-light, button.btn.btn-light { color: var(--black); }
a.btn.btn-light:hover, .scene a.btn.btn-light:hover { color: var(--black); }
a.btn.btn-ink, a.btn.btn-dark, button.btn.btn-ink, .scene a.btn.btn-dark, a.btn.btn-ink:hover, a.btn.btn-dark:hover { color: var(--white); }
a.btn.btn-ghost, .scene a.btn.btn-ghost, a.btn.btn-ghost:hover { color: var(--text); }
a.btn.btn-outline { color: var(--ink); }
a.btn.btn-outline:hover { color: var(--white); }

/* ============================ Pagination ============================ */
.pager { margin-top: var(--s-8); border-top: 1px solid var(--rule-l); padding-top: var(--s-3); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2); }
.pager .count { font-size: var(--fs-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pager ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-1); }
.pager a, .pager span.cur, .pager span.gap {
  min-width: 2.75rem; height: 2.75rem; padding: 0 var(--s-2);
  display: inline-grid; place-items: center; border-radius: var(--radius-sm);
  font-size: var(--fs-sm); font-variant-numeric: tabular-nums; text-decoration: none;
}
.pager a { color: var(--ink); border: 1px solid var(--rule-l); background: var(--paper); transition: border-color var(--ease), background var(--ease); }
.pager a:hover { border-color: var(--ink); background: var(--paper-2); color: var(--ink); }
.pager span.cur { background: var(--ink); color: var(--white); border: 1px solid var(--ink); font-weight: 600; }
.pager span.gap { color: var(--ink-3); min-width: auto; padding: 0 0.25rem; }
.pager .dir { font-weight: 500; }
.pager .dir.off { color: var(--ink-3); border: 1px dashed var(--rule-l); background: transparent; pointer-events: none; }
@media (max-width: 600px) { .pager ol .num-link { display: none; } .pager { justify-content: center; } }

/* ============================ Article page ============================ */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 70; pointer-events: none; }
.read-progress span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--accent-l), var(--accent)); transform-origin: 0 50%; transform: scaleX(0); }
.article-kicker { display: flex; gap: var(--s-2); margin-top: var(--s-3); }
.article-kicker span + span::before { content: "\00B7"; margin-right: var(--s-2); color: var(--line-strong); }
.page-head.article h1 { margin-top: var(--s-1); }
.article-lede { margin-top: var(--s-3); max-width: 46rem; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-8); padding: var(--s-10) 0 var(--s-12); }
@media (min-width: 1100px) { .article-layout { grid-template-columns: 16rem minmax(0, 46rem); justify-content: center; gap: var(--s-10); } }
.article-aside { display: none; }
@media (min-width: 1100px) { .article-aside { display: flex; flex-direction: column; gap: var(--s-4); position: sticky; top: var(--s-4); align-self: start; max-height: calc(100vh - var(--s-8)); overflow-y: auto; padding-right: var(--s-1); } }
.article-main { min-width: 0; }
.article-main .prose { max-width: none; }
.article-figure { margin: 0 0 var(--s-6); border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--rule-l); aspect-ratio: 16 / 9; background: var(--paper-2); }
.article-figure img { width: 100%; height: 100%; object-fit: cover; }

/* Table of contents */
.toc { border-top: 2px solid var(--ink); }
.toc-title, .toc summary { font-size: var(--fs-xs); font-weight: 600; color: var(--ink); text-transform: uppercase; letter-spacing: 0.04em; padding: var(--s-2) 0 var(--s-1); }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: grid; grid-template-columns: 2rem 1fr; padding: 0.4rem 0; font-size: var(--fs-xs); line-height: 1.4; color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--rule-l); transition: color var(--ease); }
.toc a::before { content: counter(toc, decimal-leading-zero); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.toc a:hover { color: var(--accent-l); }
.toc a.active { color: var(--ink); font-weight: 600; }
.toc a.active::before { color: var(--accent-l); }
.toc-mobile { margin-bottom: var(--s-4); background: var(--paper-2); border: 1px solid var(--rule-l); border-top: 2px solid var(--ink); border-radius: 0 0 var(--radius-sm) var(--radius-sm); padding: 0 var(--s-3) var(--s-2); }
.toc-mobile summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary::after { content: "+"; font-size: var(--fs-md); line-height: 1; }
.toc-mobile[open] summary::after { content: "\2212"; }
@media (min-width: 1100px) { .toc-mobile { display: none; } }

/* Related service card */
.svc-card { background: var(--bg); color: var(--text); border-radius: var(--radius-sm); padding: var(--s-3); position: relative; overflow: hidden; }
.svc-card::before { content: ""; position: absolute; inset: 0 0 auto auto; width: 70%; height: 100%; background: repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0, rgba(255,255,255,0.01) 10px, rgba(0,0,0,0.25) 18px, rgba(255,255,255,0.07) 19px, rgba(255,255,255,0.05) 20px); -webkit-mask-image: linear-gradient(200deg, #000, transparent 60%); mask-image: linear-gradient(200deg, #000, transparent 60%); pointer-events: none; }
.svc-card > * { position: relative; }
.svc-card .label { color: var(--accent); }
.svc-card-t { font-size: var(--fs-md); line-height: var(--lh-snug); margin: var(--s-1) 0; letter-spacing: var(--track-head); }
.svc-card-d { font-size: var(--fs-xs); color: var(--muted); margin-bottom: var(--s-3); }
.svc-card .btn { width: 100%; justify-content: space-between; background: var(--white); color: var(--black); }
.svc-card a.btn.btn-ink { color: var(--black); }
.svc-card .btn .chev { background: var(--black); color: var(--white); }
.svc-card .btn:hover { background: #dfe6ff; }

/* Prose extras: callouts, takeaways, further reading */
.prose h2, .prose h3 { scroll-margin-top: var(--s-4); }
.prose h2:first-child, .prose .callout:first-child { margin-top: 0; }
.prose .table-scroll { overflow-x: auto; margin-top: var(--s-4); }
.prose .table-scroll table { display: table; min-width: 32rem; }
.prose .callout { background: var(--paper-2); border: 1px solid var(--rule-l); border-left: 4px solid var(--accent-l); border-radius: var(--radius-sm); padding: var(--s-3) var(--s-4); margin-top: var(--s-6); }
.prose .callout h2 { border: 0; padding: 0; margin: 0 0 var(--s-2); font-size: var(--fs-md); }
.prose .callout > * + * { margin-top: var(--s-2); }
.prose ul.sf-takeaways { list-style: none; background: var(--paper-2); border: 1px solid var(--rule-l); border-top: 2px solid var(--ink); border-radius: 0 0 var(--radius-sm) var(--radius-sm); padding: var(--s-2) var(--s-3); }
.prose ul.sf-takeaways li { position: relative; padding: var(--s-1) 0 var(--s-1) var(--s-4); border-bottom: 1px solid var(--rule-l); margin: 0; }
.prose ul.sf-takeaways li:last-child { border-bottom: 0; }
.prose ul.sf-takeaways li::before { content: "\2713"; position: absolute; left: 0; top: var(--s-1); color: var(--accent-l); font-weight: 600; }
.prose h2#key-takeaways { border-top: 0; padding-top: 0; margin-top: 0; font-size: var(--fs-md); }
.prose h2#further-reading { font-size: var(--fs-md); }
.prose ul.sf-further { list-style: none; padding: 0; border-top: 2px solid var(--ink); border-bottom: var(--double); }
.prose ul.sf-further li { margin: 0; padding: var(--s-2) 0; border-bottom: 1px solid var(--rule-l); font-size: var(--fs-sm); }
.prose ul.sf-further li:last-child { border-bottom: 0; }

/* End of article: share, about, newer/older */
.article-end { margin-top: var(--s-8); display: grid; gap: var(--s-4); }
.share { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2); border-top: 2px solid var(--ink); padding-top: var(--s-3); }
.share-t { font-weight: 600; color: var(--ink); }
.share ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-1); }
.share-btn { display: inline-flex; align-items: center; height: 2.5rem; padding: 0 var(--s-2); border: 1px solid var(--rule-l); border-radius: var(--radius-sm); background: var(--paper); color: var(--ink); font: 500 var(--fs-xs)/1 var(--font); text-decoration: none; cursor: pointer; transition: border-color var(--ease), background var(--ease); }
.share-btn:hover { border-color: var(--ink); background: var(--paper-2); color: var(--ink); }
.about-box { display: grid; grid-template-columns: auto 1fr; gap: var(--s-3); align-items: start; background: var(--paper-2); border: 1px solid var(--rule-l); border-radius: var(--radius-sm); padding: var(--s-3); font-size: var(--fs-xs); }
.about-mark { width: 3rem; height: 3rem; border-radius: 50%; background: var(--paper); border: 1px solid var(--rule-l); display: grid; place-items: center; overflow: hidden; }
.about-mark img { height: 1.75rem; width: auto; max-width: none; margin-left: 0.85rem; }
.about-t { font-weight: 600; color: var(--ink); font-size: var(--fs-sm); margin-bottom: var(--s-1); }
.about-note { margin-top: var(--s-1); color: var(--ink-3); }
.article-end .post-nav { margin: 0; max-width: none; }

/* Article polish */
.page-head.article .wrap { display: block; }
.page-head.article .crumbs { margin-bottom: var(--s-1); }
.prose h2#key-takeaways { margin-top: var(--s-6); }
.prose h2#key-takeaways:first-child { margin-top: 0; }
.prose ul.sf-takeaways li { padding-left: 1.75rem; }
.svc-card .btn { font-size: var(--fs-xs); padding: 0.75rem var(--s-2); white-space: nowrap; }

/* Light surfaces inside dark scenes always use dark text */
.scene .nav-menu a, .scene .nav-menu a:hover, .scene .nav-menu a:focus-visible { color: var(--ink); }
.scene .nav-menu a:hover, .scene .nav-menu a:focus-visible { background: var(--paper-2); }

/* Site credit */
.foot .legal .credit { flex-basis: 100%; color: var(--ink-3); }
@media (min-width: 900px) { .foot .legal .credit { flex-basis: auto; } }
.foot .legal .credit a { color: var(--ink-2); font-weight: 500; text-decoration: underline; text-underline-offset: 0.2em; }
.foot .legal .credit a:hover { color: var(--accent-l); }

/* ============================ Motion ============================
 * Restrained by design: transform + opacity only, nothing blocks reading,
 * and everything is switched off for prefers-reduced-motion.
 */
@keyframes sf-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes sf-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sf-drop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes sf-slide-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes sf-pop { 0% { opacity: 0; transform: scale(.4); } 70% { opacity: 1; transform: scale(1.15); } 100% { opacity: 1; transform: scale(1); } }
@keyframes sf-sweep { 0% { transform: translateX(-70%); } 100% { transform: translateX(170%); } }
@keyframes sf-float { from { transform: translateY(0); } to { transform: translateY(14px); } }
@keyframes sf-breathe { from { opacity: .7; } to { opacity: 1; } }

@media (prefers-reduced-motion: no-preference) {
  /* Hero entrance */
  .scene--home h1 span, .scene .tag, .scene .tools li, .scene .lede, .scene .actions > *,
  .page-head .crumbs, .page-head .label, .page-head h1, .page-head .meta-line, .nf-links li {
    animation: sf-rise .8s cubic-bezier(.2,.7,.2,1) both;
  }
  .scene--home h1 span:nth-child(2) { animation-delay: .08s; }
  .scene .tag { animation-delay: .18s; }
  .scene .tools li { animation-delay: .26s; }
  .scene .tools li:nth-child(2) { animation-delay: .3s; } .scene .tools li:nth-child(3) { animation-delay: .34s; } .scene .tools li:nth-child(4) { animation-delay: .38s; }
  .page-head h1 { animation-delay: .06s; }
  .scene .lede { animation-delay: .22s; }
  .page-head .meta-line { animation-delay: .3s; }
  .scene .actions > *:nth-child(1) { animation-delay: .34s; } .scene .actions > *:nth-child(2) { animation-delay: .42s; }
  .topbar { animation: sf-fade .6s ease both; }

  /* Ambient scene: light passing over the glass, drifting sphere, breathing arc */
  .scene .ribs::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(100deg, transparent 0%, rgba(190, 210, 255, 0.22) 45%, rgba(220, 230, 255, 0.32) 50%, rgba(190, 210, 255, 0.22) 55%, transparent 100%);
    width: 45%; animation: sf-sweep 11s cubic-bezier(.45,0,.55,1) 1.2s infinite; will-change: transform;
  }
  .scene .sphere { animation: sf-float 9s ease-in-out infinite alternate; will-change: transform; }
  .scene .arc { animation: sf-breathe 6s ease-in-out infinite alternate; }

  /* Scroll reveals (classes added by js/site.js only to content below the fold) */
  .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 70ms); }
  .reveal.in { opacity: 1; transform: none; }

  /* Rules drawn left to right, like ruling off a total */
  .ledger-total.reveal, .closing .rule-off.reveal, .track li.reveal, .facts.reveal { transform: none; clip-path: inset(0 100% 0 0); transition: clip-path 1s cubic-bezier(.65,0,.35,1), opacity .4s ease; transition-delay: calc(var(--i, 0) * 90ms); }
  .ledger-total.reveal.in, .closing .rule-off.reveal.in, .track li.reveal.in, .facts.reveal.in { clip-path: inset(0 0 0 0); }

  /* Audit ticks pop in after their row */
  .t-account li.reveal::after, .tick-list li.reveal::after, .keys > div.reveal h3::before { opacity: 0; }
  .t-account li.reveal.in::after, .tick-list li.reveal.in::after, .keys > div.reveal.in h3::before { animation: sf-pop .5s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 70ms + .35s); }

  /* Menus */
  .nav-drop.open .nav-menu { animation: sf-drop .22s cubic-bezier(.2,.7,.2,1) both; transform-origin: top left; }
  .drawer.open { animation: sf-slide-in .3s cubic-bezier(.2,.7,.2,1) both; }
  .faq details[open] .ans, .toc-mobile[open] ol { animation: sf-rise .35s cubic-bezier(.2,.7,.2,1) both; }
}

/* Hover / press feedback (also kept subtle) */
.btn:active { transform: translateY(0) scale(.98); }
.ledger-t a.tr .c-name { transition: transform var(--ease), color var(--ease); }
.ledger-t a.tr:hover .c-name { transform: translateX(6px); }
.ledger-t a.tr:hover .c-no { color: var(--accent-l); }
.ledger-t .c-go svg { transition: transform var(--ease); }
.ledger-t a.tr:hover .c-go svg { transform: translate(2px, -2px); }
.card .thumb img { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.card:hover .thumb img { transform: scale(1.04); }
.card .t { transition: color var(--ease); }
.card:hover .t { color: var(--accent-l); }
.card:active { transform: translateY(-1px) scale(.995); }
.nav-drop > button svg { transition: transform var(--ease); }
.share-btn:active, .pager a:active { transform: scale(.97); }
.toc a { transition: color var(--ease), padding-left var(--ease); }
.toc a:hover { padding-left: 4px; }
.prose a { text-decoration-thickness: 1px; transition: text-decoration-thickness var(--ease), color var(--ease); }
.prose a:hover { text-decoration-thickness: 2px; }
.field input, .field select, .field textarea { transition: border-color var(--ease), box-shadow var(--ease), background var(--ease); }
.btn[disabled] .chev { animation: sf-breathe .6s ease-in-out infinite alternate; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .card:hover .thumb img, .ledger-t a.tr:hover .c-name { transform: none; }
}
