/* Layout variables */
:root {
  --ink: #0f172a;
  --body: #475569;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --surface: #ffffff;
  --wash: #f8fafc;
  --wash-2: #f1f5f9;
  --brand: #059669;
  --brand-dark: #047857;
  --brand-tint: #d1fae5;
  
  --ai: #2563eb;
  --energy: #059669;
  --robotics: #ea580c;
  --business: #7c3aed;
  --space: #dc2626;
  
  --dev-tools: #0891b2;
  --biotech: #16a34a;
  --consumer: #d97706;
  --cyber: #db2777;
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--body);
  background-color: var(--surface);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--ink);
  margin: 0 0 16px;
  line-height: 1.1;
}

h2 { font-size: 32px; letter-spacing: -0.5px; }

p { margin: 0 0 16px; line-height: 1.6; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
section { padding: 48px 0; }

@media (min-width: 768px) {
  section { padding: 72px 0; }
  h2 { font-size: 40px; }
}

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.honeypot { position: absolute; left: -9999px; }

/* Focus rings */
*:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}
button:focus-visible, .pill-btn:focus-visible, input:focus-visible {
  border-radius: 9999px;
}

/* Header */
.header {
  position: sticky; top: 0; background: var(--surface);
  border-bottom: 1px solid var(--line); z-index: 100;
  padding: 16px 0;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.wordmark {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2px; color: var(--ink);
  text-decoration: none !important;
}
.header-actions { display: flex; align-items: center; gap: 24px; }
.archive-link { font-weight: 600; font-size: 14px; }
.pill-btn {
  background: var(--brand); color: white; border: none;
  border-radius: 9999px; padding: 8px 16px; font-weight: 600; font-size: 14px;
  cursor: pointer; transition: background 0.2s;
  font-family: 'Inter', sans-serif;
}
.pill-btn:hover { background: var(--brand-dark); text-decoration: none; }

/* Hero */
.hero-split { display: grid; grid-template-columns: 1fr; gap: 48px; }
@media (min-width: 900px) {
  .hero-split { grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: flex-start; }
}
.pill-label {
  display: inline-block; padding: 6px 12px; border-radius: 9999px;
  font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700;
  margin-bottom: 24px;
}
.blue-pill { background: var(--brand-tint); color: var(--brand); }
.hero-left h1 { font-size: 40px; letter-spacing: -1px; margin-bottom: 24px; }
.hero-left h1 .highlight { color: var(--brand); }
@media (min-width: 768px) {
  .hero-left h1 { font-size: 56px; }
}
.hero-subhead { font-size: 18px; line-height: 1.6; margin-bottom: 32px; color: var(--body); }

/* Email Form */
.email-form { margin-bottom: 12px; position: relative; }
.form-row { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 480px; }
.email-form input[type="email"] {
  flex: 1; padding: 12px 20px; border-radius: 9999px;
  border: 1px solid var(--line); font-family: 'Inter', sans-serif;
  font-size: 16px; color: var(--ink); background: var(--surface);
  transition: border-color 0.2s;
  height: 48px;
}
.email-form input[type="email"]:focus { border-color: var(--brand); outline: none; }
.email-form input[type="email"]::placeholder { color: var(--faint); }
.email-form button {
  background: var(--brand); color: white; border: none;
  border-radius: 9999px; padding: 0 24px; font-weight: 600; font-size: 16px;
  cursor: pointer; transition: background 0.2s;
  font-family: 'Inter', sans-serif; white-space: nowrap;
  height: 48px; line-height: 48px;
}
.email-form button:hover { background: var(--brand-dark); }
.email-form button:disabled { opacity: 0.7; cursor: not-allowed; }
.email-form input:disabled { opacity: 0.7; background: var(--wash); }
@media (min-width: 640px) {
  .form-row { flex-direction: row; gap: 8px; }
}
.form-caption { font-size: 13px; color: var(--faint); }
.form-status { font-size: 14px; margin-top: 8px; font-weight: 500; }
.form-status.is-error { color: var(--space); font-size: 14px; }
.form-success { color: var(--ink); font-weight: 600; font-size: 17px; padding: 12px 0; }

/* Story Card */
.story-caption { font-size: 13px; color: var(--ink); margin-bottom: 12px; font-weight: 700; letter-spacing: 0.3px; display: flex; align-items: center; gap: 7px; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); flex-shrink: 0; }
.story-card {
  border-radius: 16px; border: 1px solid var(--line); background: var(--surface);
  padding: 24px; box-shadow: none;
}
.story-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.category-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700;
  padding: 4px 8px; border-radius: 4px; display: inline-block;
}
.cat-ai { background: rgba(37, 99, 235, 0.1); color: var(--ai); }
.bullet { color: var(--line); font-weight: bold; }
.time { color: var(--muted); font-size: 13px; font-weight: 500; }
.story-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 12px; line-height: 1.3; }
.story-card p { font-size: 16px; line-height: 1.7; color: var(--body); margin-bottom: 16px; }
.source-line { font-size: 13px !important; color: var(--faint) !important; margin-bottom: 0 !important; }

/* Inbox Grid */
.inbox .section-desc { font-size: 18px; color: var(--body); margin-bottom: 40px; }
.card-grid {
  display: grid; grid-template-columns: 1fr; gap: 24px;
}
@media (min-width: 768px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}
.inbox-card {
  border-radius: 16px; border: 1px solid var(--line); background: var(--surface);
  padding: 24px; box-shadow: none; display: flex; flex-direction: column;
}
.inbox-card h3 { font-size: 18px; margin-bottom: 8px; font-weight: 700; }
.inbox-card p { font-size: 15px; line-height: 1.6; color: var(--body); margin: 0; }

/* Beats */
.beats .section-sup { font-size: 14px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.beats h2 { margin-bottom: 32px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 12px; }
.beat-pill {
  padding: 8px 16px; border-radius: 9999px; font-size: 13px; font-weight: 600; letter-spacing: 0.5px;
  display: inline-flex; align-items: center; justify-content: center;
}
.beat-pill.cat-ai { background: rgba(37,99,235,0.1); color: var(--ai); }
.beat-pill.cat-robotics { background: rgba(234,88,12,0.1); color: var(--robotics); }
.beat-pill.cat-chips { background: rgba(100,116,139,0.1); color: var(--muted); }
.beat-pill.cat-energy { background: rgba(5,150,105,0.1); color: var(--energy); }
.beat-pill.cat-space { background: rgba(220,38,38,0.1); color: var(--space); }
.beat-pill.cat-business { background: rgba(124,58,237,0.1); color: var(--business); }
.beat-pill.cat-devtools { background: rgba(8,145,178,0.1); color: var(--dev-tools); }
.beat-pill.cat-biotech { background: rgba(22,163,74,0.1); color: var(--biotech); }
.beat-pill.cat-consumer { background: rgba(217,119,6,0.1); color: var(--consumer); }
.beat-pill.cat-cyber { background: rgba(219,39,119,0.1); color: var(--cyber); }

/* Stat block */
.stat-section { padding-top: 24px; padding-bottom: 48px; }
@media (min-width: 768px) {
  .stat-section { padding-top: 24px; padding-bottom: 72px; }
}
.stat-card {
  background: var(--wash-2); border-radius: 16px; border: 1px solid var(--line);
  padding: 32px; display: flex; flex-direction: column; gap: 24px;
}
@media (min-width: 768px) {
  .stat-card { flex-direction: row; justify-content: space-between; align-items: center; padding: 48px; }
}
.stat-left { flex: 1; max-width: 500px; }
.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; color: var(--faint); display: block; margin-bottom: 12px; }
.stat-headline { font-size: 19px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.stat-right { text-align: left; }
@media (min-width: 768px) {
  .stat-right { text-align: right; }
}
.stat-number { font-family: 'Space Grotesk', sans-serif; font-size: 32px; font-weight: 700; color: var(--brand); line-height: 1; margin-bottom: 8px; }
.stat-sub { font-size: 14px; color: var(--muted); font-weight: 500; }
.stat-caption { font-size: 12px; color: var(--faint); margin-top: 16px; margin-left: 16px; font-weight: 500; }

/* Who it's for */
.who-for h2 { margin-bottom: 32px; }
.audience-list p { font-size: 18px; line-height: 1.8; color: var(--body); margin-bottom: 16px; max-width: 720px; }
.audience-list p:last-child { margin-bottom: 0; }

/* Closing subscribe */
.closing-band { background: var(--wash-2); padding: 72px 0; border-top: 1px solid var(--line); }
.closing-inner { text-align: center; max-width: 640px; margin: 0 auto; }
.closing-inner h2 { margin-bottom: 12px; }
.closing-inner > p { font-size: 18px; margin-bottom: 32px; color: var(--body); }
.closing-inner .email-form { max-width: 480px; margin: 0 auto; text-align: left; }
.closing-inner .form-row { margin: 0 auto; }

/* Footer */
.footer { padding: 48px 0; text-align: center; border-top: 1px solid var(--line); }
.footer-wordmark { font-family: 'Space Grotesk', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 2px; color: var(--faint); margin-bottom: 8px; }
.footer-copy { font-size: 13px; color: var(--faint); margin-bottom: 24px; }
.footer-links { display: flex; justify-content: center; gap: 24px; }
.footer-links a { font-size: 13px; color: var(--faint); font-weight: 500; transition: color 0.2s; }
.footer-links a:hover { color: var(--muted); text-decoration: none; }
