:root {
  color-scheme: light;
  --ink: #15171c;
  --ink-soft: #3f4350;
  --muted: #6d7280;
  --paper: #fbfaf5;
  --surface: #ffffff;
  --line: #e5dfd2;
  --blue: #1f4fa8;
  --blue-soft: #e8eefa;
  --green: #15803d;
  --red: #b91c1c;
  --amber: #b45309;
  --violet: #4f46e5;
  --warning: #6d28d9;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Newsreader", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 20;
  transform: translateY(-140%);
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 28px;
  border-bottom: 1px solid rgba(21, 23, 28, 0.10);
  background: rgba(251, 250, 245, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-weight: 600;
}

nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  color: var(--ink-soft);
}

nav a {
  text-decoration: none;
}

nav a:hover {
  color: var(--blue);
}

.hero {
  min-height: 86vh;
  position: relative;
  display: grid;
  align-items: center;
  padding: 90px 28px 64px;
  overflow: hidden;
}

.hero-visual {
  position: absolute;
  inset: 0;
  opacity: 0.88;
}

.hero-visual svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(251, 250, 245, 0.98) 0%, rgba(251, 250, 245, 0.88) 44%, rgba(251, 250, 245, 0.38) 100%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  padding-left: max(0px, calc((100vw - 1180px) / 2));
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  max-width: 720px;
  font-family: var(--serif);
  font-size: 72px;
  line-height: 0.98;
  font-weight: 500;
}

.lead {
  max-width: 620px;
  margin: 24px 0 0;
  font-size: 21px;
  line-height: 1.46;
  color: var(--ink-soft);
}

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

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.1;
}

.button.primary {
  background: var(--ink);
  color: #fff;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.button:hover {
  transform: translateY(-1px);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 14px;
  max-width: 620px;
  margin: 34px 0 0;
}

.hero-metrics div {
  border-top: 1px solid rgba(21, 23, 28, 0.18);
  padding-top: 12px;
}

.hero-metrics dt {
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 700;
}

.hero-metrics dd {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.disclaimer {
  max-width: 520px;
  margin: 22px 0 0;
  color: var(--amber);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
}

.section {
  padding: 76px 28px;
}

.section-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.intro-band {
  background: #ffffff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.4fr);
  gap: 54px;
  align-items: start;
  margin-bottom: 36px;
}

.section-heading.compact {
  display: block;
  max-width: 760px;
}

h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1.08;
  font-weight: 500;
}

h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.22;
}

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

.summary-item,
.tutorial-grid article,
.download-list a {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.summary-item {
  padding: 20px;
}

.summary-item p,
.tutorial-grid p,
.episode p,
.profile-detail p,
.footer p {
  color: var(--ink-soft);
  line-height: 1.55;
}

.pill,
.data-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 4px;
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}

.pill {
  margin-bottom: 22px;
}

.pill.blue {
  background: var(--blue);
}

.pill.violet {
  background: var(--violet);
}

.pill.green {
  background: var(--green);
}

.pill.amber,
.data-chip {
  background: var(--amber);
}

.flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 34px 0 54px;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.flow li {
  position: relative;
  min-height: 190px;
  padding: 20px;
  border-right: 1px solid var(--line);
}

.flow li:last-child {
  border-right: 0;
}

.flow-index {
  display: block;
  margin-bottom: 40px;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}

.flow strong {
  display: block;
  font-size: 18px;
}

.flow p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.episode {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 28px;
  align-items: stretch;
}

.episode-copy {
  padding: 8px 0;
}

.source-list {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.source-list li {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}

.source-list span {
  min-width: 132px;
  color: var(--violet);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 12px;
}

.chart-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.chart-top,
.chart-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.chart-top span,
.chart-foot {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.chart-top strong {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 700;
}

.chart-top em {
  color: var(--green);
  font-style: normal;
  font-size: 17px;
}

.chart-panel svg {
  width: 100%;
  height: auto;
  margin: 20px 0 10px;
}

.chart-grid {
  stroke: #ece7da;
  stroke-width: 1;
  stroke-dasharray: 4 6;
}

.watch {
  stroke: var(--warning);
  stroke-width: 1.5;
  stroke-dasharray: 6 6;
}

.chart-area {
  fill: rgba(31, 79, 168, 0.10);
}

.chart-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.event circle {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 2;
}

.event text {
  text-anchor: middle;
  font-family: var(--mono);
  font-size: 13px;
  fill: var(--muted);
}

.theme-band {
  background: #10141c;
  color: #f8fafc;
}

.theme-band .eyebrow {
  color: #93c5fd;
}

.theme-band h2,
.theme-band h3 {
  color: #fff;
}

.profile-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.profile-switch button {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  background: transparent;
  color: #dbe4f0;
  padding: 9px 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.profile-switch button[aria-pressed="true"] {
  background: #f8fafc;
  color: #10141c;
}

.profile-detail {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 30px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.profile-detail p {
  max-width: 680px;
  color: #cbd5e1;
}

.profile-detail ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-detail li {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
}

.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 32px;
}

.tutorial-grid article {
  padding: 20px;
}

.tutorial-grid span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--blue);
  font-family: var(--mono);
  font-weight: 700;
}

.download-band {
  background: #f3f0e7;
  border-top: 1px solid var(--line);
}

.download-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.download-list a {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  text-decoration: none;
}

.download-list a:hover {
  border-color: var(--blue);
  transform: translateY(-1px);
}

.download-list span {
  display: block;
  margin-top: 16px;
  color: var(--ink-soft);
  line-height: 1.45;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 34px 28px;
  background: var(--ink);
  color: #fff;
}

.footer p {
  margin: 6px 0 0;
  color: #cbd5e1;
}

.footer .button.secondary {
  background: #fff;
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    flex-wrap: wrap;
  }

  h1 {
    font-size: 52px;
  }

  h2 {
    font-size: 34px;
  }

  .section-heading,
  .episode,
  .profile-detail {
    grid-template-columns: 1fr;
  }

  .summary-grid,
  .download-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow,
  .tutorial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow li {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 12px 16px;
  }

  .hero,
  .section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero {
    min-height: 0;
    padding-top: 58px;
  }

  .hero::after {
    background: rgba(251, 250, 245, 0.92);
  }

  h1 {
    font-size: 40px;
    line-height: 1.04;
  }

  .lead {
    font-size: 18px;
  }

  .hero-metrics,
  .summary-grid,
  .flow,
  .tutorial-grid,
  .download-list {
    grid-template-columns: 1fr;
  }

  .flow li {
    min-height: 0;
    border-right: 0;
  }

  .flow-index {
    margin-bottom: 18px;
  }

  .chart-top,
  .chart-foot,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
