/* ==========================================================
   Recovery without return: companion site stylesheet.
   Light mode only. One finding line and one figure per page,
   numbers in hover, reading aids folded away. The paper's figure
   palette (navy, deep pink, deep green, grays; no light blue, no
   orange), so the site and the manuscript read as one system.
   Serif for titles and large numbers, sans for what a reader
   operates.
   ========================================================== */

:root {
  --navy: #16385c;
  --pink: #a8325e;
  --green: #2f6b4f;
  --wine: #7b1e3b;
  --gray: #8c8c8c;
  --gray-dark: #595959;
  --ink: #14181d;
  --body: #2a2f36;
  --muted: #626a75;
  --rule: #d5dae0;
  --rule-soft: #e9ecef;
  --paper: #ffffff;
  --wash: #f5f6f7;
  --wash-2: #eceef0;
  --pale-navy: #dce6f0;
  --pale-pink: #f3dde5;
  --pale-green: #dfeadf;
  --pale-gray: #ececec;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: Consolas, "SFMono-Regular", Menlo, monospace;

  --w-wide: 78rem;
  --gutter: 1.5rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; font-weight: 600; }
a { color: var(--navy); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 99; background: var(--paper); padding: .5rem .8rem; }
button:focus-visible, a:focus-visible, select:focus, input:focus, summary:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

/* ------------------------------------------------ masthead and tabs */

.masthead { border-top: 4px solid var(--navy); }
.masthead-inner {
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: 1rem var(--gutter) .5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .1rem 1.3rem;
}
.homelink {
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1.15;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -.005em;
  white-space: nowrap;
}
.homelink:hover { color: var(--navy); }
.crumb { flex: 1 1 18rem; min-width: 0; font-size: .9rem; color: var(--muted); margin: 0; }

.sitenav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--rule);
}
.sitenav-inner { max-width: var(--w-wide); margin: 0 auto; padding: 0 var(--gutter); overflow-x: auto; scrollbar-width: none; }
.sitenav-inner::-webkit-scrollbar { display: none; }
.sitenav ul { display: flex; gap: 1.45rem; list-style: none; margin: 0; padding: 0; white-space: nowrap; }
.sitenav a {
  display: block;
  font-size: .86rem;
  color: var(--muted);
  text-decoration: none;
  padding: .7rem 0 .6rem;
  border-bottom: 2px solid transparent;
}
.sitenav a:hover { color: var(--ink); }
.sitenav a.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--pink); }

/* ------------------------------------------------ page */

main { display: block; }
.section { max-width: var(--w-wide); margin: 0 auto; padding: 1.3rem var(--gutter) 2.5rem; }
.lede { margin: 0 0 1rem; max-width: 62rem; }
.lede h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.22;
  letter-spacing: -.005em;
  margin: 0 0 .45rem;
}
.finding { font-size: 1rem; color: var(--body); margin: 0; min-height: 1.5em; max-width: 56rem; }
.finding b { color: var(--ink); font-weight: 600; }
.finding .rwr { color: var(--pink); font-weight: 600; }

.chart-block { margin: 0; }

.foot {
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: 1.2rem var(--gutter) 2.4rem;
  border-top: 1px solid var(--rule-soft);
}
.foot p { font-size: .76rem; color: var(--muted); margin: 0; max-width: 64rem; line-height: 1.55; }

h3.rule {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.22rem;
  margin: 2.4rem 0 .35rem;
  padding-top: .9rem;
  border-top: 1px solid var(--rule);
}
p.sub { font-size: .9rem; color: var(--muted); margin: 0 0 .9rem; max-width: 52rem; }

/* ------------------------------------------------ reading aids */

.howto { margin: 1.4rem 0 0; border-top: 1px solid var(--rule-soft); padding-top: .6rem; max-width: 62rem; }
.howto summary { cursor: pointer; font-size: .84rem; color: var(--navy); font-weight: 600; }
.howto ul { margin: .6rem 0 .2rem; padding-left: 1.1rem; font-size: .88rem; }
.howto li { margin: .2rem 0; }
.howto dl { display: grid; grid-template-columns: minmax(9rem, 14rem) minmax(0, 1fr); gap: .3rem 1.2rem; margin: .7rem 0 0; font-size: .84rem; }
.howto dt { color: var(--ink); font-weight: 600; }
.howto dd { margin: 0; color: var(--body); }
@media (max-width: 700px) {
  .howto dl { grid-template-columns: 1fr; gap: .05rem; }
  .howto dd { margin-bottom: .45rem; }
}

/* ------------------------------------------------ controls */

.controls { display: flex; flex-wrap: wrap; gap: .7rem 1.3rem; align-items: flex-end; margin: 0 0 .9rem; }
.control { display: flex; flex-direction: column; gap: .28rem; min-width: 0; }
.control > .label { font-size: .74rem; color: var(--muted); }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; max-width: 100%; }
.seg button {
  font-family: var(--sans);
  font-size: .8rem;
  border: 0;
  border-right: 1px solid var(--rule);
  background: var(--paper);
  color: var(--body);
  padding: .36rem .72rem;
  cursor: pointer;
  line-height: 1.25;
}
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--wash); }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.seg.swatch button[aria-pressed="true"] { background: var(--paper); color: var(--ink); font-weight: 600; box-shadow: inset 0 -3px 0 var(--sw, var(--navy)); }
.btn-quiet {
  font-family: var(--sans);
  font-size: .8rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--body);
  border-radius: 4px;
  padding: .34rem .75rem;
  cursor: pointer;
  line-height: 1.25;
}
.btn-quiet:hover { background: var(--wash); }
.btn-quiet[aria-pressed="true"] { border-color: var(--navy); color: var(--navy); font-weight: 600; }

/* ------------------------------------------------ figures */

.figure { width: 100%; position: relative; }
.figure svg { display: block; width: 100%; height: auto; overflow: visible; }
.figure text { font-family: var(--sans); fill: var(--ink); }
.panelgrid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(16rem, 1fr); gap: 2rem; align-items: start; }
.panelgrid.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.panelgrid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }

.legend { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; font-size: .78rem; color: var(--body); margin: .55rem 0 0; }
.legend .item { display: inline-flex; align-items: center; gap: .38rem; }
.legend .swatch { width: 1.15rem; height: 3px; display: inline-block; }
.legend .swatch.dash { background: repeating-linear-gradient(90deg, currentColor 0 4px, transparent 4px 7px) !important; height: 2px; }
.legend .sq { width: .7rem; height: .7rem; display: inline-block; border: .5px solid var(--ink); }
.legend .ring { width: .62rem; height: .62rem; border-radius: 50%; display: inline-block; border: 1.5px solid var(--ink); background: #fff; }
.legend .hatch { width: .9rem; height: .7rem; display: inline-block; border: .5px solid var(--gray); background: repeating-linear-gradient(-45deg, #fff 0 2px, #b5b5b5 2px 3px); }
.figure .legend svg { width: 1.7rem; height: auto; display: inline-block; overflow: visible; }
.legend .note { color: var(--muted); }

/* the side card: the number being read and its context */
.sidecard { border-left: 2px solid var(--navy); padding: .1rem 0 .1rem 1.1rem; }
.sidecard h4 { font-family: var(--serif); font-size: 1.1rem; font-weight: 400; color: var(--ink); margin: 0 0 .5rem; }
.sidecard p { font-size: .86rem; margin: 0 0 .6rem; }
.bignum {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 3.1rem);
  line-height: 1;
  color: var(--ink);
  letter-spacing: -.015em;
  font-variant-numeric: tabular-nums lining-nums;
}
.bignum.pink { color: var(--pink); }
.bignum small { font-size: .38em; color: var(--muted); letter-spacing: 0; margin-left: .3rem; }
.what { font-size: .86rem; color: var(--body); margin: .35rem 0 .9rem; max-width: 24rem; }
.sidecard dl { margin: .2rem 0 0; font-size: .84rem; display: grid; grid-template-columns: 1fr auto; gap: .25rem .9rem; }
.sidecard dt { color: var(--muted); }
.sidecard dd { margin: 0; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* panel heads, the seven-state bar, mini bars, season cards */
.panel-head { display: flex; justify-content: space-between; align-items: baseline; font-size: .86rem; border-bottom: 1px solid var(--rule-soft); padding-bottom: .25rem; margin-bottom: .2rem; }
.panel-head b { color: var(--ink); }
.panel-head span { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.reading-strip { margin: 1.2rem 0 0; padding: .8rem 1rem .7rem; background: var(--wash); border-radius: 4px; }
.reading-head { font-size: .88rem; margin: 0 0 .5rem; }
.stackbar { display: flex; height: 1.9rem; border: .5px solid var(--ink); border-radius: 3px; overflow: hidden; background: #fff; }
.stackbar i { display: flex; align-items: center; justify-content: center; border-right: .5px solid var(--ink); transition: width .5s ease; min-width: 0; }
.stackbar i:last-child { border-right: 0; }
.stackbar span { font-size: .74rem; font-weight: 600; color: var(--ink); font-style: normal; white-space: nowrap; }
.minibars { margin: 0 0 1rem; }
.minibars .lab { font-size: .78rem; color: var(--muted); margin: 0 0 .35rem; }
.minibar { display: grid; grid-template-columns: 7.2rem 1fr 2.6rem; gap: .5rem; align-items: center; font-size: .78rem; margin: .18rem 0; }
.minibar .k { color: var(--body); }
.minibar .t { height: .6rem; background: var(--pale-gray); border: .5px solid var(--ink); position: relative; }
.minibar .t i { position: absolute; left: 0; top: 0; bottom: 0; }
.minibar b { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.seasons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem 1.2rem; }
.season { display: flex; flex-direction: column; gap: .1rem; border-top: 2px solid var(--ink); padding-top: .35rem; }
.season b { font-size: .86rem; color: var(--ink); }
.season .meta { font-size: .74rem; color: var(--muted); }
@media (max-width: 960px) { .seasons { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .seasons { grid-template-columns: 1fr; } }

/* ------------------------------------------------ the recovery matrix (Figure 1) */

.matrix { display: grid; grid-template-columns: 5.4rem 1fr 1fr; gap: .32rem; font-size: .8rem; margin: .3rem 0 .4rem; }
.matrix .mh { color: var(--muted); font-size: .74rem; align-self: end; text-align: center; padding-bottom: .1rem; }
.matrix .rh { color: var(--muted); font-size: .74rem; align-self: center; text-align: right; padding-right: .3rem; }
.matrix .cell {
  position: relative;
  border: .5px solid var(--ink);
  border-radius: 5px;
  padding: .5rem .55rem .45rem;
  min-height: 4.7rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: default;
  transition: box-shadow .2s ease, transform .2s ease;
}
.matrix .cell .v { font-family: var(--serif); font-size: 1.75rem; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.matrix .cell .n { font-size: .74rem; color: var(--body); line-height: 1.25; }
.matrix .cell.rt { border-width: 2px; }
.matrix .cell.rt .tag {
  position: absolute; top: -.62rem; right: .5rem;
  font-size: .68rem; font-weight: 700; color: var(--ink);
  background: #fff; border: .5px solid var(--ink); border-radius: 999px; padding: 0 .45rem; line-height: 1.35;
}
.matrix .cell.cl { grid-column: 2 / span 2; min-height: 3.1rem; flex-direction: row; align-items: center; gap: .8rem; }
.matrix .cell.cl .v { font-size: 1.45rem; }
.matrix .cell.lit { box-shadow: 0 0 0 2px var(--ink); }

/* ------------------------------------------------ forest plots */

.forest { font-size: .84rem; margin: .4rem 0 0; }
.forest-row { display: grid; grid-template-columns: minmax(12rem, 1.35fr) minmax(9rem, 1fr) minmax(9.5rem, auto); gap: .9rem; align-items: center; padding: .28rem 0; border-bottom: 1px solid var(--rule-soft); }
.forest-row:hover { background: var(--wash); }
.forest-axis { border-bottom: 1px solid var(--rule); color: var(--muted); font-size: .74rem; padding-bottom: .4rem; }
.forest-axis:hover { background: none; }
.forest-head { font-weight: 600; color: var(--ink); font-size: .82rem; padding: .8rem 0 .2rem; }
.f-label { line-height: 1.3; color: var(--ink); }
.f-status { display: block; font-size: .72rem; color: var(--muted); }
.f-plot { position: relative; height: 1.1rem; }
.forest-axis .f-plot { height: 1rem; }
.f-tick { position: absolute; transform: translateX(-50%); top: 0; font-variant-numeric: tabular-nums; }
.f-ref { position: absolute; top: -.3rem; bottom: -.3rem; width: 1px; background: var(--gray); transform: translateX(-.5px); }
.f-ci { position: absolute; top: 50%; height: 2px; transform: translateY(-50%); border-radius: 1px; }
.f-dot { position: absolute; top: 50%; width: .68rem; height: .68rem; border-radius: 50%; border: 1.5px solid; transform: translate(-50%, -50%); }
.f-dot.key { position: static; display: inline-block; transform: none; }
.f-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.forest-foot { font-size: .74rem; color: var(--muted); padding-top: .35rem; }
.forest-row.key .f-label { font-weight: 600; }
.forest.compact .forest-row { grid-template-columns: minmax(9rem, 1fr) minmax(7rem, 1fr) minmax(8.5rem, auto); }
@media (max-width: 640px) {
  .forest-row { grid-template-columns: 1fr auto; gap: .2rem .6rem; }
  .forest-row .f-label { grid-column: 1 / span 2; }
  .forest-row .f-plot { grid-column: 1; }
  .forest-axis .f-label, .forest-axis .f-val { display: none; }
  .forest-axis .f-plot { grid-column: 1; }
}

/* ------------------------------------------------ small tables */

.dtable { width: 100%; border-collapse: collapse; font-size: .82rem; margin-top: .5rem; }
.dtable th, .dtable td { text-align: right; padding: .34rem .5rem; border-bottom: 1px solid var(--rule-soft); font-variant-numeric: tabular-nums; vertical-align: top; }
.dtable th:first-child, .dtable td:first-child { text-align: left; padding-left: 0; }
.dtable thead th { color: var(--muted); font-weight: 400; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.dtable tbody tr:last-child td { border-bottom: none; }
.dtable.text th, .dtable.text td { text-align: left; }
.dtable td.pill-cell { white-space: nowrap; }
.tablewrap { overflow-x: auto; }
.pill { display: inline-block; font-size: .7rem; border-radius: 999px; padding: .02rem .5rem; border: 1px solid var(--rule); color: var(--body); white-space: nowrap; }
.pill.pass { border-color: var(--green); color: var(--green); }
.pill.desc { border-color: var(--gray); color: var(--gray-dark); }
.pill.miss { border-color: var(--pink); color: var(--pink); }

/* ------------------------------------------------ data page */

.lab-strong { font-size: .84rem; font-weight: 600; color: var(--ink); margin: 0 0 .3rem; }
.factrow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.2rem; margin: .3rem 0 .9rem; }
.fact { border-top: 2px solid var(--ink); padding-top: .4rem; }
.fact .bignum { display: block; font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 400; }
.fact span { font-size: .82rem; color: var(--body); }
dl.defs { display: grid; grid-template-columns: minmax(10rem, 15rem) minmax(0, 1fr); gap: .45rem 1.4rem; font-size: .88rem; margin: 0; max-width: 64rem; }
dl.defs dt { color: var(--ink); font-weight: 600; }
dl.defs dd { margin: 0; }
ul.plain { margin: 0; padding-left: 1.1rem; font-size: .9rem; max-width: 62rem; }
ul.plain li { margin: .3rem 0; }
code { font-family: var(--mono); font-size: .86em; background: var(--wash); padding: .08em .35em; border-radius: 3px; }
@media (max-width: 760px) {
  .factrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  dl.defs { grid-template-columns: 1fr; gap: .1rem; }
  dl.defs dd { margin-bottom: .5rem; }
}

/* ------------------------------------------------ owner cards (Figure 7) */

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.card { border: .5px solid var(--ink); border-radius: 8px; overflow: hidden; background: #fff; }
.card-head { color: #fff; padding: .7rem .9rem .6rem; }
.card-head h4 { color: #fff; margin: 0; font-size: 1rem; }
.card-head p { margin: .1rem 0 0; font-size: .8rem; opacity: .92; }
.card-body { padding: .7rem .9rem .9rem; }
.card-body .lab { font-size: .74rem; color: var(--muted); margin: .45rem 0 .3rem; }
.bars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.bar { font-size: .74rem; color: var(--muted); }
.bar b { display: block; font-size: .95rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.bar .track { height: .55rem; background: var(--pale-gray); border: .5px solid var(--ink); margin: .2rem 0 .15rem; position: relative; }
.bar .fill { position: absolute; left: 0; top: 0; bottom: 0; transition: width .6s ease; }
.gap { font-size: .8rem; margin-top: .7rem; border-top: 1px solid var(--rule-soft); padding-top: .5rem; color: var(--body); }
.gap b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------ the surfaces grid (Figure 6) */

.grid8 svg text { font-variant-numeric: tabular-nums; }
.scale-bar { display: flex; align-items: center; gap: .5rem; font-size: .74rem; color: var(--muted); margin: .5rem 0 0; }
.scale-bar i { display: block; height: .55rem; width: 9rem; border: .5px solid var(--ink); }

/* ------------------------------------------------ tooltip */

.tooltip {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  opacity: 0;
  transition: opacity .09s ease-out;
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: .45rem .6rem;
  font-size: .8rem;
  color: var(--body);
  max-width: 19rem;
  line-height: 1.4;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
}
.tooltip.on { opacity: 1; }
.tooltip .t-title { font-weight: 600; color: var(--ink); margin-bottom: .2rem; }
.tooltip .t-row { display: flex; justify-content: space-between; gap: 1.1rem; font-variant-numeric: tabular-nums; }
.tooltip .t-row span:last-child { color: var(--ink); font-weight: 600; text-align: right; }
.tooltip .t-note { color: var(--muted); margin-top: .3rem; }

/* ------------------------------------------------ loading and errors */

.loading { display: flex; flex-direction: column; gap: .8rem; min-height: 22rem; justify-content: center; align-items: center; font-size: .86rem; color: var(--muted); }
.loading-bar { display: block; width: 9rem; height: 2px; background: var(--wash-2); overflow: hidden; position: relative; }
.loading-bar::after { content: ""; position: absolute; left: -40%; width: 40%; height: 100%; background: var(--navy); animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { to { left: 100%; } }
.errorbox { font-size: .88rem; color: var(--pink); border: 1px solid var(--pink); padding: 1rem 1.1rem; }
.errorbox code { font-family: var(--mono); color: var(--ink); background: var(--wash); padding: .1em .35em; }

/* ------------------------------------------------ tour control */

.tour { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 1rem; min-height: 2.2rem; border-bottom: 1px solid var(--rule-soft); padding-bottom: .55rem; }
.tour-cap { flex: 1 1 auto; min-width: 0; font-family: var(--serif); font-size: 1.06rem; color: var(--ink); }
.tour-btn {
  position: relative;
  flex: 0 0 auto;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  color: var(--navy);
  background: var(--paper);
  border: 1px solid var(--navy);
  border-radius: 999px;
  padding: .28rem .95rem;
  min-width: 6.2rem;
  cursor: pointer;
  overflow: hidden;
  line-height: 1.4;
}
.tour-btn:hover { background: var(--wash); }
.tour.on { position: sticky; top: 2.55rem; z-index: 35; background: rgba(255, 255, 255, .97); padding-top: .45rem; }
.tercile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; align-content: start; }
.tercile b { display: block; font-size: .86rem; margin-bottom: .45rem; color: var(--ink); }
.tercile .minibar { grid-template-columns: 6.6rem 1fr 2.4rem; }
@media (max-width: 760px) { .tercile-grid { grid-template-columns: 1fr; } }
.tour-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--navy); transform-origin: 0 50%; transform: scaleX(0); }
.tour.on .tour-bar { background: var(--pink); }

/* emphasis the figures and the tour use */
.dim { opacity: .2; transition: opacity .3s ease; }
.figure .lot { transition: opacity .3s ease; }
.lot-house path.roof-front, .lot-house path.roof-back { transition: fill .55s ease; }

/* ------------------------------------------------ map */

.mapwrap { position: relative; border: 1px solid var(--rule-soft); background: #fbfbfb; border-radius: 4px; overflow: hidden; touch-action: none; }
.mapwrap svg { display: block; width: 100%; height: auto; cursor: grab; overflow: hidden; }
.mapkey .lab { font-size: .78rem; color: var(--muted); margin: .9rem 0 .3rem; }
.keyrow { display: grid; grid-template-columns: .8rem 1fr auto; gap: .5rem; font-size: .8rem; align-items: center; margin: .18rem 0; }
.keyrow .sq { width: .8rem; height: .8rem; display: inline-block; border: .5px solid var(--ink); }
.keyrow b { font-variant-numeric: tabular-nums; color: var(--ink); }
.seg button:disabled { color: #b8bec6; cursor: not-allowed; background: var(--paper); }
.mapwrap svg.drag { cursor: grabbing; }
.mapbtns { position: absolute; right: .6rem; top: .6rem; display: flex; flex-direction: column; gap: .3rem; }
.mapbtns button { width: 2rem; height: 2rem; border: 1px solid var(--rule); background: #fff; border-radius: 4px; font-size: 1rem; color: var(--ink); cursor: pointer; line-height: 1; }
.mapbtns button:hover { background: var(--wash); }
.mapbtns button.wide { width: auto; padding: 0 .55rem; font-size: .74rem; }
.tract { transition: fill .35s ease, opacity .35s ease; }
.storm-glyph { pointer-events: none; }

/* ------------------------------------------------ responsive */

@media (max-width: 960px) {
  .panelgrid, .panelgrid.even { grid-template-columns: 1fr; }
  .panelgrid.three, .cards { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --gutter: 1rem; }
  .homelink { font-size: 1.3rem; }
  .sitenav ul { gap: 1.05rem; }
  .tour { flex-wrap: wrap; }
  .tour-cap { font-size: 1rem; }
  .matrix { grid-template-columns: 4.3rem 1fr 1fr; }
  .matrix .cell .v { font-size: 1.45rem; }
}

@media (prefers-reduced-motion: reduce) {
  .loading-bar::after { animation: none; left: 0; width: 100%; opacity: .4; }
  .dim, .tract, .bar .fill, .lot-house path { transition: none !important; }
}

@media print {
  .sitenav, .tooltip, .tour, .mapbtns { display: none; }
  .howto { display: none; }
}

/* a side card that sits under a full-width figure */
.sidecard.wide { margin-top: 1.2rem; display: grid; grid-template-columns: minmax(14rem, 22rem) minmax(0, 1fr); gap: .4rem 2rem; align-items: start; }
.sidecard.wide h4 { grid-column: 1 / -1; }
@media (max-width: 760px) { .sidecard.wide { grid-template-columns: 1fr; } }

/* wide figures keep a legible minimum width and scroll sideways on a phone */
.scrollx { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 760px) {
  .scrollx > svg { min-width: 640px; }
  .scrollx.wide > svg { min-width: 760px; }
}
