/* VectorGym project page. Visual language follows quiver.ai: Geist and Geist Mono,
   near-white canvas, neutral ink, hairline frame and grids, dark pill buttons,
   window-style cards. */
:root {
  --bg: #fcfcfc;
  --surface: #ffffff;
  --ink: #141414;
  --text: #333333;
  --muted: #565656;
  --faint: #6b6b6b;  /* 5.3:1 on white; quiver.ai uses #8b8b8b for decorative text */
  --line: #ebebeb;
  --soft: #f5f5f5;
  --accent: #1d4ed8;
  --accent-soft: #dbeafe;
  --frame: 1180px;
  --gutter: 32px;
  --sans: 'Geist', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { color: var(--ink); font-weight: 500; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 10px 16px; background: var(--ink); color: #fff; border-radius: 999px; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.frame { width: min(var(--frame), 100% - var(--gutter) * 2); margin-inline: auto; }
main.frame { border-inline: 1px solid var(--line); background: var(--bg); }


/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(252, 252, 252, .9); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 32px; min-height: 60px; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 17px; color: var(--ink); letter-spacing: -.02em; }
.wordmark-mark { width: 20px; height: 20px; }
nav { display: flex; gap: 26px; margin-left: auto; font-size: 14px; color: var(--muted); }
nav a:hover { color: var(--ink); }

/* Buttons */
.pill { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 9px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; transition: background .15s, border-color .15s; }
.pill-dark { background: var(--ink); color: #fff; }
.pill-dark:hover { background: #333; }
.pill-light { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.pill-light:hover { box-shadow: inset 0 0 0 1px #cfcfcf; }
.pill-ghost { color: var(--muted); }
.pill-ghost:hover { color: var(--ink); }
.header-cta { min-height: 34px; padding: 6px 14px; font-size: 13px; }

/* Labels */
.eyebrow, .label, .task-tag, .step-tag { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }

/* Hero */
.hero { padding: 88px 56px 64px; text-align: center; border-bottom: 1px solid var(--line);
  background-image: radial-gradient(circle, #e2e2e2 1px, transparent 1.2px); background-size: 22px 22px; background-position: center top;
  -webkit-mask-image: none; }
.hero h1 { margin: 16px 0 10px; font-size: clamp(52px, 7vw, 88px); line-height: 1; letter-spacing: -.045em; }
.hero-title { font-size: clamp(19px, 2.1vw, 24px); color: var(--ink); letter-spacing: -.02em; max-width: 760px; margin: 0 auto; }
.hero-deck { margin: 22px auto 0; max-width: 720px; font-size: 17px; color: var(--muted); line-height: 2; }
.chip { display: inline-flex; align-items: center; padding: 1px 10px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font-size: 15px; line-height: 1.7; }
.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hero-window { margin: 52px auto 0; max-width: 1000px; text-align: left; }

/* Window cards */
.window, .code-window { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 12px 32px rgba(0,0,0,.05); }
.window-bar { position: relative; display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-bottom: 1px solid var(--line); background: #fafafa; }
.window-bar > span { width: 9px; height: 9px; border-radius: 50%; background: #dadada; }
.window-bar em { position: absolute; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 12px; color: var(--faint); white-space: nowrap; }
.window-body { display: block; padding: 18px; cursor: zoom-in; }
.window figcaption { padding: 12px 18px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); line-height: 1.6; }
.window.wide { margin-top: 40px; }

/* People */
.people { padding: 36px 56px 34px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 140px minmax(0, 1fr); column-gap: 32px; row-gap: 14px; }
.people .label { padding-top: 3px; }
.authors { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; color: var(--ink); }
.authors sup, .affiliations li::marker { font-family: var(--mono); font-size: 10px; color: var(--faint); }
.authors sup { margin-left: 2px; }
.affiliations { grid-column: 2; margin: 4px 0 0; padding-left: 22px; columns: 3 220px; column-gap: 28px; font-size: 13px; color: var(--muted); line-height: 1.8; }
.affiliations li { break-inside: avoid; padding-left: 2px; }
.people .note { grid-column: 2; font-size: 12px; color: var(--faint); }

/* Sections */
.block { padding: 80px 56px; border-bottom: 1px solid var(--line); }
.block h2 { margin: 14px 0 16px; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.15; letter-spacing: -.035em; max-width: 820px; }
.lede { max-width: 760px; font-size: 17px; color: var(--muted); line-height: 1.75; }
.fine { margin-top: 14px; font-size: 13px; color: var(--faint); max-width: 760px; }

/* Task grid: hairline grid like the QuiverAI logo wall */
.task-grid { margin-top: 44px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.task { padding: 28px 30px 30px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.task h3 { margin: 10px 0 10px; font-size: 21px; letter-spacing: -.02em; }
.task p:last-child { font-size: 15px; color: var(--muted); line-height: 1.7; }

/* Stats */
.stats { margin: 40px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats > div { padding: 22px 22px 22px 0; }
.stats > div + div { padding-left: 22px; border-left: 1px solid var(--line); }
.stats dt { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.stats dd { margin: 8px 0 4px; font-size: clamp(26px, 2.8vw, 34px); font-weight: 500; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stats .stat-note { margin: 0; font-size: 13px; color: var(--muted); }

/* Method steps */
.steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.steps li { padding: 26px 26px 28px 0; }
.steps li + li { padding-left: 26px; border-left: 1px solid var(--line); }
.steps h3 { margin: 10px 0 10px; font-size: 18px; letter-spacing: -.02em; }
.steps p { font-size: 15px; color: var(--muted); line-height: 1.7; }
.equation { margin-top: 14px; padding: 12px 14px; background: var(--soft); border-radius: 8px; overflow-x: auto; font-size: 15px; color: var(--ink); }
.equation .katex-display { margin: 0; }

/* Tables */
.table-scroll { margin-top: 36px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
caption { caption-side: top; text-align: left; padding: 14px 16px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); }
th, td { padding: 10px 14px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
thead th { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); background: #fafafa; }
tbody th, thead th:first-child { text-align: left; font-weight: 500; color: var(--ink); }
.compare td { text-align: center; color: var(--muted); }
tr.ours th, tr.ours td { background: #f3f7ff; color: var(--ink); }
tr.group th { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); background: #fcfcfc; font-weight: 500; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
td b { color: var(--ink); font-weight: 600; }

/* Bar chart */
.chart { margin: 40px 0 0; padding: 26px 28px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.chart figcaption { font-size: 14px; color: var(--ink); margin-bottom: 18px; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.bars li { display: grid; grid-template-columns: 200px minmax(0, 1fr) 56px; align-items: center; gap: 14px; font-size: 14px; }
.bar-name { color: var(--muted); }
.bar-track { height: 12px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.bar { display: block; height: 100%; width: calc(var(--v) * 1%); border-radius: inherit; background: #cfcfcf; }
.bars li.closed .bar { background: #8b8b8b; }
.bars li.ours .bar { background: var(--accent); }
.bars li.ours .bar-name, .bars li.ours .bar-val { color: var(--ink); font-weight: 600; }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.legend { margin-top: 16px; font-size: 12px; font-size: 12px; color: var(--muted); }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 6px 0 10px; vertical-align: -1px; }
.key-closed { background: #8b8b8b; } .key-open { background: #cfcfcf; } .key-ours { background: var(--accent); }

/* Findings */
.findings { margin-top: 40px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.findings article { padding: 24px 24px 6px 0; }
.findings article + article { padding-left: 24px; border-left: 1px solid var(--line); }
.findings h3 { margin: 10px 0 8px; font-size: 18px; letter-spacing: -.02em; }
.findings p:last-child { font-size: 14px; color: var(--muted); line-height: 1.7; }

details.tables { margin-top: 40px; }
details.tables summary { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; list-style: none; padding: 9px 18px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); font-size: 14px; font-weight: 500; color: var(--ink); }
details.tables summary::-webkit-details-marker { display: none; }
details.tables summary::after { content: '+'; color: var(--faint); }
details.tables[open] summary::after { content: '−'; }

/* Citation */
.code-window { margin-top: 28px; max-width: 900px; }
.code-window pre { margin: 0; padding: 20px 22px; overflow-x: auto; font-family: var(--mono); font-size: 13px; line-height: 1.7; color: var(--text); background: var(--surface); }
.copy { position: absolute; right: 10px; font: inherit; font-size: 12px; padding: 3px 10px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; cursor: pointer; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; padding: 24px 0 40px; font-size: 13px; color: var(--faint); }
.footer-inner a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.footer-inner a:hover { text-decoration-color: currentColor; }

@media (max-width: 960px) {
  :root { --gutter: 16px; }
  nav { display: none; }
  .header-cta { margin-left: auto; }
  .hero { padding: 64px 22px 44px; }
  .people, .block { padding-inline: 22px; }
  .people { grid-template-columns: minmax(0, 1fr); }
  .affiliations, .people .note { grid-column: 1; }
  .block { padding-block: 60px; }
  .task-grid { grid-template-columns: minmax(0, 1fr); }
  .stats, .stats.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .steps, .findings { grid-template-columns: minmax(0, 1fr); }
  .steps li, .steps li + li, .findings article, .findings article + article { padding: 22px 0; border-left: 0; }
  .steps li + li, .findings article + article { border-top: 1px solid var(--line); }
  .bars li { grid-template-columns: 128px minmax(0, 1fr) 46px; gap: 10px; font-size: 13px; }
  .window-body { padding: 10px; }
}
.eq-note { margin-top: 8px; font-size: 13px; color: var(--muted); }
