:root {
  /* Cool off-white paper + navy ink */
  --bg: #f8fafc;
  --bg-elev: #ffffff;
  --bg-elev-2: #eef2f7;
  --bg-tint: #f1f5f9;

  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --text: #0f172a;          /* slate-900, near-navy */
  --text-dim: #475569;      /* slate-600 */
  --text-faint: #94a3b8;    /* slate-400 */

  --accent: #1e3a8a;        /* deep navy */
  --accent-soft: #dbeafe;
  --accent-deep: #172554;

  --anthropic: #c25a3d;     /* Anthropic brand-ish */
  --openai:    #4a7d5f;     /* OpenAI brand-ish, muted */

  --warn: #b45309;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow:    0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.08);

  --radius: 12px;
  --radius-sm: 6px;

  --font-serif: 'Fraunces', 'Iowan Old Style', 'Charter', 'Georgia', serif;
  --font-mono:  'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

code, .mono { font-family: var(--font-mono); font-size: 0.88em; }

main { max-width: 1200px; margin: 0 auto; padding: 36px 28px 72px; }

/* -------------------- Header -------------------- */
.page-header {
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(1200px 320px at 20% -10%, rgba(30, 58, 138, 0.06), transparent 60%),
    linear-gradient(180deg, #f3f7fc 0%, var(--bg) 100%);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 44px 28px 36px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}
.page-header h1 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: 38px;
  font-weight: 600;
  font-variation-settings: 'opsz' 80, 'SOFT' 50;
  letter-spacing: -0.015em;
  line-height: 1.1;
  color: var(--text);
}
.subtitle {
  margin: 0;
  color: var(--text-dim);
  font-size: 17px;
  font-style: italic;
  font-weight: 400;
  max-width: 640px;
  line-height: 1.5;
}
.header-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}
.status-line {
  font-size: 13px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* -------------------- Method blurb (above KPIs) -------------------- */
.method-blurb {
  margin-bottom: 32px;
  padding: 20px 24px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.method-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}
.method-blurb p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-dim);
  font-style: italic;
  max-width: 880px;
}

/* -------------------- KPI strip -------------------- */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 48px;
}
.kpi-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}
.kpi-label {
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
  margin-bottom: 8px;
}
.kpi-value {
  font-family: var(--font-serif);
  font-size: 38px;
  font-weight: 500;
  font-variation-settings: 'opsz' 144;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: var(--text);
}
.kpi-delta {
  margin-top: 6px;
  font-size: 12px;
  font-style: italic;
  min-height: 16px;
  color: var(--text-faint);
}
.kpi-delta.up   { color: #15803d; }
.kpi-delta.down { color: #b91c1c; }
.kpi-delta.flat { color: var(--text-faint); }

/* -------------------- Sections -------------------- */
.section-header { margin-bottom: 18px; }
.section-header h2 {
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
  font-variation-settings: 'opsz' 80;
  letter-spacing: -0.01em;
  color: var(--text);
}
.section-sub {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
  font-style: italic;
  max-width: 720px;
}

.predictions-section,
.chart-section,
.jobs-section { margin-bottom: 48px; }

/* -------------------- Daily analysis (hero) -------------------- */
.analysis-section {
  margin-bottom: 56px;
  background:
    radial-gradient(700px 200px at 15% 0%, rgba(30, 58, 138, 0.05), transparent 70%),
    var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.analysis-header {
  padding: 32px 36px 24px;
  border-bottom: 1px solid var(--border);
}
.analysis-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 10px;
}
.analysis-headline {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 600;
  font-variation-settings: 'opsz' 72;
  line-height: 1.32;
  letter-spacing: -0.01em;
  color: var(--text);
  max-width: 820px;
}

.analysis-changes {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--border-strong);
}
.changes-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 10px;
}
.changes-list { margin: 0; padding: 0; list-style: none; }
.changes-list li {
  position: relative;
  padding: 4px 0 4px 22px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-dim);
}
.changes-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 4px;
  color: var(--accent);
  font-weight: 700;
}

.analysis-body { padding: 8px 36px 36px; }

.analysis-block {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.analysis-block:last-child { border-bottom: none; }
.analysis-block-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.analysis-block-title {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  font-variation-settings: 'opsz' 48;
  letter-spacing: -0.005em;
  color: var(--text);
}
.analysis-para {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.62;
  color: var(--text-dim);
  max-width: 760px;
}
.analysis-para:last-of-type { margin-bottom: 0; }

/* Leaderboard (Part 1) */
.leaderboard {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.leaderboard-row { display: flex; flex-direction: column; gap: 6px; }
.lb-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.lb-label {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.lb-count {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
  flex-shrink: 0;
}
.lb-bar {
  height: 8px;
  background: var(--bg-tint);
  border-radius: 999px;
  overflow: hidden;
}
.lb-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #3b5cb8);
}
.lb-split {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.lb-read {
  font-size: 13.5px;
  font-style: italic;
  color: var(--text-dim);
}

/* Capability columns (Part 2) */
.capability-columns {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.capability-col {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
}
.capability-col-good { background: #ecf3df; border-color: #cfdcb1; }
.capability-col-weak { background: #e6edf9; border-color: #b7c6e3; }
.capability-col h4 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
}
.capability-col-good h4 { color: #3a5a1f; }
.capability-col-weak h4 { color: var(--accent); }
.capability-col ul { margin: 0; padding-left: 18px; }
.capability-col li {
  font-size: 14.5px;
  line-height: 1.55;
  margin-bottom: 8px;
  color: var(--text-dim);
}
.capability-col li:last-child { margin-bottom: 0; }

/* Impact table (Part 3) */
.impact-table-wrap {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.impact-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.impact-table thead th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  color: var(--text-faint);
  background: var(--bg-tint);
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
}
.impact-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text-dim);
}
.impact-table tbody tr:last-child td { border-bottom: none; }
.impact-fn { font-weight: 600; color: var(--text); }
.impact-horizon { white-space: nowrap; font-variant-numeric: tabular-nums; }
.impact-note { font-style: italic; }
.exposure-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 999px;
}
.exposure-high   { background: #fde2d8; color: #9a3412; }
.exposure-medium { background: #fef3c7; color: #92400e; }
.exposure-low    { background: #dbeafe; color: var(--accent); }

/* -------------------- Predictions -------------------- */
.predictions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 18px;
}
.prediction-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.prediction-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.prediction-card .pred-headline {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  font-variation-settings: 'opsz' 36;
  line-height: 1.3;
  letter-spacing: -0.005em;
  margin: 0;
  color: var(--text);
}
.prediction-card .pred-claim {
  font-size: 15px;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.5;
}
.prediction-card .pred-rationale {
  font-size: 14px;
  color: var(--text-faint);
  font-style: italic;
  border-left: 2px solid var(--accent-soft);
  padding-left: 12px;
  margin: 0;
  line-height: 1.55;
}
.prediction-card .pred-evidence {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: 6px;
}
.pred-evidence .count {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  font-variation-settings: 'opsz' 144;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--accent);
}
.pred-evidence .count-label {
  font-size: 13px;
  font-style: italic;
  color: var(--text-dim);
}
.pred-evidence .toggle {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-serif);
  font-size: 13px;
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease, background 140ms ease;
}
.pred-evidence .toggle:hover {
  color: var(--accent-deep);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.pred-evidence-list {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  max-height: 260px;
  overflow-y: auto;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.pred-evidence-list li {
  font-size: 14px;
  padding: 5px 0;
  display: flex;
  gap: 10px;
  align-items: baseline;
  line-height: 1.4;
}
.pred-evidence-list a {
  color: var(--text);
  text-decoration: none;
  flex: 1;
}
.pred-evidence-list a:hover { color: var(--accent-deep); text-decoration: underline; }
.pred-evidence-list .company-pill { flex-shrink: 0; }
.hidden { display: none !important; }

.confidence-badge {
  display: inline-block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text-faint);
  background: var(--bg-tint);
  align-self: flex-start;
  font-weight: 500;
}
.confidence-badge.high   { color: #3f6212; border-color: #bef264; background: #ecfccb; }
.confidence-badge.medium { color: #92400e; border-color: #fcd34d; background: #fef3c7; }
.confidence-badge.low    { color: #334155; border-color: #cbd5e1; background: #e2e8f0; }

/* -------------------- Company pills -------------------- */
.company-pill {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 11px;
  font-weight: 600;
  font-variation-settings: 'opsz' 14;
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.company-pill.anthropic {
  background: #f9e3d6;
  color: #8e3e1f;
}
.company-pill.openai {
  background: #dfeadd;
  color: #2f5641;
}

/* -------------------- Chart -------------------- */
.chart-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

/* -------------------- Filters & table -------------------- */
.filters {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: end;
  margin-bottom: 16px;
}
.filters label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
}
.filters select,
.filters input {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-serif);
  font-size: 15px;
  text-transform: none;
  letter-spacing: normal;
  min-width: 200px;
  box-shadow: var(--shadow-sm);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.filters .search-label input { min-width: 280px; }
.filters select:focus,
.filters input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.results-count {
  margin-left: auto;
  font-size: 13px;
  font-style: italic;
  color: var(--text-faint);
  align-self: end;
  padding-bottom: 10px;
}

.jobs-table-wrap {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.jobs-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.jobs-table thead th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
  color: var(--text-faint);
  padding: 14px 18px;
  background: var(--bg-tint);
  border-bottom: 1px solid var(--border);
}
.jobs-table tbody td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.4;
}
.jobs-table tbody tr:last-child td { border-bottom: none; }
.jobs-table tbody tr:hover { background: var(--bg-tint); }
.jobs-table a { color: var(--text); text-decoration: none; }
.jobs-table a:hover { color: var(--accent-deep); text-decoration: underline; }
.tag-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-chip {
  font-family: var(--font-serif);
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-tint);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.empty-state {
  padding: 44px;
  text-align: center;
  color: var(--text-faint);
  font-style: italic;
}

/* -------------------- Footer -------------------- */
.page-footer {
  border-top: 1px solid var(--border);
  padding: 24px 28px 40px;
  max-width: 1200px;
  margin: 0 auto;
  font-size: 13px;
  font-style: italic;
  color: var(--text-faint);
}
.page-footer code { color: var(--text-dim); font-style: normal; }

/* -------------------- Errors -------------------- */
.global-error {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 26px;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
}

/* -------------------- Newsletter opt-in -------------------- */
.newsletter {
  margin-bottom: 56px;
  padding: 30px 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background:
    radial-gradient(620px 180px at 88% 0%, rgba(30, 58, 138, 0.06), transparent 72%),
    var(--bg-elev);
}
.newsletter-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.newsletter-copy { flex: 1 1 320px; }
.newsletter-title {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 600;
  font-variation-settings: 'opsz' 60;
  letter-spacing: -0.005em;
  color: var(--text);
}
.newsletter-sub {
  margin: 0;
  font-size: 15px;
  font-style: italic;
  color: var(--text-dim);
  max-width: 470px;
}
.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}
.newsletter-input {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 15px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  min-width: 240px;
}
.newsletter-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.newsletter-btn {
  background: var(--accent);
  color: #fdfaf3;
  border: 1px solid var(--accent);
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 140ms ease, transform 80ms ease;
  box-shadow: var(--shadow-sm);
}
.newsletter-btn:hover { background: var(--accent-deep); }
.newsletter-btn:active { transform: translateY(1px); }
.newsletter-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.newsletter-msg {
  flex-basis: 100%;
  margin: 2px 0 0;
  font-size: 13px;
  font-style: italic;
  min-height: 16px;
  text-align: right;
}
.newsletter-msg.success { color: #15803d; }
.newsletter-msg.error   { color: #b91c1c; }
.newsletter-msg.pending { color: var(--text-faint); }

/* -------------------- Sponsor banner -------------------- */
.ad-banner {
  margin-bottom: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 26px 32px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #1e3a8a 0%, #172554 100%);
  box-shadow: var(--shadow);
}
.ad-copy { flex: 1 1 280px; }
.ad-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: #bfdbfe;
  margin-bottom: 8px;
}
.ad-pitch {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  font-variation-settings: 'opsz' 60;
  line-height: 1.35;
  color: #f8fafc;
}
.ad-cta {
  flex-shrink: 0;
  display: inline-block;
  background: var(--bg);
  color: var(--accent-deep);
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  transition: background 140ms ease, transform 80ms ease;
}
.ad-cta:hover { background: #ffffff; transform: translateY(-1px); }
.ad-cta:active { transform: translateY(0); }

@media (max-width: 720px) {
  .header-inner { flex-direction: column; align-items: stretch; }
  .page-header h1 { font-size: 30px; }
  .header-meta { justify-content: space-between; }
  main { padding: 26px 18px 56px; }
  .method-blurb { padding: 18px 20px; }
  .filters { flex-direction: column; align-items: stretch; }
  .filters .search-label input,
  .filters select { min-width: 0; width: 100%; }
  .results-count { margin-left: 0; }
  .analysis-header { padding: 24px 20px 20px; }
  .analysis-body { padding: 4px 20px 24px; }
  .analysis-headline { font-size: 22px; }
  .capability-columns { grid-template-columns: 1fr; }
  .impact-table { font-size: 13px; }
  .ad-banner { padding: 22px; }
  .ad-cta { width: 100%; text-align: center; }
  .newsletter { padding: 24px 20px; }
  .newsletter-form { width: 100%; }
  .newsletter-input { min-width: 0; width: 100%; }
  .newsletter-btn { width: 100%; }
}
