/* PICPAC 3PL FUNNEL: SHARED STYLESHEET
   Restyled 2026-09-21 to the "stoic." design reference (see
   ../design-reference/STOIC-Design-Brief.md): near-black ink, light gray
   ground, no brand accent color, solid black pill buttons, one all-black
   rounded calculator section, monoline icon badges, huge whitespace.
   Light tokens on :root, dark overrides under prefers-color-scheme (guarded
   by :not([data-theme="light"])) AND under :root[data-theme="dark"] so an
   explicit toggle would win in both directions even though no toggle exists
   yet. Element IDs referenced by calc.js / inline page scripts are
   untouched; only classes/markup around them changed. */

:root {
  --ground: #F3F3F3;
  --surface: #FFFFFF;
  --surface-2: #E9E9E9;
  --ink: #0E0E0E;
  --ink-2: #4A4A4A;
  --muted: #8A8A8A;
  --line: #E2E2E2;
  --shadow: 0 10px 30px rgba(14, 14, 14, 0.08);
  --shadow-badge: 0 8px 20px rgba(14, 14, 14, 0.12);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  /* "inverse" pair: the one all-black rounded calculator section. In light
     mode it is literally black-on-white-page; in dark mode (page already
     black) it inverts to a white block, so it keeps reading as the one
     high-contrast block on the page either way. */
  --calc-shell: #0E0E0E;
  --calc-shell-ink: #FFFFFF;
  --calc-muted: rgba(255, 255, 255, 0.62);
  --calc-line: rgba(255, 255, 255, 0.14);
  --calc-border: rgba(255, 255, 255, 0.4);
  --calc-panel: #FFFFFF;
  --calc-panel-ink: #0E0E0E;
  --calc-panel-line: #E2E2E2;
  --calc-panel-ground: #F3F3F3;

  /* Neutral (non-accent) state colors: used only for the two functional
     edge-case notices (negative-gap message, [Ava to confirm] flags). No
     hue, so they read as ink/gray, never as a brand color. */
  --note-ink: #0E0E0E;
  --note-bg: #E9E9E9;

  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0E0E0E;
    --surface: #171717;
    --surface-2: #232323;
    --ink: #F3F3F3;
    --ink-2: #C7C7C7;
    --muted: #8F8F8F;
    --line: #2A2A2A;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-badge: 0 8px 20px rgba(0, 0, 0, 0.55);

    --calc-shell: #FFFFFF;
    --calc-shell-ink: #0E0E0E;
    --calc-muted: rgba(14, 14, 14, 0.55);
    --calc-line: rgba(14, 14, 14, 0.12);
    --calc-border: rgba(14, 14, 14, 0.4);
    --calc-panel: #111111;
    --calc-panel-ink: #F3F3F3;
    --calc-panel-line: #2A2A2A;
    --calc-panel-ground: #0E0E0E;

    --note-ink: #F3F3F3;
    --note-bg: #232323;

    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #0E0E0E;
  --surface: #171717;
  --surface-2: #232323;
  --ink: #F3F3F3;
  --ink-2: #C7C7C7;
  --muted: #8F8F8F;
  --line: #2A2A2A;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-badge: 0 8px 20px rgba(0, 0, 0, 0.55);

  --calc-shell: #FFFFFF;
  --calc-shell-ink: #0E0E0E;
  --calc-muted: rgba(14, 14, 14, 0.55);
  --calc-line: rgba(14, 14, 14, 0.12);
  --calc-border: rgba(14, 14, 14, 0.4);
  --calc-panel: #111111;
  --calc-panel-ink: #F3F3F3;
  --calc-panel-line: #2A2A2A;
  --calc-panel-ground: #0E0E0E;

  --note-ink: #F3F3F3;
  --note-bg: #232323;

  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: "Inter", "Helvetica Neue", Arial, sans-serif; font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3 { font-family: "Inter", "Helvetica Neue", sans-serif; font-weight: 700; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.mono { font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { opacity: 0.7; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.eyebrow { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

/* Header / nav, shared on every page */
header.top { background: var(--ground); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.brand { font-family: "Inter", sans-serif; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; text-decoration: none; color: var(--ink); }
.header-mid { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
nav.mainnav { display: flex; gap: 24px; flex-wrap: wrap; }
nav.mainnav a { font-size: 14.5px; font-weight: 600; color: var(--ink); text-decoration: none; }
nav.mainnav a:hover { opacity: 0.6; }
.btn-sm { padding: 10px 20px; font-size: 13.5px; }

/* Hero */
.hero { padding: 72px 0 40px; }
.hero h1 { font-size: clamp(40px, 6vw, 72px); font-weight: 800; line-height: 1.02; letter-spacing: -0.03em; max-width: 15ch; }
.hero p.lede { font-size: 19px; color: var(--ink-2); max-width: 52ch; margin: 22px 0 0; font-weight: 400; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; align-items: center; }
.hero .fine { font-size: 14.5px; color: var(--muted); margin-top: 16px; max-width: 58ch; }

/* Simple page hero (qualify/book/history/thanks) */
.page-hero { padding: 64px 0 8px; }
.page-hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; max-width: 20ch; }
.page-hero p.lede { font-size: 17.5px; color: var(--ink-2); max-width: 62ch; margin: 16px 0 0; }

/* Calculator: the ONE big all-black (white in dark mode) rounded section */
.calc { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 0; align-items: stretch; background: var(--calc-shell); border-radius: 28px; padding: 8px; margin: 32px 0; }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; } }

.panel { background: var(--calc-panel); border-radius: 22px; padding: 28px; color: var(--calc-panel-ink); }
.panel h2 { font-size: 15px; font-weight: 700; margin-bottom: 20px; color: var(--calc-panel-ink); }

.field { display: grid; gap: 10px; padding: 18px 0; border-top: 1px solid var(--calc-panel-line); }
.field:first-of-type { border-top: 0; padding-top: 0; }
.field .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.field label, .field .lbl { font-weight: 600; font-size: 15px; color: var(--calc-panel-ink); }
.field .hint { font-size: 13px; color: var(--calc-panel-ink); opacity: 0.55; }
.field output { font-size: 18px; font-weight: 700; color: var(--calc-panel-ink); white-space: nowrap; }
.field .scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--calc-panel-ink); opacity: 0.5; }

.pickers { display: flex; gap: 10px; flex-wrap: wrap; }
select, input[type="number"], input[type="email"], input[type="text"], input[type="tel"] {
  font: inherit; font-size: 16px; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); min-width: 120px; max-width: 100%;
}
.panel select, .panel input[type="number"] { background: var(--calc-panel-ground); border-color: var(--calc-panel-line); color: var(--calc-panel-ink); }
select:focus-visible, input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.panel select:focus-visible, .panel input:focus-visible { outline-color: var(--calc-panel-ink); }
.money { display: flex; align-items: center; gap: 0; max-width: 100%; }
.money span { padding: 11px 0 11px 14px; border: 1px solid var(--calc-panel-line); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); background: var(--calc-panel-ground); color: var(--calc-panel-ink); opacity: 0.6; font-weight: 600; }
.money input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; min-width: 100px; width: 140px; font-family: "IBM Plex Mono", monospace; font-weight: 600; }

input[type="range"] { width: 100%; accent-color: var(--calc-panel-ink); height: 28px; margin: 0; cursor: pointer; }
input[type="range"]:focus-visible { outline: 2px solid var(--calc-panel-ink); outline-offset: 4px; border-radius: 4px; }

.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--calc-panel-ink); flex: none; }
.check .lbl { display: block; }
.check .hint { margin-top: 2px; }

.ledger { padding: 28px 24px; color: var(--calc-shell-ink); }
.ledger .eyebrow { color: var(--calc-muted); }
.ledger .sentence { font-size: 17.5px; line-height: 1.5; margin-top: 8px; font-weight: 400; }
.ledger .sentence b { color: var(--calc-shell-ink); font-weight: 700; }
.ledger .big { font-family: "IBM Plex Mono", monospace; font-variant-numeric: tabular-nums; font-size: clamp(36px, 8vw, 60px); font-weight: 600; line-height: 1; letter-spacing: -0.03em; margin: 20px 0 4px; color: var(--calc-shell-ink); }
.ledger .big small { display: block; font-size: 15px; font-weight: 500; color: var(--calc-muted); letter-spacing: 0; margin: 8px 0 0; white-space: nowrap; }
.ledger .sub { color: var(--calc-muted); font-size: 14px; }
.ledger .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--calc-line); }
.ledger .tile .eyebrow { margin-bottom: 4px; }
.ledger .tile .val { font-family: "IBM Plex Mono", monospace; font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 600; }
.ledger .tile .note { font-size: 12px; color: var(--calc-muted); margin-top: 2px; }
.ledger .split { margin-top: 18px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--calc-line); font-size: 13px; color: var(--calc-muted); display: grid; gap: 4px; }
.ledger .split b { color: var(--calc-shell-ink); font-weight: 700; }
.ledger .split[hidden] { display: none; }
.ledger .flat { margin-top: 18px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--calc-line); color: var(--calc-shell-ink); font-size: 13.5px; line-height: 1.45; }
.ledger .flat[hidden] { display: none; }
.ledger .gatenote { margin-top: 16px; font-size: 13px; color: var(--calc-muted); }
.ledger .gatenote[hidden] { display: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px; border-radius: var(--radius-pill); font-weight: 600; font-size: 15px; border: 1px solid transparent; cursor: pointer; text-decoration: none; font-family: inherit; transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease; }
.btn-primary { background: var(--ink); color: var(--ground); }
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); opacity: 1; }
.btn-lg { padding: 18px 30px; font-size: 16.5px; }
.ledger .btn-primary { background: var(--calc-shell-ink); color: var(--calc-shell); }
.ledger .btn-primary:hover { opacity: 0.85; }
.ledger .btn-ghost { color: var(--calc-shell-ink); border-color: var(--calc-border); }
.ledger .btn-ghost:hover { background: var(--calc-line); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.ledger .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }

section.block { padding: 56px 0; }
section.block h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 10px; }
section.block p.intro { color: var(--ink-2); max-width: 62ch; margin: 0 0 26px; font-size: 16px; }

/* Steps: the one place besides badges that uses a card, per the design brief */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--surface); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.badge { width: 56px; height: 56px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-badge); display: grid; place-items: center; color: var(--ink); margin-bottom: 20px; flex: none; }
.badge svg { width: 24px; height: 24px; display: block; }
.step h3 { font-size: 17.5px; font-weight: 700; margin-bottom: 8px; }
.step p { margin: 0; font-size: 14.5px; color: var(--ink-2); }

/* Carrier strip: plain text wordmarks separated by whitespace, no chips */
.section-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-badge); color: var(--ink); margin-bottom: 14px; }
.section-icon svg { width: 18px; height: 18px; }
.carrier-strip { display: flex; gap: 28px; flex-wrap: wrap; margin: 6px 0 20px; row-gap: 12px; }
.chip { display: inline-flex; align-items: center; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.carrier-note { font-size: 15px; color: var(--ink-2); max-width: 62ch; }

.assume { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 40px; }
@media (max-width: 760px) { .assume { grid-template-columns: 1fr; } }
.assume div { padding: 16px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.assume div:nth-child(1), .assume div:nth-child(2) { border-top: 0; }
@media (max-width: 760px) { .assume div:nth-child(2) { border-top: 1px solid var(--line); } }
.assume b { display: block; font-weight: 700; margin-bottom: 4px; }
.assume span { color: var(--ink-2); }

/* FAQ */
.faq { display: grid; gap: 0; }
.faq-item { border-top: 1px solid var(--line); padding: 22px 0; }
.faq-item:first-child { border-top: 0; padding-top: 0; }
.faq-item h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 8px; }
.faq-item p { margin: 0; font-size: 14.5px; color: var(--ink-2); }

/* Confirm-with-Ava highlight: kept neutral (no accent color) */
.confirm { background: var(--note-bg); color: var(--note-ink); padding: 2px 8px; border-radius: 6px; font-weight: 700; font-size: 0.92em; white-space: normal; }

/* Gate + capture: open whitespace, not boxed cards, per the design brief */
.gate { display: grid; gap: 18px; max-width: 640px; padding: 0; }
.gate h3 { font-size: 22px; font-weight: 700; }
.gate .choices { display: flex; gap: 12px; flex-wrap: wrap; }
.gate .result { padding: 20px 0 0; border-top: 1px solid var(--line); font-size: 15px; }
.gate .result[hidden] { display: none; }

.capture { padding: 0; max-width: 640px; }
.capture form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.capture input[type="email"] { flex: 1 1 240px; padding: 13px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; background: var(--surface); color: var(--ink); }
.capture .done { margin-top: 16px; padding: 16px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 15px; }
.capture .done[hidden] { display: none; }

/* Generic card: reserved for placeholders and step-style blocks */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card.placeholder { border-style: dashed; color: var(--ink-2); text-align: center; padding: 40px 24px; }
.card.placeholder .eyebrow { display: block; margin-bottom: 8px; }

/* Embeds (Tally / Calendly) */
.embed-frame { width: 100%; min-height: 640px; border: 0; border-radius: var(--radius); background: var(--surface); }

/* Simple form fields (fallback form, notify capture) */
.formfield { display: grid; gap: 6px; margin-bottom: 16px; }
.formfield label { font-weight: 600; font-size: 14px; }
.formfield .hint { font-size: 12.5px; color: var(--muted); }
.radiorow, .checkrow { display: flex; gap: 16px; flex-wrap: wrap; }
.radiorow label, .checkrow label { display: flex; align-items: center; gap: 6px; font-weight: 500; font-size: 14.5px; }

/* Export steps (history page): open, 1px rules, no card box */
details.export { border-top: 1px solid var(--line); padding: 0; margin-bottom: 0; }
details.export:first-of-type { border-top: 1px solid var(--line); }
details.export summary { cursor: pointer; padding: 18px 0; font-weight: 600; font-size: 15.5px; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
details.export summary::-webkit-details-marker { display: none; }
details.export summary::after { content: "+"; font-size: 20px; color: var(--muted); flex: none; }
details.export[open] summary::after { content: "\2212"; }
details.export ol { margin: 0 0 20px; padding-left: 20px; color: var(--ink-2); font-size: 14.5px; line-height: 1.7; }
details.export ol li { margin-bottom: 4px; }

ul.plain { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 14.5px; line-height: 1.7; }

.notes { font-size: 13px; color: var(--muted); }
.notes ul { margin: 8px 0 0; padding-left: 18px; }
footer.sitefoot { padding: 40px 0 56px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); margin-top: 24px; }
footer.sitefoot a { color: var(--muted); text-decoration: underline; }

.center { text-align: center; }
.stack-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 22px; }

/* Mobile: keep everything inside 375px with no horizontal scroll */
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  header.top .wrap { height: auto; }
  .money input { width: 110px; }
  .gate .choices, .stack-actions, .carrier-strip { flex-direction: column; align-items: stretch; }
  .gate .choices .btn, .stack-actions .btn { width: 100%; }
  .calc { padding: 6px; border-radius: 22px; }
  .panel, .ledger { padding: 22px 18px; }
}
