/* Editorial data style: serif headlines, square controls, thin rules, direct chart labels. */
@font-face {
  font-family: "Plex";
  src: url("fonts/IBMPlexSans.woff2") format("woff2");
  font-weight: 100 700;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif";
  src: url("fonts/SourceSerif4.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}
:root {
  --bg: #ffffff;
  --paper: #f5f4f0;
  --ink: #262b33;
  --head: #13294b;
  --muted: #5d6673;
  --rule: #d8dbdf;
  --grid: #dfe2e6;
  --link: #1d4e89;
  --select: #dce6f1;
  --hosted: #c25e1c;
  --own: #11786f;
  --mix: #7a6a1d;
  --warn: #a8321f;
  --pull: #c25e1c;
  --model: #008c7a;
  --sans: "Plex", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif", Georgia, "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --paper: #191c21;
    --ink: #dde1e6;
    --head: #e8edf3;
    --muted: #98a1ac;
    --rule: #2d323a;
    --grid: #262b32;
    --link: #8db4e2;
    --select: #213149;
    --hosted: #e6873f;
    --own: #3db5a8;
    --mix: #c7b257;
    --warn: #f08a72;
    --pull: #d9772f;
    --model: #29a295;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
main { max-width: 680px; margin: 0 auto; padding: 48px 20px 64px; }
main.wide { max-width: 960px; }
h1, .serif { font-family: var(--serif); color: var(--head); font-weight: 600; }
h1 { font-size: 2.2rem; line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.005em; }
h2 {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin: 52px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
h3 { font-size: 0.95rem; margin: 0 0 6px; color: var(--head); }
p { margin: 0 0 16px; }
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
.crumb { margin-bottom: 28px; font-size: 0.9rem; }
.crumb a { text-decoration: none; color: var(--muted); }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 46em; margin-bottom: 32px; }
.note, .source { color: var(--muted); font-size: 0.86rem; }
.source { border-top: 1px solid var(--rule); padding-top: 8px; margin-top: 6px; }

/* controls */
.controls { background: var(--paper); border-top: 3px solid var(--head); padding: 20px 22px 8px; }
fieldset { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
legend, .label { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 8px; padding: 0; }
legend output { color: var(--head); font-size: 0.95rem; text-transform: none; letter-spacing: 0; margin-left: 6px; }
.tabs { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--rule); background: var(--bg); }
.tabs label { position: relative; cursor: pointer; padding: 7px 14px; font-size: 0.92rem; border-right: 1px solid var(--rule); }
.tabs label:last-child { border-right: 0; }
.tabs input { position: absolute; opacity: 0; pointer-events: none; }
.tabs label:has(input:checked) { background: var(--select); color: var(--head); font-weight: 600; }
.tabs label:has(input:focus-visible) { outline: 2px solid var(--link); outline-offset: -2px; }
.row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
select {
  font: inherit; font-size: 0.9rem; color: var(--ink); background: var(--bg);
  border: 1px solid var(--rule); border-radius: 0; padding: 7px 8px; width: 100%;
}
input[type=range] { width: 100%; accent-color: var(--head); margin: 4px 0 0; }
.scale { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.8rem; }
.check { display: flex; gap: 8px; align-items: center; font-size: 0.92rem; margin: 4px 0 14px; }
.check input { accent-color: var(--head); }
.button {
  display: inline-block; font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
  padding: 8px 14px; border-radius: 0; border: 1px solid var(--head); background: var(--head); color: var(--bg);
  text-decoration: none;
}
.button.secondary { background: transparent; color: var(--head); }
.button:hover { text-decoration: none; opacity: 0.9; }

/* result */
.verdict { font-family: var(--serif); font-size: 1.35rem; line-height: 1.45; color: var(--head); margin: 36px 0 24px; max-width: 40em; }
.versus { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--rule); }
.side { padding: 14px 18px 16px 0; border-top: 3px solid var(--rule); }
.side + .side { padding-left: 18px; border-left: 1px solid var(--rule); }
.side.hosted { border-top-color: var(--hosted); }
.side.own { border-top-color: var(--own); }
.side.out { opacity: 0.4; }
.side .big { font-size: 2rem; font-weight: 600; color: var(--head); line-height: 1.2; margin: 4px 0 10px; }
.side .big small { font-size: 0.88rem; font-weight: 400; color: var(--muted); }
dl { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; margin: 0; font-size: 0.9rem; }
dt { color: var(--muted); }
dd { margin: 0; text-align: right; font-weight: 600; }
.bad { color: var(--warn); }
.swatch { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: 0; }
.chart { position: relative; height: 340px; margin-top: 8px; }

/* tables with inline value bars */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
th, td { text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; }
td.num, th.num { text-align: right; white-space: nowrap; }
td.barcell { position: relative; min-width: 110px; }
td.barcell .bar { position: absolute; left: 0; top: 6px; bottom: 6px; background: var(--select); z-index: 0; }
td.barcell span { position: relative; z-index: 1; padding-left: 6px; }
ul.plain { padding-left: 18px; max-width: 46em; }
ul.plain li { margin-bottom: 10px; }
.cta { background: var(--paper); border-top: 3px solid var(--head); padding: 20px 22px 6px; margin-top: 40px; }
.contact { border-top: 1px solid var(--rule); margin-top: 48px; padding-top: 18px; color: var(--muted); font-size: 0.92rem; }
.contact a { margin-right: 18px; }

/* dashboard */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--rule); }
.kpi { padding: 12px 16px 14px; border-right: 1px solid var(--rule); }
.kpi:last-child { border-right: 0; }
.kpi .label { margin-bottom: 2px; }
.kpi .value { font-size: 1.7rem; font-weight: 600; color: var(--head); line-height: 1.2; }
.kpi .sub { color: var(--muted); font-size: 0.82rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.panel h3 { font-family: var(--serif); font-size: 1.1rem; margin: 0 0 2px; }
.panel .chart { height: 250px; }
.flag { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.flag.ok { color: var(--own); }
.flag.miss { color: var(--warn); }
.banner { font-size: 0.88rem; color: var(--muted); border-left: 3px solid var(--rule); padding: 2px 0 2px 12px; margin-bottom: 28px; }

/* notes: startup timeline */
.kpis.three { grid-template-columns: repeat(3, 1fr); margin-bottom: 8px; }
.timeline { position: relative; margin: 0 0 18px; }
.legend-row { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.86rem; color: var(--muted); margin-bottom: 6px; }
.legend-row .swatch { border-radius: 2px; }
.swatch.pull { background: var(--pull); }
.swatch.model { background: var(--model); }
.timeline-plot { position: relative; min-height: 118px; }
.timeline-plot svg { display: block; overflow: visible; }
.timeline-plot .grid { stroke: var(--grid); stroke-width: 1; }
.timeline-plot .tick { fill: var(--muted); font-size: 12px; }
.timeline-plot .seg.pull rect:first-child { fill: var(--pull); }
.timeline-plot .seg.model rect:first-child { fill: var(--model); }
.timeline-plot .seg .hit { fill: transparent; }
.timeline-plot .seg { cursor: default; outline: none; }
.timeline-plot .seg:hover rect:first-child, .timeline-plot .seg:focus-visible rect:first-child { opacity: 0.85; }
.timeline-plot .seg:focus-visible .hit { stroke: var(--link); stroke-width: 2; }
.timeline-plot .seg-label { fill: var(--ink); font-size: 13px; }
.timeline-plot .seg-value { font-weight: 600; fill: var(--head); }
.timeline-plot .marker { stroke: var(--muted); stroke-width: 1; }
.timeline-plot .marker-label { fill: var(--muted); font-size: 12px; }
.tip {
  position: absolute; z-index: 2; pointer-events: none; white-space: nowrap;
  background: var(--bg); border: 1px solid var(--rule); padding: 6px 10px; font-size: 0.86rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.tip strong { color: var(--head); }
.tip-sub { color: var(--muted); font-size: 0.8rem; }
figure.timeline figcaption { margin-top: 6px; }
code { font-size: 0.88em; background: var(--paper); padding: 1px 4px; }
pre { background: var(--paper); border-left: 3px solid var(--rule); padding: 10px 12px; overflow-x: auto; margin: 8px 0 4px; }
pre code { background: none; padding: 0; font-size: 0.82rem; }
ol.steps { padding-left: 20px; }
ol.steps li { margin-bottom: 16px; }

@media (max-width: 720px) {
  main { padding-top: 28px; }
  h1 { font-size: 1.8rem; }
  .row, .grid2, .versus { grid-template-columns: 1fr; }
  .side + .side { padding-left: 0; border-left: 0; }
  .kpis, .kpis.three { grid-template-columns: 1fr 1fr; }
  .kpi:nth-child(2) { border-right: 0; }
  .kpi:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .verdict { font-size: 1.15rem; }
  .chart { height: 300px; }
}
