:root {
  --ink: #080b0a;
  --ink-1: #0d1110;
  --bone: #e9e5d9;
  --bone-dim: #b9b29d;
  --muted: #746f61;
  --line: rgba(233, 229, 217, .10);
  --line-2: rgba(233, 229, 217, .06);
  --red: #e96a2f;
  --teal: #2b8f96;
  --gold: #edbb2e;
  --severe: #c84038;
  --number-serif: 'Libre Baskerville', Georgia, serif;
  --maxw: 1360px;
}

html, body {
  background:
    radial-gradient(900px 540px at 82% 2%, rgba(43, 143, 150, .06), transparent 62%),
    radial-gradient(860px 500px at 14% 94%, rgba(233, 106, 47, .05), transparent 60%),
    var(--ink);
  background-attachment: fixed;
  color: var(--bone);
  font-family: 'Archivo', system-ui, sans-serif;
}

.tb { max-width: var(--maxw); margin: 0 auto; padding: 30px 34px 80px; }
.disp { font-family: 'Fraunces', Georgia, serif; }
.eyebrow {
  color: var(--muted); font-family: 'Space Mono', monospace; font-size: 10px;
  letter-spacing: .22em; text-transform: uppercase;
}
.eyebrow em { font-style: italic; text-transform: none; letter-spacing: 0; }

/* ── Hero ── */
.tb-hero { padding: 32px 0 30px; border-bottom: 1px solid var(--line); }
.tb-hero h1 {
  max-width: 15ch; margin: 12px 0 14px;
  font-size: clamp(40px, 6.6vw, 92px); font-weight: 400; letter-spacing: -.03em; line-height: .95;
  text-wrap: balance;
}
.tb-hero h1 .light { font-weight: 300; color: var(--bone-dim); }
.tb-hero h1 .gold { color: var(--gold); }
.lede {
  max-width: 62ch; margin: 0; color: var(--bone-dim); font-size: 16px; line-height: 1.62;
}
.lede em { font-style: italic; color: var(--bone); }
.tb-hero-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 28px;
  border: 1px solid var(--line); background: rgba(8, 11, 10, .4);
}
.tb-hero-stats > div { padding: 16px 18px; border-right: 1px solid var(--line); }
.tb-hero-stats > div:last-child { border-right: 0; }
.tb-hero-stats .n {
  display: block; font-family: var(--number-serif); font-size: clamp(24px, 2.4vw, 34px);
  letter-spacing: -.03em; line-height: 1; color: var(--bone);
}
.tb-hero-stats > div:nth-child(1) .n,
.tb-hero-stats > div:nth-child(2) .n { color: var(--red); }
.tb-hero-stats .k {
  display: block; margin-top: 8px; color: var(--muted); font-family: 'Space Mono', monospace;
  font-size: 8px; letter-spacing: .13em; line-height: 1.5; text-transform: uppercase;
}

/* ── Section scaffolding ── */
.tb-section { padding: 40px 0; border-bottom: 1px solid var(--line); }
.section-head {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 14px;
}
.section-head h2 {
  margin: 0; font-size: clamp(22px, 2.6vw, 34px); font-weight: 400; letter-spacing: -.018em;
  text-wrap: balance;
}
.tb-history-grid h3, .lede, .tb-close-line, .tb-sub { text-wrap: pretty; }
.tb-sub { max-width: 74ch; margin: 0 0 22px; color: var(--bone-dim); font-size: 14px; line-height: 1.6; }

/* ── Burden map ── */
.tb-map-shell { position: relative; }
#tbMap {
  width: 100%; aspect-ratio: 16 / 8; min-height: 380px; max-height: 620px;
  border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--ink-1);
}
.tb-map-fallback {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 10px; padding: 24px;
  border: 1px solid var(--line); border-radius: 4px; text-align: center;
  background: rgba(8, 11, 10, .8);
}
.tb-map-fallback[hidden] { display: none; }
.tb-map-fallback p { max-width: 52ch; margin: 0 auto; color: var(--bone-dim); font-size: 13px; line-height: 1.55; }
.tb-map-key {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px;
  margin-top: 12px; color: var(--muted); font-family: 'Space Mono', monospace; font-size: 9px;
  letter-spacing: .1em; text-transform: uppercase;
}
.tb-legend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tb-lg { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-left: 12px; }
.tb-lg:first-child { margin-left: 0; }
.tb-lg-circle { border: 1.4px solid var(--red); background: rgba(233, 106, 47, .3); }
.tb-lg-mdr { border: 1.4px solid var(--gold); background: rgba(237, 187, 46, .3); }

.tb-popup .mapboxgl-popup-content {
  background: rgba(8, 11, 10, .96) !important; border: 1px solid var(--line) !important;
  border-radius: 4px !important; padding: 11px 13px !important; box-shadow: 0 18px 44px rgba(0, 0, 0, .5) !important;
}
.tb-popup .mapboxgl-popup-tip { border-top-color: rgba(8, 11, 10, .96) !important; }
.tb-pop-c { display: block; color: var(--muted); font-family: 'Space Mono', monospace; font-size: 8px; letter-spacing: .14em; text-transform: uppercase; }
.tb-pop-n { display: block; margin: 2px 0 0; font-family: var(--number-serif); font-size: 22px; color: var(--bone); line-height: 1; }
.tb-pop-k { display: block; color: var(--bone-dim); font-size: 11px; }
.tb-pop-d { display: block; margin-top: 5px; color: var(--muted); font-family: 'Space Mono', monospace; font-size: 9px; letter-spacing: .06em; }
.mapboxgl-ctrl-group { background: rgba(13, 17, 16, .92) !important; border: 1px solid var(--line) !important; box-shadow: none !important; }
.mapboxgl-ctrl button .mapboxgl-ctrl-icon { filter: invert(1) opacity(.55); }
.mapboxgl-ctrl-logo { opacity: .5; }

/* ── Top-burden list ── */
.tb-toplist { margin-top: 22px; border-top: 1px solid var(--line-2); }
.tb-row {
  display: grid; grid-template-columns: 130px 1fr 64px; align-items: center; gap: 14px;
  padding: 9px 0; border-bottom: 1px solid var(--line-2);
}
.tb-row-c { font-size: 13px; color: var(--bone); }
.tb-row-track { height: 6px; border-radius: 3px; background: rgba(233, 229, 217, .05); overflow: hidden; }
.tb-row-fill { display: block; width: 0; height: 100%; background: var(--red); border-radius: 3px; transition: width .9s cubic-bezier(.2, .7, .2, 1); }
.tb-toplist .tb-row {
  opacity: 0; transform: translateX(22px);
  transition: opacity .45s ease, transform .5s cubic-bezier(.2, .72, .2, 1);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.tb-toplist.revealed .tb-row { opacity: 1; transform: none; }
.tb-row.is-mdr .tb-row-fill { background: var(--gold); }
.tb-row-n { font-family: var(--number-serif); font-size: 15px; letter-spacing: -.02em; text-align: right; color: var(--bone); }

/* ── History ── */
.tb-history-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; margin-bottom: 30px; }
.tb-history-grid h3 { margin: 0 0 8px; font-size: 21px; font-weight: 400; line-height: 1.1; }
.tb-history-grid p { margin: 0; color: var(--bone-dim); font-size: 14px; line-height: 1.62; }
.tb-history-grid em { font-style: italic; color: var(--bone); }

/* ── Milestone timeline — horizontal coverflow ── */
.tb-timeline-outer { position: relative; margin: 8px -34px 0; }
.tb-timeline {
  display: flex; align-items: stretch; gap: 18px;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scroll-behavior: smooth;
  padding: 34px 0 30px; -webkit-overflow-scrolling: touch; overflow-anchor: none;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, transparent, black 64px, black calc(100% - 64px), transparent);
  mask-image: linear-gradient(to right, transparent, black 64px, black calc(100% - 64px), transparent);
}
.tb-timeline::-webkit-scrollbar { display: none; }
.tl-sp { flex: 0 0 max(20px, calc(50% - 150px)); scroll-snap-align: none; }
.tl-ev {
  position: relative; flex: 0 0 clamp(220px, 26vw, 300px); scroll-snap-align: center;
  padding: 20px 22px 22px; border: 1px solid var(--line); border-radius: 3px; background: var(--ink-1);
  opacity: .32; transform: scale(.9); filter: blur(.5px);
  transition: opacity .35s ease, transform .35s ease, filter .35s ease, border-color .35s ease;
  will-change: opacity, transform;
}
.tl-ev.is-active { opacity: 1; transform: scale(1); filter: none; border-color: var(--line-2); }
@media (prefers-reduced-motion: reduce) { .tl-ev { transition: none; } }
.tl-ev .yr {
  font-family: 'Space Mono', monospace; font-size: 9px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--red);
}
.tl-ev.ok .yr { color: var(--teal); }
.tl-ev .body b { display: block; margin: 5px 0 4px; font-size: 18px; font-weight: 400; color: var(--bone); }
.tl-ev .body p { margin: 0; color: var(--bone-dim); font-size: 13px; line-height: 1.55; }
.tl-ev em { font-style: italic; color: var(--bone); }

.tl-arrow {
  position: absolute; top: 50%; transform: translateY(-60%); z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--ink-1); color: var(--bone-dim); font-size: 16px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: color .2s ease, border-color .2s ease;
}
.tl-arrow:hover { color: var(--bone); border-color: var(--teal); }
.tl-arrow.prev { left: 4px; }
.tl-arrow.next { right: 4px; }

/* ── Mini timeline nav ── */
.tl-mini { display: flex; gap: 2px; margin: 4px 0 0; padding: 0 2px; overflow-x: auto; scrollbar-width: none; }
.tl-mini::-webkit-scrollbar { display: none; }
.tl-mini-node {
  flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 6px 0; background: none; border: none; cursor: pointer; position: relative;
}
.tl-mini-node::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--line);
}
.tl-mini-node .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--line); margin-top: -4px;
  transition: background .25s ease, transform .25s ease;
}
.tl-mini-node .yr {
  font-family: 'Space Mono', monospace; font-size: 8.5px; letter-spacing: .06em; color: var(--muted);
  transition: color .25s ease; white-space: nowrap;
}
.tl-mini-node.is-active::before { background: var(--teal); }
.tl-mini-node.is-active .dot { background: var(--teal); transform: scale(1.5); }
.tl-mini-node.is-active .yr { color: var(--bone); }
.tl-mini-node.sev.is-active::before, .tl-mini-node.sev.is-active .dot { background: var(--severe); }

/* ── The descent into resistance ── */
.tb-ladder { margin-top: 6px; }
.tb-step {
  margin-left: calc(var(--indent) * clamp(0px, 3.4vw, 52px));
  padding: 14px 16px; margin-bottom: 6px; border-radius: 4px; cursor: default;
  border: 1px solid var(--line); border-left: 3px solid var(--sc, var(--muted));
  background: linear-gradient(180deg, rgba(233, 229, 217, .04), transparent 60%), rgba(8, 11, 10, .5);
  opacity: 0; transform: translateX(24px);
  transition: opacity .5s ease, transform .5s cubic-bezier(.2, .72, .2, 1), border-color .18s ease, background .18s ease;
  transition-delay: calc(var(--i, 0) * 85ms);
}
.tb-ladder.revealed .tb-step { opacity: 1; transform: none; }
.tb-step-teal { --sc: var(--teal); }
.tb-step-gold { --sc: var(--gold); }
.tb-step-red { --sc: var(--red); }
.tb-step-severe { --sc: var(--severe); }
.tb-step:hover, .tb-step:focus-visible {
  outline: none; transform: translateX(3px);
  transition: transform .16s ease, background .18s ease, border-color .18s ease;
  transition-delay: 0s;
  background: linear-gradient(180deg, rgba(233, 229, 217, .07), transparent 60%), rgba(8, 11, 10, .66);
  border-color: color-mix(in srgb, var(--sc) 55%, var(--line));
}
.tb-step-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.tb-step-tag {
  font-family: 'Space Mono', monospace; font-size: 9px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--sc);
}
.tb-step-tier { font-size: 18px; font-weight: 400; color: var(--bone); }
.tb-step-bar {
  position: relative; display: flex; align-items: center; gap: 10px;
  height: 8px; margin: 10px 0 9px; border-radius: 4px; background: rgba(233, 229, 217, .05);
}
.tb-step-fill { display: block; width: 0; height: 100%; border-radius: 4px; background: var(--sc); transition: width .9s cubic-bezier(.2, .7, .2, 1); }
.tb-step-pct {
  position: absolute; right: 0; top: -3px; font-family: var(--number-serif); font-size: 12px;
  color: var(--bone-dim); background: var(--ink); padding-left: 6px;
}
.tb-step-meta {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--muted); font-size: 12px; line-height: 1.45;
}
.tb-step-dur { font-family: 'Space Mono', monospace; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.tb-ladder-foot { margin: 14px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.5; max-width: 80ch; }
.tb-ladder-foot em { font-style: italic; color: var(--bone-dim); }

/* ── Mumbai ── */
.tb-mumbai-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(240px, .9fr); gap: 34px; }
.tb-mumbai-lead p { margin: 0 0 14px; color: var(--bone-dim); font-size: 15px; line-height: 1.66; }
.tb-mumbai-lead p:last-child { margin-bottom: 0; }
.tb-mumbai-lead b { color: var(--bone); font-weight: 600; }
.tb-mumbai-lead em { font-style: italic; color: var(--bone); }
.tb-mumbai-facts { display: grid; align-content: start; gap: 1px; border: 1px solid var(--line); background: var(--line); }
.tb-fact { padding: 15px 16px; background: rgba(8, 11, 10, .6); }
.tb-fact .n { display: block; font-family: var(--number-serif); font-size: 26px; letter-spacing: -.03em; line-height: 1; color: var(--severe); }
.tb-fact .k { display: block; margin-top: 7px; color: var(--bone-dim); font-size: 12px; line-height: 1.4; }
.tb-fact-hope .n { color: var(--teal); }

/* ── Close ── */
.tb-close { border-bottom: 0; }
.tb-close-line {
  max-width: 68ch; margin: 6px 0 0; font-family: 'Fraunces', Georgia, serif; font-weight: 300;
  font-size: clamp(18px, 2.1vw, 25px); line-height: 1.42; color: var(--bone);
}
.tb-close-line strong, .tb-close-line b { color: var(--red); font-weight: 400; }
.tb-source { margin: 22px 0 0; color: var(--muted); font-family: 'Space Mono', monospace; font-size: 10px; letter-spacing: .04em; line-height: 1.6; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .tb { padding: 24px 22px 64px; }
  .tb-hero-stats { grid-template-columns: 1fr 1fr; }
  .tb-hero-stats > div:nth-child(2n) { border-right: 0; }
  .tb-hero-stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .tb-history-grid,
  .tb-mumbai-grid { grid-template-columns: 1fr; gap: 22px; }
  .tb-timeline-outer { margin: 8px -22px 0; }
  .tl-arrow { display: none; }
  .tl-ev { flex-basis: min(78vw, 300px); }
  .tl-sp { flex-basis: max(12px, calc(50% - 39vw)); }
}
@media (max-width: 560px) {
  .tb-hero-stats { grid-template-columns: 1fr; }
  .tb-hero-stats > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .tb-hero-stats > div:last-child { border-bottom: 0; }
  .tb-row { grid-template-columns: 100px 1fr 52px; gap: 10px; }
  .tb-step { margin-left: calc(var(--indent) * 14px); }
}

@media (prefers-reduced-motion: reduce) {
  .tb-toplist .tb-row,
  .tb-ladder .tb-step { opacity: 1 !important; transform: none !important; }
  .tb-row-fill, .tb-step-fill, .tl-ev { transition: none !important; }
}
