/* Layout: a comp-plan document on green-bar payroll paper. Quiet prose on the left,
   the live simulator printed as a tractor-feed printout on the right; every band
   collapses to one column below 880px. */
:root {
  --paper: #f4f7f2;      /* page: a faintly green ledger white */
  --band: #e5eee3;       /* green-bar stripe */
  --surface: #ffffff;    /* the printout and form cards */
  --ink: #13231c;        /* text */
  --ink-2: #4b5d54;      /* secondary text */
  --rule: #cdd9cf;       /* hairlines and borders */
  --accent: #1d5c43;     /* ledger green: actions */
  --accent-ink: #ffffff;
  --within: #2a6db3;     /* chart: simulated years within budget */
  --over: #c8481f;       /* chart: simulated years over budget */
  --focus: #2a6db3;
  --font-display: "IBM Plex Sans Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1712; --band: #142119; --surface: #13201a; --ink: #e3ede6; --ink-2: #a3b5aa;
    --rule: #28392f; --accent: #6cc39a; --accent-ink: #0d1712; --within: #4f8fd4; --over: #df6a3f;
    --focus: #8bb8ea; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0d1712; --band: #142119; --surface: #13201a; --ink: #e3ede6; --ink-2: #a3b5aa;
  --rule: #28392f; --accent: #6cc39a; --accent-ink: #0d1712; --within: #4f8fd4; --over: #df6a3f;
  --focus: #8bb8ea; color-scheme: dark;
}

* { box-sizing: border-box; }
body { background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.55; }
.wrap {
  max-width: 1120px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.01em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); line-height: 1.02; font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.08; font-weight: 600; }
h3 { font-size: 1.18rem; line-height: 1.25; font-weight: 600; }
p { margin: 0; max-width: 65ch; }
.mono, .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.eyebrow { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.muted { color: var(--ink-2); }

/* header */
.top { border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.mark { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; text-decoration: none; }
.mark svg { width: 26px; height: 26px; }
.top nav { display: flex; gap: 20px; align-items: center; font-size: 0.95rem; }
.top nav a:not(.btn) { text-decoration: none; color: var(--ink-2); }
.top nav a:not(.btn):hover { color: var(--ink); }
@media (max-width: 640px) { .top nav .opt { display: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
  border-radius: 6px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  font: 600 1rem/1 var(--font-body); text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.top .btn { min-height: 38px; padding: 0 14px; font-size: 0.92rem; }

/* hero */
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; padding-block: 56px 72px; }
.hero-copy { display: grid; gap: 22px; padding-top: 8px; }
.hero-copy .lead { font-size: 1.15rem; color: var(--ink-2); }
.hero-copy .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.proof { font-size: 0.92rem; color: var(--ink-2); border-left: 2px solid var(--accent); padding-left: 12px; }
@media (max-width: 880px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-block: 36px 48px; } }

/* the printout: tractor-feed margins and green-bar stripes */
.printout {
  position: relative; background: var(--surface); border: 1px solid var(--rule); border-radius: 4px;
  padding: 20px 34px 22px; display: grid; gap: 16px; min-width: 0;
  box-shadow: 0 1px 0 var(--rule), 0 18px 40px -28px rgba(19, 35, 28, 0.45);
}
.printout::before, .printout::after {
  content: ""; position: absolute; top: 10px; bottom: 10px; width: 10px;
  background: radial-gradient(circle at 50% 50%, var(--paper) 0 3.2px, var(--rule) 3.3px 4.2px, transparent 4.3px) center top / 10px 22px repeat-y;
}
.printout::before { left: 9px; }
.printout::after { right: 9px; }
@media (max-width: 520px) { .printout { padding: 16px 24px 18px; } .printout::before { left: 5px; } .printout::after { right: 5px; } }
.printout-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; border-bottom: 1px dashed var(--rule); padding-bottom: 10px; }
.printout-head .spec { font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-2); line-height: 1.5; }

.controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; }
@media (max-width: 600px) { .controls { grid-template-columns: minmax(0, 1fr); } }
.control { display: grid; gap: 4px; min-width: 0; grid-template-rows: 1fr auto; align-items: end; }
.control label { display: flex; justify-content: space-between; gap: 8px; font-size: 0.85rem; color: var(--ink-2); }
.control output { font-family: var(--font-mono); color: var(--ink); font-weight: 500; }
input[type="range"] { width: 100%; accent-color: var(--accent); min-height: 28px; margin: 0; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.stat { padding: 10px 10px 9px; min-width: 0; }
.stat:nth-child(odd) { background: var(--band); }
.stat dt { font-size: 0.74rem; color: var(--ink-2); line-height: 1.3; }
.stat dd { margin: 4px 0 0; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 1.28rem; font-weight: 500; }
.stat.alarm dd { color: var(--over); }
@media (max-width: 600px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat:nth-child(odd) { background: transparent; } .stat:nth-child(4n+1), .stat:nth-child(4n+4) { background: var(--band); } }
.convexity { font-size: 0.92rem; }
.convexity strong { font-family: var(--font-mono); font-weight: 500; }

.chart { position: relative; min-width: 0; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.8rem; color: var(--ink-2); margin-bottom: 4px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.legend .k-within { background: var(--within); }
.legend .k-over { background: var(--over); }
.legend .k-budget { width: 14px; height: 0; border-top: 2px dashed var(--ink); border-radius: 0; }
#hist { width: 100%; height: auto; display: block; }
#hist .bar-within { fill: var(--within); }
#hist .bar-over { fill: var(--over); }
#hist .bar.hot { stroke: var(--ink); stroke-width: 1.5; }
#hist .base { stroke: var(--rule); stroke-width: 1; }
#hist .tick { fill: var(--ink-2); font: 11px var(--font-mono); }
#hist .marker { stroke: var(--ink-2); stroke-width: 1; }
#hist .budget { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 5 4; }
#hist .mlabel { fill: var(--ink-2); font: 11px var(--font-mono); }
#hist .blabel { fill: var(--ink); font: 500 11.5px var(--font-mono); }
.tip {
  position: absolute; pointer-events: none; background: var(--ink); color: var(--paper); font: 12px/1.4 var(--font-mono);
  padding: 6px 8px; border-radius: 4px; white-space: nowrap; transform: translate(-50%, -100%); top: 0; left: 0;
}
.footnote { font-size: 0.78rem; color: var(--ink-2); }
details.table-view summary { cursor: pointer; font-size: 0.85rem; color: var(--ink-2); }
details.table-view table { margin-top: 8px; border-collapse: collapse; font: 0.85rem var(--font-mono); font-variant-numeric: tabular-nums; }
details.table-view td, details.table-view th { padding: 4px 14px 4px 0; text-align: left; border-bottom: 1px solid var(--rule); font-weight: 400; }
details.table-view th { color: var(--ink-2); }

/* sections */
section.band { border-top: 1px solid var(--rule); }
section.band > .wrap { padding-block: 64px; display: grid; gap: 32px; }
section.alt { background: var(--band); }
.section-head { display: grid; gap: 10px; }
.section-head p { color: var(--ink-2); font-size: 1.05rem; }
@media (max-width: 640px) { section.band > .wrap { padding-block: 44px; } }

.findings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.finding { padding: 20px 24px 8px 0; display: grid; gap: 10px; align-content: start; min-width: 0; }
.finding + .finding { padding-left: 24px; border-left: 1px solid var(--rule); }
.finding .big { font: 600 2.6rem/1 var(--font-mono); letter-spacing: -0.02em; }
.finding .big small { font-size: 1rem; color: var(--ink-2); font-weight: 400; margin-left: 4px; }
@media (max-width: 820px) { .findings { grid-template-columns: minmax(0, 1fr); } .finding + .finding { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); } }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; counter-reset: step; }
.steps li { display: grid; gap: 8px; align-content: start; counter-increment: step; min-width: 0; }
.steps li::before { content: "Step " counter(step); font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.steps p { color: var(--ink-2); }
@media (max-width: 820px) { .steps { grid-template-columns: minmax(0, 1fr); } }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.feature { padding: 18px 20px 20px 0; border-top: 1px solid var(--rule); display: grid; gap: 6px; align-content: start; min-width: 0; }
.feature p { color: var(--ink-2); font-size: 0.97rem; }
@media (max-width: 820px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .features { grid-template-columns: minmax(0, 1fr); } }

.people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.person { display: grid; gap: 8px; align-content: start; min-width: 0; }
.person .eyebrow { color: var(--accent); }
.person p { color: var(--ink-2); }
@media (max-width: 820px) { .people { grid-template-columns: minmax(0, 1fr); } }

.offer { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; align-items: start; }
.offer ol { margin: 0; padding-left: 1.3em; display: grid; gap: 14px; }
.offer ol li::marker { font-family: var(--font-mono); color: var(--accent); }
.offer li strong { display: block; font-weight: 600; }
.offer li span { color: var(--ink-2); }
.data-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.data-list li { padding-left: 22px; position: relative; }
.data-list li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 10px; height: 2px; background: var(--accent); }
@media (max-width: 820px) { .offer { grid-template-columns: minmax(0, 1fr); } }

/* sign-up */
.signup { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: start; }
@media (max-width: 880px) { .signup { grid-template-columns: minmax(0, 1fr); } }
form.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 24px; display: grid; gap: 16px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
@media (max-width: 560px) { .fields { grid-template-columns: minmax(0, 1fr); } }
.field label { font-size: 0.88rem; font-weight: 500; }
.field label .opt { color: var(--ink-2); font-weight: 400; }
input[type="text"], input[type="email"], select, textarea {
  width: 100%; font: 1rem var(--font-body); color: var(--ink); background: var(--paper);
  border: 1px solid var(--rule); border-radius: 4px; padding: 10px 12px; min-height: 44px;
}
textarea { min-height: 84px; resize: vertical; }
.field [aria-invalid="true"] { border-color: var(--over); }
.status { font-size: 0.95rem; min-height: 1.5em; }
.status.ok { color: var(--accent); font-weight: 500; }
.status.warn { color: var(--over); }
.privacy { font-size: 0.82rem; color: var(--ink-2); }

.faq { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style-position: outside; }
.faq details p { margin-top: 10px; color: var(--ink-2); }

footer { border-top: 1px solid var(--rule); }
footer .wrap { padding-block: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 0.88rem; color: var(--ink-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
html { scroll-behavior: smooth; }

/* standalone page: what the artifact viewer's reset used to provide */
html, body { margin: 0; }
.sim-title, #sim-title { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; }
.gap-20 { gap: 20px; }
.gap-14 { gap: 14px; }
.submit-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.ink { color: var(--ink); }
/* honeypot: off-screen for people, still filled in by naive bots */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

/* consent banner, shown only when the LinkedIn Insight Tag is configured */
.consent {
  position: fixed; z-index: 10; left: 16px; right: 16px; bottom: 16px; margin-inline: auto; max-width: 720px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 16px 18px;
  display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; justify-content: space-between;
  box-shadow: 0 18px 40px -20px rgba(19, 35, 28, 0.5); font-size: 0.92rem;
}
.consent[hidden] { display: none; }
.consent p { flex: 1 1 320px; }
.consent .choices { display: flex; gap: 10px; }
.foot-links { display: inline-flex; gap: 16px; }

/* privacy policy and other long-form pages */
.legal { max-width: 760px; margin-inline: auto; padding-block: 48px 72px; display: grid; gap: 14px; }
.legal h1 { font-size: clamp(2rem, 4.4vw, 2.8rem); }
.legal h2 { font-size: 1.45rem; margin-top: 26px; }
.legal h3 { font-size: 1.08rem; margin-top: 8px; }
.legal p, .legal li { color: var(--ink); max-width: 70ch; }
.legal ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.legal .meta { color: var(--ink-2); font-family: var(--font-mono); font-size: 0.85rem; }
.legal .summary { background: var(--band); border-left: 2px solid var(--accent); padding: 14px 18px; display: grid; gap: 8px; }
.legal table { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--rule); }
.legal th { color: var(--ink-2); font-weight: 500; }
.table-scroll { overflow-x: auto; }
