@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,600;12..96,700&family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

/* AGI Watch — layout & components (consumes tokens.css) */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--page);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 980px; margin: 0 auto; padding: 28px 24px 64px; display: flex; flex-direction: column; gap: 28px; }
a { color: var(--predicted); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--predicted); outline-offset: 2px; border-radius: 3px; }

/* ---------- top nav ---------- */
.nav { display: flex; align-items: center; gap: 18px; padding: 4px 0; }
.nav .brand { font-weight: 800; letter-spacing: -0.01em; font-size: 15px; color: var(--ink); text-decoration: none; }
.nav .brand span { color: var(--predicted); }
.nav .links { display: flex; gap: 14px; margin-left: auto; font-size: 13.5px; }
.nav .links a { color: var(--ink-2); text-decoration: none; }
.nav .links a:hover, .nav .links a[aria-current="page"] { color: var(--ink); }
.nav .theme-toggle {
  border: 1px solid var(--border); background: var(--surface); color: var(--ink-2);
  border-radius: 999px; padding: 3px 10px; font-size: 12px; cursor: pointer;
}

/* ---------- hero ---------- */
header.hero .eyebrow {
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-bottom: 6px;
}
header.hero h1 { font-size: clamp(28px, 4.5vw, 42px); margin: 0 0 8px; font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
header.hero p.sub { color: var(--ink-2); margin: 0; max-width: 62ch; font-size: 16px; }
.asof {
  display: inline-block; margin-top: 12px; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 12.5px; color: var(--ink-2); font-weight: 600;
}
h1 .pace { color: var(--serious); white-space: nowrap; }

/* ---------- stat tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 18px 20px 16px; display: flex; flex-direction: column; gap: 4px;
}
.tile .label { font-size: 12px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.tile .value { font-size: 30px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.15; }
.tile .note  { font-size: 13px; color: var(--ink-2); }

/* ---------- cards ---------- */
section.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 22px 22px 20px;
}
section.card h2 { margin: 0 0 4px; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
section.card p.desc { margin: 0 0 18px; font-size: 13.5px; color: var(--ink-2); max-width: 70ch; }

/* ---------- legend ---------- */
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; font-size: 13px; color: var(--ink-2); }
.legend .key { display: inline-flex; align-items: center; gap: 7px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.swatch.hollow { background: transparent; border: 2px dashed var(--muted); width: 9px; height: 9px; border-radius: 50%; }

/* ---------- timeline ---------- */
.tl-scroll { overflow-x: auto; }
.timeline { min-width: 660px; position: relative; padding: 26px 0 30px; }
.tl-grid { position: absolute; inset: 0 0 30px 0; }
.tl-grid .yr { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--grid); }
.tl-grid .yr span {
  position: absolute; bottom: -24px; left: 0; transform: translateX(-50%);
  font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.tname {
  position: relative; font-size: 11.5px; font-weight: 700; margin: 4px 0 0;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.tname.predicted { color: var(--predicted); }
.tname.actual    { color: var(--actual); }
.track { position: relative; height: 76px; margin: 0 0 22px; }
.track .rail { position: absolute; left: 0; right: 0; top: 52px; height: 2px; background: var(--baseline); border-radius: 1px; }
.ms { position: absolute; top: 46px; transform: translateX(-50%); cursor: default; }
.ms .dot {
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border);
}
.track.predicted .dot { background: var(--predicted); }
.track.actual    .dot { background: var(--actual); }
.ms.pending .dot { background: transparent; border: 2px dashed var(--muted); box-shadow: none; }
.ms .mlab {
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-size: 11.5px; color: var(--ink-2); text-align: center; line-height: 1.25;
}
.ms.up .mlab { top: auto; bottom: 22px; }
.ms .mlab b { color: var(--ink); font-weight: 650; }
.bandbar {
  position: absolute; top: 44px; height: 18px; border-radius: 4px;
  background: var(--band); border: 1px dashed var(--predicted);
}
.bandbar span {
  position: absolute; top: 1px; left: 50%; transform: translateX(-50%);
  font-size: 11px; color: var(--ink-2); white-space: nowrap;
}
.today { position: absolute; top: 0; bottom: 30px; width: 0; border-left: 2px solid var(--critical); }
.today em {
  position: absolute; top: 2px; left: 50%; transform: translateX(-50%);
  font-style: normal; font-size: 11px; background: var(--surface); padding: 0 5px;
  font-weight: 700; color: var(--critical); white-space: nowrap; border-radius: 3px;
}

/* ---------- pace bars ---------- */
.bars { display: flex; flex-direction: column; gap: 10px; }
.barrow { display: grid; grid-template-columns: 190px 1fr 64px; align-items: center; gap: 12px; }
.barrow .bl { font-size: 13px; color: var(--ink-2); text-align: right; line-height: 1.3; }
.barrow .bl small { display: block; color: var(--muted); font-size: 11px; }
.btrack { position: relative; height: 22px; }
.btrack .fill {
  position: absolute; left: 0; top: 3px; bottom: 3px; border-radius: 0 4px 4px 0;
  background: var(--actual); min-width: 3px;
}
.btrack .fill.behind { background: var(--serious); }
.btrack .fill.ahead  { background: var(--good); }
.btrack .ref { position: absolute; top: -3px; bottom: -3px; border-left: 2px dashed var(--ink-2); }
.btrack .ref i {
  position: absolute; top: -16px; left: -22px; font-style: normal; font-size: 10.5px; color: var(--muted); white-space: nowrap;
}
.barrow .bv { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bars-note { margin-top: 14px; font-size: 12px; color: var(--muted); max-width: 70ch; }
@media (prefers-reduced-motion: no-preference) {
  .btrack .fill { transition: width 0.6s ease; }
}
@media (max-width: 560px) {
  .barrow { grid-template-columns: 120px 1fr 52px; }
}

/* ---------- scorecard table ---------- */
.tbl-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 13.5px; }
th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); font-weight: 650; padding: 8px 12px; border-bottom: 1px solid var(--grid);
}
td { padding: 10px 12px; border-bottom: 1px solid var(--grid); vertical-align: top; color: var(--ink-2); }
td:first-child { color: var(--ink); font-weight: 600; }
tr:last-child td { border-bottom: none; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px;
  border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap;
  border: 1px solid var(--border);
}
.pill::before { font-size: 11px; }
.pill.ok       { color: var(--good-text); } .pill.ok::before       { content: "\2713"; }
.pill.ahead    { color: var(--good-text); } .pill.ahead::before    { content: "\25B2"; }
.pill.behind   { color: var(--serious);   } .pill.behind::before   { content: "\25BC"; }
.pill.faroff   { color: var(--critical);  } .pill.faroff::before   { content: "\25BC"; }

/* ---------- verdict cards ---------- */
.verdict { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.vcard { border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; background: var(--surface); }
.vcard h3 { margin: 0 0 6px; font-size: 14px; font-weight: 700; }
.vcard p { margin: 0; font-size: 13px; color: var(--ink-2); }
.vcard h3 .tick { color: var(--good-text); margin-right: 4px; }
.vcard h3 .cross { color: var(--serious); margin-right: 4px; }

/* ---------- prose pages (methodology / about / changelog) ---------- */
.prose { max-width: 70ch; }
.prose h2 { font-size: 20px; margin: 28px 0 8px; letter-spacing: -0.01em; }
.prose h3 { font-size: 15px; margin: 20px 0 6px; }
.prose p, .prose li { color: var(--ink-2); font-size: 14.5px; }
.prose code { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; font-size: 13px; }
.log-entry { border-left: 3px solid var(--predicted); padding: 2px 0 2px 14px; margin: 14px 0; }
.log-entry time { font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: 0.04em; }
.log-entry p { margin: 4px 0 0; }

/* ---------- footer ---------- */
footer { font-size: 12.5px; color: var(--muted); line-height: 1.7; border-top: 1px solid var(--grid); padding-top: 18px; }
footer a { color: var(--predicted); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ---------- tooltip ---------- */
#tip {
  position: fixed; z-index: 10; pointer-events: none; display: none;
  background: var(--ink); color: var(--page); padding: 6px 10px; border-radius: 6px;
  font-size: 12px; max-width: 260px; line-height: 1.4;
}

/* ---------- founder-first refresh ---------- */
body {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 28rem),
    var(--page);
}
.wrap { max-width: 1160px; padding: 26px 28px 72px; gap: 22px; }
.nav { min-height: 42px; }
.nav .brand { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-size: 19px; letter-spacing: -0.045em; }
.nav .brand span { color: var(--actual); }
.nav .links { gap: 18px; font-size: 13px; }
.nav-cta {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px;
  color: var(--ink); background: var(--accent); border-radius: 999px;
  text-decoration: none; font-size: 12px; font-weight: 700;
}
.theme-toggle { white-space: nowrap; }
header.hero {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr); gap: 28px;
  padding: 48px 0 22px; align-items: end;
}
header.hero .eyebrow, .section-kicker {
  color: var(--actual); font-family: "IBM Plex Mono", monospace; font-size: 11px;
  font-weight: 500; letter-spacing: .11em; text-transform: uppercase;
}
header.hero .eyebrow { margin-bottom: 14px; }
header.hero h1 {
  max-width: 780px; font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: clamp(42px, 6.1vw, 76px); line-height: .98; letter-spacing: -.055em;
}
header.hero p.sub { max-width: 54ch; font-size: 18px; line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.button { display: inline-flex; align-items: center; min-height: 42px; padding: 0 15px; border-radius: 7px; font-size: 13px; font-weight: 700; text-decoration: none; }
.button-primary { background: var(--ink); color: var(--surface); }
.button-primary:hover { background: var(--actual); }
.button-quiet { border: 1px solid var(--border); color: var(--ink-2); background: var(--surface); }
.button-quiet:hover { color: var(--ink); border-color: var(--actual); }
.hero-verdict {
  position: relative; min-height: 218px; padding: 24px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--ink); color: var(--surface); border-radius: 18px 18px 4px 18px;
  box-shadow: 10px 10px 0 var(--accent);
}
.hero-verdict::before { content: ""; position: absolute; width: 150px; height: 150px; right: -58px; top: -58px; border: 1px solid color-mix(in srgb, var(--accent) 75%, transparent); border-radius: 50%; }
.verdict-label { color: var(--accent); font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.hero-verdict strong { max-width: 9ch; margin-top: 20px; font-family: "Bricolage Grotesque", system-ui, sans-serif; font-size: 34px; line-height: .95; letter-spacing: -.05em; }
.hero-verdict p { max-width: 29ch; margin: 14px 0 0; color: color-mix(in srgb, var(--surface) 72%, transparent); font-size: 14px; line-height: 1.45; }
.verdict-mark { position: absolute; right: 22px; bottom: 18px; color: var(--accent); font-size: 26px; }
.asof { margin-top: 18px; background: transparent; border: 0; padding: 0; color: var(--muted); font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 400; }
.tiles { grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tile { min-height: 132px; padding: 18px; border: 0; border-radius: 12px; box-shadow: 0 1px 0 var(--border); }
.tile .label { font-family: "IBM Plex Mono", monospace; font-size: 10px; }
.tile .value { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-size: 31px; letter-spacing: -.045em; }
.tile .note { max-width: 33ch; line-height: 1.4; }
section.card { padding: 30px; border: 0; border-radius: 14px; box-shadow: 0 1px 0 var(--border); }
section.card h2 { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-size: 25px; letter-spacing: -.035em; }
section.card p.desc { font-size: 14px; line-height: 1.55; }
.section-kicker { margin-bottom: 10px; }
.section-intro { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.section-intro h2 { margin-bottom: 6px; }
.section-intro .desc { margin-bottom: 22px; }
.brief-note { padding: 6px 9px; color: var(--actual); background: color-mix(in srgb, var(--actual) 10%, transparent); border-radius: 5px; font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 500; text-transform: uppercase; white-space: nowrap; }
.action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.action-card { min-height: 180px; padding: 18px; background: var(--surface-2); border-radius: 10px; }
.action-card .action-number { color: var(--actual); font-family: "IBM Plex Mono", monospace; font-size: 12px; }
.action-card h3 { margin: 20px 0 8px; font-family: "Bricolage Grotesque", system-ui, sans-serif; font-size: 19px; line-height: 1; letter-spacing: -.03em; }
.action-card p { margin: 0; color: var(--ink-2); font-size: 13px; line-height: 1.5; }
.action-card strong { display: block; margin-top: 12px; color: var(--ink); font-size: 12px; }
.legend { margin-top: 18px; }
.tname { font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: .08em; }
.mlab, .tl-grid .yr span, .today em { font-family: "IBM Plex Mono", monospace; }
.barrow { grid-template-columns: 220px 1fr 64px; }
.barrow .bl { font-size: 13px; }
.btrack .fill { border-radius: 0 5px 5px 0; }
table { font-size: 13px; }
th { font-family: "IBM Plex Mono", monospace; font-size: 10px; }
td { line-height: 1.45; }
.final-verdict { background: var(--ink); color: var(--surface); }
.final-verdict h2 { color: var(--surface); font-size: 31px; }
.final-verdict p.desc { color: color-mix(in srgb, var(--surface) 72%, transparent); }
.final-verdict .section-kicker { color: var(--accent); }
.vcard { background: color-mix(in srgb, var(--surface) 8%, transparent); border-color: color-mix(in srgb, var(--surface) 18%, transparent); }
.vcard h3 { color: var(--surface); }
.vcard p { color: color-mix(in srgb, var(--surface) 72%, transparent); }
.prose h1, .prose h2 { font-family: "Bricolage Grotesque", system-ui, sans-serif; letter-spacing: -.04em; }

@media (max-width: 760px) {
  header.hero { grid-template-columns: 1fr; padding-top: 34px; }
  .hero-verdict { min-height: 190px; box-shadow: 7px 7px 0 var(--accent); }
  .tiles, .action-grid { grid-template-columns: 1fr; }
  .tile { min-height: 0; }
  .nav .links { order: 3; width: 100%; margin: 4px 0 0; overflow-x: auto; padding-bottom: 2px; }
  .nav { flex-wrap: wrap; }
  .nav-cta { margin-left: auto; }
  .section-intro { display: block; }
  .brief-note { display: inline-block; margin-bottom: 18px; }
  section.card { padding: 22px 18px; }
  .barrow { grid-template-columns: 135px 1fr 50px; gap: 8px; }
  .barrow .bl { font-size: 11px; }
}
