/* Sidecar — sidecar.datascoop.ai
   Tokens follow the Sidecar brand palette (grays, primary blue, secondary purple).
   Type: Newsreader (display) + IBM Plex Sans (text). */

:root {
  color-scheme: light;
  --bg: #F9FBFD;          /* Gray 10 */
  --bg-alt: #F4F6F8;      /* Gray 24 */
  --surface: #FFFFFF;
  --line: #E6E6E7;        /* Gray 100 */
  --line-strong: #CACBCB; /* Gray 200 */
  --ink: #2C2E30;         /* Gray 700 */
  --ink-2: #45484C;       /* Gray 500 */
  --ink-3: #66686B;       /* between Gray 400 and 500, so small muted text passes AA */
  --heading: #1D2E54;     /* Primary 800 */
  --accent: #6E4A95;      /* Secondary 600 */
  --accent-soft: #D7AFF2; /* Secondary 300 */
  --accent-tint: #FBF2FF; /* Secondary 25 */
  --blue: #2B3C6B;        /* Primary 700 */
  --blue-mid: #7F8ACA;    /* Primary 500 */
  --blue-soft: #B0B5EF;   /* Primary 300 */
  --blue-tint: #F3F2FF;   /* Primary 25 */
  --btn-bg: #2B3C6B;
  --btn-ink: #FFFFFF;
  --btn-bg-hover: #1D2E54;
  --ghost-ink: #1D2E54;
  --ghost-line: #CACBCB;
  --band-bg: #1D2E54;
  --band-ink: #F4F6F8;
  --band-ink-2: #B0B5EF;
  --chart-a: #7F8ACA;     /* applications (bars) */
  --chart-b: #6E4A95;     /* staffed hours (line) */
  --chart-grid: #E6E6E7;
  --chart-axis: #CACBCB;
  --seg-1: #F3F2FF;
  --seg-2: #B0B5EF;
  --seg-3: #AD81D2;
  --error: #B42318;       /* Red 700 */
  --fail: #B42318;        /* file card: rule needs attention */
  --ok: #445082;          /* Primary 600: rule passes */
  --tick: #B0B5EF;        /* Primary 300: coverage ticks */
  --focus: #7F8ACA;
  --shadow: 0 1px 2px rgba(29, 46, 84, .06), 0 12px 32px rgba(29, 46, 84, .08);
  --shadow-lg: 0 1px 1px rgba(29, 46, 84, .04), 0 10px 24px -10px rgba(29, 46, 84, .14), 0 36px 72px -28px rgba(29, 46, 84, .22);
  --nav-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #2C2E30;
    --bg-alt: #35383B;
    --surface: #35383B;
    --line: #45484C;
    --line-strong: #828385;
    --ink: #F4F6F8;
    --ink-2: #CACBCB;
    --ink-3: #AAABAC;
    --heading: #F9FBFD;
    --accent: #D7AFF2;
    --accent-soft: #AD81D2;
    --accent-tint: #45484C;
    --blue: #B0B5EF;
    --blue-mid: #7F8ACA;
    --blue-soft: #7F8ACA;
    --blue-tint: #45484C;
    --btn-bg: #B0B5EF;
    --btn-ink: #1D2E54;
    --btn-bg-hover: #D7AFF2;
    --ghost-ink: #F4F6F8;
    --ghost-line: #828385;
    --chart-a: #7F8ACA;
    --chart-b: #D7AFF2;
    --chart-grid: #45484C;
    --chart-axis: #828385;
    --seg-1: #45484C;
    --seg-2: #7F8ACA;
    --seg-3: #AD81D2;
    --error: #F97066;
    --fail: #F97066;
    --ok: #B0B5EF;
    --tick: rgba(127, 138, 202, .55);
    --focus: #B0B5EF;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
    --shadow-lg: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 48px -12px rgba(0, 0, 0, .5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #2C2E30;
  --bg-alt: #35383B;
  --surface: #35383B;
  --line: #45484C;
  --line-strong: #828385;
  --ink: #F4F6F8;
  --ink-2: #CACBCB;
  --ink-3: #AAABAC;
  --heading: #F9FBFD;
  --accent: #D7AFF2;
  --accent-soft: #AD81D2;
  --accent-tint: #45484C;
  --blue: #B0B5EF;
  --blue-mid: #7F8ACA;
  --blue-soft: #7F8ACA;
  --blue-tint: #45484C;
  --btn-bg: #B0B5EF;
  --btn-ink: #1D2E54;
  --btn-bg-hover: #D7AFF2;
  --ghost-ink: #F4F6F8;
  --ghost-line: #828385;
  --chart-a: #7F8ACA;
  --chart-b: #D7AFF2;
  --chart-grid: #45484C;
  --chart-axis: #828385;
  --seg-1: #45484C;
  --seg-2: #7F8ACA;
  --seg-3: #AD81D2;
  --error: #F97066;
  --fail: #F97066;
  --ok: #B0B5EF;
  --tick: rgba(127, 138, 202, .55);
  --focus: #B0B5EF;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  --shadow-lg: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 48px -12px rgba(0, 0, 0, .5);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 {
  font-family: 'Newsreader', Georgia, 'Times New Roman', serif;
  font-weight: 500;
  color: var(--heading);
  margin: 0;
  text-wrap: balance;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.375rem, 1.5rem + 3vw, 3.75rem); line-height: 1.06; }
h2 { font-size: clamp(1.75rem, 1.3rem + 1.5vw, 2.5rem); line-height: 1.15; }
h3 { font-size: 1.375rem; line-height: 1.3; }
[id] { scroll-margin-top: calc(var(--nav-h) + 16px); }

.wrap { max-width: 1120px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
.eyebrow { font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.lead { font-size: 1.25rem; line-height: 1.5; color: var(--ink-2); max-width: 34em; }
.note { font-size: .875rem; color: var(--ink-3); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); color: var(--ink); padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }
.nowrap { white-space: nowrap; }
.text-link { color: var(--ink-2); font-size: .9375rem; font-weight: 500; text-underline-offset: 3px; }
.text-link:hover { color: var(--heading); }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 6px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .9375rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--btn-bg); color: var(--btn-ink); }
.btn-primary:hover { background: var(--btn-bg-hover); }
.btn-ghost { background: transparent; color: var(--ghost-ink); border-color: var(--ghost-line); }
.btn-ghost:hover { border-color: var(--ghost-ink); }
.btn-light { background: #F4F6F8; color: #1D2E54; }
.btn-light:hover { background: #FFFFFF; }
.btn-sm { padding: 8px 14px; font-size: .875rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.2) blur(10px); backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--nav-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--heading); font-weight: 600; font-size: 1.125rem; letter-spacing: -0.01em; }
.brand svg { flex: none; }
.brand-sm { font-size: 1rem; }
.nav-links { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; font-size: .9375rem; font-weight: 500; }
.nav-links a { text-decoration: none; color: var(--ink-2); }
.nav-links a:hover { color: var(--heading); }
.nav-cta { display: flex; gap: 8px; align-items: center; }
@media (max-width: 900px) { .nav-links { display: none; } }

/* ---------- hero ---------- */
.hero { padding-block: clamp(48px, 7vw, 96px) clamp(40px, 6vw, 80px); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-copy { display: flex; flex-direction: column; gap: 20px; }
.hero-copy h1 { max-width: 12em; }
.hero-copy .eyebrow { text-wrap: balance; max-width: 34em; }
.hero-copy .cta-row { margin-top: 8px; }

/* ---------- chart ---------- */
.chart { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 20px 20px 12px; box-shadow: var(--shadow); }
.chart figcaption { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.chart-title { font-weight: 600; color: var(--heading); font-size: .9375rem; }
.chart-sub { font-size: .8125rem; color: var(--ink-3); }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: .8125rem; color: var(--ink-2); margin-bottom: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { display: inline-block; }
.sw-bar { width: 12px; height: 12px; border-radius: 3px; background: var(--chart-a); }
.sw-line { width: 18px; height: 2px; background: var(--chart-b); position: relative; }
.sw-line::after { content: ""; position: absolute; left: 5px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--chart-b); }
.chart-plot { position: relative; }
.chart-plot svg { display: block; width: 100%; height: auto; font-family: inherit; }
.chart-plot svg rect[tabindex]:focus-visible { outline: none; stroke: var(--focus); stroke-width: 2; }
.tip {
  position: absolute; pointer-events: none; z-index: 2;
  background: #1D2E54; color: #F4F6F8;
  font-size: .8125rem; line-height: 1.35; padding: 8px 10px; border-radius: 6px; white-space: nowrap;
  transform: translate(-50%, -100%); box-shadow: var(--shadow);
}
.chart-table { margin-top: 8px; font-size: .8125rem; color: var(--ink-2); }
.chart-table summary { cursor: pointer; }
.chart-table table { border-collapse: collapse; margin-top: 8px; width: 100%; font-variant-numeric: tabular-nums; }
.chart-table th, .chart-table td { text-align: left; padding: 4px 8px 4px 0; border-bottom: 1px solid var(--line); }

/* ---------- sections ---------- */
.sec { padding-block: clamp(56px, 8vw, 112px); }
.sec-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.sec-grid { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 32px clamp(40px, 6vw, 96px); }
.sec-head { display: flex; flex-direction: column; gap: 12px; align-self: start; position: sticky; top: calc(var(--nav-h) + 24px); }
.sec-body { display: flex; flex-direction: column; gap: 28px; max-width: 44rem; }
.sec-body.wide { max-width: none; }
@media (max-width: 900px) {
  .sec-grid { grid-template-columns: 1fr; gap: 24px; }
  .sec-head { position: static; }
}
.intro { font-size: 1.1875rem; line-height: 1.55; color: var(--ink-2); }
.intro-side { color: var(--ink-2); font-size: .9375rem; line-height: 1.55; }
.closing {
  font-family: 'Newsreader', Georgia, serif; font-size: 1.5rem; line-height: 1.35; color: var(--heading);
  border-left: 3px solid var(--accent-soft); padding-left: 20px;
}

/* ledger: you sell / you carry */
.ledger { border-top: 1px solid var(--line-strong); }
.ledger-head, .ledger-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; }
.ledger-head { padding: 12px 0; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.ledger-row { padding: 24px 0; border-bottom: 1px solid var(--line); }
.sell p { font-family: 'Newsreader', Georgia, serif; font-style: italic; font-size: 1.375rem; line-height: 1.3; color: var(--heading); }
.cell-label { display: none; }
@media (max-width: 700px) {
  .ledger-head { display: none; }
  .ledger-row { grid-template-columns: 1fr; gap: 12px; }
  .cell-label { display: block; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
}

/* lists with a bold lead */
.leadlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.leadlist li { padding-left: 20px; border-left: 2px solid var(--line-strong); }
.leadlist strong, .costs strong, .solved strong { color: var(--heading); font-weight: 600; }

/* on the floor */
.floor { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 32px; position: relative; }
.floor::before { content: ""; position: absolute; left: 5px; top: 12px; bottom: 12px; width: 1px; background: var(--line-strong); }
.floor li { position: relative; padding-left: 32px; }
.floor li::before { content: ""; position: absolute; left: 0; top: 9px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.floor h3 { margin-bottom: 8px; }

/* what it costs */
.costs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 24px 40px; }
.costs li { border-top: 1px solid var(--line-strong); padding-top: 14px; }
.costs strong { display: block; margin-bottom: 4px; }
@media (max-width: 700px) { .costs { grid-template-columns: 1fr; } }
.mathline {
  font-family: 'Newsreader', Georgia, serif; font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem); line-height: 1.35; color: var(--heading);
  border-left: 3px solid var(--accent-soft); padding-left: 20px; max-width: 30em;
}

/* the other side */
.solved { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 24px 40px; }
.solved li { position: relative; padding-left: 18px; }
.solved li::before { content: ""; position: absolute; left: 0; top: .5em; width: 6px; height: 15px; border-radius: 2px; background: var(--blue-soft); }
.solved strong { display: block; }
@media (max-width: 700px) { .solved { grid-template-columns: 1fr; } }

/* in production */
.proof-head { max-width: 44rem; display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.shot { margin: 0; }
.shot-frame { background: #FFFFFF; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; }
.shot-frame img { display: block; width: 100%; height: auto; }
.shot figcaption { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; font-size: .8125rem; color: var(--ink-3); margin-top: 12px; }
.shot figcaption a { color: var(--ink-2); }
.proof-facts { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 40px; }
.proof-facts li { border-top: 1px solid var(--line-strong); padding-top: 14px; }
.proof-facts strong { display: block; color: var(--heading); font-weight: 600; margin-bottom: 4px; }
.proof .closing { margin-top: 40px; max-width: 34em; }
@media (max-width: 800px) { .proof-facts { grid-template-columns: 1fr; } }
/* on phones the full capture is a sliver, so show the Sidecar panel itself; the caption links the full image */
@media (max-width: 700px) { .shot-frame img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 100% 0; } }

/* two seats */
.seats { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.seat { display: flex; flex-direction: column; gap: 16px; padding-top: 16px; border-top: 2px solid var(--heading); }
.seat h3 { font-size: 1.5rem; }
.seat-lead { color: var(--ink-2); }
.seat-group { display: flex; flex-direction: column; gap: 8px; }
.seat-label { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.seat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: .9375rem; line-height: 1.45; }
.seat-list li { position: relative; padding-left: 16px; }
.seat-list li::before { content: ""; position: absolute; left: 0; top: .68em; width: 7px; height: 2px; border-radius: 1px; background: var(--accent-soft); }
.seat .test { font-weight: 600; color: var(--heading); margin-top: 4px; }
@media (max-width: 800px) { .seats { grid-template-columns: 1fr; } }

/* faq */
.faq { margin: 0; display: flex; flex-direction: column; }
.faq > div { padding: 24px 0; border-bottom: 1px solid var(--line); }
.faq > div:first-child { border-top: 1px solid var(--line-strong); padding-top: 20px; }
.faq dt { font-family: 'Newsreader', Georgia, serif; font-size: 1.375rem; line-height: 1.3; color: var(--heading); margin-bottom: 8px; text-wrap: balance; }
.faq dd { margin: 0; color: var(--ink-2); max-width: 36em; }

/* ---------- diagnostic ---------- */
.diag { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: clamp(20px, 4vw, 36px); }
.diag-progress { display: flex; align-items: center; gap: 16px; font-size: .8125rem; color: var(--ink-3); margin-bottom: 20px; font-variant-numeric: tabular-nums; }
.diag-bar { flex: 1; height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
#diag-bar-fill { display: block; height: 100%; width: 20%; background: var(--accent); transition: width .25s; }
.diag fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.diag legend { font-family: 'Newsreader', Georgia, serif; font-size: 1.5rem; line-height: 1.3; color: var(--heading); margin-bottom: 16px; padding: 0; text-wrap: balance; outline: none; }
.opts { display: flex; flex-direction: column; gap: 8px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 8px; cursor: pointer; transition: border-color .15s, background .15s; }
.opt:hover { border-color: var(--blue-mid); }
.opt input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border: 2px solid var(--line-strong); border-radius: 50%; margin: 0; flex: none; display: grid; place-content: center; background: var(--surface); }
.opt input::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--btn-bg); transform: scale(0); transition: transform .12s; }
.opt input:checked::before { transform: scale(1); }
.opt input:checked { border-color: var(--btn-bg); }
.opt:has(input:checked) { border-color: var(--btn-bg); background: var(--blue-tint); }
.diag-error { color: var(--error); font-size: .875rem; min-height: 1.2em; margin-top: 10px; }
.diag-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; }

.res-title { font-size: 2rem; margin-top: 4px; outline: none; }
.meter { margin: 24px 0 8px; }
.meter-wrap { position: relative; padding-block: 6px; }
.meter-track { display: grid; grid-template-columns: 5fr 5fr 6fr; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; }
.meter-track span { display: block; }
.seg-1 { background: var(--seg-1); }
.seg-2 { background: var(--seg-2); }
.seg-3 { background: var(--seg-3); }
.meter-pin { position: absolute; top: 0; left: 50%; width: 22px; height: 22px; border-radius: 50%; background: var(--heading); border: 3px solid var(--surface); transform: translateX(-50%); box-shadow: var(--shadow); transition: left .3s; }
.meter-labels { display: grid; grid-template-columns: 5fr 5fr 6fr; font-size: .75rem; color: var(--ink-3); margin-top: 6px; }
.res-score { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: .9375rem; }
.res-text { font-size: 1.125rem; line-height: 1.55; margin-top: 12px; }
.diag-send { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; }
.send-intro { color: var(--ink-2); }
.fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fields label { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: .8125rem; font-weight: 600; color: var(--ink-2); }
.fields input { font: inherit; font-size: 1rem; font-weight: 400; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink); width: 100%; min-width: 0; }
@media (max-width: 700px) { .fields { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.status { font-size: .875rem; color: var(--ink-2); min-height: 1.2em; }
.linklike { background: none; border: 0; padding: 0; margin-top: 16px; color: var(--ink-3); font: inherit; font-size: .875rem; text-decoration: underline; cursor: pointer; }

/* ---------- band (demo) ---------- */
.band { background: var(--band-bg); color: var(--band-ink); padding-block: clamp(56px, 8vw, 96px); }
.band h2 { color: var(--band-ink); }
.band .lead { color: var(--band-ink-2); }
.band-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: end; }
.band-copy { display: flex; flex-direction: column; gap: 16px; }
.eyebrow-light { color: var(--band-ink-2); }
.band-cta { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.note-light { font-size: .875rem; color: var(--band-ink-2); }
.note-light a { color: var(--band-ink); }
@media (max-width: 800px) { .band-grid { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.footer { padding-block: 32px; border-top: 1px solid var(--line); font-size: .875rem; color: var(--ink-3); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--ink-2); text-decoration: none; }
.footer-links a:hover { color: var(--heading); }
.soc-logo { width: 56px; height: 56px; display: block; }

/* ---------- document pages (privacy, terms) ---------- */
.doc { max-width: 44rem; padding-block: clamp(48px, 6vw, 80px); display: flex; flex-direction: column; gap: 18px; }
.doc h1 { font-size: clamp(2rem, 1.5rem + 1.5vw, 2.75rem); }
.doc h2 { font-size: 1.5rem; margin-top: 12px; }
.doc ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.doc .note { margin-top: -6px; }

/* ---------- contact page ---------- */
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: clamp(20px, 4vw, 36px); }
.contact-card form { display: flex; flex-direction: column; gap: 16px; }
.fields-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) { .fields-2 { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; font-size: .8125rem; font-weight: 600; color: var(--ink-2); }
.field textarea { font: inherit; font-size: 1rem; font-weight: 400; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink); width: 100%; min-width: 0; min-height: 150px; resize: vertical; }
.optional { font-weight: 400; color: var(--ink-3); }
.turnstile-widget:empty { display: none; }

/* ---------- booking page ---------- */
.book { padding-block: clamp(40px, 6vw, 72px) clamp(56px, 8vw, 96px); }
.book-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.book-intro { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--nav-h) + 24px); }
.book-intro h1 { font-size: clamp(2rem, 1.4rem + 2vw, 3rem); }
.book-intro .note a { color: var(--ink-2); }
.book-frame { background: #FFFFFF; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.book-frame iframe { display: block; width: 100%; height: 750px; border: 0; }
@media (max-width: 900px) {
  .book-grid { grid-template-columns: 1fr; }
  .book-intro { position: static; }
}

/* ==========================================================================
   Home page (credit union lending leaders): opening, file card, gap,
   changes, keeps, letter. The sections above (hero, chart, ledger, floor,
   costs, seats, faq, diagnostic, band) serve /outsourced/.
   ========================================================================== */

.sec-intro { display: flex; flex-direction: column; gap: 14px; max-width: 40rem; }

/* opening */
.opening { padding-block: clamp(48px, 7vw, 104px) clamp(56px, 8vw, 112px); }
.opening-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.opening-copy { display: flex; flex-direction: column; gap: 22px; }
.opening h1 { font-size: clamp(2.375rem, 1.55rem + 2.4vw, 3.25rem); line-height: 1.08; letter-spacing: -0.018em; max-width: 12.5em; }
.opening h1 em { display: block; margin-top: .14em; font-style: italic; }
.opening .cta-row { margin-top: 10px; align-items: center; gap: 12px 24px; }
@media (max-width: 960px) {
  .opening-grid { grid-template-columns: 1fr; }
  .file { max-width: 40rem; }
}

/* file card: one sample application checked against the whole policy */
.file { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.file-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: clamp(20px, 2.6vw, 28px);
  font-size: .9375rem; line-height: 1.45;
}
.file-top { display: flex; justify-content: space-between; gap: 12px; font-size: .6875rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.file-rev { font-weight: 500; }
.file-title { margin-top: 6px; font-weight: 600; color: var(--heading); font-variant-numeric: tabular-nums; }
.file-cover { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-top: 22px; }
.file-count { color: var(--ink-2); }
.file-count .num { font-family: 'Newsreader', Georgia, serif; font-size: 1.875rem; line-height: 1; color: var(--heading); margin-right: 4px; font-variant-numeric: lining-nums; letter-spacing: -0.01em; }
.file-flag { color: var(--fail); font-size: .8125rem; font-weight: 600; }
.ticks { display: block; width: 100%; height: 14px; margin-top: 12px; }
.ticks .p { fill: var(--tick); }
.ticks .f { fill: var(--fail); }
.checks { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--line); }
.checks li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.mark { width: 16px; height: 16px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.fail .mark { color: var(--fail); }
.pass .mark { color: var(--ok); }
.rule { color: var(--ink); font-weight: 500; min-width: 0; }
.rule small { display: block; margin-top: 1px; font-size: .8125rem; font-weight: 400; color: var(--ink-3); }
.val { font-weight: 600; color: var(--heading); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.fail .val { color: var(--fail); }
.checks-more { margin-top: 10px; font-size: .8125rem; color: var(--ink-3); }
.counter { margin-top: 18px; padding: 14px 16px; border-radius: 10px; background: var(--blue-tint); }
.counter-label { font-size: .6875rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.counter-value { margin-top: 2px; font-family: 'Newsreader', Georgia, serif; font-size: 1.375rem; line-height: 1.3; color: var(--heading); font-variant-numeric: lining-nums; }
.counter-note { margin-top: 2px; font-size: .8125rem; color: var(--ink-2); }
.file figcaption { padding-left: 2px; font-size: .8125rem; color: var(--ink-3); }

/* the card assembles once: coverage sweeps across, then the findings settle in */
@keyframes sweep { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes settle { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ticks { animation: sweep 1.2s cubic-bezier(.3, .7, .2, 1) .3s both; }
.checks li, .checks-more, .counter { animation: settle .5s ease-out both; }
.checks li:nth-child(1) { animation-delay: .95s; }
.checks li:nth-child(2) { animation-delay: 1.05s; }
.checks li:nth-child(3) { animation-delay: 1.15s; }
.checks li:nth-child(4) { animation-delay: 1.25s; }
.checks-more { animation-delay: 1.35s; }
.counter { animation-delay: 1.5s; }

/* the gap */
.gap { padding-block: clamp(64px, 9vw, 120px); background: var(--bg-alt); border-block: 1px solid var(--line); }
.scenes { list-style: none; margin: clamp(40px, 5vw, 56px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px clamp(28px, 4vw, 48px); }
.scenes li { display: flex; flex-direction: column; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line-strong); }
.scene-when { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.scene-what { font-family: 'Newsreader', Georgia, serif; font-size: 1.375rem; line-height: 1.35; color: var(--heading); }
.coda { margin-top: clamp(56px, 7vw, 88px); max-width: 26em; font-family: 'Newsreader', Georgia, serif; font-size: clamp(1.5rem, 1.15rem + 1.1vw, 2.125rem); line-height: 1.28; color: var(--heading); text-wrap: balance; }
.coda::before { content: ""; display: block; width: 40px; height: 2px; margin-bottom: 22px; background: var(--accent-soft); }
.coda em { display: block; font-style: italic; }
@media (max-width: 800px) { .scenes { grid-template-columns: 1fr; gap: 24px; } }

/* what changes */
.changes { padding-block: clamp(72px, 10vw, 136px) clamp(56px, 7vw, 96px); }
.changes h2 .line { display: block; }
.outcomes { list-style: none; margin: clamp(40px, 5vw, 56px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 4vw, 48px) clamp(32px, 6vw, 88px); counter-reset: outcome; }
.outcomes li { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); align-content: start; }
.outcomes li::before { counter-increment: outcome; content: counter(outcome, decimal-leading-zero); grid-row: span 2; padding-top: .35em; font-family: 'Newsreader', Georgia, serif; font-style: italic; font-size: 1rem; color: var(--accent); }
.outcomes h3 { font-size: 1.5rem; line-height: 1.25; }
.outcomes p { margin-top: 8px; color: var(--ink-2); max-width: 28em; }
@media (max-width: 760px) { .outcomes { grid-template-columns: 1fr; } }

/* what stays yours, and the questions that follow: two bordered rows, heading left, content right */
.keeps { padding-block: 0 clamp(56px, 7vw, 96px); }
.questions { padding-block: 0 clamp(72px, 10vw, 136px); }
.keeps-grid, .questions-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 28px clamp(32px, 5vw, 72px); padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--line-strong); }
.keeps h2, .questions h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.keeps-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px clamp(24px, 3vw, 40px); }
.keeps-list h3 { font-family: 'IBM Plex Sans', system-ui, sans-serif; font-size: 1rem; font-weight: 600; letter-spacing: 0; }
.keeps-list p { margin-top: 6px; font-size: .9375rem; color: var(--ink-2); }
.questions .faq { max-width: 44rem; margin-top: -4px; }
.questions .faq > div:first-child { border-top: 0; padding-top: 0; }
.questions .faq > div:last-child { border-bottom: 0; padding-bottom: 0; }
.questions .faq dt { font-size: 1.25rem; }
.questions .faq dd { font-size: .9375rem; max-width: 40em; }
@media (max-width: 900px) { .keeps-grid, .questions-grid { grid-template-columns: 1fr; } .questions .faq { margin-top: 0; } }
@media (max-width: 640px) { .keeps-list { grid-template-columns: 1fr; } }

/* the ask, in Sidd's voice */
.letter { background: var(--band-bg); color: var(--band-ink); padding-block: clamp(80px, 11vw, 144px); }
.letter-col { max-width: 40rem; margin-inline: auto; display: flex; flex-direction: column; gap: 22px; }
.letter h2 { color: var(--band-ink); font-size: clamp(2rem, 1.4rem + 2vw, 2.875rem); line-height: 1.12; }
.letter-body { font-family: 'Newsreader', Georgia, serif; font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); line-height: 1.5; color: var(--band-ink); }
.signature { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.sig-name { font-family: 'Newsreader', Georgia, serif; font-style: italic; font-size: 1.5rem; line-height: 1.2; color: var(--band-ink); }
.sig-role { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--band-ink-2); }
.letter-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 14px; padding-top: 30px; border-top: 1px solid rgba(176, 181, 239, .22); }
.letter .text-link { color: var(--band-ink-2); }
.letter .text-link:hover { color: var(--band-ink); }
.letter :focus-visible { outline-color: var(--band-ink-2); }

/* ==========================================================================
   Guides: the article pages under /<slug>/ (underwriting automation, rules
   engine, rules vs AI, policy exceptions, policy changes, glossary).
   ========================================================================== */

.article { padding-top: clamp(40px, 6vw, 80px); }
.article-head { display: flex; flex-direction: column; gap: 18px; }
.article-head > * { max-width: 44rem; }
.article-head h1 { font-size: clamp(2.125rem, 1.4rem + 2.2vw, 3rem); line-height: 1.1; letter-spacing: -0.015em; text-wrap: balance; }
.article-head .lead { font-size: clamp(1.125rem, 1rem + .5vw, 1.3125rem); max-width: 40rem; }

.article-body { padding-block: clamp(32px, 4vw, 48px) clamp(40px, 5vw, 64px); font-size: 1.0625rem; line-height: 1.65; }
.article-body > * { max-width: 40rem; }
.article-body > * + * { margin-top: 1.1em; }
.article-body h2 { font-size: clamp(1.5rem, 1.2rem + .9vw, 1.875rem); line-height: 1.22; margin-top: 2.2em; text-wrap: balance; }
.article-body h2 + * { margin-top: .7em; }
.article-body ul, .article-body ol { padding-left: 1.3em; display: flex; flex-direction: column; gap: .55em; }
.article-body li { padding-left: .2em; }
.article-body li::marker { color: var(--ink-3); }
.article-body strong { font-weight: 600; color: var(--heading); }
.article-body em { font-family: 'Newsreader', Georgia, serif; font-style: italic; font-size: 1.06em; }
.article-body a { color: var(--heading); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: .15em; }
.article-body a:hover { text-decoration-color: currentColor; }
.article-body figure, .article-body .file { margin: 2.2em 0; max-width: 40rem; }
.article-body figcaption { margin-top: 12px; font-size: .8125rem; line-height: 1.5; color: var(--ink-3); }

/* record: one rule, one exception, one revision */
.record { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: clamp(18px, 3vw, 26px); font-size: .9375rem; line-height: 1.5; }
.record-top { display: flex; justify-content: space-between; gap: 12px; font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.record-title { font-family: 'Newsreader', Georgia, serif; font-size: 1.375rem; line-height: 1.25; color: var(--heading); margin-bottom: 16px; }
.record dl { margin: 0; display: grid; grid-template-columns: minmax(7em, max-content) minmax(0, 1fr); gap: 10px 20px; }
.record dt { color: var(--ink-3); font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding-top: 4px; }
.record dd { margin: 0; color: var(--ink); }
.record dd.quote { font-family: 'Newsreader', Georgia, serif; font-style: italic; font-size: 1.0625rem; color: var(--heading); }
.record dd.flag { color: var(--fail); font-weight: 500; }
.record dd.ok { color: var(--ok); font-weight: 500; }
.record dd.was { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line-strong); }
@media (max-width: 480px) { .record dl { grid-template-columns: 1fr; gap: 2px 0; } .record dd + dt { margin-top: 10px; } }

/* comparison table */
.compare { width: 100%; border-collapse: collapse; font-size: .9375rem; line-height: 1.45; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); }
.compare thead th { font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); border-bottom-color: var(--line-strong); padding-top: 0; }
.compare tbody th { font-weight: 600; color: var(--heading); width: 26%; }
.compare td { color: var(--ink-2); }
@media (max-width: 640px) {
  .compare thead { display: none; }
  .compare tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .compare td, .compare tbody th { display: block; border: 0; padding: 3px 0; width: auto; }
  .compare td::before { content: attr(data-col) ": "; font-weight: 600; color: var(--ink-3); font-size: .8125rem; }
}

/* glossary */
.glossary { margin: 0; }
.glossary > div { padding: 18px 0; border-bottom: 1px solid var(--line); }
.glossary > div:first-child { border-top: 1px solid var(--line-strong); }
.glossary dt { font-family: 'Newsreader', Georgia, serif; font-size: 1.25rem; line-height: 1.3; color: var(--heading); margin-bottom: 6px; }
.glossary dd { margin: 0; color: var(--ink-2); font-size: .9375rem; max-width: 40em; }

/* questions and further reading */
.article-faq { padding-bottom: clamp(40px, 5vw, 64px); }
.article-faq h2 { font-size: 1.5rem; margin-bottom: 14px; }
.article-faq .faq { max-width: 40rem; }
.article-faq .faq dt { font-size: 1.25rem; }
.article-faq .faq dd { font-size: .9375rem; }
.related { padding-bottom: clamp(56px, 8vw, 96px); }
.related h2 { font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.related ul { list-style: none; margin: 0; padding: 0; max-width: 40rem; }
.related li { border-top: 1px solid var(--line); }
.related li:last-child { border-bottom: 1px solid var(--line); }
.related a { display: block; padding: 12px 0; font-family: 'Newsreader', Georgia, serif; font-size: 1.1875rem; color: var(--heading); text-decoration: none; }
.related a:hover { color: var(--accent); }

/* footer row of guide links (home, /outsourced/, and every guide) */
.footer-reading { width: 100%; list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-reading li:first-child { color: var(--ink-3); }
.footer-reading a { color: var(--ink-2); text-decoration: none; }
.footer-reading a:hover { color: var(--heading); }
