/* The public website: one stylesheet, the pitch sheet's palette and type.
 *
 * The tokens are the web app's (frontend/src/index.css), so a screenshot
 * sits on a page in the colours it was taken in. Dark values follow the
 * reader's system setting; there is no toggle, because there is nothing on
 * these pages to remember a choice for. */
:root {
  --bg: #fcfcfb;
  --sunken: #f5f4f2;
  --surface: #ffffff;
  --fg: #242426;
  --fg-2: #3a3a3c;
  --muted: #5f5f66;
  --line: #d9d9dd;
  --grid: #ececef;
  --brand: #b2461e;
  --brand-strong: #9a3c19;
  --brand-soft: #fdf3ef;
  --on-brand: #ffffff;
  --accent: #1f5138;
  --accent-soft: #eef6f1;
  --yes: #1f5138;
  --part: #a8650a;
  --no: #8d8d93;
  --shadow: 0 1px 2px rgb(36 36 38 / 0.06), 0 8px 24px rgb(36 36 38 / 0.08);
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17181a;
    --sunken: #1c1d20;
    --surface: #1f2023;
    --fg: #ececea;
    --fg-2: #d6d6d3;
    --muted: #9a9aa0;
    --line: #3a3b40;
    --grid: #2a2b2f;
    --brand: #e0825e;
    --brand-strong: #ea9a7c;
    --brand-soft: #2b2320;
    --on-brand: #17181a;
    --accent: #7fbf9a;
    --accent-soft: #1d2a23;
    --yes: #7fbf9a;
    --part: #d9a24a;
    --no: #7c7c84;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.015em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; }
h1 em { font-style: normal; color: var(--brand); }
h2 { font-size: clamp(24px, 3vw, 30px); font-weight: 700; }
h3 { font-size: 19px; font-weight: 600; }
p { margin: 0 0 1em; color: var(--fg-2); }
p strong, li strong { color: var(--fg); }
code { font-family: var(--mono); font-size: 0.92em; background: var(--sunken); padding: 1px 5px; border-radius: 3px; }
pre { background: var(--sunken); border: 1px solid var(--line); padding: 14px 16px; overflow-x: auto; border-radius: 4px; }
pre code { background: none; padding: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.eyebrow { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0 0 12px; }
.lede { font-size: 20px; line-height: 1.5; color: var(--fg-2); max-width: 36em; }
.fine { font-size: 14px; color: var(--muted); }
.muted { color: var(--muted); }

/* The frame: the pitch's two-colour band, a header that wraps, one column. */
.band { height: 10px; background: var(--accent); }
.band span { display: block; width: min(34%, 260px); height: 100%; background: var(--brand); }
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding-block: 14px; }
.site-header .wordmark { display: flex; align-items: center; }
.site-header .wordmark svg { height: 30px; width: auto; display: block; }
.site-nav { display: flex; flex-wrap: wrap; gap: 2px 4px; margin-inline-start: auto; }
.site-nav a { color: var(--fg-2); text-decoration: none; font-size: 15px; padding: 6px 10px; border-radius: 4px; }
.site-nav a:hover { background: var(--sunken); color: var(--fg); }
.site-nav a[aria-current="page"] { color: var(--brand); font-weight: 600; }
.site-actions { display: flex; gap: 8px; align-items: center; }
@media (max-width: 760px) {
  .site-nav { margin-inline-start: 0; width: 100%; order: 3; }
  .site-actions { margin-inline-start: auto; }
}
main { padding-block: 40px 64px; }
main > section + section { margin-top: 64px; }
@media (min-width: 900px) { main { padding-block: 56px 96px; } main > section + section { margin-top: 88px; } }
.site-footer { border-top: 1px solid var(--line); background: var(--sunken); padding-block: 32px 40px; font-size: 14px; color: var(--muted); }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; }
.site-footer h4 { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-2); margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--fg-2); text-decoration: none; }
.site-footer a:hover { color: var(--brand); text-decoration: underline; }
.site-footer .legal { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }

/* Buttons. */
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--fg);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
}
.btn:hover { border-color: var(--fg-2); color: var(--fg); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: var(--on-brand); }
.btn-small { padding: 6px 12px; font-size: 14px; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 10px; }

/* The hero: the words, then a screenshot beside them when there is room. */
.hero { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .hero { grid-template-columns: 5fr 6fr; gap: 48px; } }
.hero h1 { margin-bottom: 18px; }

/* Prose sections keep a reading measure; the rest of the page may be wider. */
.prose { max-width: 68ch; }
.prose h2 { margin-bottom: 14px; }
.prose p + h2, section h2 + p { margin-top: 0; }
section > h2 { margin-bottom: 14px; }
section > h2 + p { max-width: 68ch; }
section > h2 + p.fine { max-width: none; }
.two { display: grid; gap: 24px 48px; }
@media (min-width: 760px) { .two { grid-template-columns: 1fr 1fr; } }

/* Screenshots: a thin frame, a caption beneath. */
.shot { margin: 0; min-width: 0; }
.shot img { border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); background: var(--surface); }
.shot figcaption { font-size: 13.5px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
.shots { display: grid; gap: 24px; }
@media (min-width: 760px) { .shots { grid-template-columns: repeat(3, minmax(0, 1fr)); } .shots.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Cards. */
.grid { display: grid; gap: 14px; margin-top: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 18px 20px; min-width: 0; }
.card h3 { margin-bottom: 6px; }
.card p { margin: 0; font-size: 15px; }
.card p + p { margin-top: 8px; }
.card .tag { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.card.featured { border-color: var(--accent); background: var(--accent-soft); }
.card a.more { display: inline-block; margin-top: 8px; font-size: 14px; }

/* The three facts, the ask, the banner: the pitch sheet's blocks. */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 24px; }
.fact { background: var(--accent-soft); border-radius: 8px; padding: 16px 18px; }
.fact b { display: block; font-size: 20px; color: var(--accent); margin-bottom: 2px; }
.fact span { font-size: 14px; color: var(--fg-2); line-height: 1.45; }
.ask { border-left: 4px solid var(--brand); background: var(--brand-soft); padding: 18px 22px; border-radius: 0 8px 8px 0; }
.ask p { margin: 0; color: var(--fg); }
.ask .cta { margin: 14px 0 0; }
.banner { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 18px 22px; border-radius: 0 8px 8px 0; }
.banner b { display: block; font-size: 18px; color: var(--fg); margin-bottom: 4px; }
.banner p { margin: 0; }

/* The loop: four stations in a row, each with the question it answers. */
.loop { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 20px 0 10px; counter-reset: station; }
.station { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 14px 14px 12px; position: relative; }
.station::before { counter-increment: station; content: counter(station); position: absolute; top: 10px; right: 12px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.station b { display: block; font-size: 16px; margin-bottom: 4px; color: var(--fg); }
.station span { display: block; font-size: 14px; line-height: 1.45; color: var(--muted); }
.loop-note { font-size: 14px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; max-width: 68ch; }
.loop-note svg { flex: none; margin-top: 3px; }
@media (max-width: 640px) { .loop { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.joins { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; max-width: 72ch; }
.joins li { background: var(--accent-soft); border-left: 4px solid var(--accent); padding: 12px 16px; color: var(--fg-2); }
.joins li b { color: var(--fg); }

/* Tables, including the ones the Markdown documents carry. */
.table-wrap { overflow-x: auto; margin: 16px 0 24px; max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; vertical-align: top; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 13.5px; }
thead th { border-bottom: 1.5px solid var(--fg-2); }
td.row { font-weight: 600; color: var(--fg); }
.matrix th.dc, .matrix td.dc { background: var(--accent-soft); padding-left: 10px; padding-right: 10px; }
/* A highlighted row is tinted and not padded, so its cells line up with the rows beneath. */
.matrix tr.dc td { background: var(--accent-soft); }
.y { color: var(--yes); font-weight: 700; }
.p { color: var(--part); font-weight: 700; }
.n { color: var(--no); font-weight: 700; }
.note { display: block; color: var(--muted); font-size: 13px; font-weight: 400; }
.legend { color: var(--muted); font-size: 14px; margin: 8px 0 12px; }

/* Pricing. */
.plans { display: grid; gap: 16px; margin-top: 20px; }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 24px; min-width: 0; }
.plan.full { border-color: var(--accent); }
.plan .price { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; color: var(--fg); margin: 8px 0 2px; }
.plan .price small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan ul { padding-left: 20px; margin: 14px 0 0; color: var(--fg-2); font-size: 15px; display: grid; gap: 6px; }
.tiers td:first-child { font-weight: 600; color: var(--fg); }

/* The figure on the loop page: one chart, hand-drawn SVG, with a hover layer. */
figure.chart-figure { margin: 24px 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 18px 18px 14px; }
figure.chart-figure header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; align-items: baseline; margin-bottom: 6px; }
figure.chart-figure h3 { font-size: 16px; margin: 0; }
figure.chart-figure header .kpi { font-size: 13px; color: var(--muted); }
figure.chart-figure figcaption { font-size: 13.5px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--sans); font-size: 11px; fill: var(--muted); }
.chart .lbl { fill: var(--fg-2); font-weight: 500; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .series { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .pt { fill: var(--brand); stroke: var(--surface); stroke-width: 2; }
.chart .target { fill: none; stroke: var(--fg-2); stroke-width: 1.5; stroke-dasharray: 4 4; }
.chart .hit { fill: transparent; cursor: default; }
.chart .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; }
.tip { position: absolute; pointer-events: none; background: var(--fg); color: var(--bg); font-size: 12px; line-height: 1.35; padding: 6px 8px; border-radius: 3px; transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap; font-variant-numeric: tabular-nums; }
details { margin-top: 10px; font-size: 14px; }
summary { cursor: pointer; color: var(--fg-2); }
figure.chart-figure table { font-variant-numeric: tabular-nums; width: auto; }

/* A document rendered from Markdown: a contents list beside it when wide. */
.doc-layout { display: grid; gap: 32px; }
@media (min-width: 1000px) { .doc-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 48px; } .toc { position: sticky; top: 16px; align-self: start; max-height: calc(100vh - 32px); overflow-y: auto; } }
.toc { font-size: 14px; }
.toc h2 { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.toc a { color: var(--fg-2); text-decoration: none; }
.toc a:hover { color: var(--brand); text-decoration: underline; }
.doc { min-width: 0; max-width: 76ch; }
.doc h1 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 16px; }
.doc h2 { font-size: 24px; margin: 48px 0 12px; padding-top: 8px; }
.doc h3 { font-size: 18px; margin: 28px 0 8px; }
.doc h4 { font-size: 16px; margin: 20px 0 6px; }
.doc ul, .doc ol { padding-left: 24px; color: var(--fg-2); }
.doc li { margin-bottom: 4px; }
.doc blockquote { margin: 16px 0; padding: 4px 18px; border-left: 4px solid var(--line); color: var(--muted); }
.doc .table-wrap table { min-width: 720px; }
.doc .table-wrap td, .doc .table-wrap th { padding-right: 16px; }
.doc-meta { font-size: 14px; color: var(--muted); margin: -4px 0 24px; }
.doc-list { display: grid; gap: 12px; margin-top: 20px; }
/* Each group after the first stands apart from the cards above it. */
.doc-list + .doc-group { margin-top: 48px; }
.doc-list .card h3 a { color: var(--fg); text-decoration: none; }
.doc-list .card h3 a:hover { color: var(--brand); text-decoration: underline; }

/* Definition lists on the trust page. */
dl { margin: 0; display: grid; gap: 18px; }
dt { font-weight: 600; color: var(--fg); margin-bottom: 4px; }
dd { margin: 0; color: var(--fg-2); max-width: 72ch; }

@media print {
  .site-header, .site-footer, .band, .cta, .toc { display: none; }
  body { background: #fff; color: #000; }
}

/* Questions and their answers: a heading for each, close above its answer. */
.faq h3 { margin: 22px 0 6px; font-size: 18px; }
.faq h3 + p { margin-top: 0; }
