:root {
  --paper: #e8e8e3;
  --paper-bright: #f5f4ed;
  --ink: #121310;
  --muted: #666960;
  --line: rgba(18, 19, 16, .16);
  --olive: #303d23;
  --clay: #b65d38;
  --blue: #8aa4b8;
  --mono: "Martian Mono", ui-monospace, monospace;
  --sans: "Manrope", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --accent: var(--olive);
  --accent-soft: #d7ddcf;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); font-family: var(--sans); background: var(--paper); }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(18,19,16,.035) 1px, transparent 1px) 0 0 / 88px 88px,
    linear-gradient(0deg, rgba(18,19,16,.03) 1px, transparent 1px) 0 0 / 88px 88px,
    var(--paper);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
p, h1, h2, h3, figure { margin-top: 0; }

.founder-case { --accent: #303d23; --accent-soft: #dbe0cf; }
.policy-case { --accent: #6f3929; --accent-soft: #ead7cd; }
.research-case {
  --paper: #111716;
  --paper-bright: #192120;
  --ink: #eff0e9;
  --muted: #a7afa9;
  --line: rgba(239,240,233,.18);
  --accent: #9ab6c5;
  --accent-soft: #243c43;
}

.read-progress { position: fixed; inset: 0 0 auto; z-index: 90; height: 3px; background: transparent; }
.read-progress span { display: block; height: 100%; width: var(--read-progress, 0%); background: var(--accent); }

.case-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  width: 176px;
  padding: 22px 20px 26px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(18px);
}
.case-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--paper-bright);
  background: var(--ink);
  font: 400 25px/1 var(--serif);
}
.research-case .case-mark { color: #111716; background: #eff0e9; }
.case-rail nav { align-self: start; display: grid; gap: 13px; margin-top: 72px; }
.case-rail nav a { width: fit-content; color: var(--muted); font-size: 12px; font-weight: 700; transition: color .2s, transform .2s; }
.case-rail nav a:hover,
.case-rail nav a:focus-visible,
.case-rail nav a.is-active { color: var(--ink); transform: translateX(4px); }
.case-rail nav a.is-active::after { content: ""; display: block; height: 1px; margin-top: 4px; background: currentColor; }
.case-rail-bottom { display: grid; gap: 9px; color: var(--muted); font: 500 9px/1.5 var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.case-rail-bottom a { text-decoration: underline; text-underline-offset: 3px; }

.case-content { margin-left: 176px; overflow: hidden; }
.editorial-hero {
  width: min(100%, 1500px);
  min-height: 82svh;
  margin: 0 auto;
  padding: clamp(58px, 7vw, 108px) clamp(34px, 6vw, 94px) 52px;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(360px, 1.08fr);
  gap: clamp(42px, 6vw, 96px);
  align-items: center;
}
.eyebrow, .chapter-label, .meta-strip span, .case-card > span, .case-quote span, .case-action, .artifact-label {
  font: 500 10px/1.5 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.eyebrow { margin-bottom: 22px; color: var(--muted); }
.editorial-hero h1 {
  max-width: 9ch;
  margin-bottom: 24px;
  font: 400 clamp(68px, 7.4vw, 126px)/.86 var(--serif);
  letter-spacing: -.035em;
}
.editorial-hero .hero-lede { max-width: 660px; margin-bottom: 28px; font-size: clamp(18px, 1.5vw, 24px); font-weight: 650; line-height: 1.42; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.case-action { display: inline-grid; place-items: center; min-height: 42px; padding: 10px 14px; border: 1px solid var(--line); background: color-mix(in srgb, var(--paper-bright) 72%, transparent); transition: transform .2s, background .2s; }
.case-action:hover { transform: translateY(-3px); background: var(--paper-bright); }
.research-case .case-action:hover { color: #111716; }

.hero-artifact { position: relative; min-height: 490px; display: grid; place-items: center; }
.artifact-frame {
  width: min(100%, 690px);
  min-height: 440px;
  padding: clamp(24px, 4vw, 48px);
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  background: var(--paper-bright);
  color: #121310;
  box-shadow: 18px 18px 0 color-mix(in srgb, var(--accent) 32%, transparent);
  transform: rotate(.5deg);
}
.research-case .artifact-frame { border-color: rgba(239,240,233,.45); background: #17201f; color: var(--ink); }
.artifact-label { position: absolute; left: 0; top: 42px; z-index: 2; padding: 9px 12px; border: 1px solid var(--ink); background: var(--accent); color: var(--paper-bright); transform: rotate(-4deg); }
.research-case .artifact-label { color: #111716; }

.discovery-map, .policy-matrix { width: 100%; display: grid; gap: 9px; }
.discovery-map { grid-template-columns: 1fr 1fr; }
.discovery-map span, .policy-matrix span { padding: 17px 12px; border: 1px solid rgba(18,19,16,.18); text-align: center; font: 500 9px var(--mono); text-transform: uppercase; }
.discovery-map span:nth-child(3) { background: #e5d6cf; }
.discovery-map span:nth-child(4) { background: #ece18f; }
.founder-card { width: 88%; margin-top: 52px; padding: 28px; background: var(--ink); color: var(--paper-bright); box-shadow: 12px 12px 0 rgba(18,19,16,.12); }
.founder-card p { margin: 0; font: 400 clamp(38px, 4vw, 62px)/.98 var(--serif); }
.policy-matrix { grid-template-columns: repeat(3, 1fr); }
.policy-matrix span:nth-child(3n+1) { background: var(--olive); color: #fff; }
.policy-matrix span:nth-child(3n) { background: #e7cfc5; }
.hero-artifact img { width: 100%; height: auto; }

.meta-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.meta-strip > div { min-height: 92px; padding: 20px clamp(20px, 3vw, 38px); border-right: 1px solid var(--line); }
.meta-strip > div:last-child { border-right: 0; }
.meta-strip span { display: block; margin-bottom: 8px; color: var(--muted); }
.meta-strip p { margin: 0; font-size: 13px; font-weight: 700; line-height: 1.45; }

.case-chapter { padding: clamp(78px, 9vw, 132px) clamp(34px, 7vw, 110px); border-bottom: 1px solid var(--line); }
.chapter-inner { width: min(100%, 1180px); margin: 0 auto; }
.chapter-label { margin-bottom: 46px; color: var(--muted); }
.story-grid { display: grid; grid-template-columns: .78fr 1.22fr; gap: clamp(48px, 8vw, 130px); align-items: start; }
.story-grid h2, .section-heading { margin: 0; font: 400 clamp(52px, 6vw, 92px)/.92 var(--serif); letter-spacing: -.025em; }
.story-copy { max-width: 720px; }
.story-copy p { margin-bottom: 20px; font-size: 17px; line-height: 1.75; }
.story-copy .lead { font-size: clamp(21px, 2vw, 29px); font-weight: 650; line-height: 1.45; }

.case-quote { padding: clamp(74px, 9vw, 138px) clamp(34px, 7vw, 110px); background: var(--accent); color: #fff; }
.research-case .case-quote { color: #111716; }
.case-quote > div { width: min(100%, 1180px); margin: 0 auto; }
.case-quote span { opacity: .7; }
.case-quote blockquote { max-width: 1060px; margin: 28px 0 0; font: 400 clamp(45px, 6vw, 92px)/.95 var(--serif); letter-spacing: -.02em; }

.case-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 68px; border-top: 1px solid var(--line); }
.case-card { min-height: 270px; padding: 28px 28px 28px 0; border-bottom: 1px solid var(--line); }
.case-card + .case-card { padding-left: 28px; border-left: 1px solid var(--line); }
.case-card > span { color: var(--accent); }
.case-card h3 { margin: 34px 0 13px; font: 400 30px/1.05 var(--serif); }
.case-card p { margin: 0; font-size: 14px; line-height: 1.7; }
.founder-learning-cards { grid-template-columns: repeat(2, 1fr); }
.founder-learning-cards .case-card:nth-child(odd) { padding-left: 0; border-left: 0; }
.founder-learning-cards .case-card:nth-child(even) { padding-left: 28px; border-left: 1px solid var(--line); }
.founder-learning-cards .case-card:last-child:nth-child(odd) { grid-column: 1 / -1; }

.evidence-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 58px; }
.evidence-grid figure { margin: 0; border: 1px solid var(--line); background: var(--paper-bright); }
.research-case .evidence-grid figure { background: #17201f; }
.evidence-grid img { width: 100%; }
.evidence-grid figcaption { padding: 17px 19px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.55; }

.process-list { margin-top: 64px; border-top: 1px solid var(--line); }
.process-list > div { display: grid; grid-template-columns: 62px 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.process-list span { color: var(--accent); font: 500 10px var(--mono); }
.process-list p { max-width: 790px; margin: 0; font-size: 16px; line-height: 1.6; }

.case-footer { padding: 54px clamp(34px, 7vw, 110px) 70px; }
.case-footer > div { width: min(100%, 1180px); margin: 0 auto; display: flex; justify-content: space-between; gap: 18px; }
.case-footer a { font: 500 10px var(--mono); text-transform: uppercase; text-decoration: underline; text-underline-offset: 5px; }

@media (max-width: 1050px) {
  .case-rail { width: 138px; }
  .case-content { margin-left: 138px; }
  .editorial-hero { grid-template-columns: 1fr; padding-top: 72px; }
  .editorial-hero h1 { max-width: 12ch; }
  .hero-artifact { min-height: 400px; }
  .artifact-frame { min-height: 380px; }
  .story-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .case-rail { position: relative; width: 100%; height: auto; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; border-right: 0; border-bottom: 1px solid var(--line); }
  .case-rail nav { display: none; }
  .case-rail-bottom { display: block; }
  .case-rail-bottom span { display: none; }
  .case-content { margin-left: 0; }
  .editorial-hero { min-height: auto; padding: 58px 20px 46px; gap: 42px; }
  .editorial-hero h1 { font-size: clamp(60px, 18vw, 88px); }
  .editorial-hero .hero-lede { font-size: 18px; }
  .hero-artifact { min-height: 320px; }
  .artifact-frame { min-height: 300px; padding: 22px; box-shadow: 10px 10px 0 color-mix(in srgb, var(--accent) 32%, transparent); }
  .artifact-label { top: 12px; }
  .founder-card { margin-top: 30px; }
  .meta-strip { grid-template-columns: 1fr; }
  .meta-strip > div { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .meta-strip > div:last-child { border-bottom: 0; }
  .case-chapter { padding: 72px 20px; }
  .chapter-label { margin-bottom: 34px; }
  .story-grid h2, .section-heading { font-size: 55px; }
  .case-quote { padding: 72px 20px; }
  .case-quote blockquote { font-size: 48px; }
  .case-cards, .evidence-grid { grid-template-columns: 1fr; }
  .case-card, .case-card + .case-card { min-height: auto; padding: 26px 0; border-left: 0; }
  .founder-learning-cards .case-card:nth-child(even) { padding: 26px 0; border-left: 0; }
  .founder-learning-cards .case-card:last-child:nth-child(odd) { grid-column: auto; }
  .case-footer { padding: 42px 20px 54px; }
  .case-footer > div { flex-direction: column; }
}

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