/* Sidecar — onsidecar.com
   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: #828385;       /* Gray 400 */
  --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 */
  --focus: #7F8ACA;
  --shadow: 0 1px 2px rgba(29, 46, 84, .06), 0 12px 32px rgba(29, 46, 84, .08);
  --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;
    --focus: #B0B5EF;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  }
}
: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;
  --focus: #B0B5EF;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
}

/* ---------- 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; }
: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-tight { padding-block: clamp(40px, 5vw, 64px); }
.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;
}

/* funding */
.funding .sec-body p { font-size: 1.1875rem; line-height: 1.55; color: var(--ink-2); }

/* 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; } }

/* 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; } }

/* ---------- 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; }
}
