:root {
  --paper: #f5f1e8;
  --paper-deep: #e9e2d4;
  --ink: #171716;
  --muted: #68645d;
  --line: #cfc6b8;
  --red: #d52b1e;
  --red-dark: #a91f16;
  --coral: #ed756a;
  --orange: #d77b2d;
  --blue: #42657a;
  --blue-light: #89a7b7;
  --white: #fffdf8;
  --content: 1160px;
  --reading: 760px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(23, 23, 22, 0.028) 1px, transparent 1px),
    var(--paper);
  background-size: 100% 8px;
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background: radial-gradient(circle at 76% 9%, rgba(213, 43, 30, 0.08), transparent 24rem);
  content: "";
  pointer-events: none;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.55rem 0.8rem;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-150%);
}

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

.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  width: min(calc(100% - 3rem), var(--content));
  margin: 0 auto;
  padding: 1.35rem 0;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.brand svg {
  width: 1.75rem;
  fill: var(--red);
}

.site-header nav {
  display: flex;
  gap: 1.35rem;
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: var(--red);
}

article {
  overflow: hidden;
}

.hero {
  display: grid;
  width: min(calc(100% - 3rem), var(--content));
  min-height: 560px;
  margin: 0 auto;
  padding: clamp(3.5rem, 7vw, 6rem) 0 4rem;
  grid-template-columns: minmax(0, 1.65fr) minmax(270px, 0.75fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}

.eyebrow,
.section-kicker {
  margin: 0 0 1rem;
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.03;
}

h1 {
  max-width: 760px;
  margin-bottom: 1.4rem;
  font-size: clamp(2.9rem, 5.8vw, 5.6rem);
}

h2 {
  margin-bottom: 1.1rem;
  font-size: clamp(1.9rem, 3.6vw, 3.5rem);
}

h3 {
  margin-bottom: 0.75rem;
  font-size: 1.55rem;
}

.dek {
  max-width: 760px;
  margin-bottom: 1.8rem;
  color: #35322e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  line-height: 1.48;
}

.dek strong {
  color: var(--red-dark);
  font-weight: 500;
}

.byline {
  margin: -0.35rem 0 1.25rem;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-meta span:not(:last-child)::after {
  margin-left: 0.55rem;
  color: var(--red);
  content: "•";
}

.headline-number {
  position: relative;
  display: flex;
  min-height: 280px;
  padding: 2rem;
  color: var(--white);
  background: var(--red);
  flex-direction: column;
  justify-content: center;
}

.headline-number::before,
.headline-number::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.45);
  content: "";
}

.headline-number::before {
  top: 1rem;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
}

.headline-number::after {
  width: 3rem;
  height: 3rem;
  top: -1px;
  right: -1px;
  border-width: 0 0 1px 1px;
  background: var(--paper);
}

.number {
  position: relative;
  z-index: 1;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4rem, 7.5vw, 6.6rem);
  letter-spacing: -0.075em;
  line-height: 0.86;
}

.number small {
  font-size: 0.35em;
  letter-spacing: -0.02em;
}

.number-label,
.number-note {
  position: relative;
  z-index: 1;
}

.number-label {
  margin-top: 1.15rem;
  font-weight: 800;
}

.number-note {
  margin-top: 0.5rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
}

.read-this-first {
  padding: 3.5rem max(1.5rem, calc((100vw - var(--content)) / 2));
  color: var(--white);
  background: var(--ink);
}

.read-this-first h2 {
  max-width: 750px;
  color: var(--white);
}

.qualification-grid {
  display: grid;
  margin-top: 3rem;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.qualification-grid p {
  margin: 0;
  color: #cfcac1;
  font-size: 0.94rem;
}

.qualification-grid strong {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--white);
}

.narrative,
.strategy-section,
.results-section,
.economics,
.reproduction,
.limits,
.conclusion {
  width: min(calc(100% - 3rem), var(--content));
  margin: 0 auto;
  padding: clamp(4.5rem, 8vw, 7rem) 0;
}

.narrative {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: clamp(2.5rem, 7vw, 6rem);
}

.section-heading > p:last-child {
  max-width: var(--reading);
  color: var(--muted);
  font-size: 1.05rem;
}

.prose {
  padding-top: 2.6rem;
  color: #34312d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
}

.prose p:first-child::first-letter {
  float: left;
  margin: 0.04em 0.12em 0 0;
  color: var(--red);
  font-size: 4.15rem;
  line-height: 0.8;
}

.strategy-section {
  padding-top: 1rem;
}

.strategy-grid {
  display: grid;
  margin-top: 3.5rem;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.strategy-card {
  display: flex;
  min-height: 430px;
  padding: 2.25rem;
  flex-direction: column;
  border-left: 1px solid var(--line);
}

.strategy-card:last-child {
  border-right: 1px solid var(--line);
}

.strategy-card-combined {
  color: var(--white);
  background: var(--red);
  border-color: var(--red);
}

.strategy-index {
  margin-bottom: 4rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.strategy-card-combined .strategy-index,
.strategy-card-combined .strategy-type {
  color: rgba(255, 255, 255, 0.76);
}

.strategy-card p:not(.strategy-type) {
  font-size: 0.94rem;
}

.strategy-type {
  margin-top: -0.3rem;
  color: var(--red-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.flow {
  display: flex;
  margin-top: auto;
  padding-top: 1.25rem;
  gap: 0.45rem;
  align-items: center;
  border-top: 1px solid currentColor;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
}

.flow i {
  color: var(--red);
  font-style: normal;
}

.strategy-card-combined .flow i {
  color: var(--white);
}

.results-section {
  width: 100%;
  padding-right: max(1.5rem, calc((100vw - var(--content)) / 2));
  padding-left: max(1.5rem, calc((100vw - var(--content)) / 2));
  background: var(--white);
}

.chart-block {
  margin: 4rem 0 0;
  padding: clamp(1.3rem, 3vw, 2.4rem);
  border: 1px solid var(--line);
  background: var(--white);
}

.results-section .chart-block {
  background: var(--paper);
}

.chart-header {
  display: flex;
  margin-bottom: 1.5rem;
  gap: 2rem;
  align-items: flex-start;
  justify-content: space-between;
}

.chart-header h3 {
  margin-bottom: 0.3rem;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.chart-header p,
.chart-unit {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.chart-unit {
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--line);
  white-space: nowrap;
}

.chart {
  min-height: 360px;
}

.chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart svg text {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.chart [tabindex="0"]:focus {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

figcaption {
  max-width: 880px;
  margin-top: 1.2rem;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.legend span {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}

.legend-swatch {
  display: inline-block;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
}

.legend-swatch.redis {
  background: var(--red);
}

.legend-swatch.reproduced {
  background: var(--orange);
}

.legend-swatch.published {
  background: #918b82;
}

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

.economics .section-heading,
.reproduction .section-heading {
  max-width: 900px;
}

.cost-chart {
  min-height: 500px;
}

.metric-strip {
  display: grid;
  margin-top: 1.4rem;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.metric-strip > div {
  display: flex;
  padding: 2rem;
  flex-direction: column;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metric-value {
  color: var(--red-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  letter-spacing: -0.06em;
  line-height: 1;
}

.metric-label {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
}

.reproduction {
  width: 100%;
  padding-right: max(1.5rem, calc((100vw - var(--content)) / 2));
  padding-left: max(1.5rem, calc((100vw - var(--content)) / 2));
  background: var(--paper-deep);
}

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

.limits-list li {
  display: grid;
  padding: 1.65rem 0;
  grid-template-columns: 4.5rem minmax(0, var(--reading));
  border-bottom: 1px solid var(--line);
}

.limits-list li > span {
  color: var(--red);
  font-size: 0.75rem;
  font-weight: 800;
}

.limits-list p {
  margin: 0;
}

.conclusion {
  width: 100%;
  padding-right: max(1.5rem, calc((100vw - var(--content)) / 2));
  padding-left: max(1.5rem, calc((100vw - var(--content)) / 2));
  color: var(--white);
  background: var(--red);
}

.conclusion .section-kicker {
  color: var(--white);
}

.conclusion h2,
.conclusion > p:last-child {
  max-width: 960px;
}

.conclusion > p:last-child {
  margin: 2rem 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
}

.article-footer {
  display: grid;
  padding: 5rem max(1.5rem, calc((100vw - var(--content)) / 2)) 2.5rem;
  color: #cbc7bf;
  background: var(--ink);
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.6fr);
  gap: 4rem;
  font-size: 0.85rem;
}

.article-footer > div:first-child {
  max-width: var(--reading);
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-links a {
  padding: 0.5rem 0;
  color: var(--white);
}

.copyright {
  margin: 2rem 0 0;
  padding-top: 1.25rem;
  grid-column: 1 / -1;
  border-top: 1px solid #3b3936;
  color: #8d8982;
  font-size: 0.72rem;
}

.tooltip {
  position: fixed;
  z-index: 50;
  width: min(270px, calc(100vw - 2rem));
  padding: 0.75rem 0.9rem;
  color: var(--white);
  background: var(--ink);
  font-size: 0.75rem;
  line-height: 1.45;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 12px));
  transition: opacity 120ms ease;
  pointer-events: none;
}

.tooltip.visible {
  opacity: 1;
}

@media (max-width: 900px) {
  .hero,
  .narrative {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 4rem;
  }

  .headline-number {
    max-width: 460px;
  }

  .qualification-grid,
  .strategy-grid {
    grid-template-columns: 1fr;
  }

  .strategy-card {
    min-height: auto;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .strategy-index {
    margin-bottom: 2rem;
  }

  .flow {
    margin-top: 2.5rem;
  }

  .chart {
    overflow-x: auto;
  }

  .chart svg {
    min-width: 700px;
  }

  #strategy-chart svg {
    min-width: 560px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .site-header {
    width: min(calc(100% - 2rem), var(--content));
  }

  .site-header nav {
    display: none;
  }

  .hero,
  .narrative,
  .strategy-section,
  .economics,
  .limits {
    width: min(calc(100% - 2rem), var(--content));
  }

  h1 {
    font-size: clamp(2.7rem, 12vw, 3.8rem);
  }

  .qualification-grid {
    gap: 1.5rem;
  }

  .chart-header {
    flex-direction: column;
    gap: 0.75rem;
  }

  .metric-strip {
    grid-template-columns: 1fr;
  }

  .limits-list li {
    grid-template-columns: 2.6rem 1fr;
  }

  .article-footer {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  body {
    background: white;
  }

  .site-header,
  .tooltip {
    display: none;
  }

  .hero {
    min-height: 0;
  }

  .chart-block,
  .strategy-card,
  .limits-list li {
    break-inside: avoid;
  }
}
