/* deepearth.ai/plant-habitats: the results page of DeepEarth's native habitat maps. The viewer's room (white ground,
 * black ink, hairlines; Oxygen for structure and data, Cormorant Garamond for what reads as drawn), set as the
 * Ecological.dev investment memo sets a document: one reading column, generous rhythm, bold first sentences. The one
 * accent is the viewer's viridis teal, used only for the deployed model. */

:root {
  --ink: #111; --dim: #666; --faint: #9a9a9a; --line: rgba(0,0,0,.14); --line-strong: rgba(0,0,0,.4); --hair: #ececec;
  --bg: #fff; --sans: 'Oxygen', system-ui, sans-serif; --serif: 'Cormorant Garamond', Georgia, serif;
  --accent: #21918c; --col: 720px; --wide: 1120px; --gut: 24px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body { font-weight: 300; line-height: 1.7; font-size: 16px; }
button { font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: underline; text-decoration-thickness: .5px; text-decoration-color: #c8c8c8; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 3px; }
b, strong { font-weight: 700; color: #000; }
sup { font-size: .68em; line-height: 0; }
.skip { position: absolute; left: -9999px; top: 8px; background: #000; color: #fff; padding: 6px 12px; z-index: 9999; }
.skip:focus { left: 8px; }

.col { max-width: calc(var(--col) + 2 * var(--gut)); margin-left: auto; margin-right: auto; padding-left: var(--gut); padding-right: var(--gut); }
.wide { max-width: calc(var(--wide) + 2 * var(--gut)); margin-left: auto; margin-right: auto; padding-left: var(--gut); padding-right: var(--gut); }
main p { margin: 0 0 1.15rem; font-size: 1.05rem; line-height: 1.75; color: #1c1c1c; }

/* ── the brand, as the viewer's (#brand, the hairline (i) button, the credit line) ─────────────────────── */
.masthead { padding-top: 6vh; display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
#brand .nw { white-space: nowrap; }
#brand h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 2rem; line-height: 1.05; letter-spacing: .005em; color: #000; }
#brand h1 b { font-weight: 600; }
#brand h1 i { font-style: italic; font-weight: 400; }
.hood-btn { box-sizing: border-box; width: 21px; height: 21px; min-width: 21px; border: 1px solid #c4c4c4; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; font-family: var(--serif); font-style: italic; font-size: .92rem; line-height: 1; color: #888;
  background: rgba(255,255,255,.7); transition: border-color .18s, color .18s; margin-left: .55rem; vertical-align: .32em; }
.hood-btn:hover, .hood-btn[aria-expanded="true"], .hood-btn:focus-visible { border-color: #000; color: #000; outline: none; }
.credit-line { margin: .55rem 0 0; font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: #888; }
.credit-line a { color: #888; text-decoration: none; border-bottom: 1px solid #ddd; }
.credit-line a:hover { color: #111; border-bottom-color: #111; }
.credit-line i { font-family: var(--serif); font-size: .82rem; letter-spacing: .02em; text-transform: none; }
.prelim { margin: 1.1rem 0 0; color: #8a5a00; font-size: .56rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 400; }

/* ── the ten-second read ──────────────────────────────────────────────────────────────────────────────────── */
.hero { padding-top: 10vh; }
.elevator { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(2.05rem, 5.2vw, 3.25rem); line-height: 1.1;
  letter-spacing: -.005em; margin: 0 0 1.6rem; color: #0a0a0a; text-wrap: balance; }
.lede { font-size: 1.16rem !important; line-height: 1.7 !important; color: #222 !important; font-weight: 400; }
.lede a { text-decoration-color: #999; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 2.6rem 0 0; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; }
.metric { padding: 1.35rem .9rem 1.2rem; text-align: center; border-right: 1px solid var(--hair); min-width: 0; }
.metric:last-child { border-right: none; }
.mv { font-family: var(--serif); font-weight: 600; font-size: clamp(1.9rem, 4.2vw, 2.6rem); line-height: 1; font-feature-settings: "lnum" 1, "tnum" 1; color: #000; white-space: nowrap; }
.mv .u { font-size: .5em; font-weight: 400; margin-left: .12em; letter-spacing: .02em; }
.mv sup { font-size: .5em; vertical-align: .9em; }
.ml { margin-top: .6rem; font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: #777; line-height: 1.45; font-weight: 400; }
.ml .lc { text-transform: none; letter-spacing: .06em; }
.ms { margin-top: .25rem; font-size: .74rem; line-height: 1.4; color: #888; }
.metrics.small { margin: 2rem 0 .4rem; }
.metrics.small .mv { font-size: clamp(1.5rem, 3.4vw, 2rem); }

/* ── sections: a number and a word, then the serif title (the memo's rhythm) ─────────────────────────────── */
.sec { margin-top: 8.5rem; }
.sec.sub { margin-top: 5rem; }
.sec-label { display: flex; align-items: baseline; gap: .9rem; margin: 0 0 .35rem !important; font-size: .62rem !important; letter-spacing: .3em;
  text-transform: uppercase; color: #999 !important; font-weight: 400; }
.sec-label span { font-family: var(--serif); font-size: 1.15rem; letter-spacing: .02em; color: #111; font-weight: 600; font-feature-settings: "lnum" 1; }
.sec-label::after { content: ''; flex: 1; height: 1px; background: var(--hair); transform: translateY(-.25em); }
.sec-title { font-family: var(--serif); font-weight: 600; font-size: clamp(1.9rem, 4vw, 2.45rem); line-height: 1.15; margin: 0 0 1.4rem; color: #000; }
.sec.sub .sec-title { font-size: clamp(1.55rem, 3.2vw, 1.95rem); margin-bottom: 1rem; }

/* key results: deepearth.ai's numbered contributions */
.contrib { list-style: none; counter-reset: c; padding: 0; margin: 2rem 0 0; }
.contrib li { position: relative; padding-left: 3.5rem; margin: 0 0 1.55rem; font-size: 1.05rem; line-height: 1.7; color: #2a2a2a; }
.contrib li::before { counter-increment: c; content: counter(c); position: absolute; left: 0; top: .05rem; width: 2.25rem; height: 2.25rem;
  border: 1.5px solid #111; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--serif);
  font-weight: 700; font-size: 1.45rem; line-height: 1; font-feature-settings: "lnum" 1; padding-bottom: .06em; color: #111; }

/* ── figures ──────────────────────────────────────────────────────────────────────────────────────────────── */
.fig { margin: 3.2rem auto 0; }
.fig.wide { margin-top: 3.4rem; }
.fig + .col, .fig + section.col { margin-top: 2.8rem; }
.fig:not(.wide) { max-width: calc(var(--col) + 2 * var(--gut)); padding: 0 var(--gut); }
.hero-fig { margin-top: 5.5rem; }
.cap { margin-top: 1.1rem !important; font-family: var(--serif); font-style: italic; font-size: 1.04rem; line-height: 1.5; color: #666; text-wrap: pretty; }
.cap .fnum { font-family: var(--sans); font-style: normal; font-weight: 700; font-size: .82rem; color: #111; letter-spacing: .02em; margin-right: .2rem; }
.cap i { font-style: normal; }
.panels { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 34px; }
.panel { flex: 0 1 auto; min-width: 0; }
.chart-wrap + .chart-wrap { margin-top: 1.6rem; }
svg.chart { display: block; max-width: 100%; height: auto; overflow: visible; margin: 0 auto; }
svg.chart text { fill: #333; }
svg.chart .grid { stroke: #efefef; stroke-width: 1; }
svg.chart .tk { fill: #9a9a9a; font-size: 10px; font-variant-numeric: tabular-nums; }
svg.chart .ax { fill: #777; font-size: 10.5px; letter-spacing: .02em; }
svg.chart .pt { fill: #111; font-weight: 700; font-size: 12px; }
svg.chart .pt-lg { font-size: 12.5px; letter-spacing: .01em; }
svg.chart.phone { display: none; }
svg.chart .ps { fill: #888; font-size: 10.5px; }
svg.chart .diag { stroke: #bdbdbd; stroke-width: 1; stroke-dasharray: 3 3; }
svg.chart .pt-dot { fill: var(--accent); fill-opacity: .72; stroke: #fff; stroke-width: 1; cursor: default; transition: fill-opacity .15s; }
svg.chart .pt-dot:hover { fill-opacity: 1; stroke: #111; }
svg.chart .med { stroke: #111; stroke-width: 2; fill: none; stroke-linecap: round; }
svg.chart .sp-line { fill: none; stroke: #000; stroke-opacity: .13; stroke-width: 1; transition: stroke-opacity .12s; }
svg.chart .sp-line:hover { stroke: var(--accent); stroke-opacity: 1; stroke-width: 2; }
svg.chart .med-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; pointer-events: none; }
svg.chart .iqr { stroke-width: 6; stroke-linecap: round; stroke-opacity: .28; }
svg.chart .med-dot { stroke: #fff; stroke-width: 2; }
svg.chart .val { fill: #111; font-weight: 700; font-size: 11px; font-variant-numeric: tabular-nums; }
svg.chart .xl { fill: #333; font-size: 11px; }
svg.chart .xs { fill: #8a8a8a; font-size: 10px; font-variant-numeric: tabular-nums; }
svg.chart .mk { fill: var(--accent); stroke: #fff; stroke-width: 1.5; }
svg.chart .lg { fill: #555; font-size: 11px; }
svg.chart .chance { stroke: #999; stroke-width: 1; stroke-dasharray: 2 3; }
svg.chart .gh { fill: #111; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
svg.chart .rl { fill: #444; font-size: 11.5px; }
svg.chart .rl0 { fill: #444; font-size: 12px; }
svg.chart .stem { stroke-width: 2; stroke-opacity: .35; }
svg.chart .zero { stroke: #111; stroke-width: 1; }
svg.chart [data-tip] { cursor: default; }
#tip { position: fixed; z-index: 5000; max-width: 280px; padding: 7px 10px 6px; background: #111; color: #fff; font-size: .7rem; line-height: 1.45;
  pointer-events: none; box-shadow: 0 6px 18px rgba(0,0,0,.18); font-variant-numeric: tabular-nums; font-weight: 400; }
#tip b { color: #fff; font-family: var(--serif); font-style: italic; font-size: .95rem; font-weight: 400; display: block; margin-bottom: 1px; }

/* ── tables ───────────────────────────────────────────────────────────────────────────────────────────────── */
.tables2 { display: grid; gap: 1.6rem; margin: 2rem 0 0; }
table.data { width: 100%; border-collapse: collapse; font-size: .86rem; font-variant-numeric: tabular-nums; }
table.data caption { text-align: left; font-family: var(--serif); font-style: italic; font-size: 1.08rem; color: #444; padding-bottom: .45rem; }
table.data th { text-align: left; font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: #888; font-weight: 700;
  padding: .55rem .55rem .5rem; border-bottom: 1.5px solid #111; vertical-align: bottom; white-space: nowrap; }
table.data td { padding: .6rem .55rem; border-bottom: 1px solid #eee; color: #555; vertical-align: top; }
table.data th:first-child, table.data td:first-child { padding-left: 0; }
table.data th:last-child, table.data td:last-child { padding-right: 0; }
table.data .n { text-align: right; }
table.data td.win { color: #000; font-weight: 700; }
table.data td.p { font-size: .76rem; color: #888; white-space: nowrap; }
table.data .sub, table.mini .sub { display: block; font-size: .64rem; font-weight: 400; letter-spacing: .02em; text-transform: none; color: #999; white-space: nowrap; }
table.ladder { margin-top: 2.6rem; }
table.ladder td:first-child { color: #222; }
table.ladder td .sub { white-space: normal; }
.sw { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .55rem; vertical-align: .05em; }
.tnote { font-size: .86rem !important; line-height: 1.65 !important; color: #777 !important; margin-top: 1rem !important; }

/* ── maps: the same window, three ways ───────────────────────────────────────────────────────────────────── */
.tri { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tri-cell { margin: 0; min-width: 0; }
.tri-cell .zoomable { display: block; width: 100%; cursor: zoom-in; }
.tri-cell img { display: block; width: 100%; height: auto; border: 1px solid #eee; background: #fff; }
.tri-cell figcaption { margin-top: .5rem; font-size: .7rem; line-height: 1.35; color: #888; }
.tri-cell figcaption b { display: block; font-size: .74rem; color: #111; }
.tri-cell.is-joint figcaption b::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: .45rem; vertical-align: .06em; }
.ramp { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem .55rem; margin-top: .7rem; font-size: .62rem; color: #888; }
.ramp i { display: inline-block; width: 120px; height: 7px; border-radius: 2px; background: linear-gradient(90deg, #440154, #3b528b, #21918c, #5ec962, #fde725); }
.ramp em { font-family: var(--serif); font-size: .86rem; color: #999; margin-left: .4rem; }
.tri-missing { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border: 1px dashed #ddd; color: #aaa; font-family: var(--serif); font-style: italic; }

/* featured species and the live viewer */
.featured { margin-top: 3rem; padding-left: 0; padding-right: 0; }
.sp-eyebrow { margin: 0 0 .35rem !important; font-size: .62rem !important; letter-spacing: .2em; text-transform: uppercase; color: #888 !important; font-weight: 400; }
.sp-name { margin: 0 0 .7rem; font-family: var(--serif); font-weight: 400; font-size: 1.85rem; line-height: 1.12; }
.sp-name i { font-style: italic; }
.sp-name .common { display: block; font-family: var(--sans); font-size: .82rem; letter-spacing: .04em; color: #555; margin-top: .25rem; }
.sp-why { font-size: .98rem !important; line-height: 1.65 !important; color: #333 !important; }
table.mini { width: 100%; border-collapse: collapse; font-size: .74rem; font-variant-numeric: tabular-nums; margin: .4rem 0 0; }
table.mini th { text-align: left; font-size: .54rem; letter-spacing: .12em; text-transform: uppercase; color: #999; font-weight: 700; padding: 0 .35rem .35rem; border-bottom: 1px solid #111; vertical-align: bottom; }
table.mini td { padding: .38rem .35rem; border-bottom: 1px solid #f0f0f0; color: #666; }
table.mini th:first-child, table.mini td:first-child { padding-left: 0; }
table.mini th:last-child, table.mini td:last-child { padding-right: 0; }
table.mini .n { text-align: right; }
table.mini td.win { color: #000; font-weight: 700; }

.species-list { margin-top: 4rem; }
.sp { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: 2.6rem; padding: 3rem 0; border-top: 1px solid var(--hair); align-items: start; }
.sp .sp-name { font-size: 1.55rem; }
.species-list.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 3rem; }
.sp.noimg { grid-template-columns: minmax(0, 1fr); }
.to-live { margin-top: 1rem; font-size: .6rem; letter-spacing: .18em; text-transform: uppercase; color: #555; border-bottom: 1px solid #ccc; padding-bottom: 1px; }
.to-live:hover { color: #000; border-bottom-color: #000; }

/* method links */
.links { display: flex; flex-wrap: wrap; gap: .6rem 1.8rem; margin-top: 1.8rem !important; }
.links a, .link-btn { font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: #333; text-decoration: none; border-bottom: 1px solid #bbb; padding-bottom: 1px; }
.links a:hover, .link-btn:hover { color: #000; border-bottom-color: #000; }

/* ── footer: who made it, who supports it ─────────────────────────────────────────────────────────────────── */
.foot { margin-top: 9rem; padding-top: 2.6rem; padding-bottom: 4.5rem; border-top: 1px solid var(--hair); }
.credits p { font-size: .86rem; line-height: 1.7; color: #555; margin: 0; }
.logos { display: flex; flex-wrap: wrap; align-items: center; gap: 22px 34px; margin-top: 2rem; }
.logos img { height: 34px; width: auto; filter: grayscale(1); opacity: .72; transition: filter .3s, opacity .3s; }
.logos img:hover { filter: none; opacity: 1; }
.logos .lg-ei { height: 30px; }
.logos .lg-qed { height: 40px; }
.logos .lg-nasa { height: 42px; }
.copy { margin: 2.4rem 0 0; font-size: .54rem; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); font-weight: 400; }

/* lightbox */
#lightbox { position: fixed; inset: 0; z-index: 6000; background: rgba(255,255,255,.97); display: flex; align-items: center; justify-content: center; padding: 3vh 3vw; cursor: zoom-out; }
#lightbox img { max-width: 100%; max-height: 100%; box-shadow: 0 10px 40px rgba(0,0,0,.08); }
#lightbox .x { position: absolute; right: 18px; top: 10px; font-size: 1.8rem; color: #888; }

/* ── SPONSORS / DATA and the method note: the viewer's components, as they are ───────────────────────────── */
#cb { position: fixed; right: 20px; bottom: 5px; z-index: 3900; display: flex; gap: 18px; padding: 2px 8px; background: rgba(255, 255, 255, .94); }
#cb button { padding: 2px 0; font-size: .56rem; letter-spacing: .22em; text-indent: .22em; text-transform: uppercase; color: var(--faint); border-bottom: 1px solid transparent; transition: color .15s, border-color .15s; }
#cb button:hover, #cb button[aria-expanded="true"] { color: var(--ink); }
#cb button.pin { border-bottom-color: var(--ink); }
#cb-pop { position: fixed; right: 20px; bottom: 30px; z-index: 3950; box-sizing: border-box; max-height: calc(100vh - 150px); overflow-y: auto;
  padding: 16px 20px 18px; background: rgba(255, 255, 255, .97); border: 1px solid var(--line); box-shadow: 0 10px 34px rgba(0, 0, 0, .08); }
#cb-pop[hidden] { display: none; }
#cb-pop .x { position: absolute; right: 10px; top: 7px; padding: 0; font-size: 1.05rem; line-height: 1; color: var(--faint); }
#cb-pop .x:hover { color: var(--ink); }
#cb-pop .grp { font-size: .54rem; letter-spacing: .22em; text-transform: uppercase; color: var(--faint); }
#cb-pop h3 { margin: 4px 0 10px; font-family: var(--serif); font-weight: 400; font-size: 1.2rem; line-height: 1.15; }
#cb-pop.cb-sponsors { width: 620px; }
#cb-pop .cb-marks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 32px; align-items: center; margin: 18px 0 6px; }
#cb-pop .cb-mark { justify-self: start; width: var(--w); max-width: 100%; height: 66px; background: left center / contain no-repeat; padding: 0;
  filter: grayscale(1); opacity: .75; transition: filter .25s, opacity .25s; }
#cb-pop .cb-mark:hover, #cb-pop .cb-mark.on { filter: none; opacity: 1; }
#cb-pop .cb-mark[data-k="nasa"] { height: 76px; }
.cb-card { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.cb-card[hidden] { display: none; }
.cb-card.side { position: fixed; z-index: 3950; box-sizing: border-box; width: 300px; margin: 0; padding: 16px 20px 18px;
  background: rgba(255, 255, 255, .97); border: 1px solid var(--line); box-shadow: 0 10px 34px rgba(0, 0, 0, .08); }
.cb-card h3 { margin: 0 0 4px; font-family: var(--serif); font-weight: 400; font-size: 1.2rem; line-height: 1.15; }
.cb-card p { margin: 0; font-size: .68rem; line-height: 1.55; color: var(--dim); }
.cb-card p.award { margin-top: 6px; font-family: var(--serif); font-style: italic; font-size: .92rem; color: var(--ink); }
.cb-card p.go { margin-top: 8px; font-size: .56rem; letter-spacing: .22em; text-transform: uppercase; }
#cb-pop a, .cb-card a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
#cb-pop a:hover, .cb-card a:hover { text-decoration-color: var(--ink); }
#cb-pop.cb-data { width: 440px; }
#cb-pop .ly { border-top: 1px solid var(--line); }
#cb-pop .ly:last-child { border-bottom: 1px solid var(--line); }
#cb-pop .ly > button { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 9px 0 8px; font-size: .56rem; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); }
#cb-pop .ly > button::after { content: '+'; font-size: .8rem; letter-spacing: 0; color: var(--faint); transition: transform .25s ease; }
#cb-pop .ly > button:hover, #cb-pop .ly.open > button { color: var(--ink); }
#cb-pop .ly.open > button::after { transform: rotate(45deg); }
#cb-pop .ly .bd { display: none; padding: 0 0 12px; }
#cb-pop .ly.open .bd { display: block; }
#cb-pop .cb-it + .cb-it { margin-top: 10px; }
#cb-pop .cb-it .nm { font-family: var(--serif); font-size: .92rem; line-height: 1.25; color: var(--ink); }
#cb-pop .cb-it .by { margin-top: 1px; font-size: .66rem; line-height: 1.45; color: var(--ink); }
#cb-pop .cb-it .dt { margin-top: 1px; font-size: .62rem; line-height: 1.45; color: var(--dim); }
#cb-pop .cb-it .lc { margin-top: 2px; font-size: .5rem; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); }

#sim-note { position: fixed; z-index: 4100; width: 460px; padding: 14px 16px 13px; background: rgba(255,255,255,.97); border: 1px solid var(--line);
  backdrop-filter: blur(8px); box-shadow: 0 10px 34px rgba(0,0,0,.07); max-height: calc(100vh - 120px); overflow-y: auto;
  animation: pop-in .28s cubic-bezier(.2,.8,.2,1) both; }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#sim-note .grp { font-size: .54rem; letter-spacing: .22em; text-transform: uppercase; color: var(--faint); }
#sim-note h3 { margin: 3px 0 7px; font-family: var(--serif); font-weight: 400; font-size: 1.25rem; line-height: 1.15; }
#sim-note p { margin: 0; font-size: .68rem; line-height: 1.6; color: var(--dim); }
#sim-note .x { position: absolute; right: 9px; top: 6px; padding: 0; font-size: 1rem; line-height: 1; color: var(--faint); }
#sim-note .x:hover { color: var(--ink); }
#sim-note .layers { margin: 11px 0 0; border-top: 1px solid var(--line); }
#sim-note .ly { border-bottom: 1px solid var(--line); }
#sim-note .ly > button { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 8px 0 7px; font-size: .54rem; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); }
#sim-note .ly > button::after { content: '+'; font-size: .8rem; letter-spacing: 0; color: var(--faint); transition: transform .25s ease; }
#sim-note .ly > button:hover, #sim-note .ly.open > button { color: var(--ink); }
#sim-note .ly.open > button::after { transform: rotate(45deg); }
#sim-note .ly .bd { display: none; padding: 0 0 10px; }
#sim-note .ly .bd p + p { margin-top: 6px; }
#sim-note .ly.open .bd { display: block; }
#sim-note .ly .bd p b { color: var(--ink); font-weight: 400; }
#sim-note table { width: 100%; border-collapse: collapse; margin: 6px 0 8px; font-size: .64rem; font-variant-numeric: tabular-nums; }
#sim-note th { text-align: left; font-weight: 400; font-size: .5rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); padding: 3px 4px 3px 0; border-bottom: 1px solid var(--line); }
#sim-note td { padding: 3px 4px 3px 0; border-bottom: 1px solid #f2f2f2; color: var(--ink); }
#sim-note td.n, #sim-note th.n { text-align: right; }
#sim-note ul { margin: 4px 0 8px; padding-left: 1.1em; font-size: .68rem; line-height: 1.55; color: var(--dim); }
#sim-note li + li { margin-top: 3px; }
#sim-note p a, #sim-note li a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
#sim-note:focus { outline: none; }
#sim-note .prov dt { font-size: .5rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-top: 7px; }
#sim-note .prov dd { margin: 1px 0 0; font-size: .62rem; line-height: 1.5; color: var(--ink); word-break: break-word; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
#sim-note .ly .code { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 3px 12px; }
#sim-note .ly .code a { font-size: .6rem; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
#cb, #sim-note { font-weight: 400; }
#eq-tip { z-index: 9999 !important; }

/* ── narrower screens ─────────────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .sp { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
}
@media (max-width: 900px) {
  #cb { position: static; justify-content: flex-end; padding: .9rem 16px calc(.9rem + env(safe-area-inset-bottom)); background: none; }
  #sim-note { left: 8px !important; right: 8px; top: 8px !important; width: auto; max-height: calc(100vh - 16px); }
  .foot { padding-bottom: 1rem; }
}
@media (max-width: 700px) {
  :root { --gut: 16px; }
  body { font-size: 15.5px; }
  .masthead { padding-top: 1.1rem; flex-direction: column; gap: .2rem; }
  #brand h1 { font-size: 1.55rem; }
  .hero { padding-top: 3.2rem; }
  .lede { font-size: 1.04rem !important; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { padding: 1.05rem .5rem 1rem; }
  .metric:nth-child(2) { border-right: none; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--hair); }
  .hero-fig { margin-top: 3.2rem; }
  .tri.big { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
  .tri { gap: 8px; }
  .tri-cell figcaption { font-size: .62rem; }
  .tri-cell figcaption b { font-size: .66rem; }
  .sec { margin-top: 5.5rem; }
  .sec.sub { margin-top: 3.6rem; }
  .contrib li { padding-left: 2.8rem; font-size: 1rem; }
  .contrib li::before { width: 1.9rem; height: 1.9rem; font-size: 1.2rem; }
  table.data { font-size: .8rem; }
  table.data th { font-size: .52rem; letter-spacing: .06em; padding: .45rem .3rem; white-space: normal; }
  table.data td { padding: .5rem .3rem; }
  table.data td.p { font-size: .7rem; }
  .panels { gap: 14px; }
  .panel { flex: 1 1 100%; }
  svg.chart.desk { display: none; }
  svg.chart.phone { display: block; }
  .live-frame { margin: 0; height: 78vh; height: 78svh; min-height: 460px; border-left: 0; border-right: 0; }
  .sp { padding: 2.4rem 0; }
}
@media print {
  #cb, #cb-pop, #sim-note, .hood-btn, .live, .to-live, .links .link-btn { display: none !important; }
  .sec { break-before: auto; }
  .fig { break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } #sim-note { animation: none; } }

/* ── the in-page method note: the simulator's layers, equations and code links ───────────────────────────── */
.mnote { padding: 2px 0 6px; }
.mnote .layers { margin: 4px 0 0; border-top: 1px solid var(--line); }
.mnote p { margin: 0; font-size: .68rem; line-height: 1.6; color: var(--dim); }
.mnote .layers { margin: 11px 0 0; border-top: 1px solid var(--line); }
.mnote .ly { border-bottom: 1px solid var(--line); }
.mnote .ly > button { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 8px 0 7px; font-size: .54rem; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); }
.mnote .ly > button::after { content: '+'; font-size: .8rem; letter-spacing: 0; color: var(--faint); transition: transform .25s ease; }
.mnote .ly > button:hover, .mnote .ly.open > button { color: var(--ink); }
.mnote .ly.open > button::after { transform: rotate(45deg); }
.mnote .ly .bd { display: none; padding: 0 0 10px; }
.mnote .ly .bd p + p { margin-top: 6px; }
.mnote .ly.open .bd { display: block; }
.mnote .ly .bd p b { color: var(--ink); font-weight: 400; }
.mnote table { width: 100%; border-collapse: collapse; margin: 6px 0 8px; font-size: .64rem; font-variant-numeric: tabular-nums; }
.mnote th { text-align: left; font-weight: 400; font-size: .5rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); padding: 3px 4px 3px 0; border-bottom: 1px solid var(--line); }
.mnote td { padding: 3px 4px 3px 0; border-bottom: 1px solid #f2f2f2; color: var(--ink); }
.mnote td.n, .mnote th.n { text-align: right; }
.mnote ul { margin: 4px 0 8px; padding-left: 1.1em; font-size: .68rem; line-height: 1.55; color: var(--dim); }
.mnote li + li { margin-top: 3px; }
.mnote p a, .mnote li a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.mnote .prov dt { font-size: .5rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-top: 7px; }
.mnote .prov dd { margin: 1px 0 0; font-size: .62rem; line-height: 1.5; color: var(--ink); word-break: break-word; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.mnote .ly .code { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 3px 12px; }
.mnote .ly .code a { font-size: .6rem; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }

/* ── DATA at the top of the page; its panel opens below it ─────────────────────────────────────────────────── */
#topnav { padding-top: .55rem; }
#topnav button { padding: 2px 0; font-size: .56rem; letter-spacing: .22em; text-indent: .22em; text-transform: uppercase; color: var(--faint); border-bottom: 1px solid transparent; transition: color .15s, border-color .15s; font-weight: 400; }
#topnav button:hover, #topnav button[aria-expanded="true"] { color: var(--ink); }
#topnav button.pin { border-bottom-color: var(--ink); }
#cb-pop.cb-data { top: 70px; bottom: auto; right: max(16px, calc((100vw - 720px) / 2)); max-height: calc(100vh - 100px); }

/* ── the model comparison ─────────────────────────────────────────────────────────────────────────────────── */
.seg { display: flex; flex-wrap: wrap; gap: 0; margin: 1.8rem 0 .6rem; border-bottom: 1px solid #ddd; }
.seg button { padding: .45rem .9rem .5rem; font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: #888; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 400; }
.seg button:first-child { padding-left: 0; }
.seg button:hover { color: #111; }
.seg button[aria-selected="true"] { color: #000; border-bottom-color: #000; }
.src-def { font-size: .86rem !important; color: #777 !important; margin: 0 !important; }
.cmp-fig { max-width: calc(900px + 2 * var(--gut)) !important; margin-top: 1.2rem !important; }
svg.chart .val.big { font-size: 13px; }
table.medians td:first-child { color: #222; }
table.medians tr.win td { color: #000; font-weight: 700; }
table.medians td .sub { font-weight: 300; }

/* more results: one line each, details on demand */
.more { margin-top: 3.4rem; border-top: 1px solid #ddd; }
.more-label { margin: .9rem 0 .2rem !important; font-size: .62rem !important; letter-spacing: .3em; text-transform: uppercase; color: #999 !important; font-weight: 400; }
.more details { border-bottom: 1px solid var(--hair); }
.more summary { list-style: none; cursor: pointer; padding: .85rem 2rem .85rem 0; position: relative; font-size: .98rem; line-height: 1.6; color: #333; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: '+'; position: absolute; right: 0; top: .8rem; font-size: 1.1rem; color: #999; transition: transform .25s ease; }
.more details[open] summary::after { transform: rotate(45deg); }
.more summary:hover { color: #000; }
.more details > :not(summary) { margin-bottom: 1.4rem; }
.fig.in { margin: .6rem 0 0; padding: 0; }

/* ── species ──────────────────────────────────────────────────────────────────────────────────────────────── */
.tri { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cell { margin: 0; min-width: 0; }
.cell .zoomable, .cell .natz { display: block; width: 100%; cursor: zoom-in; }
.cell img { display: block; width: 100%; height: auto; border: 1px solid #eee; background: #fff; }
.cell figcaption { margin-top: .5rem; font-size: .7rem; line-height: 1.35; color: #888; }
.cell figcaption b { display: block; font-size: .74rem; color: #111; }
.cell.is-joint figcaption b::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: .45rem; vertical-align: .06em; }
.missing { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border: 1px dashed #ddd; color: #aaa; font-family: var(--serif); font-style: italic; }
.ramp { display: flex; align-items: center; gap: .55rem; margin-top: .8rem; font-size: .62rem; color: #888; }
.ramp i { display: inline-block; width: 120px; height: 7px; border-radius: 2px; background: linear-gradient(90deg, #440154, #3b528b, #21918c, #5ec962, #fde725); }
.hero-fig .ramp { justify-content: center; }
.sp-desc { font-size: 1rem !important; color: #444 !important; margin: 0 !important; }

.species-list .ramp { justify-content: flex-end; margin: 0 0 .8rem; }
.sp { display: block; padding: 2.6rem 0 2.4rem; border-top: 1px solid var(--hair); }
.sp-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: .3rem .9rem; margin-bottom: 1.1rem; }
.sp-num { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; color: #999; font-feature-settings: "lnum" 1; }
.sp-h .sp-name { margin: 0; font-size: 1.6rem; }
.sp-h .common { font-size: .82rem; letter-spacing: .04em; color: #555; }
.strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.strip .photo img, .strip .nat img { aspect-ratio: 1; object-fit: cover; }
.strip .nat img { object-fit: contain; }
.strip .photo figcaption a { color: #555; text-decoration-color: #ccc; }
.strip .photo figcaption a { display: block; font-size: .64rem; line-height: 1.35; }
.sp table.mini { max-width: 560px; margin-top: 1.4rem; }

/* the lead species: its national map edge to edge */
.lead { margin-top: 2.6rem; }
.lead-head { margin-bottom: 2rem; display: flex; justify-content: space-between; align-items: flex-end; gap: 1.6rem; }
.lead-photo { width: 190px; flex: none; }
.lead-photo img { aspect-ratio: 1; object-fit: cover; }
.photo figcaption a { display: block; font-size: .64rem; line-height: 1.35; color: #555; text-decoration-color: #ccc; }
.lead-table table.mini { max-width: 560px; margin: 2.2rem 0 0; }
.bleed { position: relative; width: 100%; height: min(100vh, var(--h)); height: min(100svh, var(--h)); background: #fff; cursor: zoom-in; overflow: hidden; }
.bleed-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 50%; transition: opacity .6s ease; }
.bleed-osd { position: absolute !important; inset: 0; width: 100%; height: 100%; }
.bleed.osd-ready .bleed-img { opacity: 0; }
.bleed-go { position: absolute; right: 22px; top: 18px; z-index: 5; padding: 7px 14px 6px; border: 1px solid #c8c8c8; border-radius: 999px; background: rgba(255,255,255,.92);
  font-size: .6rem; letter-spacing: .18em; text-transform: uppercase; color: #333; font-weight: 400; width: auto !important; }
.bleed-go:hover { border-color: #000; color: #000; }
.lead > .cap { margin-top: .9rem !important; }

/* the Bay Area sequence: a sticky stage, driven by scroll */
.bay { position: relative; height: 340vh; margin-top: 4rem; }
.bay-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: #fff; }
.bay-zoom { position: absolute; inset: 6vh 0 12vh; }
.bay-zoom img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 50%; display: block; }
.bay-zoom img.bay-crop { position: absolute; width: auto; height: auto; object-fit: fill; opacity: 0; }
.bay-box { position: absolute; border: 1.5px solid #111; box-shadow: 0 0 0 1px rgba(255,255,255,.8); pointer-events: none; }
.bay-panels { position: absolute; left: 50%; top: 50%; width: min(1180px, calc(100vw - 48px)); transform: translate(-50%, -54%);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; pointer-events: none; }
.bay-panels .cell { opacity: var(--qi, 0); transform: translateY(calc((1 - var(--qi, 0)) * 28px)); }
.bay-panels figcaption .auc { display: block; margin-top: .15rem; font-size: .74rem; color: #111; font-variant-numeric: tabular-nums; }
.bay-panels .is-joint figcaption .auc { font-weight: 700; }
.bay-panels img { max-height: 62vh; object-fit: contain; }
.bay-text { position: absolute; left: 0; right: 0; bottom: 4vh; }
.bay-t { position: absolute; left: var(--gut); right: var(--gut); bottom: 0; margin: 0 !important; opacity: 0; transform: translateY(8px); transition: opacity .45s ease, transform .45s ease; font-size: 1.05rem !important; }
.bay-t.on { opacity: 1; transform: none; }

/* the zoomable national map: full screen, over the page; the page does not scroll beneath it */
html.zooming, html.zooming body { overflow: hidden; }
#zoom { position: fixed; inset: 0; z-index: 7000; background: #fff; }
#zoom-osd { position: absolute !important; inset: 0; width: 100%; height: 100%; touch-action: none; }
.zoom-bar { position: absolute; left: 14px; top: 12px; z-index: 2; display: flex; flex-direction: column; gap: 2px; pointer-events: none; background: rgba(255,255,255,.78); backdrop-filter: blur(6px); padding: 6px 12px 7px; }
.zoom-name { font-family: var(--serif); font-size: 1.3rem; color: #000; }
.zoom-png { pointer-events: auto; margin-top: 3px; font-size: .56rem; letter-spacing: .12em; text-transform: uppercase; color: #333; text-decoration: none; border-bottom: 1px solid #bbb; align-self: flex-start; }
.zoom-png:hover { color: #000; border-bottom-color: #000; }
.zoom-hint { font-size: .56rem; letter-spacing: .18em; text-transform: uppercase; color: #999; }
.zoom-ctl { position: absolute; right: 18px; bottom: 22px; z-index: 2; display: flex; flex-direction: column; gap: 7px; }
.zoom-ctl button { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.94); border: 1px solid #ccc; font-size: 1.15rem; color: #333; line-height: 1; }
.zoom-ctl button:hover { border-color: #000; color: #000; }
#zoom .x { position: absolute; right: 18px; top: 12px; z-index: 3; font-size: 2rem; line-height: 1; color: #666; width: 44px; height: 44px; }
#zoom .x:hover { color: #000; }

@media (max-width: 700px) {
  .strip { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
  .strip .photo, .strip .nat { grid-column: span 3; }
  .strip .cell:nth-child(n+3) { grid-column: span 2; }
  .cell figcaption { font-size: .6rem; }
  .cell figcaption b { font-size: .64rem; }
  .bay { height: 300vh; }
  .bay-panels { grid-template-columns: minmax(0, 1fr); width: calc(100vw - 32px); gap: 6px; top: 3vh; transform: translate(-50%, 0); }
  .bay-panels img { max-height: 20vh; width: auto; margin: 0 auto; }
  .bay-panels figcaption { font-size: .58rem; line-height: 1.25; }
  .bay-panels figcaption .auc { font-size: .66rem; }
  .bay-t { font-size: .92rem !important; }
  .bay-panels figcaption { text-align: center; margin-top: .2rem; }
  .bay-zoom { inset: 8vh 0 16vh; }
  .seg button { padding: .45rem .6rem .5rem; font-size: .56rem; letter-spacing: .1em; }
  .masthead #topnav { padding-top: .35rem; }
  .bleed-go { right: 10px; top: 10px; }
  .lead-photo { width: 120px; }
}
@media (max-width: 900px) { #cb-pop.cb-data { top: 56px; } }

.fn { font-size: .72rem !important; color: #888 !important; margin: .5rem 0 0 !important; }

.nat-key { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.1rem; margin-top: .55rem; font-size: .66rem; color: #777; }
.nat-key span { display: inline-flex; align-items: center; gap: .4rem; }
.nat-key i { display: inline-block; width: 64px; height: 7px; border-radius: 2px; background: linear-gradient(90deg, #440154, #3b528b, #21918c, #5ec962, #fde725); }
.nat-key i.faded { opacity: .38; }
.nat-key i.grey { width: 14px; background: #ecEAE4; border: 1px solid #ddd; }

/* ── every multi-panel figure: equal boxes, whatever the images' own sizes; captions below, outside the boxes ── */
.tri, .strip, .bay-panels { align-items: start; }
.cell > .zoomable, .cell > .natz, .cell > .missing, .cell > .box { display: block; width: 100%; aspect-ratio: 1 / 1; height: auto;
  border: 1px solid #e8e8e8; background: #fafafa; overflow: hidden; padding: 0; }
.cell > .zoomable img, .cell > .natz img, .cell > .box img { display: block; width: 100% !important; height: 100% !important;
  max-height: none !important; object-fit: contain; border: 0; background: transparent; aspect-ratio: auto; }
.strip .photo > .zoomable img { object-fit: cover; }
.cell > .missing { display: flex; }
.bay-panels .cell > .box { aspect-ratio: var(--ar); }
@media (max-width: 700px) {
  .bay-panels .cell > .box { width: auto; height: 20vh; margin: 0 auto; }
  .strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .strip .photo, .strip .nat, .strip .cell:nth-child(n+3) { grid-column: auto; }
}
table.data tr.pool td { color: #111; border-bottom: 1px solid #bbb; }

/* ── the national map: its own section, edge to edge, contained (nothing in it can paint over what follows) ── */
.national { margin-top: 9rem; }
.national .bleed { isolation: isolate; contain: paint; }
.national .cap { margin-top: 1rem !important; }
#species { margin-top: 9rem; }
#species .ramp { margin-top: .4rem; }

/* ── ten species: one line, the three models full width, one row of AUC under the panels ─────────────────── */
.cmp-list { margin-top: 1.6rem; }
.cmp-list .sp { padding: 1.9rem 0 2.2rem; border-top: 1px solid var(--hair); }
.sp-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: .2rem .8rem; margin: 0 0 .9rem; font-family: var(--serif); font-weight: 400; font-size: 1.5rem; line-height: 1.2; }
.sp-line .sp-num { font-size: 1rem; }
.sp-line .common { font-family: var(--sans); font-size: .8rem; letter-spacing: .04em; color: #666; }
.cmp-list .tri { gap: 16px; }
.cmp-list .cell figcaption { margin-top: .45rem; }
.auc-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: .35rem; font-size: .8rem; color: #666; font-variant-numeric: tabular-nums; }
.auc-row b { color: #000; }
.auc-row .src { font-weight: 400; color: #333; margin-right: .35rem; }
.zoomable.px { cursor: zoom-in; }

/* the native PNG, opened */
#lightbox { padding: 0 !important; display: block !important; cursor: default !important; }
#lightbox[hidden] { display: none !important; }
.lb-scroll { position: absolute; inset: 0; overflow: auto; display: grid; place-items: center; padding: 16px; }
.lb-scroll img { display: block; max-width: none !important; max-height: none !important; box-shadow: 0 10px 40px rgba(0,0,0,.08); background: #fafafa; }
.lb-scroll img.px { image-rendering: pixelated; image-rendering: crisp-edges; }
.lb-ctl { position: absolute; right: 18px; bottom: 18px; display: flex; gap: 6px; z-index: 2; }
.lb-ctl button { min-width: 40px; height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid #ccc; background: rgba(255,255,255,.94); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: #444; }
.lb-ctl button[aria-pressed="true"], .lb-ctl button:hover { border-color: #000; color: #000; }
#lightbox .x { z-index: 3; }

@media (max-width: 700px) {
  .national { margin-top: 5.5rem; }
  #species { margin-top: 6rem; }
  .sp-line { font-size: 1.25rem; }
  .cmp-list .tri, .auc-row { gap: 8px; }
  .auc-row { font-size: .68rem; }
  .auc-row span:first-child { display: flex; flex-direction: column; }
}

/* ── deepearth.ai/plant-habitats: the multi-model panel figures (large, edge to edge up to 1,440 px) and the
   table of every published model ───────────────────────────────────────────────────────────────────────── */
.panel-fig { max-width: calc(1440px + 2 * var(--gut)); margin: 3.4rem auto 0; padding: 0 var(--gut); }
.panel-fig + .panel-fig { margin-top: 3rem; }
.panel-fig .zoomable { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.panel-fig img { display: block; width: 100%; height: auto; }
.panel-fig .cap { max-width: var(--col); margin-left: auto; margin-right: auto; }
.panel-rule { max-width: var(--col); margin: 1.6rem auto 3rem !important; padding: 0 var(--gut); box-sizing: content-box; }
table.competitors td { line-height: 1.35; }
table.competitors td.n b { color: #000; }
table.competitors td.n { white-space: nowrap; }
table.competitors td:first-child .sub { white-space: normal; }
table.competitors td.n .sub { margin-top: .15rem; }
table.competitors td.draw { background: #f6f6f4; }
table.competitors .ni { color: #aaa; }
h3.sub-title { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; line-height: 1.2; margin: 3.6rem 0 0; color: #111; }
@media (max-width: 900px) {
  .panel-fig { padding: 0 10px; }
  table.competitors td .sub { white-space: normal; }
  table.competitors td.n { white-space: normal; font-size: .74rem; padding-left: .2rem; padding-right: .2rem; }
  table.competitors th .sub, table.competitors td.n .sub { font-size: .56rem; letter-spacing: 0; }
  table.competitors td:first-child { font-size: .78rem; }
  h3.sub-title { font-size: 1.35rem; margin-top: 2.6rem; }
}
#sim-note .code + p, .mnote .code + p { margin-top: 1rem; }

/* ── the model comparison as one figure: five species, six maps. A black square (the brand's framed square) marks
   the chosen photograph; its line runs down and around the maps. Only the species' maps and words change: the
   land, state lines, letters, model names and legend stay where they are. ─────────────────────────────────── */
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.mm { position: relative; max-width: calc(1440px + 2 * var(--gut)); margin: 3.4rem auto 0; padding: 0 var(--gut); }
.mm-ask { margin: 0 0 .55rem !important; text-align: center; font-size: .6rem !important; letter-spacing: .24em; text-indent: .24em; text-transform: uppercase; color: #999 !important; font-weight: 400; }
.mm-pick { display: flex; justify-content: center; gap: 18px; overflow-x: auto; scrollbar-width: none; padding: 2px 10px 9px; }
.mm-pick::-webkit-scrollbar { display: none; }
.mm-sp { flex: none; display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.mm-sp-name { font-family: var(--serif); font-size: .9rem; line-height: 1.1; color: #8a8a8a; white-space: nowrap; transition: color .2s; }
.mm-sp-name > i { display: block; text-align: center; }
.mm-sp-img { display: block; width: 76px; height: 76px; object-fit: cover; background: #f2f2f0; opacity: .8; filter: saturate(.8); transition: opacity .25s, filter .25s; }
.mm-sp:hover .mm-sp-img, .mm-sp[aria-pressed="true"] .mm-sp-img { opacity: 1; filter: none; }
.mm-sp:hover .mm-sp-name, .mm-sp[aria-pressed="true"] .mm-sp-name { color: #000; }
.mm-sp:focus-visible { outline: none; }
.mm-sp:focus-visible .mm-sp-img { outline: 2px solid var(--accent); outline-offset: 2px; }
.mm-box { position: relative; margin-top: 30px; padding: 20px 26px 18px; outline: 1.5px solid #111; outline-offset: -1px; }
.mm.js .mm-box { outline: none; }
.mm-stack { display: grid; }
.mm-stack > * { grid-area: 1 / 1; }
.mm-stack > :not(.on), .mm-d:not(.on), .mm-note:not(.on) { visibility: hidden; opacity: 0; }
.mm-head { margin: 0 0 .9rem; }
.mm-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .7rem; margin: 0 !important; font-family: var(--serif); font-size: 1.6rem !important; line-height: 1.2 !important; color: #000 !important; }
.mm-title i { font-style: italic; }
.mm-common { font-family: var(--sans); font-size: .8rem; letter-spacing: .04em; color: #666; }
.mm-credit { margin-left: auto; font-family: var(--sans); font-size: .62rem; letter-spacing: .02em; color: #999; text-decoration-color: #ddd; }
.mm-credit:hover { color: #333; }
.mm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 22px; }
.mm-panel { min-width: 0; }
.mm-name { margin: 0 !important; font-size: .9rem !important; line-height: 1.3 !important; font-weight: 700; color: #111 !important; }
.mm-name b { margin-right: .4rem; }
.mm-sub { margin: .12rem 0 .4rem !important; padding-left: 1.05rem; font-size: .72rem !important; line-height: 1.4 !important; color: #666 !important; font-variant-numeric: tabular-nums; }
.mm-map { position: relative; aspect-ratio: var(--fw) / var(--fh); overflow: hidden; }
.mm-l { position: absolute; left: 0; top: calc(var(--i) * -100%); width: 100%; height: calc(var(--fn) * 100%); max-width: none; display: block; }
.mm-note { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0 !important; padding: .5rem .8rem; max-width: 80%; text-align: center;
  font-family: var(--serif); font-style: italic; font-size: .9rem !important; line-height: 1.35 !important; color: #888 !important; background: #fff; border: 1px solid #e2e2e0; }
.mm-legend { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1rem 3rem; margin-top: 1.2rem; }
.mm-ramp { width: min(330px, 100%); }
.mm-ramp-label { margin: 0 0 .3rem !important; font-size: .7rem !important; line-height: 1.35 !important; color: #333 !important; }
.mm-bar { height: 9px; }
.mm-ticks { position: relative; height: 1.25rem; }
.mm-ticks span { position: absolute; top: 0; padding-top: 5px; transform: translateX(-50%); font-size: .62rem; line-height: 1.2; color: #777; white-space: nowrap; }
.mm-ticks span::before { content: ''; position: absolute; left: 50%; top: 0; height: 4px; border-left: 1px solid #aaa; }
.mm-ticks span.first { transform: none; }
.mm-ticks span.first::before { left: 0; }
.mm-ticks span.last { transform: translateX(-100%); }
.mm-ticks span.last::before { left: auto; right: 0; }
.mm-keys { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, auto); gap: .3rem 2rem; font-size: .7rem; line-height: 1.4; color: #555; }
.mm-keys li { display: flex; align-items: center; gap: .5rem; }
.mm-keys i { flex: none; display: inline-block; }
.mm-keys .k-patch { width: 14px; height: 10px; background: var(--accent-m); }
.mm-keys .k-line { width: 16px; border-top: 1.5px solid var(--accent-m); }
.mm-keys .k-presence { width: 7px; height: 7px; margin: 0 4px; border-radius: 50%; background: var(--ink-m); box-shadow: 0 0 0 1px #fff; }
.mm-keys .k-absence { width: 4px; height: 4px; margin: 0 5.5px; border-radius: 50%; background: var(--absent-m); }
.mm-frame { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; fill: none; stroke: #111; }
.mm-frame .mm-sq { stroke-width: 2; }
.mm-frame .mm-ln { stroke-width: 1.5; stroke-linejoin: miter; stroke-linecap: butt; }
.mm-foot { max-width: var(--col); margin: 1.2rem auto 0; font-size: .82rem; line-height: 1.6; color: #777; }
@media (max-width: 760px) {
  .mm { padding: 0 var(--gut); }
  .mm-pick { justify-content: flex-start; gap: 10px; padding: 2px 6px 8px; }
  .mm-pick > :first-child { margin-left: auto; }
  .mm-pick > :last-child { margin-right: auto; }
  .mm-sp-img { width: 56px; height: 56px; }
  .mm-sp-name { font-size: .7rem; }
  .mm-box { margin-top: 24px; padding: 14px 12px 14px; }
  .mm-title { font-size: 1.25rem !important; }
  .mm-credit { margin-left: 0; flex-basis: 100%; }
  .mm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  .mm-name { font-size: .74rem !important; }
  .mm-sub { padding-left: 0; font-size: .62rem !important; }
  .mm-note { font-size: .72rem !important; padding: .3rem .5rem; }
  .mm-legend { gap: .6rem 2rem; }
  .mm-keys { margin-top: .2rem; gap: .2rem 1.2rem; font-size: .64rem; }
  .mm-foot { font-size: .76rem; }
}

/* every map of a row starts at the same height, however its title and AUC line wrap: each panel spans three rows of
   the figure's grid (name, AUC line, map) and shares them with its neighbours (subgrid); the space between rows of
   maps is the map's own margin, since a subgrid inherits the grid's row gap */
@supports (grid-template-rows: subgrid) {
  .mm-grid { row-gap: 0; }
  .mm-panel { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
  .mm-name { align-self: end; }
  .mm-map { margin-bottom: 22px; }
  .mm-legend { margin-top: calc(1.2rem - 22px); }
  @media (max-width: 760px) {
    .mm-map { margin-bottom: 14px; }
    .mm-legend { margin-top: calc(1.2rem - 14px); }
  }
}

/* ── a comparison map, opened full screen (the national map's zoom view, with the map's key in a corner) ──── */
.mm-map[data-pi] { cursor: zoom-in; }
.mm-map[data-pi]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.zoom-model { font-size: .8rem; font-weight: 700; color: #111; line-height: 1.35; }
.zoom-sub { font-size: .72rem; color: #555; line-height: 1.35; font-variant-numeric: tabular-nums; }
.zoom-bar .zoom-hint { margin-top: 2px; }
.zoom-step { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.94); border: 1px solid #ccc; font-size: 1.55rem; line-height: 1; color: #333; padding-bottom: 3px; }
.zoom-step:hover { border-color: #000; color: #000; }
.zoom-step.prev { left: 14px; }
.zoom-step.next { right: 14px; }
.zoom-legend { position: absolute; left: 14px; bottom: 14px; z-index: 2; box-sizing: border-box; max-width: min(400px, calc(100vw - 84px));
  padding: 9px 13px 9px; background: rgba(255,255,255,.9); backdrop-filter: blur(6px); border: 1px solid #e6e6e6; }
.zoom-legend .mm-ramp { width: 300px; max-width: 100%; }
.zoom-legend .mm-keys { margin: 0; gap: .25rem 1.4rem; }
.zoom-legend .zl-ramp + .zl-keys { margin-top: .35rem; }
.zoom-legend .nat-key { margin: 0; flex-direction: column; align-items: flex-start; gap: .3rem; font-size: .74rem; color: #555; }
.zoom-legend .mm-keys { font-size: .74rem; }
.zoom-legend .mm-ramp-label { font-size: .74rem !important; }
.zoom-legend .mm-ticks span { font-size: .66rem; }
@media (max-width: 700px) {
  .zoom-bar { left: 8px; top: 8px; right: 60px; padding: 5px 9px 6px; }
  .zoom-name { font-size: 1.1rem; }
  .zoom-step { width: 34px; height: 34px; font-size: 1.3rem; }
  .zoom-step.prev { left: 6px; }
  .zoom-step.next { right: 6px; }
  .zoom-legend { left: 8px; bottom: 10px; padding: 7px 9px; max-width: calc(100vw - 70px); }
  .zoom-legend .mm-keys { grid-template-columns: auto; font-size: .64rem; }
  .zoom-legend .mm-ramp-label { font-size: .64rem !important; }
}
