:root {
  color-scheme: dark;
  --bg: #0a0b0b;
  --ink: #f2efe8;
  --muted: #aaa59a;
  --line: rgba(242, 239, 232, 0.16);
  --panel: #151716;
  --panel-2: #1d211f;
  --acid: #d7ff45;
  --signal: #ff5b3f;
  --blue: #70c7ff;
  --violet: #b38cff;
  --green: #48d597;
  --max: 1180px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(255, 91, 63, 0.12), transparent 30rem),
    radial-gradient(circle at 80% 10%, rgba(112, 199, 255, 0.12), transparent 22rem),
    var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

.masthead {
  min-height: 86vh;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(rgba(10, 11, 11, 0.2), rgba(10, 11, 11, 0.96)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1400' height='900' viewBox='0 0 1400 900'%3E%3Crect width='1400' height='900' fill='%230a0b0b'/%3E%3Cg opacity='0.5'%3E%3Cpath d='M0 600 C220 520 300 720 520 630 S860 500 1100 590 1320 690 1400 620 V900 H0Z' fill='%23191d1b'/%3E%3Cpath d='M0 660 C280 590 390 770 660 680 S960 560 1400 710 V900 H0Z' fill='%23212724'/%3E%3C/g%3E%3Cg stroke='%23d7ff45' stroke-opacity='0.22' fill='none'%3E%3Cpath d='M75 164 H580 M188 221 H711 M321 278 H980 M95 335 H670 M730 392 H1280 M220 449 H1030 M80 506 H1340'/%3E%3Cpath d='M211 145 V535 M465 190 V548 M812 255 V620 M1116 300 V690'/%3E%3C/g%3E%3Cg fill='%23ff5b3f' fill-opacity='0.8'%3E%3Ccircle cx='211' cy='221' r='5'/%3E%3Ccircle cx='812' cy='392' r='5'/%3E%3Ccircle cx='1116' cy='506' r='5'/%3E%3C/g%3E%3C/svg%3E")
      center/cover;
}

.nav {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 0.92rem;
}

.detail-nav {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
}

.detail-nav a:first-child {
  margin-right: auto;
  color: var(--ink);
  font-weight: 900;
  text-transform: uppercase;
}

.nav .brand {
  margin-right: auto;
  color: var(--ink);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  min-height: calc(86vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 40px;
  align-items: end;
  padding: 72px 0 56px;
}

.hero-copy {
  min-width: 0;
  max-width: 820px;
}

.eyebrow,
.section-label,
.panel-kicker {
  margin: 0 0 16px;
  color: var(--acid);
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(3.6rem, 8vw, 7.2rem);
  line-height: 0.9;
  max-width: 980px;
}

.lede {
  max-width: 680px;
  color: #d5d0c6;
  font-size: 1.2rem;
  line-height: 1.55;
}

.today-panel {
  min-width: 0;
  background: rgba(21, 23, 22, 0.88);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  backdrop-filter: blur(12px);
}

.today-panel h2 {
  font-size: 1.45rem;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.today-panel p:not(.panel-kicker) {
  color: var(--muted);
  line-height: 1.45;
}

.score-strip {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.score-strip span:first-child {
  color: var(--signal);
  font-size: 2.8rem;
  font-weight: 900;
}

main {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 70px 0 26px;
}

.intro-grid,
.index-tools,
.dossiers {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 44px;
  align-items: start;
}

.section h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 0.98;
  margin-bottom: 0;
  overflow-wrap: anywhere;
}

.pillars,
.dossier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.pillars div,
.dossier-card {
  min-height: 132px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.dossier-card a {
  display: block;
  height: 100%;
}

.pillars h3,
.dossier-card h3 {
  margin-bottom: 10px;
  color: var(--blue);
}

.pillars p,
.dossier-card p {
  color: var(--muted);
  line-height: 1.45;
}

.search-label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 0 28px;
}

.filter {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  padding: 9px 13px;
  font: inherit;
  cursor: pointer;
}

.filter.is-active {
  color: #141414;
  background: var(--acid);
  border-color: var(--acid);
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: 40px;
}

.signal-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.clickable-card {
  cursor: pointer;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background-color 160ms ease;
}

.clickable-card:hover,
.clickable-card:focus-visible {
  border-color: rgba(215, 255, 69, 0.68);
  transform: translateY(-2px);
}

.clickable-card:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

.signal-card:nth-child(4n + 1) {
  background: var(--panel-2);
}

.card-meta,
.tags,
.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-meta {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.signal-card h3 {
  font-size: 1.35rem;
  line-height: 1.1;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}

.read-link {
  width: max-content;
  margin-bottom: 12px;
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 800;
}

.hook {
  color: var(--signal);
  font-weight: 760;
  line-height: 1.35;
}

.angle {
  color: #d0cabf;
  line-height: 1.45;
}

.tags {
  margin-top: auto;
  padding-top: 16px;
}

.tags span,
.metrics div {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--muted);
  font-size: 0.75rem;
}

.metrics {
  margin: 12px 0 0;
}

.metrics div {
  display: flex;
  gap: 5px;
}

.metrics dt,
.metrics dd {
  margin: 0;
}

.metrics dd {
  color: var(--ink);
  font-weight: 800;
}

.detail-page,
.archive-page {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.detail-article,
.archive-header {
  max-width: 880px;
  padding: 72px 0 46px;
}

.detail-article h1,
.archive-header h1 {
  font-size: clamp(2.7rem, 7vw, 6rem);
  line-height: 0.95;
}

.detail-hook {
  color: var(--signal);
  font-size: 1.6rem;
  font-weight: 850;
  line-height: 1.2;
}

.detail-score {
  display: flex;
  align-items: baseline;
  gap: 12px;
  width: max-content;
  margin: 28px 0 44px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.detail-score span:first-child {
  color: var(--signal);
  font-size: 4rem;
  font-weight: 900;
}

.detail-article section {
  border-top: 1px solid var(--line);
  padding: 26px 0;
}

.detail-article section h2,
.archive-day h2 {
  color: var(--acid);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.detail-article section p,
.archive-header p {
  color: #d1ccc2;
  font-size: 1.08rem;
  line-height: 1.65;
}

.detail-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-metrics span,
.source-list li,
.archive-list a {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.detail-metrics span {
  padding: 9px 12px;
  color: var(--muted);
}

.source-list {
  display: grid;
  gap: 8px;
  padding-left: 0;
  list-style: none;
}

.source-list li {
  padding: 10px 12px;
  overflow-wrap: anywhere;
}

.source-list a {
  display: grid;
  gap: 4px;
  color: var(--blue);
}

.source-list strong {
  color: var(--ink);
}

.source-list span {
  color: var(--muted);
  font-size: 0.86rem;
}

.compact-sources {
  margin-top: 0;
}

.archive-day {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 28px;
  border-top: 1px solid var(--line);
  padding: 34px 0;
}

.archive-list {
  display: grid;
  gap: 10px;
}

.archive-list a {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  padding: 14px;
}

.archive-list span {
  color: var(--muted);
}

.archive-list strong {
  color: var(--ink);
}

.archive-list em {
  grid-column: 2;
  color: var(--muted);
  font-style: normal;
  line-height: 1.4;
}

.daily-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-bottom: 70px;
}

.daily-card,
.packet-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.daily-card {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
}

.daily-card span,
.daily-card em {
  color: var(--muted);
  font-style: normal;
}

.daily-card strong {
  color: var(--acid);
  font-size: 1.25rem;
  line-height: 1.1;
}

.packet-page .archive-header {
  max-width: 980px;
}

.packet-list {
  display: grid;
  gap: 18px;
  padding-bottom: 76px;
}

.packet-card {
  padding: 22px;
}

.packet-card h2 {
  max-width: 920px;
  margin-bottom: 12px;
  font-size: clamp(1.7rem, 3.6vw, 3rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.packet-card > p {
  max-width: 820px;
  color: #d1ccc2;
  line-height: 1.55;
}

.packet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 8px;
}

.packet-actions a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 800;
}

.packet-card section {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 18px;
}

.packet-card h3 {
  color: var(--acid);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.packet-card section p {
  color: #d8d1c6;
  line-height: 1.55;
}

.packet-card pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #d8d1c6;
  font: inherit;
  line-height: 1.55;
}

.dossier-index {
  padding-bottom: 70px;
}

.dossier-signal-list {
  padding-bottom: 76px;
}

.about-page {
  max-width: 900px;
}

@media (max-width: 900px) {
  .masthead {
    min-height: auto;
  }

  .nav {
    width: calc(100vw - 32px);
    min-height: 82px;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px 16px;
    padding: 14px 0;
    font-size: 0.88rem;
  }

  .detail-nav {
    width: calc(100vw - 32px);
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 14px 0;
  }

  .detail-nav a:first-child {
    flex-basis: 100%;
  }

  .nav .brand {
    flex-basis: 100%;
    margin-right: 0;
  }

  .hero,
  .intro-grid,
  .index-tools,
  .dossiers {
    grid-template-columns: 1fr;
  }

  .hero {
    width: calc(100vw - 32px);
    min-height: auto;
    align-items: end;
    padding: 70px 0 56px;
    gap: 24px;
  }

  main {
    width: calc(100vw - 32px);
  }

  .signal-grid {
    grid-template-columns: 1fr;
  }

  .daily-grid {
    grid-template-columns: 1fr;
  }

  .pillars,
  .dossier-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: calc(100vw - 32px);
    font-size: clamp(2.25rem, 10vw, 2.75rem);
    line-height: 1;
    overflow-wrap: anywhere;
  }

  .lede {
    font-size: 1.05rem;
  }

  .today-panel {
    width: 100%;
    max-width: calc(100vw - 32px);
  }

  .section h2 {
    font-size: clamp(1.9rem, 9vw, 2.7rem);
  }

  .detail-article h1,
  .archive-header h1 {
    font-size: clamp(2.2rem, 10vw, 3rem);
  }

  .archive-day {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .hero-copy,
  .today-panel,
  .intro-grid > article,
  .index-tools > div,
  .dossiers > div:first-child,
  .pillars,
  .dossier-grid,
  .signal-grid,
  .filters,
  .search-label {
    width: min(100%, 340px);
    max-width: 340px;
  }

  .detail-page,
  .archive-page,
  .detail-article,
  .archive-header,
  .archive-day,
  .archive-list {
    width: min(100%, 340px);
    max-width: 340px;
  }

  h1 {
    max-width: 340px;
    font-size: 2rem;
    line-height: 1.05;
  }

  .lede {
    max-width: 340px;
    font-size: 1rem;
  }

  .today-panel h2 {
    font-size: 1.25rem;
  }

  .section h2 {
    font-size: 2rem;
    line-height: 1.05;
  }
}
