/* goodboop production — tokens and components from the design system */
:root {
  --paper: #FCFCFA;
  --paper-2: #F2F2EE;
  --rule: #DCDCD6;
  --graphite: #5E5E59;
  --ink: #111111;
  --body: #3A3A36;
  --ai: #4DA8DE;
  --ai-ink: #0B6FA8;
  --cc: #F6F05F;
  --cc-ink: #6E6100;
  --cc-ring: #C9C34A;
  --rb: #D63384;
  --rb-ink: #B01F6E;
  --mp: #A8D5B5;
  --mp-ink: #1F5A38;
  --op-ac: #4A9E53;
  --op-ar: #412273;
  --op-cr: #CE3031;
  --op-all: #3F202B;
  --night: #0F0F12;
  --night-2: #1B1B20;
  --ai-bright: #6CC0F0;
  --rb-bright: #FF5FAE;
  --radius-card: 16px;
  --radius-pill: 32px;
  --max: 1120px;
  --shadow-ai: 3px 3px 0 var(--ai);
  --shadow-cc: 3px 3px 0 var(--cc);
  --shadow-rb: 3px 3px 0 var(--rb);
  --shadow-mp: 3px 3px 0 var(--mp);
  --shadow-ink: 3px 3px 0 var(--ink);
  --font-display: "Bricolage Grotesque", "Iowan Old Style", Georgia, serif;
  --font-text: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-data: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--body);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; border: 0; display: block; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--ai-ink); }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); letter-spacing: -0.03em; line-height: 1.15; margin: 0; }
p { margin: 0; }

.skip {
  position: absolute; left: -999px; top: 0;
}
.skip:focus {
  left: 16px; top: 16px; z-index: 80;
  background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px;
}

.wrap { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }

/* Nav */
.site-header { position: sticky; top: 0; z-index: 40; padding: 16px 0 10px; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(14px); }
.nav-pill {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 14px 10px 18px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
}
.logo-lockup { display: flex; align-items: center; flex: 0 0 auto; }
.logo-lockup img { height: 46px; width: auto; display: block; }
.nav-links {
  display: flex; align-items: center; gap: 4px; flex: 1;
}
.nav-links a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 999px;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--paper-2); color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; text-decoration: none; border: 2px solid var(--ink);
  font-weight: 700; font-size: 14px; line-height: 1; border-radius: 999px;
  padding: 12px 18px; cursor: pointer; font-family: var(--font-text);
  background: var(--paper); color: var(--ink);
}
.btn-ink { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-ink:hover { background: #000; color: #fff; }
.btn-ghost { background: var(--paper); }
.btn-ghost:hover { background: var(--paper-2); color: var(--ink); }
.nav-cta { margin-left: auto; white-space: nowrap; }

/* Hero */
.hero { padding: 48px 0 28px; }
.kicker {
  font-family: var(--font-data);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--graphite);
  margin-bottom: 18px;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(240px, 0.85fr);
  gap: 28px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(34px, 4.5vw, 60px);
  font-weight: 800;
  max-width: none;
  line-height: 1.08;
}
.lede { font-size: 20px; line-height: 1.45; margin-top: 18px; max-width: 38ch; color: var(--body); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-bots { position: relative; max-width: 500px; width: 100%; margin-left: auto; overflow: visible; padding: 4px 0; }
.hero-bots img { width: 100%; height: auto; position: relative; z-index: 1; }
.bot-label {
  position: absolute;
  z-index: 2;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.03em;
  color: var(--ink);
  background: transparent;
  border: 0;
  padding: 0;
}
.bot-label.ai { top: 8%; left: 58%; }
.bot-label.cc { top: 38%; left: 4%; }
.bot-label.rb { top: 42%; right: 0; color: var(--graphite); }

/* Sections */
.section { padding: 42px 0; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 22px;
}
.section-title {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0;
}
.section-title h2 { font-size: clamp(32px, 4vw, 42px); font-weight: 800; }
.smile {
  width: 72px; height: 14px; display: block; margin-top: -2px; margin-left: 2px;
}
.section-lede { color: var(--graphite); max-width: 42ch; margin: 0; text-align: right; font-size: 15px; line-height: 1.45; }
.more {
  font-weight: 600; font-size: 15px; text-decoration: none;
  white-space: nowrap; color: #1a66d8;
}
.more:hover { color: #0b4fb0; text-decoration: underline; }

/* Radar */
.radar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.radar-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-height: 280px;
}
.radar-card:hover { color: inherit; border-color: var(--ink); }
.radar-card.featured { border-left: 6px solid var(--op-ar); }
.radar-card.topic-compilers { }
.radar-card.topic-ai { }
.radar-card.topic-robots { }
.radar-card.topic-math { }
.radar-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-text);
  font-weight: 650;
  font-size: 13px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 4px 10px 4px 8px;
  line-height: 1.2;
  background: #fff;
  color: var(--ink);
}
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 1px rgba(17,17,17,0.15); flex: 0 0 auto; }
.dot-ai { background: var(--ai); }
.dot-compilers { background: var(--cc); }
.dot-robots { background: var(--rb); }
.dot-math { background: var(--mp); }
.dots { display: inline-flex; align-items: center; width: 16px; height: 10px; position: relative; }
.dots .dot { position: absolute; }
.dots .dot:first-child { left: 0; }
.dots .dot:last-child { left: 6px; }
.pill-status {
  background: transparent;
  color: var(--ink);
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border: 1px solid var(--rule);
}
.pill-status.is-early { background: var(--ink); color: #fff; border-color: var(--ink); }
.radar-card h3 { font-size: 22px; font-weight: 800; }
.radar-card.featured h3 { font-size: 22px; }
.radar-card p { color: var(--body); font-size: 15px; }
.stat-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: auto; padding-top: 8px; }
.stat {
  font-family: var(--font-data);
  font-size: 13px;
  color: var(--ink);
}
.stat b { font-weight: 700; }
.sample {
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 2px 7px;
  font-weight: 700;
}

/* Talking */
.talking {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 8px 0 10px;
}
.talking-label { font-weight: 700; color: var(--ink); margin-right: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  text-decoration: none;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--ai);
  max-width: 100%;
}
.chip:hover { color: var(--ink); background: #fff; }
.chip-src {
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.chip-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 34ch; }
.chip-n { font-family: var(--font-data); font-size: 12px; color: var(--graphite); white-space: nowrap; }

/* Releases */
.release-list { display: flex; flex-direction: column; border-top: 2px solid var(--ink); }
.release-row {
  display: grid;
  grid-template-columns: 78px 18px 140px 110px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
}
.release-row:hover { color: inherit; }
.release-date { font-family: var(--font-data); font-size: 13px; color: var(--graphite); }
.release-main { display: contents; }
.release-name { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--ink); letter-spacing: -0.03em; }
.release-ver { font-family: var(--font-data); font-size: 14px; font-weight: 500; color: var(--ink); }
.release-note { color: var(--body); font-size: 15px; margin: 0; }
.release-go { font-weight: 600; font-size: 14px; white-space: nowrap; color: #1a66d8; }
.tdot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 1px rgba(17,17,17,0.12); justify-self: center; }
.tdot-ai { background: var(--ai); }
.tdot-compilers { background: var(--cc); }
.tdot-robots { background: var(--rb); }
.tdot-math { background: var(--mp); }
.tdot-mix { width: 18px; height: 12px; position: relative; background: transparent; box-shadow: none; }
.tdot-mix i { position: absolute; top: 0; width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(17,17,17,0.12); }
.tdot-mix i:first-child { left: 0; }
.tdot-mix i:last-child { left: 6px; }

/* Papers */
.paper-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.paper-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  padding: 22px;
  display: flex; flex-direction: column; gap: 12px;
}
.paper-id { font-family: var(--font-data); font-size: 13px; color: var(--graphite); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.arxiv {
  display: inline-flex; align-items: center;
  background: var(--ink); color: #fff;
  font-family: var(--font-data); font-size: 11px; font-weight: 700;
  letter-spacing: 0.02em; border-radius: 6px; padding: 2px 7px;
}
.paper-card h3 { font-size: 24px; }
.paper-authors { font-size: 14px; color: var(--graphite); }
.why {
  border-radius: 14px;
  padding: 12px 14px;
  display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap;
}
.why.topic-compilers { background: var(--cc); color: var(--ink); }
.why.topic-robots { background: var(--rb); color: #fff; }
.why.topic-ai { background: var(--ai); color: var(--ai-ink); }
.why.topic-math { background: var(--mp); color: var(--mp-ink); }
.why-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
}
.paper-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: auto; padding-top: 4px; }
.paper-links a { font-weight: 600; font-size: 14px; color: #1a66d8; text-decoration: none; }
.paper-links a:hover { text-decoration: underline; }

/* Watch */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filter {
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 14px;
  font-family: var(--font-text);
  cursor: pointer;
}
.filter[aria-pressed="true"], .filter.is-on { color: var(--ink); }
.filter[data-filter="all"].is-on { background: var(--ink); color: #fff; }
.filter[data-filter="ai"].is-on { background: var(--ai); color: var(--ai-ink); }
.filter[data-filter="compilers"].is-on { background: var(--cc); color: var(--cc-ink); }
.filter[data-filter="robots"].is-on { background: var(--rb); color: #fff; }
.filter[data-filter="math"].is-on { background: var(--mp); color: var(--mp-ink); }
.watch-list { display: flex; flex-direction: column; gap: 12px; }
.watch-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  background: var(--paper);
}
.watch-item:hover { color: inherit; background: var(--paper-2); }
.watch-kind { font-family: var(--font-data); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.watch-item h3 { font-size: 18px; margin-top: 4px; }
.watch-item p { color: var(--graphite); font-size: 14px; margin-top: 4px; }
.watch-item.is-hidden { display: none; }
.watch-item.has-thumb { grid-template-columns: 148px auto 1fr; }
.watch-thumb {
  width: 148px; height: 84px; object-fit: cover;
  border-radius: 10px; background: var(--paper-2);
}

/* Digest */
.digest-band { padding: 12px 0 56px; }
.digest-card {
  background: var(--cc);
  border-radius: 28px;
  padding: 48px 48px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
}
.digest-card h2 { font-size: clamp(32px, 4vw, 52px); }
.digest-card .lede { color: var(--ink); max-width: 32ch; }
.digest-form { display: flex; flex-direction: column; gap: 8px; }
.digest-form label { font-weight: 700; color: var(--ink); font-size: 14px; }
.digest-row { display: flex; gap: 10px; align-items: center; }
.digest-form input[type="email"] {
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  font: 16px/1.2 var(--font-text);
  background: #fff;
  flex: 1;
  min-width: 0;
}
.form-note, .form-status { font-size: 14px; color: var(--ink); }
.form-status[data-state="ok"] { font-weight: 600; }

/* Footer */
.site-footer { padding: 8px 0 48px; }
.footer-line {
  display: flex; align-items: center; gap: 22px;
  padding-top: 22px; border-top: 2px solid var(--ink); flex-wrap: wrap;
}
.footer-line img { height: auto; width: 220px; max-width: min(220px, 55vw); display: block; }
.footer-line p { color: var(--graphite); font-size: 14px; flex: 1; min-width: 220px; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { text-decoration: none; font-weight: 600; color: var(--ink); }

/* Interior pages */
.page-hero { padding: 36px 0 10px; }
.page-hero h1 { font-size: clamp(36px, 5vw, 52px); max-width: 18ch; }
.page-hero .lede { margin-top: 14px; }

/* Digest preview chrome */
.email-chrome { padding: 28px 0 80px; }
.email-frame {
  width: min(720px, 100%);
  margin: 0 auto;
  background: var(--paper-2);
  border: 2px solid var(--ink);
  border-radius: 20px;
  padding: 18px 18px 28px;
  box-shadow: 6px 6px 0 var(--ink);
}
.email-meta { font-family: var(--font-data); font-size: 12px; color: var(--graphite); margin-bottom: 14px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Utility */
.list-page .paper-grid { margin-top: 8px; }
.list-page .release-list { margin-top: 8px; }
.empty { color: var(--graphite); padding: 12px 0; }

@media (max-width: 860px) {
  .hero-grid, .radar-grid, .paper-grid, .digest-card {
    grid-template-columns: 1fr;
  }
  .section-head { flex-direction: column; align-items: flex-start; }
  .section-lede { text-align: left; }
  .hero-bots { margin: 10px auto 0; }
  .release-row { grid-template-columns: 64px 18px 1fr; }
  .release-ver, .release-note, .release-go { display: none; }
  .watch-item, .watch-item.has-thumb { grid-template-columns: 1fr; gap: 8px; }
  .watch-thumb { width: 100%; height: auto; aspect-ratio: 16 / 9; }
  .digest-card { padding: 28px 22px; }
  .digest-row { flex-direction: column; align-items: stretch; }
}
@media (max-width: 720px) {
  .wrap, .nav-pill { width: min(var(--max), calc(100% - 24px)); }
  .nav-pill { flex-wrap: wrap; border-radius: 24px; gap: 8px; }
  .logo-lockup img { height: 42px; }
  .nav-links { width: 100%; justify-content: space-between; gap: 0; }
  .nav-links a { padding: 8px 8px; font-size: 14px; }
  .nav-cta { margin-left: 0; }
  .hero { padding-top: 28px; }
  .chip-title { max-width: 22ch; }
}

.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.topic-picks { display: flex; flex-wrap: wrap; gap: 10px 14px; margin: 4px 0 2px; }
.topic-picks label { font-size: 14px; font-weight: 600; color: var(--ink); display: inline-flex; gap: 6px; align-items: center; }
.form-status[data-state="err"] { color: #8a1f4b; font-weight: 600; }
