:root {
  --bg: #fbfbf9;
  --surface: #ffffff;
  --surface-2: #f2f2ee;
  --text: #1b1d1f;
  --muted: #5b6168;
  --border: #e2e2dc;
  --accent: #1f5fbf;
  --accent-soft: #e6eefb;
  --good: #1d7a4a;
  --radius: 10px;
  --maxw: 760px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121416;
    --surface: #1a1d20;
    --surface-2: #22262a;
    --text: #e8e9ea;
    --muted: #a1a7ad;
    --border: #2e3338;
    --accent: #7aa7ec;
    --accent-soft: #1e2a3d;
    --good: #5cc28d;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px;
}

/* Header / nav */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  font-weight: 650;
  color: var(--text);
  text-decoration: none;
}
.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }

main { padding: 40px 0 64px; }

h1, h2, h3 { line-height: 1.25; font-weight: 650; }
h1 { font-size: 2rem; margin: 0 0 12px; letter-spacing: -0.01em; }
h2 { font-size: 1.3rem; margin: 48px 0 12px; }
h3 { font-size: 1.05rem; margin: 24px 0 6px; }
p, ul, ol { margin: 0 0 14px; }
ul, ol { padding-left: 22px; }
li { margin-bottom: 6px; }

.lede { font-size: 1.15rem; color: var(--muted); margin-bottom: 20px; }
.eyebrow {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 8px;
}
.muted { color: var(--muted); }
.small { font-size: 14px; }

.links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 18px 0 0; padding: 0; list-style: none; }
.links li { margin: 0; }

/* Cards */
.cards { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 16px; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  color: var(--text);
  text-decoration: none;
}
a.card:hover { border-color: var(--accent); }
.card h3 { margin: 0 0 6px; }
.card p { margin: 0 0 10px; color: var(--muted); font-size: 15px; }
.card .stat { font-weight: 650; color: var(--text); font-size: 15px; margin: 0; }
.card.wide { grid-column: 1 / -1; }

/* Metric tiles */
.metrics { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin: 16px 0 8px; }
@media (min-width: 640px) { .metrics { grid-template-columns: repeat(3, 1fr); } }
.metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.metric .value { font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.metric .label { font-size: 13.5px; color: var(--muted); margin-top: 4px; }

/* Fact table */
.facts { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 15px; }
.facts th, .facts td { text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.facts th { font-weight: 600; width: 34%; color: var(--muted); }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 8px 0 14px; list-style: none; }
.tags li {
  margin: 0;
  font-size: 13.5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

/* Flow diagram: vertical on phones, horizontal rows on wider screens */
.flow {
  list-style: none;
  padding: 0;
  margin: 16px 0 8px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.flow > li {
  position: relative;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.flow > li + li::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 50%;
  width: 2px;
  height: 14px;
  background: var(--muted);
  transform: translateX(-50%);
}
.flow > li + li::after {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  border: 5px solid transparent;
  border-top-color: var(--muted);
  transform: translateX(-50%);
}
.node {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14.5px;
  line-height: 1.4;
  text-align: center;
}
.node strong { display: block; font-size: 14.5px; }
.node span { color: var(--muted); font-size: 13px; }
.node.ai { border-color: var(--accent); background: var(--accent-soft); }
.node.check { border-color: var(--good); }
.node.human { border-style: dashed; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); margin: 6px 0 0; padding: 0; list-style: none; }
.legend li { margin: 0; display: flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 14px; height: 10px; border: 1px solid var(--border); border-radius: 3px; background: var(--surface); }
.legend i.ai { border-color: var(--accent); background: var(--accent-soft); }
.legend i.check { border-color: var(--good); }
.legend i.human { border-style: dashed; border-color: var(--muted); }

.figure {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 16px 0;
}
.figure figcaption { font-size: 13.5px; color: var(--muted); margin-top: 10px; }

/* Offers */
.offer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0;
}
.offer h2 { margin-top: 0; font-size: 1.15rem; }
.offer .scope { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.offer p:last-child, .offer ul:last-child { margin-bottom: 0; }

.callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 12px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 16px 0;
}
.callout p:last-child { margin-bottom: 0; }

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}
.button:hover { opacity: 0.9; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 40px;
  font-size: 14px;
  color: var(--muted);
}
.site-footer a { color: var(--muted); }

code { font-family: var(--mono); font-size: 0.9em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 420px) {
  body { font-size: 16px; }
  h1 { font-size: 1.65rem; }
  .facts th { width: 40%; }
}
