/* PATH Vellum V4 tokens - values verbatim from shared-brain/PATH-VELLUM.md */
:root {
  --paper: #f3f1ea; --paper-deep: #e5e8e1; --surface: #faf9f4; --surface-strong: #fffef9;
  --ink: #111714; --ink-soft: #56615b;
  --pine: #4f9779; --pine-deep: #245c49; --mint: #dfeae3; --pine-press: #184838;
  --caution: #b57546; --fall: #955d4e; /* app's measured AA-passing fall colour, not a V4 token (see spec) */
  --line: rgba(17, 23, 20, 0.14); --line-strong: rgba(17, 23, 20, 0.28);
  --font-sans: "Geist", Arial, sans-serif;
  --font-mono: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-sans); font-size: 15px; line-height: 1.58; letter-spacing: -0.02em; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-weight: 590; letter-spacing: -0.025em; }
p { margin: 0; }
a { color: var(--pine-deep); }
.mono { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.num, td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* nav: translucent paper wash, single bottom hairline */
.nav { position: sticky; top: 0; z-index: 5; display: flex; align-items: baseline; gap: 22px; padding: 14px 28px; background: rgba(243, 241, 234, 0.92); backdrop-filter: blur(18px) saturate(130%); -webkit-backdrop-filter: blur(18px) saturate(130%); border-bottom: 1px solid var(--line); box-shadow: none; }
.wordmark { display: inline-flex; align-items: baseline; gap: 8px; line-height: 1; }
.wordmark-main { font-family: var(--font-sans); font-size: 26px; font-weight: 650; letter-spacing: -0.07em; color: var(--pine-deep); }
.wordmark-sub { font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.nav-title { font-weight: 500; color: var(--ink-soft); }
.nav-status { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; }

/* pills: mono, uppercase, fully rounded, hairline not shadow */
.pill { display: inline-block; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.09em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink); background: var(--surface); vertical-align: 1px; }
.pill-live { border-color: var(--pine-deep); color: var(--pine-deep); }
.pill-sim { border-color: var(--caution); color: var(--ink); background: var(--surface-strong); }
.pill-ref, .pill-paper { color: var(--ink-soft); }

/* hero: the one dark SECTION treatment */
.hero { background: linear-gradient(145deg, #101713 0%, #111a15 54%, #0d1411 100%); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 78% 42%, rgba(79, 151, 121, 0.12), transparent 55%); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 64px 28px 48px; }
.kicker { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.09em; text-transform: uppercase; color: #75b596; margin-bottom: 22px; }
.hero h1 { font-size: clamp(38px, 4.6vw, 64px); font-weight: 480; letter-spacing: -0.075em; line-height: 0.95; color: #eef3ef; max-width: 18ch; font-variant-numeric: tabular-nums; }
.hero h1 em { font-style: normal; font-weight: 420; color: #75b596; }
.hero-sub { color: #a8b6ad; max-width: 62ch; margin-top: 22px; }
.hero-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-top: 40px; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.hero-point { padding: 16px 18px 16px 0; border-right: 1px solid rgba(255, 255, 255, 0.08); }
.hero-point + .hero-point { padding-left: 18px; }
.hero-point:last-child { border-right: 0; }
.hero-point .hp-label { display: block; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.09em; text-transform: uppercase; color: #89998f; }
.hero-point .hp-value { display: block; font-size: 26px; font-weight: 500; letter-spacing: -0.045em; color: #dbe5dd; font-variant-numeric: tabular-nums; margin-top: 6px; }
.hero-point .hp-sub { display: block; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.07em; text-transform: uppercase; color: #718078; margin-top: 4px; }

/* worksheet panels: ruled by hairlines */
main { max-width: 1180px; margin: 0 auto; padding: 0 28px 40px; }
.panel { border-bottom: 1px solid var(--line-strong); padding: 40px 0 36px; }
.panel:last-child { border-bottom: 0; }
.panel-head { display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: 24px; margin-bottom: 22px; }
.panel-head h2 { font-size: 22px; }
.panel-meta { color: var(--ink-soft); max-width: 78ch; }
.panel-meta .pill { margin-right: 4px; }
@media (max-width: 760px) { .panel-head { grid-template-columns: 1fr; gap: 10px; } .nav-title { display: none; } }

.table-wrap { overflow-x: auto; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); background: var(--surface); }
table.board { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.board th { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.09em; text-transform: uppercase; font-weight: 500; color: var(--ink-soft); text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #e3ece7; white-space: nowrap; }
.board th .th-sub { color: var(--ink-soft); opacity: 0.7; }
.board td { padding: 10px 12px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
.board td:last-child { border-right: 0; }
.board tr:last-child td { border-bottom: 0; }
.board td.stable { font-weight: 590; letter-spacing: -0.02em; }
.board td.stable .issuer { display: block; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-soft); font-weight: 400; margin-top: 2px; }
.cell-dev { display: block; font-size: 15px; font-weight: 500; letter-spacing: -0.02em; }
.cell-sub { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em; color: var(--ink-soft); margin-top: 2px; }
td.flag { background: var(--mint); }
td.flag .cell-dev { color: var(--pine-deep); }
td.unavail .cell-dev { color: var(--ink-soft); font-weight: 400; }
td.empty, p.empty { color: var(--ink-soft); text-align: center; padding: 22px; }
.tag { display: inline-block; font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--pine-deep); border: 1px solid var(--pine); border-radius: 999px; padding: 1px 6px; margin-left: 6px; vertical-align: 2px; }
.foot { margin-top: 10px; text-transform: none; letter-spacing: 0.02em; }

/* flagged cycles */
.flags { border-top: 1px solid var(--line-strong); }
.flag-row { display: grid; grid-template-columns: 120px 1.4fr 1fr 1fr 1fr 1fr; gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.flag-row .fr-name { font-weight: 590; }
.flag-row .fr-name .mono { display: block; margin-top: 2px; }
.flag-row .fr-k { display: block; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-soft); }
.flag-row .fr-v { display: block; font-size: 17px; font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.flag-row .fr-v.net { color: var(--pine-deep); }
.flag-row .fr-note { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.03em; color: var(--ink-soft); }
.flags .none { padding: 18px 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
@media (max-width: 900px) { .flag-row { grid-template-columns: 1fr 1fr 1fr; } }

/* cost model form */
.costs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0; border-top: 1px solid var(--line-strong); border-left: 1px solid var(--line); }
.costs label { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 500; }
.costs .unit { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 400; }
.costs input { font-family: var(--font-mono); font-size: 14px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); width: 100%; box-shadow: none; }
.costs input:focus { outline: none; border-color: var(--pine); }
.costs-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.btn-ghost { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--pine-deep); background: transparent; color: var(--pine-deep); cursor: pointer; box-shadow: none; transition: color 180ms var(--ease), background-color 180ms var(--ease); }
.btn-ghost:hover { background: var(--pine-deep); color: var(--surface); }
#costs-summary { text-transform: none; letter-spacing: 0.02em; }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border-top: 1px solid var(--line-strong); border-left: 1px solid var(--line); margin-bottom: 26px; }
.tile { display: flex; flex-direction: column; padding: 16px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.tile-label { font-size: 13px; color: var(--ink-soft); }
.tile-value { font-size: 34px; font-weight: 590; letter-spacing: -0.045em; line-height: 1.1; margin-top: 8px; font-variant-numeric: tabular-nums; }
.tile-sub { margin-top: 6px; }

/* chart: single series, pine = simulated/forecast data, hairline grid */
.chart { margin: 0 0 26px; }
.chart figcaption { margin-bottom: 8px; text-transform: none; letter-spacing: 0.02em; }
.chart-box { position: relative; border: 1px solid var(--line-strong); background: var(--surface); height: 300px; }
.chart-box svg { display: block; width: 100%; height: 100%; }
.chart-box .grid line { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.chart-box .axis text { font-family: var(--font-mono); font-size: 10px; fill: var(--ink-soft); letter-spacing: 0.04em; }
.chart-box .series { fill: none; stroke: var(--pine); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-box .wash { fill: var(--pine); fill-opacity: 0.10; }
.chart-box .cross { stroke: var(--line-strong); stroke-width: 1; shape-rendering: crispEdges; }
.chart-box .dot { fill: var(--pine); stroke: var(--surface); stroke-width: 2; }
.chart-box .end-label { font-family: var(--font-mono); font-size: 11px; fill: var(--ink); letter-spacing: 0.02em; }
.tip { position: absolute; pointer-events: none; background: var(--surface-strong); border: 1px solid var(--line-strong); padding: 6px 10px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em; color: var(--ink); white-space: nowrap; transform: translate(-50%, -100%); margin-top: -12px; }
.tip b { font-weight: 500; }

.prose { max-width: 78ch; color: var(--ink); }
.prose p + p { margin-top: 12px; }
.prose strong { font-weight: 590; }
.site-foot { max-width: 1180px; margin: 0 auto; padding: 18px 28px 40px; border-top: 1px solid var(--line-strong); display: flex; flex-direction: column; gap: 6px; }
.site-foot .mono { text-transform: none; letter-spacing: 0.02em; }
