/* PumpCost Atlas — design tokens.
   The subject is curves and operating points, so the page is laid out like an
   instrument readout: a mono display face for every number and label, a serif
   for prose, and a left annotation gutter carrying section markers.
   Colour encodes speed class everywhere it appears. */
:root {
  --paper: #eef3f5;
  --paper-2: #e0e9ed;
  --card: #f8fbfc;
  --ink: #16323d;
  --ink-2: #4e6873;
  --rule: #c2d3da;
  --plot-bg: #0f2630;
  --plot-rule: #2b4855;
  --plot-ink: #cfe0e6;
  --vs: #0b6e8f;        /* variable-speed */
  --ms: #3f7d58;        /* multi-speed */
  --ts: #c07c17;        /* two-speed */
  --ss: #ab4f3a;        /* single-speed */
  --vs-deep: #084f69;
  --focus: #0b6e8f;
  --font-display: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-body: "Newsreader", Georgia, "Times New Roman", serif;
  --measure: 64ch;
  --wrap: 1180px;
  --gutter: 9rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1f27;
    --paper-2: #162c36;
    --card: #152a33;
    --ink: #e6eef1;
    --ink-2: #a3b8c0;
    --rule: #28434f;
    --plot-bg: #0a1920;
    --plot-rule: #24404b;
    --plot-ink: #cfe0e6;
    --vs: #4fb9d9;
    --ms: #71bd8c;
    --ts: #e0ab54;
    --ss: #dd8a72;
    --vs-deep: #7fd0ea;
    --focus: #7fd0ea;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 1.125rem; line-height: 1.58;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--vs-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--vs); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 10; }

h1, h2, h3, h4, .brand, nav, .button, .stat .value, legend, th, .tag, figcaption,
.crumb, .post-card h2, .rail-name, .rail-scale, .rail-legend, .result .value, .marker {
  font-family: var(--font-display);
}
h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; margin: 0 0 18px; max-width: 24ch; }
h2 { font-size: clamp(1.25rem, 2.1vw, 1.6rem); line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; margin: 0 0 12px; }
h3 { font-size: 1.05rem; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; margin: 24px 0 6px; }
h4 { font-size: 0.95rem; font-weight: 700; margin: 20px 0 4px; }
p, ul, ol { margin: 0 0 1.05em; max-width: var(--measure); }
.lede { font-size: 1.26rem; line-height: 1.45; max-width: 54ch; }
.small { font-size: 0.92rem; color: var(--ink-2); line-height: 1.5; font-family: var(--font-display); letter-spacing: -0.01em; }
.crumb { font-size: 0.9rem; color: var(--ink-2); margin: 0 0 10px; }
.crumb a { color: inherit; }
code { font-family: var(--font-display); font-size: 0.88em; background: var(--paper-2); padding: 1px 5px; }

/* ---------------- the offset grid ----------------
   Sections hang off a left annotation gutter that carries the section marker,
   the way a plot carries axis annotations. Collapses to one column on phones. */
.sec { display: grid; grid-template-columns: var(--gutter) minmax(0, 1fr); gap: 0 28px; padding: 26px 0 6px; border-top: 1px solid var(--rule); margin: 0 0 8px; }
.sec > .marker { font-size: 0.78rem; letter-spacing: 0.06em; color: var(--ink-2); padding-top: 4px; }
.sec > .body { min-width: 0; }
.sec.flush { border-top: 0; }
@media (max-width: 760px) {
  .sec { grid-template-columns: 1fr; gap: 0; padding-top: 20px; }
  .sec > .marker { padding: 0 0 8px; }
}

/* header: a readout strip, not a rule-under-logo bar */
.site-header { background: var(--plot-bg); color: var(--plot-ink); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 24px; padding: 12px 20px; }
.brand { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.03em; text-decoration: none; color: #fff; display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 16px; flex: none; background:
  linear-gradient(to top right, var(--vs) 0 40%, transparent 40%),
  linear-gradient(to right, transparent 0 60%, var(--ts) 60% 100%); }
nav { display: flex; flex-wrap: wrap; gap: 2px 20px; font-size: 0.86rem; letter-spacing: 0.01em; }
nav a { text-decoration: none; color: #a9c4cf; }
nav a:hover { color: #fff; text-decoration: underline; }
main { padding: 0 20px 56px; }
.site-footer { border-top: 1px solid var(--rule); padding: 20px 0 40px; margin-top: 30px; }
.site-footer .wrap { display: grid; grid-template-columns: var(--gutter) minmax(0, 1fr); gap: 0 28px; }
.site-footer .marker { font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 0.06em; color: var(--ink-2); }
.site-footer p { margin-bottom: 7px; max-width: 80ch; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } .site-footer .marker { padding-bottom: 8px; } }

/* ---------------- lead figure: operating points, full bleed ---------------- */
.plot { margin: 0 0 6px; max-width: none; }
.plot-svg { width: 100%; height: auto; background: var(--plot-bg); display: block; }
.plot-svg.tall { display: none; }
.plot-full { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); width: 100vw; max-width: 100vw; }
@media (max-width: 760px) {
  .plot-svg.tall { display: block; }
  .plot-svg.wide { display: none; }
}
.plot-full figcaption { max-width: var(--wrap); margin: 8px auto 0; padding: 0 20px; }
.plot-grid { stroke: var(--plot-rule); stroke-width: 1; }
.plot-axis { stroke: #6d8c99; stroke-width: 1.5; }
.plot-tick, .plot-axis-label { font-family: var(--font-display); font-size: 15px; fill: #8fa9b4; }
.plot-axis-label { font-size: 13px; letter-spacing: 0.1em; fill: #b6ccd4; }
.plot-link { stroke-width: 1.6; opacity: 0.5; stroke: var(--vs); }
.plot-link.ms { stroke: var(--ms); } .plot-link.ts { stroke: var(--ts); } .plot-link.ss { stroke: var(--ss); }
.plot-dot { fill: var(--vs); fill-opacity: 0.85; }
.plot-dot.ms { fill: var(--ms); } .plot-dot.ts { fill: var(--ts); } .plot-dot.ss { fill: var(--ss); }
.plot-dot.hi { fill-opacity: 0.4; }
.plot figcaption { font-size: 0.9rem; color: var(--ink-2); margin-top: 8px; max-width: 78ch; line-height: 1.45; }
@media (prefers-color-scheme: dark) { .plot-link { opacity: 0.6; } }

/* ---------------- the WEF rail (used on model pages and the index) --------- */
.rail-block { margin: 16px 0 24px; max-width: none; overflow-x: clip; }
.rail-row { display: grid; grid-template-columns: minmax(8.5rem, 14rem) 1fr; gap: 3px 16px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.rail-row:first-of-type { border-top: 1px solid var(--rule); }
.rail-name { font-size: 0.92rem; line-height: 1.2; letter-spacing: -0.02em; }
.rail-name a { text-decoration: none; }
.rail-name a:hover { text-decoration: underline; }
.rail-name .sub { display: block; font-size: 0.74rem; color: var(--ink-2); letter-spacing: 0; }
.rail-name .sub span + span::before { content: "  "; white-space: pre; }
.rail { position: relative; height: 24px; background: var(--paper-2); }
.rail-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--vs); }
.rail-bar.ms { background: var(--ms); }
.rail-bar.ts { background: var(--ts); }
.rail-bar.ss { background: var(--ss); }
.rail-bar.me { outline: 2px solid var(--ink); }
.rail-value { position: absolute; top: 0; height: 24px; line-height: 24px; font-family: var(--font-display); font-size: 0.86rem; font-weight: 700; padding: 0 6px; color: #fff; }
.rail-value.outside { color: var(--ink); }
@media (prefers-color-scheme: dark) {
  .rail-value { color: #0f1f27; }
  .rail-value.outside { color: var(--ink); }
}
.rail-tick { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.rail-scale { display: flex; justify-content: space-between; font-size: 0.76rem; color: var(--ink-2); margin-top: 6px; letter-spacing: 0.01em; }
.rail-legend { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.78rem; color: var(--ink-2); margin: 0 0 12px; letter-spacing: 0.01em; }
.key { display: inline-block; width: 15px; height: 9px; vertical-align: middle; margin-right: 6px; }
.key.vs { background: var(--vs); } .key.ms { background: var(--ms); }
.key.ts { background: var(--ts); } .key.ss { background: var(--ss); }
.key.med { background: var(--ink); width: 2px; height: 13px; }
@media (max-width: 560px) { .rail-row { grid-template-columns: 1fr; } }

/* model-page curve figure */
.curve { margin: 14px 0 22px; max-width: 780px; }
.curve svg { width: 100%; height: auto; }
.curve-axis { stroke: var(--rule); stroke-width: 1.5; }
.curve-grid { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 3 4; }
.curve-line { fill: none; stroke: var(--vs); stroke-width: 3; }
.curve-line.ms { stroke: var(--ms); } .curve-line.ts { stroke: var(--ts); } .curve-line.ss { stroke: var(--ss); }
.curve-dot { fill: var(--vs); } .curve-dot.ms { fill: var(--ms); } .curve-dot.ts { fill: var(--ts); } .curve-dot.ss { fill: var(--ss); }
.curve-mark { fill: none; stroke: var(--ink); stroke-width: 2; }
.curve-text { font-family: var(--font-display); font-size: 12px; fill: var(--ink-2); }
.curve-text.strong { fill: var(--ink); font-weight: 700; }
.curve figcaption { font-size: 0.88rem; color: var(--ink-2); margin-top: 6px; line-height: 1.45; }
/* At 390px the 760-unit viewBox would scale 12px in-SVG type down to about 6px. Hold the
   drawing at a legible width and let it scroll, the way .table-wrap already does.
   (Restored from 24bfd6e, which a full rewrite of this file had dropped.) */
@media (max-width: 640px) {
  .curve { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .curve svg { min-width: 560px; }
  .curve-text { font-size: 17px; }
}

/* buttons */
.button { display: inline-block; background: var(--vs-deep); color: var(--paper); padding: 9px 18px; text-decoration: none; font-weight: 700; font-size: 0.92rem; border: 2px solid var(--vs-deep); cursor: pointer; line-height: 1.25; letter-spacing: -0.01em; }
.button:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.button.secondary { background: transparent; color: var(--vs-deep); }
.button.secondary:hover { background: var(--paper-2); color: var(--ink); border-color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; margin: 16px 0 6px; }

/* readout strip: label over value, hairline separators, not a card row */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 0; margin: 16px 0 10px; max-width: none; border-left: 1px solid var(--rule); }
.stat { padding: 8px 14px 10px; border-right: 1px solid var(--rule); }
.stat .label { font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.03em; color: var(--ink-2); line-height: 1.3; }
.stat .value { font-size: 1.5rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.04em; margin-top: 2px; }
.stat .value.vs { color: var(--vs-deep); }

.tag { display: inline-block; font-size: 0.72rem; letter-spacing: 0.02em; padding: 1px 7px 2px; border: 1.5px solid currentColor; }
.tag.vs { color: var(--vs-deep); } .tag.ms { color: var(--ms); }
.tag.ts { color: var(--ts); } .tag.ss { color: var(--ss); }

/* CTA */
.cta { border-left: 4px solid var(--vs); padding: 4px 0 6px 18px; margin: 32px 0; max-width: var(--measure); }
.cta-title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; margin: 0 0 6px; }
.cta p:last-of-type { margin-bottom: 13px; }

.callout { background: var(--paper-2); border-left: 4px solid var(--ts); padding: 12px 16px; margin: 18px 0; max-width: var(--measure); }
.callout.info { border-left-color: var(--vs); }
.callout p:last-child { margin-bottom: 0; }
.formula { background: var(--plot-bg); color: var(--plot-ink); padding: 14px 18px; margin: 16px 0; max-width: var(--measure); font-family: var(--font-display); font-size: 0.86rem; line-height: 1.8; }
.formula strong { font-size: 0.74rem; letter-spacing: 0.08em; display: block; margin-bottom: 8px; color: #8fa9b4; }

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 12px 0 22px; border-top: 1px solid var(--ink); max-width: none; }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-family: var(--font-display); font-size: 0.86rem; letter-spacing: -0.01em; }
th, td { text-align: left; padding: 7px 14px 7px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 700; white-space: nowrap; color: var(--ink-2); }
tbody th { color: var(--ink); font-weight: 400; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.post-body table { display: block; overflow-x: auto; min-width: 0; border-top: 1px solid var(--ink); margin: 16px 0 22px; }
.post-body thead th { white-space: normal; }
table.compact { min-width: 400px; }

/* lists */
.facts { max-width: none; margin: 6px 0 0; padding: 0; list-style: none; counter-reset: fact; }
.facts li { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: 0 14px; padding: 11px 0; border-bottom: 1px solid var(--rule); counter-increment: fact; }
.facts li::before { content: counter(fact, decimal-leading-zero); font-family: var(--font-display); font-size: 0.78rem; color: var(--ink-2); padding-top: 3px; }
.facts h3 { margin: 0 0 2px; font-size: 0.98rem; }
.facts p { margin: 0; color: var(--ink-2); font-size: 0.98rem; max-width: 62ch; }
.model-list { list-style: none; padding: 0; margin: 8px 0 22px; max-width: none; columns: 2; column-gap: 34px; }
.model-list li { break-inside: avoid; padding: 3px 0; font-size: 0.95rem; }
@media (max-width: 640px) { .model-list { columns: 1; } }
.post-list { list-style: none; padding: 0; max-width: none; margin: 0; }
.post-card { border-bottom: 1px solid var(--rule); padding: 14px 0; max-width: 70ch; }
.post-card:first-child { border-top: 1px solid var(--rule); }
.post-card h2 { margin: 3px 0 5px; font-size: 1.15rem; }
.post-card p { margin: 0; }
.brand-group { margin: 0 0 26px; }
.brand-group h3 { margin-bottom: 1px; }

/* post */
.post-header { max-width: 70ch; }
.post-body h2 { margin: 40px 0 12px; padding-top: 14px; border-top: 1px solid var(--rule); }
.post-body h3 { margin-top: 28px; }
img.hero { border: 1px solid var(--rule); margin: 16px 0 6px; }
.faq details { border-bottom: 1px solid var(--rule); padding: 8px 0; max-width: var(--measure); }
.faq summary { cursor: pointer; }
.faq summary h3 { display: inline; margin: 0; font-size: 1rem; }
.faq p { margin: 8px 0 4px; }
.author-box, .related { border-top: 1px solid var(--ink); padding-top: 12px; margin-top: 32px; max-width: var(--measure); }
.author-box h2, .related h2 { margin-top: 0; font-size: 1.05rem; }

/* forms / tools */
form.calc { max-width: none; margin: 14px 0 10px; }
/* min-width: 0 overrides the UA's min-inline-size: min-content on fieldset,
   which otherwise stops the grid inside it collapsing at phone width. */
fieldset { border: 0; border-top: 1px solid var(--ink); margin: 0 0 22px; padding: 10px 0 0; min-width: 0; }
legend { font-size: 0.82rem; letter-spacing: 0.05em; font-weight: 700; padding: 0 10px 0 0; color: var(--ink-2); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 22px; max-width: 840px; }
.row > * { min-width: 0; }
.row select, .row input { max-width: 100%; }
select { text-overflow: ellipsis; }
label { display: block; font-family: var(--font-display); font-size: 0.78rem; color: var(--ink-2); line-height: 1.4; letter-spacing: -0.01em; }
input[type="number"], input[type="text"], select {
  display: block; width: 100%; margin-top: 5px; padding: 8px 10px;
  font-family: var(--font-display); font-size: 0.95rem; font-variant-numeric: tabular-nums;
  background: var(--card); color: var(--ink); border: 1px solid var(--rule);
}
input:focus-visible, select:focus-visible { border-color: var(--vs); }
.hint { font-size: 0.92rem; color: var(--ink-2); margin: 8px 0 0; max-width: 68ch; }
output { display: block; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0; max-width: none; border-left: 1px solid var(--rule); }
.result { padding: 9px 14px 11px; border-right: 1px solid var(--rule); }
.result .label { font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.03em; color: var(--ink-2); }
.result .value { font-size: 1.55rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.04em; }
.notice { font-size: 0.92rem; color: var(--ink-2); max-width: 70ch; }
@media print {
  .site-header nav, .cta, .button, .site-footer { display: none; }
  body { background: #fff; color: #000; }
  .sec { grid-template-columns: 1fr; }
}
