/* AI Atlas. Same system as Fiscal Atlas (Decisive Labs navy, cyan, mono accents, Clarendon display face);
   the task-length ladder is its own. */
:root {
  --bg: #070b14;
  --panel: #0d1422;
  --panel-2: #121b2d;
  --line: rgba(130, 190, 255, 0.14);
  --line-strong: rgba(130, 190, 255, 0.28);
  --text: #e8f0fb;
  --muted: #a3b3ca;
  --faint: #74869f;
  --cyan: #00e0ff;      /* money in, interactive */
  --amber: #ffb300;     /* money out */
  --red: #ff6b6b;       /* shortfall */
  --green: #00e676;
  --display: 'Besley', 'Rockwell', Georgia, serif;
  --body: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', 'Cascadia Code', ui-monospace, monospace;
  --wrap: 1120px;
  /* categorical slots, validated on --panel with the dataviz palette checker */
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --s5: #d55181; --s6: #0ca30c; --s7: #9085e9; --s8: #e66767; --s0: #7d8aa0;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: #7fefff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--panel); padding: 8px 12px; z-index: 100; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* top bar */
.top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 28px; padding: 12px 24px;
  background: rgba(7, 11, 20, 0.88); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { font: 700 1.15rem/1 var(--display); color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--cyan); color: var(--cyan); font: 700 0.95rem/1 var(--display); }
.chapters { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; }
.chapters::-webkit-scrollbar { display: none; }
.chapters a { color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; white-space: nowrap; padding: 4px 0; border-bottom: 2px solid transparent; }
.chapters a:hover, .chapters a.on { color: var(--text); border-bottom-color: var(--cyan); }

/* hero */
.hero { padding: 72px 0 56px; border-bottom: 1px solid var(--line);
  background: radial-gradient(900px 380px at 12% -10%, rgba(0, 224, 255, 0.09), transparent 70%), var(--bg); }
.kicker { font: 500 0.82rem/1 var(--mono); color: var(--cyan); margin: 0 0 18px; letter-spacing: 0.02em; }
h1 { font: 800 clamp(2.3rem, 5.4vw, 4.2rem)/1.04 var(--display); letter-spacing: -0.015em; margin: 0 0 22px; max-width: 17ch; text-wrap: balance; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 62ch; margin: 0 0 44px; }
.lede b { color: var(--text); font-weight: 600; }

  color: #fff; transition: filter 0.15s, opacity 0.15s; }
.readout { min-height: 3.2em; margin: 14px 0 0; color: var(--muted); font-size: 0.95rem; max-width: 80ch; }
.readout b { color: var(--text); }

.ticker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 40px 0 0; border-top: 1px solid var(--line); }
.ticker div { padding: 18px 20px 0 0; }
.ticker dt { font-size: 0.85rem; color: var(--muted); }
.ticker dt span { color: var(--faint); }
.ticker dd { margin: 4px 0 0; font: 700 clamp(1.4rem, 2.6vw, 2rem)/1.1 var(--display); font-variant-numeric: tabular-nums; }

/* chapters */
.chapter { padding: 88px 0 24px; }
.prose { max-width: 68ch; margin-bottom: 28px; }
h2 { font: 800 clamp(1.7rem, 3.4vw, 2.5rem)/1.1 var(--display); letter-spacing: -0.01em; margin: 0 0 16px; text-wrap: balance; }
h3.sub { font: 700 1.4rem/1.2 var(--display); margin: 56px 0 10px; }
.prose p { color: var(--muted); margin: 0 0 12px; }
.prose p b, .cases p b { color: var(--text); font-weight: 600; }

/* chart frame */
.chart { margin: 0 0 28px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px 18px; min-width: 0; }
.chart-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 14px; }
.chart-head h3 { font: 600 1.02rem/1.3 var(--body); margin: 0; }
.plot { position: relative; height: 400px; }
.plot.short { height: 250px; }
.plot.tall { height: 560px; }
.plot.auto { height: auto; }
.plot.map { height: auto; aspect-ratio: 975 / 610; }
.plot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.src { font-size: 0.8rem; color: var(--faint); margin: 12px 0 0; }
.src a { color: var(--muted); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }

.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 3px; flex-wrap: wrap; }
.seg button { all: unset; cursor: pointer; font-size: 0.82rem; font-weight: 500; color: var(--muted); padding: 6px 12px; border-radius: 6px; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.seg button:focus-visible { outline: 2px solid var(--cyan); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.chips button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px 5px 10px; }
.chips button i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); opacity: 0.3; }
.chips button[aria-pressed="true"] { color: var(--text); border-color: var(--line-strong); background: var(--panel-2); }
.chips button[aria-pressed="true"] i { opacity: 1; }
.chips button:focus-visible { outline: 2px solid var(--cyan); }

/* svg marks */
.axis text { fill: var(--faint); font: 400 11.5px var(--body); font-variant-numeric: tabular-nums; }
.axis path, .axis line { stroke: none; }
.grid line { stroke: rgba(130, 190, 255, 0.09); }
.baseline { stroke: rgba(130, 190, 255, 0.3); }
.lbl { fill: var(--muted); font: 500 12px var(--body); }
.lbl.strong { fill: var(--text); }
.note { fill: var(--faint); font: 400 11px var(--body); }
.cross { stroke: rgba(232, 240, 251, 0.35); stroke-width: 1; pointer-events: none; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 10px; font-size: 0.82rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }

.tip { position: fixed; z-index: 80; pointer-events: none; background: #050810; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; font-size: 0.82rem; line-height: 1.45; color: var(--muted); max-width: 320px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); }
.tip h5 { margin: 0 0 6px; font: 600 0.86rem var(--body); color: var(--text); }
.tip table { border-collapse: collapse; width: 100%; }
.tip td { padding: 1px 0; }
.tip td:last-child { text-align: right; color: var(--text); font-variant-numeric: tabular-nums; padding-left: 16px; white-space: nowrap; }
.tip i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 7px; background: var(--c); }
.tip .sep td { border-top: 1px solid var(--line); padding-top: 4px; }

details.tbl { margin-top: 10px; font-size: 0.82rem; }
details.tbl summary { cursor: pointer; color: var(--muted); width: max-content; }
details.tbl > div { max-height: 320px; overflow: auto; margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; }
details.tbl table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
details.tbl th, details.tbl td { padding: 5px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
details.tbl th { position: sticky; top: 0; background: var(--panel-2); color: var(--text); font-weight: 600; }
details.tbl th:first-child, details.tbl td:first-child { text-align: left; }
details.tbl td { color: var(--muted); }

/* map */
.map-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 0.9rem; color: var(--muted); }
select { background: var(--bg); color: var(--text); border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 34px 8px 12px; font: 500 0.9rem var(--body); max-width: 100%;
  appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.map-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 28px; align-items: start; }
.plot.map path.area { stroke: var(--panel); stroke-width: 0.5; cursor: pointer; }
.plot.map path.area.nodata { fill: #1a2233; }
.plot.map path.area:hover, .plot.map path.area.sel { stroke: #fff; stroke-width: 1.6; }
.plot.map path.mesh { fill: none; stroke: var(--panel); stroke-width: 0.9; pointer-events: none; }
.legend-scale { display: flex; align-items: flex-start; gap: 2px; margin-top: 12px; font-size: 0.74rem; color: var(--muted); }
.legend-scale div { flex: 1; text-align: center; min-width: 0; }
.legend-scale i { display: block; height: 10px; background: var(--c); margin-bottom: 5px; }
.legend-scale div:first-child i { border-radius: 4px 0 0 4px; }
.legend-scale div:last-child i { border-radius: 0 4px 4px 0; }
#map-side { font-size: 0.86rem; color: var(--muted); }
#map-side h4 { font: 700 1.2rem/1.2 var(--display); color: var(--text); margin: 0 0 4px; }
#map-side .pop { color: var(--faint); margin: 0 0 12px; }
#map-side table { width: 100%; border-collapse: collapse; }
#map-side td { padding: 5px 0; border-bottom: 1px solid var(--line); }
#map-side td:last-child { text-align: right; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
#map-side tr.cur td { color: var(--cyan); }
#map-side h5 { font: 600 0.82rem var(--body); color: var(--text); margin: 18px 0 6px; }
#map-side ol { margin: 0; padding: 0; list-style: none; }
#map-side li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
#map-side li span:last-child { color: var(--text); font-variant-numeric: tabular-nums; }
#map-side button.link { all: unset; cursor: pointer; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
#map-side button.link:hover { color: var(--text); }

/* integrity */
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 0 0 36px; border-top: 1px solid var(--line-strong); }
.three article { padding: 22px 28px 8px 0; }
.three article + article { padding-left: 28px; border-left: 1px solid var(--line); }
.three h3 { font: 500 0.85rem var(--mono); color: var(--cyan); margin: 0 0 12px; }
.three .big { font: 700 1.5rem/1.2 var(--display); margin: 0 0 10px; color: var(--text); }
.three p { color: var(--muted); font-size: 0.93rem; margin: 0 0 10px; }
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.cases article { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px 22px 14px; min-width: 0; }
.cases h4 { font: 700 1.12rem/1.25 var(--display); margin: 0 0 10px; }
.cases p { font-size: 0.92rem; color: var(--muted); margin: 0 0 12px; }
.cases .both { font-size: 0.86rem; border-top: 1px solid var(--line); padding-top: 12px; }
.cases .both strong { color: var(--text); font-weight: 600; }
.cases .plot { margin: 4px 0 12px; height: 200px; }

.srclist { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.srclist li { padding: 12px 0; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); }
.srclist a { color: var(--text); font-weight: 500; }
.srclist small { display: block; color: var(--faint); font-size: 0.8rem; }
.fine { font-size: 0.82rem; color: var(--faint); }
.foot { margin-top: 72px; padding: 32px 0 48px; border-top: 1px solid var(--line); font-size: 0.86rem; color: var(--faint); }
.foot strong { color: var(--muted); }

@media (max-width: 900px) {
  .pair, .cases, .three, .srclist { grid-template-columns: 1fr; }
  .three article + article { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .map-grid { grid-template-columns: 1fr; }
  .ticker { grid-template-columns: 1fr 1fr; }
  .chapter { padding-top: 64px; }
  .plot { height: 340px; }
  .plot.tall { height: 640px; }
  .dollar-bar { height: 92px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .top { gap: 16px; padding: 10px 16px; }
  .wrap { padding: 0 16px; }
  .chart { padding: 16px 14px 14px; border-radius: 12px; }
  .hero { padding-top: 44px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }


/* shared small parts (from Fiscal Atlas) */
input[type="search"] { background: var(--bg); color: var(--text); border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 12px; font: 500 0.9rem var(--body); min-width: 0; width: 260px; max-width: 100%; }
details.tbl .csv { all: unset; cursor: pointer; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; margin: 8px 0 0; display: inline-block; }
details.tbl .csv:hover { color: var(--text); }
.scroll-x { overflow-x: auto; }
table.score { width: 100%; border-collapse: collapse; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
table.score th { text-align: right; font-weight: 500; color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; vertical-align: bottom; }
table.score th:first-child, table.score td:first-child { text-align: left; }
table.score td { text-align: right; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--text); white-space: nowrap; }
table.score td:first-child { white-space: normal; font-weight: 500; }
table.score td i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); margin-right: 9px; }
table.score td small { display: block; color: var(--faint); font-size: 0.76rem; font-weight: 400; }
.chart-head h3 { margin-right: auto; }
.mini { margin: 0 0 6px; font-size: 0.82rem; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0 0 24px; border-top: 1px solid var(--line-strong); }
.tiles div { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); }
.tiles dt { font-size: 0.82rem; color: var(--muted); }
.tiles dd { margin: 4px 0 0; font: 700 1.5rem/1.15 var(--body); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.tiles dd small { display: block; font: 400 0.78rem/1.4 var(--body); color: var(--faint); letter-spacing: 0; margin-top: 3px; }
.hood { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.hood div { padding: 12px 0; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); display: flex; justify-content: space-between; gap: 18px; }
.hood div b { color: var(--text); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.ticker dd { font-family: var(--body); font-weight: 700; letter-spacing: -0.02em; }
.ticker dd small { display: block; font: 400 0.78rem/1.4 var(--body); color: var(--faint); letter-spacing: 0; margin-top: 4px; }

/* AI Atlas */
.chapters a.out-link { color: var(--cyan); border: 1px solid var(--line-strong); border-radius: 999px; padding: 4px 12px; }
.chapters a.out-link:hover { border-color: var(--cyan); }
.ladder { margin: 0; }
.ladder figcaption { font-size: 0.9rem; color: var(--muted); margin: 0 0 6px; }
.ladder .plot { height: 190px; }
.ladder .rung { stroke: rgba(130, 190, 255, 0.16); }
.ladder .rung-l { fill: var(--muted); font: 500 11.5px var(--body); }
.ladder .yr { fill: var(--faint); font: 500 11px var(--mono); }
.ladder circle { cursor: pointer; }
.proj-band { fill: rgba(0, 224, 255, 0.05); }
.proj-line { stroke-dasharray: 5 5; }
.caution { fill: rgba(255, 179, 0, 0.07); }
.caution-l { fill: var(--amber); font: 500 11px var(--body); opacity: 0.85; }
.modelled { display: inline-block; font: 600 0.68rem/1 var(--mono); letter-spacing: 0.03em; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--amber); color: var(--amber); margin-left: 10px; vertical-align: 2px; white-space: nowrap; }
.slider { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 18px; align-items: center; margin: 0 0 14px; font-size: 0.9rem; color: var(--muted); }
.slider input[type="range"] { width: 100%; accent-color: var(--cyan); height: 22px; grid-column: 1 / -1; }
.slider output { color: var(--cyan); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.presets button { all: unset; cursor: pointer; font-size: 0.82rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }
.presets button:hover, .presets button:focus-visible { color: var(--text); border-color: var(--line-strong); }
.presets button[aria-pressed="true"] { color: var(--text); border-color: var(--cyan); }
.bgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 28px; }
.bcard { all: unset; box-sizing: border-box; cursor: pointer; display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 14px 10px; min-width: 0; }
.bcard:hover, .bcard:focus-visible { border-color: var(--line-strong); }
.bcard[aria-pressed="true"] { border-color: var(--cyan); }
.bcard h4 { margin: 0; font: 600 0.9rem/1.3 var(--body); color: var(--text); }
.bcard .big { font: 700 1.6rem/1.1 var(--body); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin: 6px 0 0; color: var(--text); }
.bcard .who { font-size: 0.76rem; color: var(--faint); margin: 2px 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bcard svg { display: block; width: 100%; height: 56px; overflow: visible; }
.bcard .tag { font: 500 0.68rem var(--mono); color: var(--green); }
.bcard .tag.open { color: var(--faint); }
.jobs-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
#job-find { font-size: 0.88rem; color: var(--muted); }
#job-find ol { list-style: none; margin: 12px 0 0; padding: 0; }
#job-find li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
#job-find li span:last-child { color: var(--text); font-variant-numeric: tabular-nums; }
.status { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 8px; }
.status.bad { background: var(--red); }
@media (max-width: 980px) { .bgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .jobs-grid { grid-template-columns: 1fr; } .tiles { grid-template-columns: 1fr 1fr; } .hood { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .ladder .plot { height: 170px; } }

/* v0.2 data-centre map */
.dc-wrap { position: relative; min-width: 0; }
.plot.dcmap { height: auto; aspect-ratio: 975 / 610; background: #080d19; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; touch-action: none; cursor: grab; }
.plot.dcmap:active { cursor: grabbing; }
.plot.dcmap svg { overflow: hidden; }
.plot.dcmap .land { fill: #131d30; stroke: rgba(130, 190, 255, 0.22); stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-width: 0.7; }
.plot.dcmap .sphere { fill: #080d19; }
.plot.dcmap .dome { cursor: pointer; }
.plot.dcmap .plan { fill-opacity: 0.16; stroke-opacity: 0.75; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; stroke-width: 1.2; pointer-events: none; }
.plot.dcmap .built { fill-opacity: 0.78; stroke: rgba(255, 255, 255, 0.55); vector-effect: non-scaling-stroke; stroke-width: 0.8; }
.plot.dcmap .hit { fill: transparent; cursor: pointer; }
.plot.dcmap .site.sel .plan { stroke: #fff; stroke-opacity: 1; stroke-dasharray: none; stroke-width: 2; }
.plot.dcmap .site.dim { opacity: 0.35; }
.dc-zoom { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; }
.dc-zoom button { all: unset; cursor: pointer; min-width: 30px; height: 30px; padding: 0 8px; box-sizing: border-box; text-align: center; font: 600 0.9rem/30px var(--body); color: var(--text); background: rgba(13, 20, 34, 0.9); border: 1px solid var(--line-strong); border-radius: 8px; }
.dc-zoom button:hover, .dc-zoom button:focus-visible { border-color: var(--cyan); }
.dc-key { position: absolute; left: 12px; bottom: 10px; display: flex; align-items: flex-end; gap: 14px; font-size: 0.72rem; color: var(--muted); pointer-events: none; }
.dc-key span { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dc-key i { display: block; border-radius: 50%; border: 1px dashed var(--muted); background: rgba(163, 179, 202, 0.12); }
#map-side .spark { display: block; width: 100%; height: 70px; margin: 10px 0 2px; overflow: visible; }
#map-side li button { all: unset; cursor: pointer; color: var(--muted); display: flex; align-items: center; gap: 8px; min-width: 0; }
#map-side li button:hover, #map-side li button:focus-visible { color: var(--text); }
#map-side li button i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
#map-side .approx { color: var(--amber); font-size: 0.8rem; margin: 10px 0 0; }
@media (max-width: 900px) { .plot.dcmap { aspect-ratio: 4 / 3.4; } }

/* v0.4 review fixes */
.hood.means { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hood.means div { display: block; }
.hood .ul { display: block; color: var(--text); font-weight: 600; margin-bottom: 3px; }
.bnote { font-size: 0.86rem; color: var(--muted); margin: -14px 0 18px; max-width: 80ch; }
.bcard .tag.stale { color: var(--amber); white-space: normal; }
.plot.dcmap .site.unsure .built { fill-opacity: 0.4; stroke-dasharray: 2 2; }

/* v0.5 phone navigation, tap targets, glossary */
.top { -webkit-mask-image: none; }
.chapters { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); padding-right: 28px; }
.jump { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 28px 0 0; font-size: 0.86rem; color: var(--faint); }
.jump a { color: var(--muted); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
.jump a:hover, .jump a:focus-visible { color: var(--text); border-color: var(--line-strong); }
.gloss { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; margin: 0 0 24px; }
.gloss div { padding: 12px 0; border-top: 1px solid var(--line); }
.gloss dt { color: var(--text); font-weight: 600; font-size: 0.95rem; }
.gloss dd { margin: 3px 0 0; color: var(--muted); font-size: 0.92rem; }
.axis text, .note { fill: #8496b0; }
.src { color: #8496b0; }
.scroll-x { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); padding-right: 20px; }
@media (min-width: 901px) { .scroll-x { -webkit-mask-image: none; mask-image: none; padding-right: 0; } }
@media (max-width: 900px) { .gloss { grid-template-columns: 1fr; } }
@media (pointer: coarse) {
  .seg button { padding: 12px 14px; }
  .presets button, .chips button, .jump a { padding: 11px 14px; }
  .chapters a { padding: 12px 0; }
  details.tbl summary { padding: 12px 0; }
  .src a { display: inline-block; padding: 6px 0; }
  .dc-zoom button { min-width: 44px; height: 44px; line-height: 44px; }
  #map-side li { padding: 9px 0; }
}
@media (max-width: 700px) { .slider { grid-template-columns: 1fr; } .slider output { white-space: normal; } }

/* v0.6 opening chart: every measured model by release date, with a date scrubber (shared with Longevity Atlas) */
.surv { margin: 0; }
.surv figcaption { font-size: 0.9rem; color: var(--muted); max-width: 86ch; margin: 0 0 10px; }
.surv .plot { height: 400px; }
.surv .plot svg { overflow: hidden; }
.surv-year { fill: var(--text); fill-opacity: 0.16; font: 800 clamp(3rem, 9vw, 6rem)/1 var(--display); font-variant-numeric: tabular-nums; pointer-events: none; }
.surv-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; margin: 10px 0 0; }
.surv-bar button { all: unset; cursor: pointer; box-sizing: border-box; min-width: 72px; min-height: 36px; text-align: center; font: 600 0.86rem/36px var(--body); color: var(--bg); background: var(--cyan); border-radius: 999px; padding: 0 16px; }
.surv-bar button:hover { background: #7fefff; }
.surv-bar button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.surv-bar input[type="range"] { width: 100%; accent-color: var(--cyan); height: 22px; }
.surv-bar output { color: var(--cyan); font: 600 0.95rem var(--mono); font-variant-numeric: tabular-nums; min-width: 9ch; text-align: right; }
@media (max-width: 560px) { .surv .plot { height: 320px; } }

/* v0.6 tagline */
.hero h1 { max-width: 15ch; }
.subhead { font: 700 clamp(1.25rem, 2.6vw, 1.8rem)/1.25 var(--display); color: var(--cyan); margin: -6px 0 22px; max-width: 30ch; text-wrap: balance; }
.brand-tag { font: 600 0.82rem/1.2 var(--body); color: var(--cyan); white-space: nowrap; margin-left: -14px; padding-left: 14px; border-left: 1px solid var(--line-strong); }
@media (max-width: 1180px) { .brand-tag { display: none; } }

/* v0.8 scenario builder (shared shape with Longevity Atlas) */
.sc-grid { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 32px; align-items: start; }
.sc-levers .slider { margin: 0 0 12px; font-size: 0.86rem; }
.sc-levers .slider small { display: block; grid-column: 1 / -1; color: var(--faint); font-size: 0.76rem; margin-top: -4px; }
.sc-levers input[type="range"] { accent-color: var(--amber); }
.sc-levers output { color: var(--amber); }
.sc-tiles { margin-bottom: 14px; }
#c-sc { height: 420px; }
@media (max-width: 980px) { .sc-grid { grid-template-columns: 1fr; } }

/* links between the Decisive Labs atlases, above the header on every page */
.atlases { display: flex; align-items: center; gap: 20px; padding: 7px 24px; background: #050810; border-bottom: 1px solid var(--line); font: 500 0.76rem/1.4 var(--mono); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.atlases::-webkit-scrollbar { display: none; }
.atlases a { color: var(--muted); text-decoration: none; padding: 3px 0; }
.atlases a:hover { color: var(--text); }
.atlases a.here { color: var(--cyan); }
.atlases a:first-child { color: var(--text); padding-right: 20px; border-right: 1px solid var(--line); }
@media (max-width: 560px) { .atlases { padding: 7px 16px; gap: 16px; } }

/* Visual first: headline, one sentence, then the graphic */
.hero { padding-top: 34px; }
.hero h1 { font-size: clamp(1.5rem, 3.6vw, 2.7rem); margin-bottom: 10px; max-width: 30ch; }
.hero .kicker { margin-bottom: 10px; }
.hero-q { font-size: 1.05rem; color: var(--muted); max-width: 62ch; margin: 0 0 16px; }
.hero .surv figcaption { margin-top: 10px; font-size: 0.82rem; color: var(--faint); max-width: 90ch; }
.hero .lede { margin: 30px 0 0; font-size: 1.05rem; }
.stale { color: var(--amber); }
.sc-note { margin: 12px 0 0; padding: 10px 14px; border-left: 2px solid var(--amber); background: rgba(255, 179, 0, 0.06); color: var(--muted); font-size: 0.88rem; max-width: 90ch; border-radius: 0 8px 8px 0; }
.sc-note:empty { display: none; }
.sc-note b { color: var(--text); }
@media (max-width: 640px) { .hero { padding-top: 18px; } .hero-q { font-size: 0.95rem; margin-bottom: 10px; } }
.hero .subhead { font-size: clamp(1rem, 2vw, 1.3rem); margin: 0 0 12px; max-width: 60ch; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.hero .surv .plot { height: min(380px, 46vh); }
.hero-tags .pill { display: inline-block; font: 600 0.68rem/1 var(--mono); letter-spacing: 0.02em; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); white-space: nowrap; }
.hero-tags .pill.p2 { border-color: var(--cyan); color: var(--cyan); }
.hero-tags .pill.p1 { border-color: var(--amber); color: var(--amber); white-space: normal; line-height: 1.3; }

/* Share, save, reset, and the change log (assets/js/extras.js) */
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 0; }
.share-row button { all: unset; box-sizing: border-box; cursor: pointer; font: 500 0.78rem/1 var(--body); color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 7px 12px; }
.share-row button:hover, .share-row button:focus-visible { color: var(--text); border-color: var(--cyan); }
.share-row button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.share-say { font-size: 0.8rem; color: var(--cyan); }
.changes { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; max-width: 900px; }
.changes li { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 4px; color: var(--muted); font-size: 0.92rem; }
.changes li > b { color: var(--text); font-weight: 600; }
.changes li .chg b { color: var(--text); }
.changes li small { color: var(--faint); font-size: 0.8rem; }
.changes li.none { border-style: dashed; }
.changes .pill { justify-self: start; display: inline-block; font: 600 0.68rem/1 var(--mono); padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line-strong); }
.changes .pill.p2 { border-color: var(--cyan); color: var(--cyan); }
.changes .pill.p1 { border-color: var(--amber); color: var(--amber); }
.calc-stack { display: flex; gap: 2px; height: 26px; border-radius: 6px; overflow: hidden; margin: 4px 0 8px; }
.calc-stack i { display: block; min-width: 2px; }
.calc-h { font: 600 0.86rem var(--body); color: var(--muted); margin: 20px 0 8px; }
#c-calc { height: auto; }
.changes table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 0.86rem; }
.changes th { text-align: left; font-weight: 500; color: var(--faint); padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line-strong); }
.changes td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text); }
.changes td small { display: block; margin-top: 4px; }
.changes td .pill { margin-right: 4px; }

/* share dialog */
.share-dlg { width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--panel, #0d1424); color: var(--text); padding: 20px 22px; }
.share-dlg::backdrop { background: rgba(2, 5, 12, 0.72); }
.share-dlg h3 { font: 700 1.15rem var(--display, inherit); margin: 0 0 12px; }
.share-prev { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); min-height: 120px; display: grid; place-items: center; color: var(--faint); font-size: 0.86rem; }
.share-prev canvas { display: block; width: 100%; height: auto; }
.share-dlg label { display: block; font-size: 0.82rem; color: var(--muted); margin: 14px 0 6px; }
.share-dlg textarea { width: 100%; box-sizing: border-box; background: var(--bg); color: var(--text); border: 1px solid var(--line-strong); border-radius: 8px; padding: 9px 11px; font: 400 0.95rem/1.45 var(--body); resize: vertical; }
.share-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.share-acts button { all: unset; box-sizing: border-box; cursor: pointer; font: 600 0.84rem/1 var(--body); color: var(--bg); background: var(--cyan); border-radius: 999px; padding: 9px 14px; }
.share-acts button[data-do="copy"], .share-acts button[data-do="png"], .share-acts button[data-do="vid"], .share-acts button.ghost { background: none; color: var(--text); border: 1px solid var(--line-strong); }
.share-acts button[disabled] { opacity: 0.5; cursor: default; } .share-acts button[hidden] { display: none; }
.share-acts button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.share-note { min-height: 1.4em; margin: 10px 0 0; font-size: 0.84rem; color: var(--cyan); }
.share-fine { margin: 6px 0 0; font-size: 0.78rem; color: var(--faint); }
