/* --------------------------------------------------------------------------
   1. Tokens — Champagne gold & deep plum, drawn from the XLCFO coin mark.
   Gold carries the brand on dark grounds; plum carries it on light. A teal
   and a clay complete the set so category and illustration work has range.
   -------------------------------------------------------------------------- */
:root {
  /* Brand */
  --plum:        #2B0A1D;
  --plum-deep:   #17050F;
  --plum-mid:    #4A1030;
  --plum-text:   #6B1638;
  --gold:        #C9A24E;
  --gold-lite:   #E6D492;
  --gold-bright: #E9C97E;
  --gold-pale:   #F4EAA5;
  --bronze:      #7A5714;
  --rose:        #F0A9C6;   /* plum accent, legible on dark grounds */

  /* Supporting accents — category coding, charts, illustration */
  --teal:        #0F6B6B;
  --teal-lite:   #6FD3CB;
  --clay:        #973D1C;
  --clay-lite:   #E8926B;

  /* Neutrals — warm, biased toward the gold */
  --paper:      #FBF8F3;
  --paper-2:    #F3EDE2;
  --sand:       #EAE0CE;
  --sand-dk:    #D9CBB2;
  --graphite:   #4E3644;
  --graphite-2: #665160;

  /* Semantic */
  --bg:            var(--paper);
  --bg-alt:        var(--paper-2);
  --surface:       #FFFFFF;
  --text:          #1E0B15;
  --text-muted:    var(--graphite);
  --text-faint:    var(--graphite-2);
  --border:        rgba(30, 11, 21, 0.13);
  --border-strong: rgba(30, 11, 21, 0.24);
  --accent:        var(--plum-text);
  --accent-text:   var(--plum-text);
  --accent-soft:   rgba(107, 22, 56, 0.09);
  --acc-plum:      var(--plum-text);
  --focus:         var(--plum-text);
  --btn-bg:        var(--plum-text);
  --btn-fg:        #FDFBF7;

  /* Type */
  --font-display: "Instrument Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  /* Scale — fluid */
  --step--2: clamp(0.72rem, 0.70rem + 0.10vw, 0.78rem);
  --step--1: clamp(0.84rem, 0.81rem + 0.14vw, 0.92rem);
  --step-0:  clamp(1.00rem, 0.97rem + 0.16vw, 1.08rem);
  --step-1:  clamp(1.20rem, 1.13rem + 0.35vw, 1.40rem);
  --step-2:  clamp(1.48rem, 1.34rem + 0.68vw, 1.90rem);
  --step-3:  clamp(1.85rem, 1.58rem + 1.32vw, 2.70rem);
  --step-4:  clamp(2.30rem, 1.80rem + 2.45vw, 3.90rem);
  --step-5:  clamp(2.80rem, 1.90rem + 4.40vw, 5.60rem);

  /* Space */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;   --sp-3: 0.75rem;
  --sp-4: 1rem;     --sp-5: 1.5rem;   --sp-6: 2rem;
  --sp-7: 3rem;     --sp-8: 4rem;     --sp-9: 6rem;
  --sp-10: 8rem;

  /* Layout */
  --maxw: 1200px;
  --maxw-narrow: 760px;
  --radius: 4px;
  --radius-lg: 10px;

  --shadow-sm: 0 1px 2px rgba(30,11,21,.05), 0 2px 8px rgba(30,11,21,.05);
  --shadow-md: 0 2px 4px rgba(30,11,21,.06), 0 12px 32px rgba(30,11,21,.09);
  --shadow-lg: 0 4px 8px rgba(30,11,21,.07), 0 24px 64px rgba(30,11,21,.13);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dark tokens, shared by the media query and the explicit stamp */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:            #140710;
    --bg-alt:        #1C0C17;
    --surface:       #24101C;
    --text:          #F5EFE8;
    --text-muted:    #C9BAC3;
    --text-faint:    #A08E9B;
    --border:        rgba(245, 239, 232, 0.14);
    --border-strong: rgba(245, 239, 232, 0.26);
    --accent:        var(--gold-bright);
    --accent-text:   var(--gold-bright);
    --accent-soft:   rgba(233, 201, 126, 0.13);
    --acc-plum:      var(--rose);
    --focus:         var(--gold-bright);
    --btn-bg:        var(--gold-bright);
    --btn-fg:        var(--plum);
    --sand:          #2E1424;
    --sand-dk:       #3E1C2F;
    --teal:          var(--teal-lite);
    --clay:          var(--clay-lite);
    --shadow-sm: 0 1px 2px rgba(0,0,0,.45);
    --shadow-md: 0 2px 4px rgba(0,0,0,.45), 0 12px 32px rgba(0,0,0,.4);
    --shadow-lg: 0 4px 8px rgba(0,0,0,.5), 0 24px 64px rgba(0,0,0,.55);
  }
}
:root[data-theme="dark"] {
  --bg:            #140710;
  --bg-alt:        #1C0C17;
  --surface:       #24101C;
  --text:          #F5EFE8;
  --text-muted:    #C9BAC3;
  --text-faint:    #A08E9B;
  --border:        rgba(245, 239, 232, 0.14);
  --border-strong: rgba(245, 239, 232, 0.26);
  --accent:        var(--gold-bright);
  --accent-text:   var(--gold-bright);
  --accent-soft:   rgba(233, 201, 126, 0.13);
  --acc-plum:      var(--rose);
  --focus:         var(--gold-bright);
  --btn-bg:        var(--gold-bright);
  --btn-fg:        var(--plum);
  --sand:          #2E1424;
  --sand-dk:       #3E1C2F;
  --teal:          var(--teal-lite);
  --clay:          var(--clay-lite);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.45);
  --shadow-md: 0 2px 4px rgba(0,0,0,.45), 0 12px 32px rgba(0,0,0,.4);
  --shadow-lg: 0 4px 8px rgba(0,0,0,.5), 0 24px 64px rgba(0,0,0,.55);
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  font-feature-settings: "kern" 1, "liga" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--gold-lite); color: var(--plum); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { text-wrap: pretty; }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--sp-7) 0;
}

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}
.wrap--narrow { max-width: var(--maxw-narrow); }

.section { padding-block: clamp(3.5rem, 9vw, 7.5rem); }
.section--tight { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section--alt { background: var(--bg-alt); }

.section--ink {
  background: var(--plum);
  color: #F5EFE8;
  --text: #F5EFE8;
  --text-muted: #C9BAC3;
  --text-faint: #A08E9B;
  --border: rgba(245,239,232,.15);
  --border-strong: rgba(245,239,232,.30);
  --accent: var(--gold-bright);
  --accent-text: var(--gold-bright);
  --accent-soft: rgba(233,201,126,.13);
  --surface: rgba(255,255,255,.045);
  --acc-plum: var(--rose);
  --focus: var(--gold-bright);
  --btn-bg: var(--gold-bright);
  --btn-fg: var(--plum);
  --teal: var(--teal-lite);
  --clay: var(--clay-lite);
}

.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
  .split--even { grid-template-columns: 1fr 1fr; }
  .split--sticky > :first-child { position: sticky; top: 7rem; }
}

.stack > * + * { margin-top: var(--sp-4); }
.stack-lg > * + * { margin-top: var(--sp-6); }

/* --------------------------------------------------------------------------
   4. Typographic utilities
   -------------------------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-text);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: var(--sp-4);
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  background: currentColor;
  transform: rotate(45deg);
  flex: none;
}

/* Standing motto — a rallying line, not body copy. Colour comes from the
   .acc-* class on the element so it flips correctly on dark grounds. */
.motto {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.16;
  letter-spacing: -0.01em;
  color: var(--accent-text);
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
  max-width: 18ch;
}

.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 62ch;
}

.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.small { font-size: var(--step--1); }
.mono {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.serif { font-family: var(--font-display); }
.measure { max-width: 62ch; }
.center { text-align: center; margin-inline: auto; }

.hl {
  color: var(--accent-text);
  font-style: italic;
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  font-family: var(--font-sans);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  padding: 0.95em 1.6em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s var(--ease),
              border-color .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
  white-space: nowrap;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--btn-bg);
  color: var(--btn-fg);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { filter: brightness(1.12); box-shadow: var(--shadow-md); }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--ghost:hover { border-color: var(--text); background: color-mix(in oklab, var(--text) 5%, transparent); }

.btn--sm { padding: 0.7em 1.15em; font-size: var(--step--2); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--accent-text);
  border-bottom: 1px solid color-mix(in oklab, currentColor 35%, transparent);
  padding-bottom: 2px;
  transition: gap .25s var(--ease), border-color .25s var(--ease);
}
.link-arrow::after { content: "→"; transition: transform .25s var(--ease); }
.link-arrow:hover { gap: 0.7em; border-color: currentColor; }
.link-arrow:hover::after { transform: translateX(2px); }

/* --------------------------------------------------------------------------
   6. Header / nav
   -------------------------------------------------------------------------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--plum-text); color: #FDFBF7; padding: .75rem 1.25rem; border-radius: 0 0 6px 0;
}
.skip:focus { left: 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--border); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: -0.015em;
  line-height: 1;
  flex: none;
}
.brand b { font-weight: 400; }
.brand img {
  width: 2.15rem; height: 2.15rem;
  flex: none;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(201,162,78,.5), 0 1px 6px rgba(30,11,21,.18);
  transition: transform .35s var(--ease);
}
.brand:hover img { transform: rotate(-9deg) scale(1.05); }
.brand small {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-faint);
  align-self: center;
}

.nav-links {
  display: none;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.75rem);
  list-style: none;
  padding: 0;
}
@media (min-width: 1000px) { .nav-links { display: flex; } }

.nav-links a {
  font-size: var(--step--1);
  color: var(--text-muted);
  position: relative;
  padding-block: 0.4rem;
  transition: color .2s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--text); font-weight: 500; }
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; gap: var(--sp-3); }
.nav-actions .btn { display: none; }
@media (min-width: 700px) { .nav-actions .btn { display: inline-flex; } }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  align-items: center;
  background: none; border: 1px solid var(--border); border-radius: 999px;
  cursor: pointer;
}
@media (min-width: 1000px) { .nav-toggle { display: none; } }
.nav-toggle span {
  display: block; width: 17px; height: 1.5px; background: var(--text);
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding-block: var(--sp-4) var(--sp-6);
}
.mobile-menu.is-open { display: block; }
@media (min-width: 1000px) { .mobile-menu, .mobile-menu.is-open { display: none; } }
.mobile-menu ul { list-style: none; padding: 0; }
.mobile-menu li + li { border-top: 1px solid var(--border); }
.mobile-menu a {
  display: block;
  padding: 0.9rem 0;
  font-size: var(--step-1);
  font-family: var(--font-display);
}
.mobile-menu .btn { width: 100%; margin-top: var(--sp-5); }

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--plum-deep);
  color: #F5EFE8;
  overflow: hidden;
  padding-block: clamp(4rem, 12vw, 9rem) clamp(3.5rem, 9vw, 7rem);
  --text: #F5EFE8;
  --text-muted: #C9BAC3;
  --text-faint: #A08E9B;
  --border: rgba(245,239,232,.15);
  --border-strong: rgba(245,239,232,.30);
  --accent: var(--gold-bright);
  --accent-text: var(--gold-bright);
  --surface: rgba(255,255,255,.05);
  --acc-plum: var(--rose);
  --focus: var(--gold-bright);
  --btn-bg: var(--gold-bright);
  --btn-fg: var(--plum);
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(1150px 540px at 80% -14%, rgba(233,201,126,.22), transparent 62%),
    radial-gradient(820px 500px at 4% 106%, rgba(74,16,48,.85), transparent 68%),
    radial-gradient(600px 380px at 52% 118%, rgba(15,107,107,.28), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(233,201,126,.07) 1px, transparent 1px);
  background-size: 88px 100%;
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }

.hero h1 { max-width: 17ch; }
.hero .lede { margin-top: var(--sp-5); font-size: clamp(1.05rem, .95rem + .6vw, 1.35rem); }
.hero .btn-row { margin-top: var(--sp-6); }

.hero-meta {
  margin-top: clamp(3rem, 7vw, 5rem);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}
.hero-meta dt {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: .4rem;
}
.hero-meta dd { margin: 0; font-size: var(--step--1); color: var(--text-muted); line-height: 1.45; }
.hero-meta strong { display: block; font-family: var(--font-display); font-size: var(--step-2); color: var(--gold-bright); line-height: 1; margin-bottom: .3rem; font-weight: 400; }

/* --------------------------------------------------------------------------
   8. Cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  height: 100%;
}
.card--link:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.card h3 { font-size: var(--step-2); }
.card p { color: var(--text-muted); font-size: var(--step--1); line-height: 1.6; }
.card .link-arrow { margin-top: auto; padding-top: var(--sp-3); align-self: flex-start; }

.card-num {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--accent-text);
  letter-spacing: .12em;
}

.icon-badge {
  width: 42px; height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  display: grid; place-items: center;
  color: var(--accent-text);
  flex: none;
  margin-bottom: var(--sp-2);
}
.icon-badge svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; }

/* Four-up pillar grid — Run · Plan · Raise · Govern on one line */
.grid-pillars {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 248px), 1fr));
  align-items: stretch;
}
@media (min-width: 1060px) {
  .grid-pillars { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-pillars .pillar { padding: 1.6rem 1.4rem; }
  .grid-pillars .pillar h3 { font-size: var(--step-1); }
  .grid-pillars .pillar li { font-size: var(--step--2); line-height: 1.5; }
  .grid-pillars .pillar > p.small { font-size: var(--step--2); line-height: 1.55; }
}

/* Pillar cards — the service block */
.pillar {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  background: var(--surface);
  overflow: hidden;
  display: flex; flex-direction: column; gap: var(--sp-4);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.pillar::before {
  content: "";
  position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--accent);
  transform: scaleY(0); transform-origin: top;
  transition: transform .45s var(--ease);
}
.pillar:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.pillar:hover::before { transform: scaleY(1); }
.pillar h3 { font-size: var(--step-3); }
.pillar-verb {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.pillar ul { list-style: none; padding: 0; display: grid; gap: .5rem; }
.pillar li {
  font-size: var(--step--1);
  color: var(--text-muted);
  padding-left: 1.15rem;
  position: relative;
}
.pillar li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 5px; height: 5px; border: 1px solid var(--accent); border-radius: 50%;
}

/* --------------------------------------------------------------------------
   9. Ledger list — numbered process rows
   -------------------------------------------------------------------------- */
.ledger { border-top: 1px solid var(--border); }
.ledger-row {
  display: grid;
  gap: var(--sp-3) var(--sp-6);
  grid-template-columns: 1fr;
  padding-block: clamp(1.5rem, 3vw, 2.25rem);
  border-bottom: 1px solid var(--border);
  align-items: start;
}
@media (min-width: 820px) {
  .ledger-row { grid-template-columns: 5.5rem minmax(0, 15rem) minmax(0, 1fr); }
}
.ledger-row .n {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--accent-text);
  letter-spacing: .12em;
  padding-top: .45em;
}
.ledger-row h3 { font-size: var(--step-2); }
.ledger-row p { color: var(--text-muted); font-size: var(--step--1); }
.ledger-row .agent-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .06em;
  padding: .25em .7em;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-faint);
  margin-top: .75rem;
  text-transform: none;
}

/* --------------------------------------------------------------------------
   10. Feature table / comparison
   -------------------------------------------------------------------------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: var(--step--1);
}
table.data th, table.data td {
  text-align: left;
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.data thead th {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 500;
  border-bottom-color: var(--border-strong);
}
table.data tbody tr:hover { background: color-mix(in oklab, var(--text) 3%, transparent); }
table.data td:first-child { font-weight: 500; }
table.data .yes { color: var(--accent-text); font-weight: 600; }
table.data .no { color: var(--text-faint); }

/* --------------------------------------------------------------------------
   11. Pricing
   -------------------------------------------------------------------------- */
.price-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 265px), 1fr));
  align-items: stretch;
}
.plan {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2rem);
  display: flex; flex-direction: column; gap: var(--sp-4);
  background: var(--surface);
  position: relative;
}
.plan--featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
.plan--featured::after {
  content: "Most chosen";
  position: absolute; top: -0.75rem; left: clamp(1.5rem, 3vw, 2rem);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .3em .8em;
  border-radius: 999px;
}
.plan-name { font-family: var(--font-display); font-size: var(--step-2); font-weight: 400; line-height: 1.1; letter-spacing: -.015em; }
.plan-price { font-family: var(--font-display); font-size: var(--step-3); line-height: 1; }
.plan-price span { font-family: var(--font-sans); font-size: var(--step--1); color: var(--text-faint); }
.plan-for { font-size: var(--step--1); color: var(--text-muted); min-height: 3.2em; }
.plan ul { list-style: none; padding: 0; display: grid; gap: .55rem; font-size: var(--step--1); }
.plan ul[style*="columns"] { display: block; }
.plan ul[style*="columns"] li { break-inside: avoid; margin-bottom: .55rem; }
@media (max-width: 620px) { .plan ul[style*="columns"] { columns: 1 !important; } }
.plan li { padding-left: 1.4rem; position: relative; color: var(--text-muted); }
.plan li::before {
  content: "";
  position: absolute; left: 0; top: .45em;
  width: 9px; height: 5px;
  border-left: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: rotate(-45deg);
}
.plan .btn { margin-top: auto; width: 100%; }

/* --------------------------------------------------------------------------
   12. Quote / callout
   -------------------------------------------------------------------------- */
.callout {
  border-left: 2px solid var(--accent);
  padding: var(--sp-2) 0 var(--sp-2) var(--sp-5);
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.3;
}
.callout cite {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-style: normal;
  margin-top: var(--sp-3);
}

.note {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: var(--sp-4);
  font-size: var(--step--1);
  color: var(--text-muted);
  background: color-mix(in oklab, var(--text) 3%, transparent);
}

/* --------------------------------------------------------------------------
   13. Forms
   -------------------------------------------------------------------------- */
.field { display: grid; gap: .4rem; }
.field label {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.field input, .field select, .field textarea {
  font-family: var(--font-sans);
  font-size: var(--step-0);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: .8rem 1rem;
  width: 100%;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }

.form-grid { display: grid; gap: var(--sp-4); }
@media (min-width: 700px) { .form-grid--2 { grid-template-columns: 1fr 1fr; } }
.form-grid .full { grid-column: 1 / -1; }

.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.consent {
  display: flex; gap: .65rem; align-items: flex-start;
  font-size: var(--step--2); color: var(--text-muted); line-height: 1.5;
}
.consent input { width: 1.05rem; height: 1.05rem; margin-top: .18rem; flex: none; accent-color: var(--plum-text); }
.consent a { text-decoration: underline; text-underline-offset: 2px; }

/* Newsletter block */
.subscribe {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 3rem);
  background: var(--surface);
}
.subscribe-form {
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
  margin-top: var(--sp-5);
}
.subscribe-form .field { flex: 1 1 220px; }
.subscribe-form .btn { flex: none; align-self: end; height: 3.05rem; }
.subscribe .consent { margin-top: var(--sp-4); }

/* --------------------------------------------------------------------------
   14. Logo / marquee strip
   -------------------------------------------------------------------------- */
.strip {
  border-block: 1px solid var(--border);
  padding-block: var(--sp-5);
}
.strip-inner {
  display: flex; flex-wrap: wrap; gap: var(--sp-4) clamp(1.5rem, 5vw, 3.5rem);
  align-items: center; justify-content: center;
}
.strip-item {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* --------------------------------------------------------------------------
   15. FAQ
   -------------------------------------------------------------------------- */
.faq { border-top: 1px solid var(--border); }
.faq details {
  border-bottom: 1px solid var(--border);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.25rem 2.5rem 1.25rem 0;
  font-family: var(--font-display);
  font-size: var(--step-1);
  position: relative;
  transition: color .2s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; right: .25rem; top: 50%; transform: translateY(-50%);
  font-family: var(--font-sans); font-size: 1.35rem; font-weight: 300;
  color: var(--accent-text);
  transition: transform .3s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq summary:hover { color: var(--accent-text); }
.faq .answer { padding: 0 clamp(1rem, 6vw, 4rem) 1.5rem 0; color: var(--text-muted); font-size: var(--step--1); }
.faq .answer > * + * { margin-top: .75rem; }

/* --------------------------------------------------------------------------
   16. Insight cards
   -------------------------------------------------------------------------- */
.post {
  display: grid;
  gap: var(--sp-3);
  padding-block: var(--sp-5);
  border-bottom: 1px solid var(--border);
  align-content: start;
}
@media (min-width: 820px) {
  .post { grid-template-columns: 9rem 1fr auto; gap: var(--sp-5); align-items: baseline; }
}
.post .meta { font-family: var(--font-mono); font-size: var(--step--2); letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.post h3 { font-size: var(--step-1); }
.post p { color: var(--text-muted); font-size: var(--step--1); margin-top: .35rem; }
.post .tag {
  font-family: var(--font-mono); font-size: var(--step--2);
  border: 1px solid var(--border); border-radius: 999px; padding: .2em .7em;
  color: var(--text-faint); white-space: nowrap;
}

/* --------------------------------------------------------------------------
   17. CTA band
   -------------------------------------------------------------------------- */
.cta-band {
  background-color: var(--plum);
  background-image: linear-gradient(115deg, var(--plum-mid) 0%, var(--plum) 55%, var(--plum-deep) 100%);
  color: #F7F1EA;
  --text: #F7F1EA;
  --text-muted: rgba(247,241,234,.80);
  --border: rgba(247,241,234,.24);
  --border-strong: rgba(247,241,234,.45);
  --accent-text: var(--gold-bright);
  --acc-plum: var(--rose);
  --focus: var(--gold-pale);
  position: relative;
  overflow: hidden;
}
.cta-band::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(760px 360px at 88% 122%, rgba(233,201,126,.30), transparent 64%),
    radial-gradient(520px 280px at 6% -20%, rgba(111,211,203,.16), transparent 66%);
  pointer-events: none;
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band .btn--primary { background: var(--gold-bright); color: var(--plum); }
.cta-band .btn--primary:hover { background: var(--gold-pale); }
.cta-band .btn--ghost { color: #F7F1EA; border-color: rgba(247,241,234,.5); }
.cta-band .btn--ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }

/* --------------------------------------------------------------------------
   18. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--plum-deep);
  color: #C9BAC3;
  --text: #F5EFE8;
  --text-muted: #C9BAC3;
  --text-faint: #A08E9B;
  --border: rgba(245,239,232,.14);
  --border-strong: rgba(245,239,232,.28);
  --accent: var(--gold-bright);
  --accent-text: var(--gold-bright);
  --surface: rgba(255,255,255,.05);
  --acc-plum: var(--rose);
  --focus: var(--gold-bright);
  padding-block: clamp(3rem, 7vw, 5rem) var(--sp-6);
  font-size: var(--step--1);
}
.footer-top {
  display: grid;
  gap: var(--sp-7);
  grid-template-columns: 1fr;
  padding-bottom: var(--sp-7);
  border-bottom: 1px solid var(--border);
}
@media (min-width: 900px) { .footer-top { grid-template-columns: 1.3fr 1fr; align-items: start; } }

.footer-cols {
  display: grid; gap: var(--sp-6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
}
.footer-cols h4 {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--sp-3);
  font-weight: 500;
}
.footer-cols ul { list-style: none; padding: 0; display: grid; gap: .55rem; }
.footer-cols a { color: var(--text-muted); transition: color .2s var(--ease); }
.footer-cols a:hover { color: var(--gold-bright); }

.footer-bottom {
  display: flex; flex-wrap: wrap; gap: var(--sp-4);
  justify-content: space-between; align-items: center;
  padding-top: var(--sp-6);
  color: var(--text-faint);
  font-size: var(--step--2);
}
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: var(--sp-4); list-style: none; padding: 0; }
.footer-bottom a:hover { color: var(--gold-bright); }

.social { display: flex; gap: .6rem; }
.social a {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--text-muted);
  transition: border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.social a:hover { color: var(--gold-bright); border-color: var(--gold-bright); transform: translateY(-2px); }
.social svg { width: 16px; height: 16px; fill: currentColor; }

/* --------------------------------------------------------------------------
   19. Reveal animation
   -------------------------------------------------------------------------- */
/* Progressive enhancement: content is visible unless JS is running. */
.js .reveal { opacity: 0; transform: translateY(18px); }
.js .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   20. Misc
   -------------------------------------------------------------------------- */
.page-head { padding-block: clamp(3rem, 8vw, 6rem) clamp(2rem, 5vw, 3.5rem); }
.page-head h1 { font-size: var(--step-4); max-width: 20ch; }
.page-head .lede { margin-top: var(--sp-4); }

.breadcrumb {
  font-family: var(--font-mono); font-size: var(--step--2);
  letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint);
  margin-bottom: var(--sp-4);
}
.breadcrumb a:hover { color: var(--accent-text); }

.kpi-row {
  display: grid; gap: var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
}
.kpi strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1;
  color: var(--accent-text);
  font-weight: 400;
  margin-bottom: .35rem;
}
.kpi span { font-size: var(--step--1); color: var(--text-muted); }

.tag-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag-list span {
  font-family: var(--font-mono); font-size: var(--step--2);
  border: 1px solid var(--border); border-radius: 999px;
  padding: .35em .85em; color: var(--text-muted);
}

.diagram {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--surface);
  overflow-x: auto;
}
.diagram svg { width: 100%; height: auto; min-width: 520px; }

/* Small section/card title: h3 semantics, h4 scale. Declared last so it
   wins the specificity tie against `.card h3` etc. */
h2.ttl-sm, h3.ttl-sm, h4.ttl-sm { font-size: var(--step-1); }

/* --------------------------------------------------------------------------
   21. Category accents — teal / clay / gold, so the site is not one hue
   -------------------------------------------------------------------------- */
.acc-plum  { --accent-text: var(--acc-plum); --accent: var(--acc-plum); }
.acc-teal  { --accent-text: var(--teal);      --accent: var(--teal); }
.acc-clay  { --accent-text: var(--clay);      --accent: var(--clay); }
.acc-gold  { --accent-text: var(--bronze);    --accent: var(--bronze); }
.section--ink .acc-gold, .hero .acc-gold, .site-footer .acc-gold,
:root[data-theme="dark"] .acc-gold { --accent-text: var(--gold-bright); --accent: var(--gold-bright); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .acc-gold { --accent-text: var(--gold-bright); --accent: var(--gold-bright); }
}

.chip {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: .45em;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .3em .75em;
  border-radius: 999px;
  border: 1px solid currentColor;
  color: var(--accent-text);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   22. Article pages
   -------------------------------------------------------------------------- */
.article-hero {
  position: relative;
  background: var(--plum-deep);
  color: #F5EFE8;
  overflow: hidden;
  --text: #F5EFE8; --text-muted: #C9BAC3; --text-faint: #A08E9B;
  --border: rgba(245,239,232,.15); --border-strong: rgba(245,239,232,.3);
  --accent-text: var(--gold-bright); --focus: var(--gold-bright);
}
.article-hero img.cover {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .5;
}
.article-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(23,5,15,.62) 0%, rgba(23,5,15,.80) 55%, rgba(23,5,15,.95) 100%);
}
.article-hero .wrap { position: relative; z-index: 2; padding-block: clamp(3.5rem, 9vw, 6.5rem) clamp(2.5rem, 6vw, 4rem); }
.article-hero h1 { font-size: var(--step-4); max-width: 20ch; }
.article-hero .lede { margin-top: var(--sp-4); color: #DCCFD6; }
.article-meta {
  display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; align-items: center;
  margin-top: var(--sp-5);
  font-family: var(--font-mono); font-size: var(--step--2);
  letter-spacing: .1em; text-transform: uppercase; color: #B8A6B0;
}

.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1.15rem; }
.prose h2 {
  font-size: var(--step-2);
  margin-top: 2.8rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border);
}
.prose h3 { font-size: var(--step-1); margin-top: 2rem; font-family: var(--font-sans); font-weight: 600; letter-spacing: -.005em; }
.prose p { color: var(--text-muted); line-height: 1.72; }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3rem; color: var(--text-muted); }
.prose li + li { margin-top: .45rem; }
.prose li::marker { color: var(--accent-text); }
.prose a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.prose figure { margin-block: 2rem; }
.prose figure img,
.prose .figbox {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  width: 100%;
}
.prose .figbox { padding: clamp(1rem, 2.5vw, 1.6rem); overflow-x: auto; }
.prose .figbox svg { min-width: 480px; width: 100%; height: auto; }
.prose figcaption {
  font-family: var(--font-mono); font-size: var(--step--2);
  letter-spacing: .08em; color: var(--text-faint);
  margin-top: .7rem;
}
.prose blockquote {
  border-left: 2px solid var(--accent-text);
  padding-left: 1.35rem;
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.3;
  color: var(--text);
  margin-block: 2rem;
}
.prose .keybox {
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent-text);
  border-radius: var(--radius);
  background: var(--accent-soft);
  padding: 1.1rem 1.3rem;
  margin-block: 1.8rem;
}
.prose .keybox p { color: var(--text); margin: 0; }
.prose .keybox p + p { margin-top: .6rem; }
.prose .keybox .tag {
  display: block;
  font-family: var(--font-mono); font-size: var(--step--2);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-text); margin-bottom: .4rem; font-weight: 500;
}

.toc {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  background: var(--surface);
  font-size: var(--step--1);
}
@media (min-width: 980px) { .toc { position: sticky; top: 7rem; } }
.toc h2 {
  font-family: var(--font-mono); font-size: var(--step--2);
  letter-spacing: .16em; text-transform: uppercase; color: var(--text-faint);
  margin-bottom: .8rem; font-weight: 500;
}
.toc ol { list-style: none; padding: 0; display: grid; gap: .5rem; counter-reset: t; }
.toc li { counter-increment: t; }
.toc a { display: grid; grid-template-columns: 1.6rem 1fr; gap: .3rem; color: var(--text-muted); line-height: 1.35; }
.toc a::before { content: counter(t) "."; font-family: var(--font-mono); font-size: var(--step--2); color: var(--text-faint); }
.toc a:hover { color: var(--accent-text); }

.author {
  display: flex; gap: .9rem; align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem; margin-top: 2.5rem;
}
.author img { width: 44px; height: 44px; border-radius: 50%; flex: none; }
.author p { font-size: var(--step--1); color: var(--text-muted); margin: 0; }
.author strong { color: var(--text); display: block; font-size: var(--step-0); }

/* Article cards on the index */
.post-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
  height: 100%;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.post-card .thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--plum); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.post-card:hover .thumb img { transform: scale(1.04); }
.post-card .body { padding: 1.25rem 1.35rem 1.5rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.post-card h3 { font-size: var(--step-1); }
.post-card p { font-size: var(--step--1); color: var(--text-muted); }
.post-card .row { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-top: auto; padding-top: .6rem; }
.post-card .read { font-family: var(--font-mono); font-size: var(--step--2); color: var(--text-faint); letter-spacing: .08em; }
