/* ============ THEME TOKENS ============ */
:root {
  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-body: 'Inter', sans-serif;

  --bg: #faf9f6;
  --bg-elevated: #ffffff;
  --bg-muted: #f1efe9;
  --text: #171614;
  --text-muted: #5c5a54;
  --border: #e4e1d9;

  --problem: #d63b3f;   /* enshittified */
  --future: #1f8a5f;    /* unshittified */
  --money: #c98a1b;     /* money in politics */

  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.06);
  --radius: 14px;
}

[data-theme="dark"] {
  --bg: #0f0f11;
  --bg-elevated: #17171a;
  --bg-muted: #1e1e22;
  --text: #f0efec;
  --text-muted: #a3a19a;
  --border: #2a2a2f;

  --problem: #ff6b6e;
  --future: #3ecf8e;
  --money: #e8b04b;

  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ============ HEADER ============ */
header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; gap: 28px;
  height: 64px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 6px;
}
.logo .dot { color: var(--problem); }
.logo .tm { font-size: .6rem; font-weight: 600; color: var(--text-muted); align-self: flex-start; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  padding: 8px 14px; border-radius: 8px;
  font-weight: 600; font-size: .95rem; color: var(--text-muted);
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: var(--bg-muted); }
.nav-links a.active { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-elevated);
  cursor: pointer; display: grid; place-items: center;
  color: var(--text); transition: transform .15s, border-color .15s;
}
.icon-btn:hover { transform: translateY(-1px); border-color: var(--text-muted); }
.icon-btn svg { width: 19px; height: 19px; }
.hamburger { display: none; }

/* ============ HERO ============ */
.hero { padding: 72px 0 56px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 300px at 15% 0%, color-mix(in srgb, var(--problem) 10%, transparent), transparent),
    radial-gradient(600px 300px at 85% 20%, color-mix(in srgb, var(--future) 10%, transparent), transparent);
}
.hero .container { position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--problem); margin-bottom: 20px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--problem); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 800; line-height: 1.05; letter-spacing: -0.03em;
  max-width: 16ch;
}
.hero h1 .strike { color: var(--problem); text-decoration: line-through; text-decoration-thickness: 4px; }
.hero h1 .fix { color: var(--future); }
.hero p.sub {
  font-size: 1.15rem; color: var(--text-muted);
  max-width: 56ch; margin-top: 20px;
}
.hero p.sub strong { color: var(--text); }
.hero-cta { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 10px;
  font-weight: 700; font-size: .95rem; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-future { background: var(--future); color: #fff; }
.btn-ghost { border: 1px solid var(--border); background: var(--bg-elevated); }

/* ============ INDEX TICKER ============ */
.index-strip {
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.index-strip .container { display: flex; gap: 0; overflow-x: auto; padding: 0; }
.index-item {
  flex: 1 0 auto; padding: 16px 24px; border-right: 1px solid var(--border);
  min-width: 150px;
}
.index-item:last-child { border-right: 0; }
.index-item .label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.index-item .value { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; }
.index-item .value.down { color: var(--problem); }
.index-item .value.up { color: var(--future); }
.index-item .note { font-size: .75rem; color: var(--text-muted); }

/* ============ SECTION HEADERS ============ */
section { padding: 64px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem); letter-spacing: -0.02em;
}
.section-head .kicker { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 6px; }
.section-head .more { font-weight: 600; color: var(--text-muted); font-size: .9rem; }
.section-head .more:hover { color: var(--text); }

/* ============ TAG FILTER ============ */
.tag-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tag {
  padding: 7px 15px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-elevated);
  font-size: .85rem; font-weight: 600; color: var(--text-muted);
  transition: all .15s;
}
.tag:hover { border-color: var(--text-muted); color: var(--text); }
.tag.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.tag.tag-future.active { background: var(--future); border-color: var(--future); color: #fff; }

/* ============ STORY GRID ============ */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  position: relative;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .accent { height: 4px; }
.card.problem .accent { background: var(--problem); }
.card.future .accent { background: var(--future); }
.card.money .accent { background: var(--money); }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 3px 9px; border-radius: 999px;
}
.chip.problem { background: color-mix(in srgb, var(--problem) 14%, transparent); color: var(--problem); }
.chip.future { background: color-mix(in srgb, var(--future) 14%, transparent); color: var(--future); }
.chip.money { background: color-mix(in srgb, var(--money) 14%, transparent); color: var(--money); }
.card h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; line-height: 1.25; letter-spacing: -0.01em; }
.card p { font-size: .9rem; color: var(--text-muted); }
.card .meta { margin-top: auto; font-size: .78rem; color: var(--text-muted); display: flex; justify-content: space-between; }
.card .read { font-weight: 600; color: var(--text); }

/* ============ THE MONEY ============ */
.money-section { background: var(--bg-muted); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.money-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: start; }
.tracker { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.tracker table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.tracker th {
  text-align: left; padding: 12px 16px; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-muted); border-bottom: 1px solid var(--border);
  background: var(--bg-muted);
}
.tracker td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.tracker tr:last-child td { border-bottom: 0; }
.tracker .pol { font-weight: 700; }
.tracker .amt { font-weight: 700; color: var(--money); }
.tracker .vote { font-size: .78rem; }
.tracker .vote.against { color: var(--problem); }
.tracker .vote.for { color: var(--future); }

.money-copy h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; margin-bottom: 12px; }
.money-copy p { color: var(--text-muted); margin-bottom: 12px; }
.money-copy .pac-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.pac-list span {
  padding: 6px 12px; border-radius: 8px; font-size: .8rem; font-weight: 700;
  background: color-mix(in srgb, var(--money) 12%, transparent); color: var(--money);
  border: 1px solid color-mix(in srgb, var(--money) 25%, transparent);
}

/* ============ THE LOOP (connections) ============ */
.loop { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.loop-node {
  padding: 18px 22px; border-radius: 12px; text-align: center;
  background: var(--bg-elevated); border: 1px solid var(--border);
  font-weight: 700; font-size: .9rem; min-width: 130px;
}
.loop-node.bad { border-color: color-mix(in srgb, var(--problem) 40%, transparent); }
.loop-node.good { border-color: color-mix(in srgb, var(--future) 40%, transparent); background: color-mix(in srgb, var(--future) 8%, var(--bg-elevated)); }
.loop-arrow { font-size: 1.4rem; color: var(--text-muted); font-weight: 700; }
.loop-break { width: 100%; text-align: center; margin: 8px 0; }
.loop-break .btn { font-size: .85rem; }

/* ============ NEWSLETTER ============ */
.newsletter {
  background: var(--text); color: var(--bg);
  border-radius: var(--radius); padding: 48px; text-align: center;
}
.newsletter h2 { font-family: var(--font-display); font-weight: 800; font-size: 2rem; letter-spacing: -0.02em; }
.newsletter p { color: color-mix(in srgb, var(--bg) 70%, transparent); margin: 12px auto 24px; max-width: 48ch; }
.newsletter form { display: flex; gap: 10px; max-width: 440px; margin: 0 auto; }
.newsletter input {
  flex: 1; padding: 13px 16px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--bg) 30%, transparent);
  background: color-mix(in srgb, var(--bg) 8%, transparent); color: var(--bg); font-size: .95rem;
}
.newsletter input::placeholder { color: color-mix(in srgb, var(--bg) 50%, transparent); }
.newsletter .btn-primary { background: var(--future); color: #fff; border: 0; }

/* ============ FOOTER ============ */
footer { border-top: 1px solid var(--border); padding: 48px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-grid h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 14px; }
.footer-grid a { display: block; color: var(--text-muted); font-size: .9rem; padding: 4px 0; }
.footer-grid a:hover { color: var(--text); }
.footer-brand p { color: var(--text-muted); font-size: .9rem; margin-top: 12px; max-width: 34ch; }
.values { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.values span { font-size: .75rem; font-weight: 700; padding: 5px 10px; border-radius: 6px; background: var(--bg-muted); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .8rem; color: var(--text-muted); }

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg-elevated); border-bottom: 1px solid var(--border); padding: 12px 24px; gap: 4px;
  }
  .hamburger { display: grid; }
  .money-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .newsletter { padding: 32px 20px; }
  .newsletter form { flex-direction: column; }
}
