/* SOTA LLM Live — theme v0.3 (precision editorial / product docs)
   Tokens live in .planning/design-v0.3/design-tokens.json.
   One accent, one shadow, one motif. Data first. */

:root {
  /* colour — 9 values, one accent, one tint, one status pair */
  --bg: #FFFFFF;
  --surface: #F7F8FA;
  --ink: #0B0D12;
  --muted: #5B6472;
  --border: #E6E8EE;
  --accent: #2F5BFF;
  --tint: #EEF2FF;
  --ok-ink: #0E5A46;
  --ok-bg: #E7F6F1;

  /* type */
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* space / shape */
  --container: 1120px;
  --measure: 68ch;
  --radius-card: 10px;
  --radius-btn: 8px;
  --shadow-1: 0 1px 2px rgba(11, 13, 18, .06);
  --ease: cubic-bezier(.2, .6, .2, 1);
  --fast: 120ms;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--fast) var(--ease);
}
a:hover { color: var(--ink); }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

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

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--bg); color: var(--ink);
  padding: 12px 16px; border: 1px solid var(--border);
  border-radius: var(--radius-btn); z-index: 20;
}
.skip-link:focus { left: 16px; top: 12px; }

/* ---------- header ---------- */

.site-head { background: var(--bg); border-bottom: 1px solid var(--border); }
.head-row {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 4px 32px;
  padding-top: 10px; padding-bottom: 10px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; font-weight: 600;
  min-height: 44px;
}
.brand-mark { display: inline-flex; width: 26px; height: 26px; }
.brand-mark .gf-site-icon { width: 26px; height: 26px; border-radius: 6px; }
.brand-text { font-size: 16px; letter-spacing: -0.01em; }

.site-nav { display: flex; flex-wrap: wrap; gap: 0 24px; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--muted); text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: color var(--fast) var(--ease);
}
.site-nav a span {
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: border-color var(--fast) var(--ease);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.is-active { color: var(--ink); }
.site-nav a.is-active span { border-bottom-color: var(--accent); }

/* ---------- page shell ---------- */

main { padding-top: 56px; padding-bottom: 80px; }
main.wrap { padding-top: 56px; padding-bottom: 80px; }

.eyebrow {
  margin: 0 0 12px; color: var(--accent);
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
}

h1 {
  margin: 0 0 16px;
  font-size: 36px; line-height: 1.15;
  letter-spacing: -0.02em; font-weight: 600;
  text-wrap: balance;
}

.page-head { max-width: min(var(--measure), 660px); margin-bottom: 40px; }

.lede { margin: 0; font-size: 20px; line-height: 1.55; color: var(--muted); }
.meta-line { margin: 12px 0 0; font-size: 14px; color: var(--muted); }

.byline {
  margin: 16px 0 0;
  font-family: var(--mono);
  font-size: 13px; line-height: 1.6; color: var(--muted);
}
.byline a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.byline a:hover { color: var(--accent); }

/* ---------- hero (home) ---------- */

.hero { display: grid; grid-template-columns: 1fr; gap: 32px; margin-bottom: 48px; }
.hero-main { min-width: 0; }
.hero-title { font-size: 46px; line-height: 1.06; margin-bottom: 20px; text-wrap: balance; }
.hero .lede { max-width: 46ch; }

.signal { margin-bottom: 20px; line-height: 0; }

.hero-card {
  align-self: start;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-1);
}
.hero-card-label {
  margin: 0 0 12px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.snap-list { margin: 0; }
.snap-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.snap-row:last-child { border-bottom: 0; }
.snap-row dt { margin: 0; font-size: 15px; color: var(--muted); }
.snap-row dd {
  margin: 0; font-family: var(--mono); font-size: 18px; font-weight: 500;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.hero-card-foot {
  margin: 14px 0 0; padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 13px; line-height: 1.5; color: var(--muted);
}

/* ---------- prose ---------- */

.prose { max-width: min(var(--measure), 660px); }
.prose > p,
.prose > ul,
.prose > ol,
.prose > blockquote { font-size: 18px; }

.prose h2 {
  margin: 56px 0 16px;
  font-size: 28px; line-height: 1.25;
  letter-spacing: -0.015em; font-weight: 600;
}
.prose h3 { margin: 32px 0 10px; font-size: 22px; line-height: 1.35; font-weight: 600; }
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 24px; }
.prose li { margin-bottom: 10px; }
.prose li::marker { color: var(--muted); }
.prose strong { font-weight: 600; }

.prose blockquote {
  margin: 28px 0; padding: 16px 20px;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  color: var(--ink);
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose code {
  padding: 2px 6px; border-radius: 4px;
  background: var(--surface);
  font-family: var(--mono); font-size: 0.88em;
}

.trace-rule { border: 0; height: 1px; background: var(--border); margin: 56px 0; }

/* ---------- stat rows ---------- */

.stat-row { margin: 32px 0 24px; border-top: 1px solid var(--border); }
.stat {
  display: grid; grid-template-columns: 180px 1fr; gap: 4px 24px;
  padding: 16px 0; border-bottom: 1px solid var(--border);
}
.stat-dt {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
  padding-top: 3px;
}
.stat-dd { margin: 0; font-size: 17px; }

/* ---------- tables ---------- */

.table-wrap {
  margin: 28px 0 12px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg);
}
table { width: 100%; border-collapse: collapse; font-size: 16px; }
caption {
  caption-side: top; text-align: left;
  padding: 14px 16px 10px;
  font-size: 14px; line-height: 1.5; color: var(--muted);
}
th, td {
  padding: 12px 14px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--border);
}
th {
  background: var(--surface);
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap;
}
tbody tr:hover td { background: var(--surface); }
tbody tr:last-child td { border-bottom: 0; }
th.num { text-align: right; }
td.num {
  font-family: var(--mono); font-size: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap; text-align: right;
}

.table-copy {
  display: inline-flex; align-items: center;
  min-height: 44px; margin: 0 0 8px; padding: 0 16px;
  background: var(--bg); color: var(--muted); cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius-btn);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.table-copy:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- callouts / summaries ---------- */

.tldr {
  margin: 0 0 32px; padding: 20px 24px;
  background: var(--tint);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-card);
}
.tldr p { margin: 0; font-size: 18px; }
.tldr .tldr-date {
  display: block; margin-top: 8px;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}

.callout {
  margin: 28px 0; padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}
.callout p:last-child { margin-bottom: 0; }

/* ---------- figures ---------- */

.fig {
  margin: 32px 0 12px; padding: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-1);
}
.fig-chart { max-width: 100%; }
.fig-chart svg { display: block; height: auto; }
.fig-chart svg text { font-family: var(--mono); }
.fig-chart svg.chart-narrow { display: none; }
.fig figcaption { display: grid; gap: 6px; margin-top: 16px; }
.fig-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.fig-note { font-size: 14px; line-height: 1.55; color: var(--muted); }
.fig-source { font-size: 13px; line-height: 1.55; color: var(--muted); }
.figure-fallback { margin: 0 0 28px; font-size: 13px; color: var(--muted); }

/* ---------- evidence badges ---------- */

.badge {
  display: inline-block; padding: 2px 8px;
  border: 1px solid transparent; border-radius: 999px;
  font-family: var(--mono); font-size: 12px; font-weight: 400;
  line-height: 1.6; white-space: nowrap;
}
.badge--vendor { color: var(--ok-ink); background: var(--ok-bg); border-color: color-mix(in srgb, currentColor 30%, transparent); }
.badge--third { color: var(--accent); background: var(--tint); border-color: color-mix(in srgb, currentColor 30%, transparent); }
.badge--derived { color: var(--muted); background: var(--surface); border-color: color-mix(in srgb, currentColor 30%, transparent); }
.badge--none { color: var(--muted); background: transparent; border-color: color-mix(in srgb, currentColor 40%, transparent); }

/* ---------- how we checked ---------- */

.howchecked {
  margin: 48px 0 0; padding: 20px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
}
.howchecked h2 { margin: 0 0 12px; font-size: 22px; }
.howchecked ul { margin: 0; padding-left: 20px; font-size: 16px; }
.howchecked li { margin-bottom: 8px; }

/* ---------- decision flow ---------- */

.flow { margin: 28px 0; }
.flow-list { list-style: none; margin: 0; padding: 0; }
.flow-list li {
  position: relative; display: grid; gap: 4px;
  margin: 0 0 16px; padding: 16px 20px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-card);
}
.flow-list li:last-child { margin-bottom: 0; }
.flow-step {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
}
.flow-q { font-size: 17px; font-weight: 600; }
.flow-a { font-size: 15px; line-height: 1.6; color: var(--muted); }

/* ---------- faq ---------- */

.faq { margin: 48px 0 8px; max-width: min(var(--measure), 660px); }
.faq h2 { margin: 0 0 8px; font-size: 28px; letter-spacing: -0.015em; }
.faq h3 { margin: 28px 0 8px; font-size: 19px; font-weight: 600; }
.faq p { margin: 0 0 6px; }

/* ---------- related / sources ---------- */

.related, .sources {
  max-width: min(var(--measure), 660px);
  margin-top: 56px; padding-top: 24px;
  border-top: 1px solid var(--border);
}
.related h2, .sources h2 {
  margin: 0 0 16px; font-size: 22px; letter-spacing: -0.01em; font-weight: 600;
}
.related-list { list-style: none; margin: 0; padding: 0; }
.related-list li { margin-bottom: 14px; }
.related-list a { font-weight: 500; }
.related-note { display: block; margin-top: 2px; font-size: 15px; color: var(--muted); }

.sources .source-list { margin: 0; padding-left: 20px; }
.source-list li { margin-bottom: 10px; font-size: 15px; line-height: 1.55; }
.source-date {
  color: var(--muted); font-family: var(--mono); font-size: 12px;
  padding-left: 6px;
}

/* ---------- demo cards ---------- */

.demo-list { list-style: none; margin: 28px 0; padding: 0; display: grid; gap: 12px; }
.demo-card {
  display: block; padding: 16px 20px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-card);
  color: var(--ink); text-decoration: none;
  transition: border-color var(--fast) var(--ease);
}
.demo-card:hover { border-color: var(--accent); color: var(--ink); }
.demo-card .demo-title { display: block; font-weight: 600; }
.demo-card .demo-meta {
  display: block; margin-top: 4px; font-size: 14px; color: var(--muted);
}

/* ---------- footer ---------- */

.site-foot { border-top: 1px solid var(--border); background: var(--bg); }
.foot-row {
  display: flex; flex-wrap: wrap; gap: 16px 40px;
  align-items: baseline; justify-content: space-between;
  padding-top: 28px; padding-bottom: 40px;
}
.site-foot nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.site-foot a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--muted); text-decoration: none; font-size: 14px;
}
.site-foot a:hover { color: var(--ink); }
.foot-note {
  margin: 0; max-width: 52ch;
  font-size: 13px; line-height: 1.6; color: var(--muted);
}

/* ---------- misc ---------- */

.nowrap { white-space: nowrap; }

/* legacy hooks kept so old markup never breaks */
.fact-card, .two-col { min-width: 0; }
.fact-list { margin: 0; padding: 0; list-style: none; }
.fact-list li { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.fact-k { font-family: var(--mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- responsive ---------- */

@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; }
  .hero-card { margin-top: 8px; }
  /* tables and figures may run wider than the text measure, never wider than the container */
  .prose > .table-wrap,
  .prose > figure.fig { width: calc(100% + 240px); }
  .prose > .figure-fallback { width: calc(100% + 240px); }
}

@media (max-width: 959px) {
  .hero-title { font-size: 40px; }
}

@media (max-width: 767px) {
  body { font-size: 17px; }
  main { padding-top: 36px; padding-bottom: 64px; }
  main.wrap { padding-top: 36px; padding-bottom: 64px; }
  .wrap { padding: 0 20px; }
  h1 { font-size: 32px; }
  .hero-title { font-size: 34px; }
  .lede { font-size: 18px; }
  .prose > p, .prose > ul, .prose > ol, .prose > blockquote { font-size: 17px; }
  .prose h2 { font-size: 24px; margin-top: 44px; }
  .prose h3 { font-size: 20px; }
  .tldr p { font-size: 17px; }
  .stat { grid-template-columns: 1fr; gap: 2px; }
  .stat-dt { padding-top: 0; }
  table { font-size: 15px; }
  th, td { padding: 10px 10px; }
  .fig { padding: 14px; }
  .fig-chart svg.chart-wide { display: none; }
  .fig-chart svg.chart-narrow { display: block; }
  .fig-note, .fig-source { font-size: 13px; }
  .site-nav { gap: 0 18px; }
  .site-nav a { font-size: 13.5px; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  h1 { font-size: 30px; }
  .hero-title { font-size: 31px; }
  table { font-size: 14px; }
  th, td { padding: 9px 8px; }
  td.num { font-size: 13.5px; }
  .head-row { padding-top: 6px; padding-bottom: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
