/* TERRA Lab · Its climate in 2050. Forest scope; the map is drawn, not tiled. Gold is the land, sand marks where its 2050 climate is found today. Square corners. */
:root {
  --forest-deep: #161e19; --forest: #1f2a23; --forest-land: #29372e; --sand: #e8e2d6; --sand-2: rgba(232,226,214,.8);
  --sand-3: rgba(232,226,214,.62); --line: rgba(232,226,214,.18);
  --gold: #c6a76a;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: Inter, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --descend: cubic-bezier(.22,1,.36,1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--forest-deep); color: var(--sand); font: 400 14px/1.5 var(--sans); }
button { font: inherit; color: inherit; }
a { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); }
.micro { margin: 0; font: 500 12px var(--mono); letter-spacing: .12em; color: var(--sand-3); text-transform: uppercase; }

.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 6px 20px; border-bottom: 1px solid var(--line); }
.mark { font-weight: 500; letter-spacing: .22em; font-size: 15px; }
.lablink { display: inline-flex; align-items: center; min-height: 44px; color: var(--sand); text-decoration: none; }
.lablink span { margin-left: .5em; letter-spacing: .08em; font-weight: 400; color: var(--gold); }
.lablink:hover, .lablink:hover span { color: var(--gold); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.exp { font-size: 12px; letter-spacing: .12em; color: var(--gold); border: 1px solid rgba(198,167,106,.45); padding: 2px 7px; }

/* three blocks: intro and reading beside the map on a wide screen, stacked in reading order on a phone */
.climate { display: grid; gap: 20px 28px; padding: 24px 20px 40px; max-width: 1280px; margin: 0 auto;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); grid-template-areas: "stage intro" "stage read"; align-items: start; }
.intro { grid-area: intro; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.stagecol { grid-area: stage; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
@media (min-width: 861px) { .stagecol { position: sticky; top: 16px; } }
.read { grid-area: read; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
@media (max-width: 860px) {
  .stage { aspect-ratio: 4 / 3; }
  .climate { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "stage" "read"; padding: 16px 16px 32px; }
}

.eyebrow { margin: 0; font: 500 12px var(--mono); letter-spacing: .12em; color: var(--gold); text-transform: uppercase; }
h1 { margin: 0; font: 300 34px/1.1 var(--serif); letter-spacing: -.018em; }
.lede { margin: 0; font-size: 15px; line-height: 1.65; color: var(--sand-2); max-width: 44ch; }

.lands { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 4px; }
.land { min-height: 52px; padding: 8px 10px; text-align: left; background: transparent; border: 1px solid var(--line); cursor: pointer; transition: border-color .18s var(--descend), background-color .18s var(--descend); }
.land:hover { border-color: rgba(232,226,214,.5); }
.land[aria-pressed="true"] { background: var(--forest); border-color: var(--gold); }
.land b { display: block; font-weight: 500; font-size: 13.5px; }
.land span { display: block; margin-top: 2px; font-size: 12px; line-height: 1.35; color: var(--sand-3); }
.land[disabled] { cursor: progress; }

.stage { position: relative; width: 100%; aspect-ratio: 3 / 2; max-height: 72vh; background: var(--forest-deep); border: 1px solid rgba(232,226,214,.14); overflow: hidden; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#map .sea { fill: #121915; }
#map .landfill { fill: var(--forest-land); stroke: rgba(232,226,214,.42); stroke-width: .8; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
#map .borders { fill: none; stroke: rgba(232,226,214,.2); stroke-width: .7; vector-effect: non-scaling-stroke; }
#map .bandline { stroke: rgba(232,226,214,.32); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
#map image.fine { image-rendering: pixelated; }
#map .lbl { font-family: var(--mono); fill: var(--sand); paint-order: stroke; stroke: rgba(18,25,21,.9); stroke-width: 3px; stroke-linejoin: round; }
#map .lbl.gold { fill: var(--gold); }
.marks { position: absolute; inset: 0; pointer-events: none; }
.mk { position: absolute; left: 0; top: 0; will-change: transform; }
.mk > * { pointer-events: none; }
.mk.home { width: 26px; height: 26px; margin: -13px 0 0 -13px; border: 2px solid var(--gold); outline: 1px solid rgba(18,25,21,.75); }
.mk.home::after { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--gold); }
.marks.far .mk.stand { display: none; }
.marks.far .mk.home { width: 18px; height: 18px; margin: -9px 0 0 -9px; }
.marks.far .mk.home::after { width: 4px; height: 4px; margin: -2px 0 0 -2px; }
.mk.match { width: 20px; height: 20px; margin: -10px 0 0 -10px; display: grid; place-items: center; font: 500 12px var(--mono); color: var(--forest-deep); background: var(--sand); outline: 1px solid rgba(18,25,21,.75); }
.mk.match.on { outline: 2px solid var(--sand); outline-offset: 2px; }
.mk.stand { width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 2px solid var(--sand); outline: 1px solid rgba(18,25,21,.75); outline-offset: -3px; }
.mk.label { margin-top: -9px; font: 500 12px/18px var(--mono); letter-spacing: .04em; color: var(--sand); white-space: nowrap; padding: 0 5px; background: rgba(18,25,21,.82); }
.mk.label[hidden] { display: none; }
.north { position: absolute; top: 10px; right: 12px; font-size: 12px; letter-spacing: .08em; color: var(--sand-3); pointer-events: none; }
.scale { position: absolute; left: 12px; bottom: 10px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--sand-2); pointer-events: none; }
.scale[hidden] { display: none; }
.scalebar { display: inline-block; height: 6px; border: 1px solid var(--sand-2); border-top: 0; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; letter-spacing: .14em; color: var(--sand-3); background: var(--forest-deep); text-align: center; padding: 16px; }
.loading[hidden] { display: none; }

.controls { display: flex; flex-wrap: wrap; gap: 6px; }
.btn { min-height: 44px; padding: 0 16px; border: 1px solid var(--sand); background: var(--sand); color: var(--forest-deep); font-weight: 500; font-size: 13px; cursor: pointer; transition: background-color .18s var(--descend), color .18s var(--descend), border-color .18s var(--descend); }
.btn.ghost { background: transparent; color: var(--sand); border-color: rgba(232,226,214,.35); }
.btn.ghost:hover, .btn.ghost:active { border-color: var(--sand); }
.btn.ghost[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
.legend { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; font-size: 12px; line-height: 1.6; color: var(--sand-3); }
.legend .li { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.legend .li[hidden] { display: none; }
.sw { display: inline-block; flex: none; width: 14px; height: 10px; }
.sw.home { border: 2px solid var(--gold); }
.sw.held { background: rgba(232,226,214,.92); }
.sw.near { background: rgba(232,226,214,.35); }
.sw.band { height: 0; border-top: 1px dashed rgba(232,226,214,.6); }
.sw.stand { width: 14px; height: 14px; border: 2px solid var(--sand); }


.facts { margin: 0; font-size: 12px; letter-spacing: .1em; line-height: 1.7; color: var(--sand-3); text-transform: uppercase; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.clim { width: 100%; border-collapse: collapse; }
.clim th, .clim td { padding: 8px 0; border-bottom: 1px solid var(--line); text-align: right; vertical-align: baseline; }
.clim thead th { padding-top: 0; padding-left: 12px; white-space: nowrap; }
.clim th[scope="row"] { text-align: left; font-weight: 400; font-size: 13px; color: var(--sand-2); padding-right: 10px; }
.clim td { font-size: 15px; white-space: nowrap; padding-left: 12px; }
.clim td + td { color: var(--sand); }
.clim td:nth-child(2) { color: var(--sand-2); }
.small { margin: 0; font-size: 13px; line-height: 1.55; color: var(--sand-3); }

.stand { border-left: 2px solid var(--gold); padding: 2px 0 2px 14px; display: flex; flex-direction: column; gap: 6px; }
.standline { margin: 0; font: 300 19px/1.42 var(--serif); color: var(--sand); }
.standline .n { font: 400 15px var(--mono); white-space: nowrap; }
.coords { margin: 0; font-size: 12px; letter-spacing: .06em; color: var(--sand-3); }
.coords a { display: inline-block; padding: 13px 0; margin-left: 4px; letter-spacing: .04em; }

.matches { display: flex; flex-direction: column; gap: 8px; }
.picks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pick { width: 100%; min-height: 44px; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 2px 10px; padding: 10px 10px; text-align: left; background: transparent; border: 1px solid var(--line); cursor: pointer; transition: border-color .18s var(--descend), background-color .18s var(--descend); }
.pick:hover { border-color: rgba(232,226,214,.5); }
.pick[aria-pressed="true"] { border-color: var(--sand); background: var(--forest); }
.pick .num { grid-row: span 3; width: 22px; height: 22px; display: grid; place-items: center; font: 500 12px var(--mono); color: var(--forest-deep); background: var(--sand); }
.pick .where { font-weight: 500; font-size: 14px; }
.pick .how { font-size: 13px; line-height: 1.5; color: var(--sand-2); }
.pick .figs { font: 400 12px/1.6 var(--mono); color: var(--sand-3); }

.notes { border-top: 1px solid var(--line); padding-top: 12px; }
.notes ul { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.55; color: var(--sand-2); }
.notes li::marker { color: var(--gold); }
.cta { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); text-decoration: none; }
.cta:hover, .cta:active { color: var(--sand); }
.foot { max-width: 1280px; margin: 0 auto; padding: 16px 20px 28px; border-top: 1px solid var(--line); font-size: 12px; letter-spacing: .04em; color: var(--sand-3); }
.foot a { display: inline-block; padding: 13px 0; }

@media (prefers-reduced-motion: reduce) {
  .land, .btn, .pick { transition: none; }
}
