:root {
  --ink: #1f2428;
  --muted: #65717c;
  --line: #d9e0e6;
  --wash: #f7f9fa;
  --teal: #117c7c;
  --gold: #b87a13;
  --rose: #b42318;
  --blue: #315da8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #ffffff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.site-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 128px;
  height: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.nav a:hover,
.button:hover {
  border-color: var(--line);
  background: var(--wash);
}

.button.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.button.secondary {
  border-color: var(--line);
  background: white;
}

.button[aria-disabled="true"] {
  color: #9aa4ad;
  cursor: default;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
  align-items: center;
  gap: 56px;
  min-height: min(660px, calc(100vh - 110px));
  padding: 64px 7vw 42px;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.phrase-mark {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  color: var(--ink);
}

.phrase-core {
  color: var(--teal);
  font-size: 13px;
}

.phrase-edge {
  color: var(--rose);
  font-size: 17px;
  letter-spacing: 0.02em;
}

.phrase-edge-last {
  color: var(--gold);
}

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(54px, 9vw, 116px);
  line-height: 0.92;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
}

h3 {
  margin-bottom: 12px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.14;
}

.lead {
  max-width: 680px;
  color: #3f4850;
  font-size: 20px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  padding-left: 28px;
  border-left: 4px solid var(--teal);
}

.hero-panel h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 40px);
}

.metric-band,
.section {
  padding: 44px 7vw;
  border-bottom: 1px solid var(--line);
}

.section-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 14px;
}

.metric {
  min-height: 118px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.metric strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-weight: 750;
}

.archive-list,
.topic-results {
  display: grid;
  margin-top: 10px;
  border-top: 1px solid var(--line);
}

.row-card,
.article-link {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.article-link {
  grid-template-columns: minmax(0, 1fr) 140px;
}

.article-link span,
.row-card span {
  color: #2f3942;
}

.article-link small {
  color: var(--muted);
  font-weight: 750;
}

.tag-row,
.section-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--wash);
  color: #47515a;
  font-size: 13px;
  font-weight: 800;
}

.tag.clear {
  border-color: rgba(180, 35, 24, 0.28);
  background: #fff0ee;
  color: var(--rose);
}

.tag.suspected {
  border-color: rgba(184, 122, 19, 0.30);
  background: #fff8e8;
  color: #7a4b00;
}

.tag.correction {
  border-color: rgba(17, 124, 124, 0.28);
  background: #edf8f7;
  color: var(--teal);
}

.page-header {
  padding: 44px 7vw 28px;
  border-bottom: 1px solid var(--line);
  background: var(--wash);
}

.page-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.page-title-row h1 {
  margin-bottom: 8px;
  font-size: clamp(38px, 7vw, 72px);
}

.week-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.article-section {
  display: grid;
  grid-template-columns: minmax(112px, 1fr) minmax(0, 860px) minmax(112px, 1fr);
  gap: 24px;
  align-items: start;
  padding: 42px 7vw 64px;
}

.review-article {
  min-width: 0;
}

.review-article p {
  color: #303a43;
  font-size: 18px;
  line-height: 1.72;
}

.source-line {
  margin: 24px 0 10px;
  font-size: 16px;
}

.source-line a,
.reference-list a {
  color: var(--blue);
  font-weight: 800;
}

.article-week-nav {
  position: sticky;
  top: 92px;
  display: grid;
  min-height: 1px;
}

.article-week-nav-left {
  justify-items: end;
}

.article-week-nav-right {
  justify-items: start;
}

.week-side-link {
  display: inline-flex;
  max-width: 160px;
  min-height: 42px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.week-side-link:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.snippet-run {
  display: grid;
  gap: 6px;
  padding: 16px 0 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.snippet-run span {
  display: block;
}

.inline-video {
  margin: 28px 0 18px;
}

.video-box {
  display: grid;
  min-height: 320px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wash);
  color: var(--muted);
  font-weight: 850;
}

.video-box iframe {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
  border-radius: 8px;
}

.review-section {
  padding: 30px 0;
  border-top: 1px solid var(--line);
}

.review-section:first-of-type {
  margin-top: 8px;
}

.review-section blockquote {
  margin: 0 0 18px;
  padding-left: 16px;
  border-left: 4px solid var(--teal);
  color: #33404a;
  font-size: 19px;
  line-height: 1.45;
}

.reference-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.reference-list a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(49, 93, 168, 0.24);
  border-radius: 999px;
  background: #eef4ff;
  font-size: 13px;
  text-decoration: none;
}

.topic-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 34px 7vw 64px;
}

.topic-nav {
  display: grid;
  gap: 4px;
  align-content: start;
}

.topic-nav a {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: #35404a;
  text-decoration: none;
  font-weight: 800;
}

.topic-nav a[aria-current="page"] {
  color: var(--teal);
}

.muted {
  color: var(--muted);
}

@media (max-width: 900px) {
  .topbar {
    align-items: start;
    flex-direction: column;
    gap: 10px;
    padding: 14px 18px;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero,
  .topic-layout,
  .article-section {
    grid-template-columns: 1fr;
  }

  .article-week-nav {
    position: static;
  }

  .article-week-nav-left,
  .article-week-nav-right {
    justify-items: stretch;
  }

  .article-week-nav-left {
    order: 1;
  }

  .review-article {
    order: 2;
  }

  .article-week-nav-right {
    order: 3;
  }

  .week-side-link {
    max-width: none;
    justify-content: center;
  }

  .hero {
    min-height: auto;
    padding-top: 42px;
  }

  .hero-panel {
    padding-left: 0;
    padding-top: 22px;
    border-left: 0;
    border-top: 4px solid var(--teal);
  }

  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .metric-grid,
  .row-card,
  .article-link {
    grid-template-columns: 1fr;
  }

  .page-title-row {
    align-items: start;
    flex-direction: column;
  }

  .hero-actions,
  .week-nav {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .brand-logo {
    width: 116px;
  }
}
