/* Prenúncio follows docs/BRAND.md. Green is forest, red is clearing.
   Type: Barlow Condensed and Barlow, one family drawn from highway signs and number plates. Condensed 800
   sets the wordmark, the level, the headline and the lines of the story (a warning is read from a distance);
   regular width sets everything small, with tabular figures.
   Colour: forest green is the brand and whatever is chosen. Red is clearing: on the map the chance of it, in
   the bulletin the alert level. Each other hazard has its own hue and a glyph.
   Layout: the map is the page, edge to edge, and the Amazon is the object on it. Nothing has a frame. What
   the map shows and how to read it is set on the page at the top left; the bulletin with its timeline is
   docked at the bottom left; the ranked list stands on the right. Each is type on a soft surface of the
   page's own colour, which only shows once the map is moved under it, and then fades at its edges. The
   timeline can come forward to fill the page, and then the map is a small picture of itself in the upper
   right corner. */
:root {
  --ground: #f4f5f0;
  --soft: #f4f5f0;                     /* a surface: the page's colour, flat */
  --ink: #10201a;
  --grey: #55605a;
  --line: #c7cdc5;
  --green: #0b6b3a;
  --red: #e4002b;
  --red-text: #c70025;   /* the same red, a step darker, for small type on the ground */
  --dark: #141414;       /* the tip over the map */
  --clear: var(--red);
  --fire: #f2a900;
  --degr: #2f7fe6;
  --mine: #a738cf;
  --hue: var(--clear);
  --top: 54px;                                  /* the header */
  --pad: clamp(18px, 2.3vw, 34px);              /* the page's margin */
  --in: 14px;                                   /* a surface's own margin around its type */
  --rail: 408px;                                /* the column of type on the left */
  --panel-h: 232px;                             /* the room kept for the map's panel at the top of it */
  --dock-h: 286px;                              /* the timeline, docked at the bottom of it */
  --mdock-w: 312px; --mdock-h: 212px;           /* the map, docked */
  --cpad: var(--pad);                           /* inside the timeline on the stage */
  --list-w: 404px;
  --cond: "Barlow Condensed", "Arial Narrow", sans-serif;
  --sans: "Barlow", system-ui, sans-serif;
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--ground); color: var(--ink); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
/* taps on controls are taps, never a double tap that zooms the page (the page can still be pinched) */
:is(button, a, summary, [role="button"], .leaflet-control-zoom a, #story, #story *) { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }
::selection { background: var(--ink); color: var(--ground); }

/* ---------- the header: the mark, then the story, About, the API and the language ---------- */
#top { position: fixed; z-index: 40; top: 0; left: 0; right: 0; display: flex; align-items: center; height: var(--top); padding: 0 var(--pad); background: var(--soft); }
/* the name in the MCBR face, lowercase, beside the curved mark */
@font-face { font-family: "Oficina"; font-weight: 700; font-display: swap; src: url(fonts/mcbr-oficina-v3-display-bold.woff2?v=g3) format("woff2"); }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; font: 700 31px/1 "Oficina", "Barlow Condensed", sans-serif; letter-spacing: 0; text-transform: lowercase; }
.brand svg { width: 24px; height: 24px; }
.brand .f { fill: var(--green); }
.brand .c { fill: var(--red); }
#sound-btn { display: grid; place-items: center; width: 44px; min-height: 44px; flex: 0 0 auto; margin-inline-end: 8px; color: var(--grey); }
#sound-btn svg { width: 20px; height: 20px; }
#sound-btn:hover, #sound-btn[aria-pressed="true"] { color: var(--ink); }
#sound-btn[aria-pressed="false"] .sound-on, #sound-btn[aria-pressed="true"] .sound-off { display: none; }
#nav { display: flex; gap: 22px; }
#nav button, #skip-btn, .pick button { font: 600 16px/1 var(--cond); letter-spacing: 0.07em; text-transform: uppercase; padding: 7px 0; border-bottom: 3px solid transparent; }
#nav button:hover, #skip-btn:hover, .pick button:hover { border-bottom-color: var(--line); }
/* the languages, each by its own name, under the header's button */
#lang-menu { position: fixed; z-index: 61; top: var(--top); inset-inline-end: var(--pad); display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; min-width: 300px; max-height: calc(100dvh - var(--top) - 12px); overflow-y: auto; padding: 8px; background: var(--ground); }
#lang-menu button { min-height: 40px; padding: 0 12px; text-align: start; font: 500 16px/1.2 var(--sans); white-space: nowrap; }
#lang-menu button:hover { background: var(--ink); color: var(--ground); }
#lang-menu button[aria-checked="true"] { background: var(--green); color: #fff; }
#skip-btn { display: none; margin-left: 22px; color: var(--grey); }
#menu-btn { display: none; }

/* a choice between a few words: the chosen one is ink with a heavy green rule under it */
.pick { display: flex; flex-wrap: wrap; gap: 2px 22px; color: var(--grey); }
.pick button { white-space: nowrap; }
.pick button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--green); }
.glyph { width: 13px; height: 13px; flex: none; fill: var(--c); }
/* a switch between a few modes: words in a row, the one that is on set in white on forest green */
.seg { display: inline-flex; gap: 2px; margin-left: -9px; }
.seg button { padding: 7px 9px; font: 700 16px/1 var(--cond); letter-spacing: 0.07em; text-transform: uppercase; color: var(--grey); white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--green); color: #fff; }
/* the way out of a panel */
.x { display: grid; place-items: center; width: 34px; height: 34px; flex: none; }
.x::before { content: ""; width: 14px; height: 14px; background: linear-gradient(45deg, transparent 44%, currentColor 44% 56%, transparent 56%), linear-gradient(-45deg, transparent 44%, currentColor 44% 56%, transparent 56%); }
.x:hover { background: var(--ink); color: var(--ground); }
/* an X-sized button that carries a glyph of its own, drawn at the X's weight (the clipboard beside the X of the API) */
.x.ico::before { content: none; }
.x.ico svg { width: 14px; height: 14px; }
.x.ico svg path { fill: none; stroke: currentColor; stroke-width: 1.7; }
.x.ico .ok, .x.ico[data-done] .clip { display: none; }
.x.ico[data-done] .ok { display: inline; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- the page: the map under everything, and the two boxes that swap ---------- */
#app { position: absolute; inset: 0; }  /* (not fixed: its boxes take their place among the panels, by their own z-index) */
.box { position: absolute; overflow: hidden; background: var(--ground); transform-origin: 0 0; transition: opacity 0.5s, visibility 0s; }
.box > .in { position: relative; width: 100%; height: 100%; transform-origin: 0 0; }
#mapbox[data-as="stage"] { inset: 0; z-index: 0; }
#mapbox[data-as="dock"] { right: var(--pad); top: calc(var(--top) + 10px); width: var(--mdock-w); height: var(--mdock-h); z-index: 39; }
#chartbox[data-as="dock"] { left: calc(var(--pad) - var(--in)); bottom: calc(var(--pad) - var(--in)); width: calc(var(--rail) + 2 * var(--in)); height: calc(var(--dock-h) + var(--in)); z-index: 10; background: var(--soft); }
#chartbox[data-as="stage"] { left: 0; right: 0; top: var(--top); bottom: 0; z-index: 20; }
.box.sinking { z-index: 41; }
.box.shot { z-index: 39; pointer-events: none; }  /* the picture of the map that travels between the stage and the dock */
:root[data-swap] #app { pointer-events: none; }
/* the corner of a dock says it can come forward; on the stage the timeline has a way out, like any panel */
.front { display: grid; place-items: center; width: 30px; height: 30px; flex: none; color: var(--ink); }
.front svg { width: 14px; height: 14px; }
.front svg path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; }
.front:hover { background: var(--ink); color: var(--ground); }
#chartbox[data-as="dock"] #chart-front .shut, #chartbox[data-as="stage"] #chart-front .out { display: none; }

/* A surface that can stand over the map is a flat block of the page's colour with crisp edges: no fade, no
   glow, no shadow, no rule. Over the page it cannot be seen; when the map is moved under it the map passes behind. */
/* ---------- the map ---------- */
#map { position: absolute; inset: 0; background: var(--ground); }
.leaflet-container { font: inherit; background: var(--ground); }
.leaflet-tile-pane { filter: grayscale(0.8) contrast(0.62) brightness(1.7); }  /* imagery as a pale print, so the paint reads on it */
.leaflet-image-layer { transition: opacity 0.25s; }
.base.crisp, canvas.cells { image-rendering: pixelated; }
canvas.cells { position: absolute; left: 0; top: 0; transition: opacity 0.25s; }
.loss { image-rendering: auto; }  /* (the clearing of the story: its opacity is the story's timeline's) */
.state-name { color: var(--ink); font: 600 12px var(--cond); letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; text-shadow: 0 0 2px var(--ground), 0 0 2px var(--ground), 0 0 3px var(--ground), 0 0 4px var(--ground), 0 0 6px var(--ground); transform: translate(-50%, -50%); width: max-content; }
.leaflet-tooltip.tip { background: var(--dark); color: var(--ground); border: 0; border-radius: 0; box-shadow: none; padding: 6px 10px; font-size: 14px; line-height: 1.3; }
.leaflet-tooltip.tip::before { display: none; }
.leaflet-tooltip.cell small { display: block; margin-top: 3px; font-size: 12.5px; font-weight: 400; opacity: 0.85; }
.leaflet-tooltip.cell { white-space: normal; width: max-content; max-width: 240px; font-weight: 500; }
.leaflet-tooltip.tip b { display: block; font: 700 16px var(--cond); letter-spacing: 0.04em; text-transform: uppercase; }
#credit { position: absolute; z-index: 10; right: calc(var(--pad) + 46px); bottom: calc(var(--pad) + 2px); margin: 0; font-size: 11.5px; color: var(--ink); text-shadow: 0 0 3px var(--ground), 0 0 3px var(--ground); }
.leaflet-control-zoom { animation: arrive 0.4s both; display: grid; gap: 2px; border: 0 !important; border-radius: 0 !important; margin: 0 var(--pad) var(--pad) 0 !important; box-shadow: none !important; transition: opacity 0.5s, margin 0.3s; }
.leaflet-control-zoom a { background: var(--soft) !important; color: var(--ink) !important; border: 0 !important; border-radius: 0 !important; width: 34px !important; height: 34px !important; line-height: 33px !important; font: 600 20px var(--sans) !important; }
.leaflet-control-zoom a.home { display: grid; place-items: center; }
.leaflet-control-zoom a.home svg { width: 16px; height: 16px; }
.leaflet-control-zoom a.home svg path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: square; }
.leaflet-control-zoom a.home svg circle { fill: currentColor; }
.leaflet-control-zoom a.home.off { opacity: 0.35; pointer-events: none; }
.leaflet-control-zoom a:hover { background: var(--ink) !important; color: var(--ground) !important; }
:root[data-list="true"] .leaflet-control-zoom { margin-right: calc(var(--list-w) + 14px) !important; }
:root[data-list="true"] #credit { right: calc(var(--list-w) + 60px); }
/* docked, the map is a picture of itself: no controls, and the whole of it is the way back to the stage */
#map-front { display: none; position: absolute; inset: 0; z-index: 1100; width: auto; height: auto; }
#map-front svg { display: none; }  /* the timeline's own way out is right beside it */
#map-front:hover { background: none; }
#mapbox[data-as="dock"] #map-front { display: grid; }
#mapbox[data-as="dock"] :is(.leaflet-control-zoom, .state-name), :root:not([data-front="map"]) :is(#mappanel, #list, #credit), :root[data-swap] :is(#mappanel, #list, .leaflet-control-zoom) { display: none; }

/* what the map shows and how to read it, set on the page at the top of the left column: the mode, the kinds
   of sector, the key to the colours (its steps are the filter) and the count of cells */
#mappanel { position: absolute; z-index: 10; left: calc(var(--pad) - var(--in)); top: var(--top); display: flex; flex-direction: column; gap: 10px; width: fit-content; max-width: calc(var(--rail) + 2 * var(--in)); padding: 6px var(--in) 12px; background: var(--soft); animation: arrive 0.4s both; transition: opacity 0.5s, visibility 0s; }
#mapctl { display: grid; width: fit-content; max-width: 100%; justify-items: start; row-gap: 2px; }  /* as wide as what it holds: the panel is never a block of empty ground over the map */
/* the kinds of sector: a list, one to a line, when the window has the height; Ranking closes it, a toggle with a
   small list before the word, since it opens the ranked list of the kind that is on and is not a kind itself */
#kindrow { display: flex; flex-direction: column; align-items: flex-start; max-width: 100%; margin-top: 4px; }
#kindrow[hidden] { display: none; }
#kinds { flex-direction: column; align-items: flex-start; flex-wrap: nowrap; gap: 0; }
#kinds button, #rank-btn { font: 600 14.5px/1 var(--cond); letter-spacing: 0.05em; text-transform: uppercase; padding: 4px 0; border-bottom-width: 2px; border-bottom-style: solid; white-space: nowrap; }
#rank-btn { border-bottom-color: transparent; }
#rank-btn { display: inline-flex; align-items: baseline; gap: 6px; flex: none; margin-top: 6px; color: var(--grey); }
#rank-btn svg { width: 13px; height: 10px; flex: none; }
#rank-btn svg path { fill: none; stroke: currentColor; stroke-width: 1.6; }
#rank-btn:hover { border-bottom-color: var(--line); }
#rank-btn[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--green); }
#foot { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
#legend { margin: 0; display: flex; flex-direction: column; gap: 6px; width: 100%; font-size: 13px; font-weight: 500; }
#legend .what { display: flex; align-items: baseline; gap: 8px; font: 700 15px/1.2 var(--cond); letter-spacing: 0.06em; text-transform: uppercase; text-wrap: balance; max-width: 340px; }  /* (no wider than the scale under it: a long title wraps, it does not widen the panel) */
#legend .what .glyph { transform: translateY(1px); }
/* the steps of chance in one strip, green then the four reds, with the chance written where two steps meet.
   Each step is a button: choosing one leaves the cells at that chance or more. */
#legend .steps { display: flex; width: min(340px, 100%); }
#legend .steps button { position: relative; flex: 1; height: 16px; background: var(--c); }
#legend .steps button::after { content: ""; position: absolute; inset: -6px 0; }
#legend .steps button:hover { box-shadow: inset 0 0 0 2px var(--ink); }
#legend .steps button[aria-pressed="false"] { opacity: 0.22; }
#legend .ticks { display: grid; grid-template-columns: repeat(4, 1fr); width: min(272px, 80%); margin: -2px 0 0 min(34px, 10%); text-align: center; color: var(--ink); }
#legend .sw, #legend .rng { display: inline-flex; align-items: center; gap: 8px; }
#legend .sw::before { content: ""; width: 14px; height: 14px; background: var(--c); }
#legend .ramp { display: inline-flex; }
#legend .ramp i { width: 26px; height: 14px; background: var(--c); }
#share { margin: 0; font-size: 14.5px; line-height: 1.25; font-weight: 500; max-width: 26em; }
#share b { font: 800 20px/1 var(--cond); margin-right: 3px; }

/* the ranked list, on the right of the page: one line a row, no rules, no headings. A priority place is its
   rank, its name, a tag if it lies in protected land, and a thin red bar as long as the cells expected to lose
   a hectare there; chosen, it opens into a sentence or two that say why. The list has a way out, which leaves
   the map on its cells, and beside it the same list as a file. */
#list { position: absolute; z-index: 10; right: 0; top: var(--top); bottom: 0; display: flex; flex-direction: column; width: var(--list-w); background: var(--soft); animation: arrive 0.5s both; }
@keyframes arrive { from { opacity: 0; } }
#list-bar { position: absolute; z-index: 1; top: 4px; right: calc(var(--pad) - 10px); display: flex; align-items: center; gap: 4px; }
#list-grab { display: none; }
#list-csv { padding: 8px; font: 600 13.5px/1 var(--cond); letter-spacing: 0.08em; color: var(--grey); text-underline-offset: 3px; }
#list-csv:hover { color: var(--ink); }
#list-in { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 10px var(--pad) 0 18px; }
#list-say { margin: 0 84px 10px 0; font-size: 15px; line-height: 1.35; font-weight: 500; text-wrap: pretty; }
#list-say:empty { display: none; }
#list-say:empty + #list-rows { padding-top: 34px; }  /* the rows start under the way out */
#list-rows button { display: grid; grid-template-columns: 34px minmax(0, 1fr) 84px; column-gap: 8px; align-items: baseline; }
#list-rows.prio button { grid-template-columns: 34px minmax(0, 1fr) 52px 36px; column-gap: 10px; }
#list-rows .h { pointer-events: none; display: flex; justify-content: flex-end; padding: 0 var(--pad) 2px 0; font: 600 12.5px/1 var(--cond); letter-spacing: 0.08em; text-transform: uppercase; color: var(--grey); }
#list-rows { margin: 0 calc(-1 * var(--pad)) 0 -18px; padding: 0 0 14px; list-style: none; }
#list-rows button { width: 100%; min-height: 36px; padding: 4px var(--pad) 4px 18px; text-align: left; }  /* (a row is a comfortable target, top to bottom) */
#list-rows button:hover .nm { text-decoration: underline; text-underline-offset: 3px; }
#list-rows b { font: 800 17px/1.1 var(--cond); color: var(--grey); }
#list-rows .nm { display: flex; align-items: baseline; min-width: 0; font-size: 15px; font-weight: 600; line-height: 1.25; white-space: nowrap; }
#list-rows .nm > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#list-rows .tag { flex: none; margin-inline-start: 8px; font: 600 12px/1 var(--cond); letter-spacing: 0.1em; color: var(--grey); text-decoration: none; }
#list-rows .len { align-self: center; height: 4px; }
#list-rows .len i { display: block; height: 100%; background: var(--red); }
#list .v { text-align: right; white-space: nowrap; }
#list-rows .v { font-size: 15px; font-weight: 700; }
#list-rows button[aria-current] { background: var(--green); color: #fff; }
#list-rows button[aria-current] :is(b, .tag) { color: #fff; }
#list-rows button[aria-current] .len i { background: #fff; }
/* why the chosen place ranks high: a sentence or two under its row, set under the name */
#list-rows .why { padding: 9px var(--pad) 14px 60px; }
#list-rows .why p { margin: 0 0 4px; font-size: 15px; line-height: 1.35; font-weight: 500; text-wrap: pretty; }
/* The people of the Indigenous land that is selected take the timeline's place. In the dock: the photograph
   whole, its credit, the name, the lines, the other peoples as names that open, then the land's headline with its
   way out; the dock is as tall as that needs, up to the map's panel, and scrolls. The hazards and the plot are
   away until the selection is let go. */
.people figure { margin: 0 0 12px; }
.people img { display: block; width: 100%; height: auto; }
.people figcaption { padding: 5px 0 0; font-size: 12px; line-height: 1.3; color: var(--grey); }
.people figcaption a { color: inherit; text-underline-offset: 2px; }
.people h2 { margin: 0 0 6px; font: 800 26px/1.05 var(--cond); }
.people h3 { margin: 14px 0 2px; font: 600 13.5px/1.2 var(--cond); letter-spacing: 0.07em; text-transform: uppercase; color: var(--grey); }
.people p { margin: 0 0 10px; font-size: 15px; line-height: 1.4; text-wrap: pretty; }
.people summary { padding: 5px 0; font-size: 15px; font-weight: 600; cursor: pointer; }
#people { flex: none; margin-bottom: 12px; cursor: default; }
#people-x { position: sticky; top: 0; z-index: 2; float: right; margin-bottom: -34px; background: var(--soft); }
[dir="rtl"] #people-x { float: left; }
:root[data-people] :is(#hazrow, #body) { display: none; }
:root[data-people] #chartbox[data-as="stage"] #hazrow { display: flex; }  /* (on the stage its way out stays, without the hazards) */
:root[data-people] #chartbox[data-as="stage"] #hazard { visibility: hidden; }
:root[data-people] #chartbox[data-as="dock"] { height: auto; max-height: calc(100dvh - var(--panel-bottom, calc(var(--top) + 150px)) - 36px); }
:root[data-people] #chartbox[data-as="dock"] #chartin { height: auto; max-height: calc(100dvh - var(--panel-bottom, calc(var(--top) + 150px)) - 36px); overflow-y: auto; overscroll-behavior: contain; padding-top: var(--in); padding-bottom: var(--in); }
:root[data-people] #chartbox[data-as="dock"] #sub { display: block; }
#chartin.in { animation: arrive 0.45s both; }
@media (min-width: 861px) {
  :root[data-people] #chartbox[data-as="stage"] #chartin { display: block; overflow-y: auto; padding-top: 18px; }
  :root[data-people] #chartbox[data-as="stage"] #people { max-width: 560px; }
  :root[data-people] #chartbox[data-as="stage"] #lead { margin-right: 0; }
}
/* the place that is chosen, marked from far, where its block is smaller than a dot */
#map :is(.leaflet-paint-pane, .leaflet-lines-pane, .leaflet-overlay-pane, .leaflet-veil-pane, .leaflet-sel-pane, .here) { transition: opacity 0.25s; }
#map.flying :is(.leaflet-paint-pane, .leaflet-lines-pane, .leaflet-overlay-pane, .leaflet-veil-pane, .leaflet-sel-pane, .here) { opacity: 0; transition: none; }  /* (while the map flies to a place) */
.here { border: 2.5px solid var(--ink); border-radius: 50%; box-shadow: 0 0 0 2.5px var(--ground), inset 0 0 0 2.5px var(--ground); }

/* ---------- the bulletin and its timeline: which hazard, how bad, what to expect, then the timeline itself ---------- */
#chartin { display: flex; flex-direction: column; padding: 0 var(--cpad); }
#sheet-grab { display: none; }
#hazrow { display: flex; align-items: center; gap: 12px; height: 50px; flex: none; }
#hazard { flex: 1 1 0; min-width: 0; }
#hazard button { display: inline-flex; align-items: center; gap: 7px; }
/* the bulletin. Its red is the alert level: none, a word, a band, the whole block. */
#lead { flex: none; padding-bottom: 10px; }
#level { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; margin: 0 0 10px; min-height: 36px; font: 500 16px/1.15 var(--sans); }
#level b { font: 800 21px/1 var(--cond); letter-spacing: 0.08em; text-transform: uppercase; }
#level .meter { display: inline-flex; gap: 3px; }
#level .meter i { width: 9px; height: 19px; border: 2px solid currentColor; }
#level .meter i.on { background: currentColor; }
#lead[data-l="1"] #level b, #lead[data-l="1"] #level .meter { color: var(--red); }
#lead[data-l="2"] #level, #lead[data-l="3"] #level { padding: 6px 12px; background: var(--red); color: #fff; }
#lead[data-l="3"] { padding: 0 12px 12px; background: var(--red); color: #fff; }
#lead[data-l="3"] #level { margin: 0 -12px 8px; }
#scope { margin: 0 0 4px; font: 600 15px/1.2 var(--cond); letter-spacing: 0.07em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; min-height: 18px; }
#scope button { font: 600 22px/0.8 var(--cond); opacity: 0.7; padding: 0 4px; }
#scope button:hover { opacity: 1; }
#say { margin: 0; font: 800 clamp(28px, 2.9vw, 42px)/1.03 var(--cond); text-wrap: balance; max-width: 26em; }
#sub { margin: 6px 0 0; font-size: 17px; line-height: 1.3; font-weight: 500; text-wrap: pretty; }
#sub:empty { display: none; }  /* no second line, no room kept for one: the band ends after its last line */

/* the timeline takes whatever height the box has left. Its controls sit on it: the scale, bars or a line, the
   window ahead (written on the chart itself where there is room) and the year. */
#body { flex: 1 1 0; display: flex; flex-direction: column; min-height: 0; padding-bottom: 14px; }
#bar { display: flex; align-items: center; gap: 16px; margin-top: 4px; flex: none; }
#ahead { display: none; }
#shape { display: flex; gap: 2px; margin-left: 4px; }
#shape button { width: 24px; height: 24px; display: grid; place-items: center; color: var(--line); }
#shape button[aria-pressed="true"] { color: var(--green); }
#shape button:hover { color: var(--grey); }
#shape svg { width: 15px; height: 13px; }
#shape svg path { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
#step { display: flex; align-items: center; margin-left: auto; font: 700 17px var(--cond); }
#step button { width: 30px; height: 30px; font: 600 24px/1 var(--cond); }
#step button:disabled { opacity: 0.25; }
#step span { min-width: 40px; text-align: center; }
#chart { flex: 1 1 0; min-height: 60px; margin-top: 4px; position: relative; touch-action: pan-y; }
#chart svg { display: block; position: absolute; inset: 0; overflow: visible; }
#chart text { font-family: var(--sans); fill: var(--grey); font-size: 13px; font-weight: 500; }
#chart text.unit { fill: var(--ink); font-size: 13.5px; font-weight: 600; }
#chart .grid line { stroke: var(--line); }
#chart .axis { stroke: var(--ink); stroke-width: 2; }
#chart .bar .plain { fill: var(--ink); opacity: 0.2; }
#chart .bar.can .plain { opacity: 0.42; }
#chart .bar.cur .plain { opacity: 0.85; }
#chart .bar:hover .plain { opacity: 0.6; }
#chart .bar.dim .fc, #chart .bar.dim .rng { opacity: 0.38; }  /* forecast months beyond the chosen window */
#chart .bar .in { fill: var(--ink); }
#chart .h0 { fill: var(--hue); opacity: 0.3; }
#chart .h1 { fill: var(--hue); }
#chart .bar .rng { stroke: var(--ink); stroke-width: 1.5; }
#chart .bar .hot { fill: transparent; }
#chart .bar.can { cursor: pointer; }
#chart .bar text { text-anchor: middle; }
#chart .bar text.end { text-anchor: end; cursor: default; }
#chart .bar.can text { fill: var(--ink); }
#chart .bar.on text { fill: var(--ink); font-weight: 700; }
#chart .bar:focus-visible { outline: none; }
#chart .bar:focus-visible .hot { stroke: var(--ink); stroke-width: 2; }
#chart .line .obs { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
#chart .line .fcl { fill: none; stroke: var(--hue); stroke-width: 2.4; stroke-dasharray: 5 4; }
#chart .line .fcl.dim { opacity: 0.4; }
#chart .line .band { fill: var(--hue); opacity: 0.22; }
#chart .line .rng { stroke: var(--ink); stroke-width: 1.5; }
#chart .line .dot { fill: var(--ink); }
#chart .line .ring { fill: var(--ground); stroke: var(--ink); stroke-width: 3; }
#chart .line .fdot { fill: var(--hue); }
#chart .win { fill: var(--hue); opacity: 0.16; }
#chart .winrule { stroke: var(--hue); stroke-width: 4; }
#chart .now { stroke: var(--ink); stroke-width: 2; }
#chart text.note { font-size: 12.5px; fill: var(--grey); paint-order: stroke; stroke: var(--ground); stroke-width: 4px; stroke-linejoin: round; }
#chart text.caps, #chart .h { font: 600 14px var(--cond); letter-spacing: 0.07em; text-transform: uppercase; }
#chart text.caps { fill: var(--ink); }
#chart .h { cursor: pointer; fill: var(--grey); text-decoration: underline; }
#chart .h.on { fill: var(--ink); font-weight: 800; text-decoration: none; }
#chart .tip text { fill: var(--ink); font-size: 15px; font-weight: 600; paint-order: stroke; stroke: var(--ground); stroke-width: 5px; stroke-linejoin: round; }
#chart .tip path { stroke: var(--ink); stroke-width: 1; }
#chart .tip text + text { fill: var(--grey); font-size: 13px; font-weight: 500; }
#hint { margin: 4px 0 0; font-size: 13.5px; color: var(--grey); flex: none; }
#hint:empty { display: none; }
/* actions: clearing measured against clearing with enforcement held at the reference year's level. The gap is
   forest left standing, so it is forest green, and hatched because it is modelled. Never red: it is good news. */
#chart .s0 { fill: var(--green); opacity: 0.2; }
#chart .s1 { fill: var(--green); }
#chart .acts .plain { fill: var(--ink); opacity: 0.42; }
#chart .acts .bar:hover .plain { opacity: 0.6; }
#chart .acts .held { stroke: var(--green); stroke-width: 3; }
#chart .acts .refrule { stroke: var(--ink); stroke-width: 1; }
#chart .acts .gap { fill: var(--green); opacity: 0.16; }
#chart .acts .fcl, #chart .acts .fdot { stroke: var(--green); }
#chart .acts .fdot { fill: var(--green); stroke: none; }
#chart .acts .key text { fill: var(--ink); }
#chart .acts .tip .back { fill: var(--ground); }
:root[data-scale="actions"] #hint { color: var(--ink); line-height: 1.35; text-wrap: pretty; max-width: 100ch; }
/* signals: small traces with one phrase each. Red only where it is rising. */
#under { flex: none; display: flex; flex-direction: column; }
#signs { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--ink); flex: none; }
#signs > p { flex: 0 0 100%; margin: 0; font: 600 14px/1 var(--cond); letter-spacing: 0.07em; text-transform: uppercase; color: var(--grey); }
#signs > div, #signs > button { flex: 1 1 0; display: block; text-align: left; font: 500 15.5px/1.15 var(--cond); letter-spacing: 0.02em; color: var(--grey); min-width: 0; white-space: nowrap; }
#signs svg { display: block; width: 100%; height: 30px; overflow: visible; margin-bottom: 4px; }
#signs svg path { fill: none; stroke: var(--ink); stroke-width: 1.2; opacity: 0.5; }
#signs svg path.end { stroke-width: 2.6; opacity: 1; }
#signs svg line { stroke: var(--line); }
#signs b { display: block; color: var(--ink); font: 800 20px/1.05 var(--cond); letter-spacing: 0.01em; white-space: nowrap; }
#signs .wide { flex-grow: 1.3; }
#signs .up b { color: var(--red-text); }
#signs .up path.end { stroke: var(--red); }
#signs button:hover span { text-decoration: underline; text-underline-offset: 3px; }
/* the actions themselves, in the signals' place: the same traces, each with its value and the reference year's */
#signs.acts > p { line-height: 1.2; }
#signs.acts > div { white-space: normal; }
#signs.acts b { margin-top: 2px; }

/* on the stage the timeline is the large one. Its content keeps a measure of 1100 px in the middle of the page
   and its plot a height that leaves the bars a sane proportion. The map's dock stands on the upper right
   corner, so the hazards, the level and the headline stop short of it and the plot begins under it. */
@media (min-width: 861px) {
  #chartbox[data-as="stage"] { --cpad: max(var(--pad), calc((100vw - 1100px) / 2)); }
  #chartbox[data-as="stage"] :is(#hazrow, #lead) { margin-right: max(0px, calc(var(--mdock-w) + var(--pad) + 28px - var(--cpad))); }
  /* (the room that keeps the plot under the docked map belongs to the row, not to the bulletin, whose band ends with its text) */
  #chartbox[data-as="stage"] #chartin { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(calc(var(--mdock-h) - 22px), auto) minmax(0, 1fr); }
  #chartbox[data-as="stage"] #lead { align-self: start; }
  #chartbox[data-as="stage"] #chart { max-height: min(460px, 48vh); }
}
#chartbox[data-as="stage"] #signs svg { height: 52px; margin-bottom: 6px; }
/* docked it is compact: the hazards, the level, the headline and the histogram. The whole of it brings it forward. */
#chartbox[data-as="dock"] { --cpad: var(--in); cursor: pointer; }
#chartbox[data-as="dock"] :is(#sub, #under, #scale, #shape, #ahead) { display: none; }
#chartbox[data-as="dock"] #hazrow { height: 40px; gap: 6px; }
#chartbox[data-as="dock"] #hazard { gap: 0 14px; flex-wrap: nowrap; }
#chartbox[data-as="dock"] #hazard button { font-size: 15px; letter-spacing: 0.05em; gap: 5px; }
#chartbox[data-as="dock"] #level { min-height: 30px; margin-bottom: 8px; font-size: 14.5px; }
#chartbox[data-as="dock"] #lead[data-l="2"] #level, #chartbox[data-as="dock"] #lead[data-l="3"] #level { padding: 5px 10px; }
#chartbox[data-as="dock"] #level b { font-size: 18px; }
#chartbox[data-as="dock"] #level .meter i { height: 16px; width: 8px; }
#chartbox[data-as="dock"] #lead { padding-bottom: 4px; }
#chartbox[data-as="dock"] #lead[data-l="3"] { padding: 0 10px 8px; }
#chartbox[data-as="dock"] #lead[data-l="3"] #level { margin: 0 -10px 6px; }
#chartbox[data-as="dock"] #scope { font-size: 13.5px; margin-bottom: 2px; }
#chartbox[data-as="dock"] #say { font-size: 22px; line-height: 1.05; }
#chartbox[data-as="dock"] #body { padding-bottom: var(--in); }
#chartbox[data-as="dock"] #bar { margin: -2px 0 0; }
#chartbox[data-as="dock"] #step { font-size: 15px; margin-right: -6px; }
#chartbox[data-as="dock"] #step button { width: 26px; height: 22px; font-size: 20px; }
#chartbox[data-as="dock"] #chart { margin-top: 2px; }
#chartbox[data-as="dock"] #chart text { font-size: 11.5px; }
#chartbox[data-as="dock"] #chart .bar { cursor: pointer; }

/* ---------- the story. A caption, one line at a time, in the left column between the map's panel and the
   timeline's dock, while the interface is put together around the map: each step brings in one piece of it,
   in the place it keeps. The map does not move. What has not been brought in yet is not on the page (data-has
   lists what has), and what has is not yet for the hand: until the story is over a click anywhere goes on. ---------- */
#story { position: fixed; z-index: 50; left: var(--pad); top: calc(var(--top) + 182px); width: var(--rail); pointer-events: none; }  /* under the key, which in the story is never taller than this */
#story-line { margin: 0; font: 800 clamp(32px, 3vw, 44px)/1.02 var(--cond); text-wrap: balance; }
#story-line { will-change: transform, opacity; }  /* (it leaves and arrives on the story's timeline) */
#story-extra:empty { display: none; }
#story-extra { margin-top: 18px; }
#story-extra .years svg { display: block; overflow: visible; }
#story-extra .years rect { fill: var(--ink); opacity: 0.22; }  /* (each bar's opacity is set as its year runs) */
#story-extra .years p { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; width: 300px; margin: 6px 0 0; font-size: 15px; font-weight: 500; color: var(--grey); }
#story-extra .years p b { margin-right: auto; font: 800 22px/1 var(--cond); color: var(--ink); }
#story-nav { display: flex; align-items: center; gap: 8px; margin-top: 22px; pointer-events: auto; }
#story-marks { display: flex; gap: 4px; margin: 0 auto 0 0; padding: 0; list-style: none; min-width: 0; }
#story-marks li { flex: 0 1 auto; width: 14px; min-width: 4px; height: 4px; background: var(--line); }
#story-marks li.done { background: var(--grey); }
#story-marks li.now { background: var(--ink); }
/* the way on and the way back: two arrows, the way on the larger and green */
#story-next, #story-back { display: grid; place-items: center; flex: none; height: 48px; }
#story-next { width: 84px; background: var(--green); color: #fff; }
#story-next:hover { background: var(--ink); }
#story-back { width: 48px; color: var(--grey); }
#story-back:hover { color: var(--ink); }
#story-back:disabled { visibility: hidden; }
#story-nav svg { width: 26px; height: 16px; }
#story-nav svg path { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: square; stroke-linejoin: miter; }
/* The header keeps the mark, the language and a quiet way out, which stands before the links so that nothing
   moves when it goes. Each piece arrives at the step that speaks of it and stays: the key and the Cells tab with
   the model; the Sectors tab, the kinds and the states' names; the Priorities tab and the list; the timeline; at
   the last step the header's links and the zoom. What has arrived is there to be seen, not yet for the hand. */
:root[data-story]:not([data-has~="nav"]) :is(#story-btn, #about-btn, #api-btn) { display: none; }
:root[data-story] #skip-btn { display: block; order: 1; margin: 0 22px 0 0; }
:root[data-story] #nav { order: 2; }
:root[data-story] #menu-btn { order: 3; }
:root[data-story] :is(#mapbox, #mappanel, #chartbox, #list, #story-btn, #about-btn, #api-btn, #menu-btn, .leaflet-control-zoom, .leaflet-control-zoom a) { pointer-events: none !important; cursor: default; }
:root[data-story]:not([data-has~="legend"]) #mappanel, :root[data-story]:not([data-has~="nav"]) .leaflet-control-zoom, :root[data-story]:not([data-has~="chart"]) #chartbox { opacity: 0; visibility: hidden; }
:root[data-story]:not([data-has~="sectors"]) :is(#modes button[data-k="sectors"], #kindrow), :root[data-story]:not([data-has~="prio"]) #modes button[data-k="prio"] { visibility: hidden; }
:root[data-story]:not([data-has~="sectors"]) .state-name { display: none; }
/* What arrives, leaves or moves in the story does so on the story's one timeline (GSAP, app.js), which sets opacity
   and transform and nothing else. So here the pieces' own entrances and transitions stand down while it plays (an
   entrance is made instant, not removed, so it does not play again when the story ends), and the two tabs and the
   swatch of mapped clearing, which are drawn again at every step, take their opacity from a variable on their row. */
:root[data-story] :is(#mappanel, #list, .leaflet-control-zoom) { animation-duration: 0s; }
:root[data-story] :is(#mappanel, .box, .leaflet-control-zoom) { transition: none; }
:root[data-story] :is(#about[open] > *, #api[open] > *) { animation: none; }
:root[data-story] #modes button[data-k="sectors"] { opacity: var(--a-sectors, 1); }
:root[data-story] #modes button[data-k="prio"] { opacity: var(--a-prio, 1); }
:root[data-story] #legend .sw { opacity: var(--mapped, 1); }
:root[data-story] .box.shot { will-change: transform; }

/* ---------- what takes the stage in the map's place: About (what this is, the model's figure, the benchmark)
   and the API's instructions. Each fills the page under the header, its content a column in the middle; the map
   is the small picture in the upper right corner, and the column stops short of it. Each has its way out at the
   top, which stays there while the text passes under it. ---------- */
#about, #api { position: fixed; z-index: 38; inset: var(--top) 0 0 0; width: auto; max-width: none; height: auto; max-height: none; margin: 0; padding: 0 var(--apad) 40px; overflow-y: auto; overscroll-behavior: contain; border: 0; background: var(--ground); color: var(--ink); --apad: max(var(--pad), calc((100vw - 780px) / 2)); }
#api { --apad: max(var(--pad), calc((100vw - 1000px) / 2)); }
/* a panel takes the stage whole, at once, so nothing shows through it on the way; what is in it comes in */
#about[open] > *, #api[open] > * { animation: enter 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes enter { from { opacity: 0; } }  /* (what comes in fades in at its own size: nothing is ever scaled) */
.pbar { position: sticky; top: 0; z-index: 1; display: flex; justify-content: flex-end; flex: none; padding: 8px 0 4px; background: var(--ground); }
.pbar .x:not(.ico) { margin-right: -10px; }
/* in the story one piece has the stage at a time, in the middle of it, and nothing scrolls */
#about[data-only] { display: flex; flex-direction: column; padding-bottom: 0; overflow: hidden; }
#about[data-only]:not([open]) { display: none; }
#about[data-only] #about-body { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; justify-content: center; padding-bottom: 20px; }
#about[data-only="fig"] #about-body > :not(#model-fig), #about[data-only="bench"] #about-body > :not(h3, .bench, .go) { display: none; }
#about[data-only] #model-fig { margin: 0; }
#about[data-only] h3 { margin-top: 0; padding-top: 0; border-top: 0; }
@media (min-width: 861px) {
  #about, #api { padding-right: max(var(--apad), calc(var(--mdock-w) + var(--pad) + 28px)); }
  /* in the story the caption keeps the left column, the panel has the rest, and the map waits small in its corner */
  :root[data-story] #about { padding-left: calc(var(--pad) + var(--rail) + 48px); padding-right: calc(var(--mdock-w) + var(--pad) + 28px); }
  :root[data-story] #about > * { width: 100%; max-width: 800px; margin-left: auto; margin-right: auto; }
}
#about h3 { margin: 26px 0 6px; padding-top: 12px; border-top: 1px solid var(--ink); font: 700 17px var(--cond); letter-spacing: 0.07em; text-transform: uppercase; }
#about p { margin: 0 0 10px; font-size: 16px; line-height: 1.42; max-width: 62ch; text-wrap: pretty; }
#about p b { font-weight: 600; }
#about a { color: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
/* what this is and who it is for, in the voice of the headline */
#about .lede p { margin: 0 0 8px; max-width: 30em; font: 700 25px/1.14 var(--cond); letter-spacing: 0.005em; }
/* the benchmark: a bare table, a model a row, the one on this site first. Then the way in, as a button. */
#about .bench { width: 100%; margin: 8px 0 4px; border-collapse: collapse; font-size: 15px; }
#about .bench th { padding: 0 10px 6px 0; text-align: left; font: 600 13.5px var(--cond); letter-spacing: 0.07em; text-transform: uppercase; color: var(--grey); white-space: nowrap; }
#about .bench td { padding: 6px 10px 6px 0; vertical-align: baseline; white-space: nowrap; }
#about .bench :is(th, td).n { text-align: right; }
#about .bench td.n { font: 800 20px/1 var(--cond); }
#about .bench tr.ref td { color: var(--grey); }
#about .metric { margin-bottom: 18px; font-size: 13.5px; color: var(--grey); }
#about .go { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin: 14px 0 22px; }
#about .go .btn { display: inline-flex; align-items: center; height: 46px; padding: 0 22px; background: var(--green); color: #fff; font: 700 17px/1 var(--cond); letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; }
#about .go .btn:hover { background: var(--ink); }
#about .by { margin-top: 26px; font-size: 14px; color: var(--grey); }

/* the API's instructions for agents as the file has them, and nothing else. One line above the block, the base
   address and a way to copy the text. The block scrolls inside the panel. */
#api[open] { display: flex; flex-direction: column; }
#api-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; margin: 0 0 12px; font-size: 16px; font-weight: 600; flex: none; }
#api-top a { color: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; overflow-wrap: anywhere; }
#api-text { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; margin: 0; padding-top: 12px; border-top: 1px solid var(--ink); font: 13px/1.5 ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4; }

/* where there is not the height for the list (a short window) the kinds are one row that never wraps, Ranking at its end; its type is never under 13 px: the gaps tighten first, and then the row scrolls */
@media (min-width: 861px) and (max-height: 780px) { #mapctl { grid-template-columns: minmax(0, auto); } #kindrow { flex-direction: row; align-items: baseline; gap: 14px; } #kinds { flex-direction: row; flex: 0 1 auto; min-width: 0; gap: 0 14px; overflow-x: auto; scrollbar-width: none; } #kinds::-webkit-scrollbar { display: none; } #rank-btn { margin-top: 0; } }
@media (min-width: 861px) and (max-height: 879px) { :root[data-story] #mappanel:has(#kindrow:not([hidden])) #mapctl { grid-template-columns: minmax(0, auto); } :root[data-story] #mappanel:has(#kindrow:not([hidden])) #kindrow { flex-direction: row; align-items: baseline; gap: 14px; } :root[data-story] #mappanel:has(#kindrow:not([hidden])) #kinds { flex-direction: row; flex: 0 1 auto; min-width: 0; gap: 0 14px; overflow-x: auto; scrollbar-width: none; } :root[data-story] #mappanel:has(#kindrow:not([hidden])) #kinds::-webkit-scrollbar { display: none; } :root[data-story] #mappanel:has(#kindrow:not([hidden])) #rank-btn { margin-top: 0; } }  /* (in the story, where the window has not the height for the list and the caption under it) */
/* a tall window: the kinds are the list in the story as in the tool, and the caption stands under it, at one place for every step, its type a little smaller so the timeline keeps its dock */
@media (min-width: 861px) and (min-height: 880px) { :root[data-story] #story { top: calc(var(--top) + 258px); } :root[data-story] #story-line { font-size: clamp(28px, 2.6vw, 38px); } }
@media (min-width: 861px) {
  /* and the photograph gives way before anything meets: whole, only smaller */
  :root[data-people] #chartbox[data-as="dock"] .people img { width: auto; max-width: 100%; max-height: max(110px, calc(100dvh - var(--panel-bottom, calc(var(--top) + 150px)) - 36px - 250px)); }
}
/* short screens: the dock and the type step down so the Amazon keeps its height */
@media (min-width: 861px) and (max-height: 780px) {
  :root { --top: 48px; --dock-h: 262px; --mdock-h: 188px; --mdock-w: 280px; --panel-h: 222px; }
  #say { font-size: clamp(25px, 2.5vw, 34px); }
  #sub { font-size: 15.5px; }
  #hazrow { height: 44px; }
  #chartbox[data-as="stage"] #signs svg { height: 34px; }
  #story-line { font-size: clamp(26px, 2.5vw, 32px); }
  #story-nav { margin-top: 14px; }
}
@media (min-width: 861px) and (max-width: 1180px) { :root { --list-w: 340px; --rail: 380px; } }
@media (prefers-reduced-motion: reduce) {
  .leaflet-image-layer, canvas.cells, .box, #mappanel, .loss, .leaflet-control-zoom, #list, #chartbox, #story { transition: none !important; }
  #list, #about[open] > *, #api[open] > * { animation: none; }
}
/* the model's figure, in About: a stack of planes drawn on a canvas, and their names as text beside them */
#model-fig { position: relative; margin: 14px 0 20px; }
#model-fig canvas { display: block; }
#model-fig ol { margin: 0; padding: 0; list-style: none; }
#about #model-fig li { position: absolute; margin: 0; font-size: 15px; line-height: 1.1; font-weight: 500; white-space: nowrap; transform: translateY(-50%); }
#about #model-fig li small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--grey); }
#about #model-fig li.m { font: 800 22px/1 var(--cond); letter-spacing: 0.02em; }
#about #model-fig li.o { font: 700 18px/1.1 var(--cond); letter-spacing: 0.02em; color: var(--red-text); }
.seg:has(button:first-child[aria-pressed="true"]) { margin-left: 0; }  /* the first word keeps the column's edge, as type or as a chip */

/* ---------- a phone. The map is the screen. Under the header a band says what it shows. At the bottom there is
   one sheet at a time: the bulletin, which rests showing its level, its headline and its plot and is pulled up
   to the header; or the ranked list, and then the bulletin waits behind a small handle under it. The header is
   the mark and one menu. The story's caption sits at the bottom, at the thumb, and the sheets stand on it until
   it goes. Type has its own scale here: the story's line 27, a headline 21, text 15.5, labels 12.5. Everything
   that is tapped is 44 px or more. ---------- */
@media (max-width: 860px) {
  :root { --top: 48px; --pad: 16px; --in: 0px; --panel-h: 128px; --peek-min: 302px; --peek: var(--peek-user, var(--peek-min)); --handle: 30px; --cap: 0px; --list-top: 56dvh; }
  :root[data-list="true"] { --peek: 0px; }                              /* the list is open: it has the sheet's place whole, and the bulletin is away until it closes */
  :root[data-story] { --cap: 130px; }                                   /* (until the page says how tall the caption is) */
  :root[data-story]:not([data-has~="nav"]) { --peek: 213px; }                                  /* (in the story the bulletin rests without its hazards and its headline: nothing is for the hand yet, and the caption is the headline) */
  :root[data-story]:not([data-has~="chart"]) { --peek: 0px; }           /* (the bulletin has not come in yet) */
  .brand { font-size: 25px; gap: 9px; }
  .brand svg { width: 20px; height: 20px; }
  #top { padding: 0 4px 0 16px; }
  #menu-btn { display: grid; place-items: center; width: 48px; height: 48px; }
  #menu-btn svg { width: 20px; height: 15px; }
  #menu-btn svg path { fill: none; stroke: currentColor; stroke-width: 2; }
  #nav { display: none; position: fixed; z-index: 60; top: var(--top); right: 0; flex-direction: column; gap: 0; min-width: 210px; padding: 4px 0 8px; background: var(--soft); }
  :root[data-menu] #nav { display: flex; }
  #nav button { min-height: 50px; padding: 0 22px; border: 0; text-align: left; font-size: 17px; }
  /* in the story the header keeps the language and the way out, side by side */
  :root[data-story]:not([data-has~="nav"]) :is(#menu-btn, #story-btn, #about-btn, #api-btn) { display: none; }
  :root[data-story]:not([data-has~="nav"]) #nav { display: flex; position: static; flex-direction: row; min-width: 0; padding: 0; background: none; box-shadow: none; }  /* (at the last step the header is the tool's: the menu, with the language in it) */
  :root[data-story] #skip-btn { margin: 0 6px 0 0; }
  :root[data-story] #nav button, #skip-btn { min-width: 48px; min-height: 48px; padding: 0 10px; border: 0; font-size: 16px; text-align: center; }
  #skip-btn { margin: 0 6px 0 0; color: var(--ink); }
  .pick { flex-wrap: nowrap; gap: 0 16px; overflow-x: auto; scrollbar-width: none; }
  .pick::-webkit-scrollbar { display: none; }
  .pick button { min-height: 44px; padding: 0; font-size: 15px; }
  .x { width: 44px; height: 44px; }
  /* what the map shows: a band under the header, the mode and a short key */
  #mappanel { left: 0; top: var(--top); width: 100%; padding: 0 16px 10px; gap: 4px; }
  #mapctl { width: 100%; }
  #modes { width: calc(100% + 20px); justify-content: space-between; }  /* across the screen: the first word at the left edge of the page, the last ending at the right */
  #modes:has(button:first-child[aria-pressed="true"]), #modes:has(button:last-child[aria-pressed="true"]) { width: calc(100% + 10px); }
  .seg { margin-left: -10px; }
  .seg button { min-height: 44px; padding: 0 10px; font-size: 16px; }
  #kindrow { flex-direction: row; align-items: center; gap: 14px; width: 100vw; max-width: none; margin: 0 -16px; padding: 0 16px; }
  #kinds { flex-direction: row; flex: 0 1 auto; min-width: 0; margin: 0; gap: 0 14px; }
  #kinds button, #rank-btn { min-height: 40px; }
  #mapctl { grid-template-columns: minmax(0, 1fr); }
  #rank-btn { margin-top: 0; margin-inline-start: auto; align-items: center; justify-content: flex-end; position: relative; min-width: 24px; font-size: 0 !important; gap: 0; }  /* (on a phone the toggle is its glyph: the row is the kinds') */
  #rank-btn svg { width: 18px; height: 14px; }
  #rank-btn::after { content: ""; position: absolute; inset: -2px -8px -2px -12px; }  /* a 44 px target */
  #kindrow { gap: 8px; }
  #legend { gap: 5px; font-size: 12.5px; }
  #legend .what { font-size: 13.5px; max-width: none; }
  #legend .steps { width: 100%; }
  #legend .steps button { height: 12px; }
  #legend .steps button::after { inset: -16px 0; }
  #legend .ticks { width: 80%; margin-left: 10%; }
  #legend .rng { display: flex; width: 100%; }
  #legend .ramp { flex: 1; }
  #legend .ramp i { flex: 1; width: auto; }
  #share { display: none; }
  #credit { right: 10px; bottom: calc(var(--peek) + var(--cap) + 104px); max-width: 46%; text-align: right; }
  .leaflet-control-zoom { margin: 0 10px calc(var(--peek) + var(--cap) + 10px) 0 !important; }
  :root[data-list="true"] .leaflet-control-zoom, :root[data-story]:not([data-has~="nav"]) .leaflet-control-zoom { display: none; }  /* the list has the lower half; two fingers zoom */
  :root[data-story]:not([data-has~="nav"]) #chartbox[data-as="dock"] :is(#hazrow, #say) { display: none; }
  .leaflet-control-zoom a { width: 44px !important; height: 44px !important; line-height: 43px !important; font-size: 24px !important; }
  /* the map stays the screen when the bulletin's sheet is up */
  #mapbox[data-as="dock"] { inset: 0; width: auto; height: auto; z-index: 0; }
  #mapbox[data-as="dock"] #map-front { display: none; }
  :root[data-front="chart"] #mappanel { display: flex; }
  /* the bulletin: a sheet. At rest its top shows: the hazards, the level, the headline and the plot. */
  #chartbox[data-as] { left: 0; right: 0; bottom: var(--cap); width: auto; height: auto; z-index: 20; background: var(--ground); transition: top 0.34s cubic-bezier(0.2, 0.7, 0.2, 1), bottom 0.34s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.5s, visibility 0s; }
  #chartbox[data-as="dock"] { top: calc(100dvh - var(--peek) - var(--cap)); --cpad: 16px; }
  :root[data-story] #chartbox[data-as] { transition: top 0.34s cubic-bezier(0.2, 0.7, 0.2, 1), bottom 0.34s cubic-bezier(0.2, 0.7, 0.2, 1); }  /* (in the story its opacity is the timeline's; the sheet still slides) */
  /* under its rest the sheet gives its room to the plot: the band and the headline shrink together (--shrink, 0 at the rest, 1 at the floor), then the band goes, then the headline; the plot is redrawn to what is left, never under its floor */
  :root[style*="--shrink"] #chartbox[data-as="dock"] #say { font-size: calc(21px - 6px * var(--shrink)); line-height: 1.05; }
  :root[style*="--shrink"] #chartbox[data-as="dock"] #level { min-height: calc(32px - 8px * var(--shrink)); margin-bottom: calc(8px - 4px * var(--shrink)); font-size: calc(13px - 1px * var(--shrink)); }
  :root[style*="--shrink"] #chartbox[data-as="dock"] #level b { font-size: calc(17px - 4px * var(--shrink)); }
  :root[style*="--shrink"] #chartbox[data-as="dock"] #lead { padding-bottom: calc(6px - 3px * var(--shrink)); }
  :root:is([data-sheet="noband"], [data-sheet="nohead"]) #chartbox[data-as="dock"] :is(#level, #scope) { display: none; }
  :root[data-sheet="nohead"] #chartbox[data-as="dock"] #lead { display: none; }
  #chartbox[data-as="stage"] { top: var(--top); --cpad: 16px; }
  #chartbox.dragging, #list.dragging { transition: none; }
  #sheet-grab, #list-grab { touch-action: none; }
  #chartbox[data-as="dock"], #chartbox[data-as="dock"] * { touch-action: none; }  /* at rest the whole sheet is its grip: the browser does not take the finger for a scroll or a zoom */
  #chartbox[data-as="stage"] #chartin { touch-action: pan-y; }
  #sheet-grab { position: relative; display: block; flex: none; width: 100%; height: 20px; margin-bottom: -6px; }
  #sheet-grab::before, #list-grab::before { content: ""; display: block; width: 40px; height: 4px; margin: 0 auto; background: var(--line); }
  #sheet-grab::after { content: ""; position: absolute; inset: -12px 0; }  /* a 44 px target */
  :root[data-list="true"]:not([data-story]) #chartbox[data-as="dock"] { visibility: hidden; }  /* (nothing of it shows or can be reached under the list) */
  #hazrow { height: 44px; }
  #hazard { gap: 0 14px; }
  #hazard button { font-size: 15px; letter-spacing: 0.04em; gap: 5px; }
  #chartbox[data-as="dock"] #chart-front { display: none; }
  /* pulled up, the way out shares the grip's row, which stays at the top while the sheet scrolls; the hazards keep the whole width */
  #chartbox[data-as="stage"] #sheet-grab { position: sticky; top: 0; z-index: 2; height: 44px; margin-bottom: -6px; background: var(--ground); }
  #chartbox[data-as="stage"] #chart-front { position: fixed; z-index: 22; top: var(--top); right: 2px; width: 44px; height: 44px; }
  #level { flex-wrap: nowrap; min-height: 32px; margin-bottom: 8px; font-size: 13px; gap: 2px 8px; }
  #level span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #chartbox[data-as="stage"] #level { flex-wrap: wrap; }  /* pulled up there is room for the whole of it */
  #chartbox[data-as="stage"] #level span:last-child { white-space: normal; }
  #level b { font-size: 17px; }
  #level .meter i { height: 15px; width: 8px; }
  #scope { font-size: 13.5px; }
  #scope button { position: relative; }
  #scope button::after { content: ""; position: absolute; inset: -14px -12px; }  /* a 44 px target without moving the text */
  #say, #chartbox[data-as="dock"] #say { font-size: 21px; line-height: 1.07; }
  #sub { font-size: 15px; margin-top: 4px; }
  #chartbox[data-as="dock"] #say { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  #chartbox[data-as="dock"] #hazrow { height: 44px; gap: 12px; }
  #chartbox[data-as="dock"] #hazard { gap: 0 14px; }
  #chartbox[data-as="dock"] #hazard button { font-size: 15px; letter-spacing: 0.04em; }
  #chartbox[data-as="dock"] #level { min-height: 32px; margin-bottom: 8px; font-size: 13px; }
  #chartbox[data-as="dock"] #level b { font-size: 17px; }
  #chartbox[data-as="dock"] #lead { padding-bottom: 6px; }
  #chartbox[data-as="dock"] #body { flex: 1 1 0; padding-bottom: 10px; }
  #chartbox[data-as="dock"] #chart { flex: 1 1 0; min-height: 24px; margin-top: 0; }
  #chartbox[data-as="dock"] #step button { width: 44px; height: 30px; }
  #chart text, #chartbox[data-as="dock"] #chart text { font-size: 12px; }
  #chart text.unit { font-size: 12.5px; }
  #chart text.caps, #chart .h { font-size: 13px; }
  #chart .tip text { font-size: 14px; }
  #chart .tip text + text { font-size: 12.5px; }
  /* pulled up, the sheet scrolls: the tabs, the timeline at a fixed height, the signals */
  #chartbox[data-as="stage"] #chartin { overflow-y: auto; overscroll-behavior: contain; }
  #chartbox[data-as="stage"] #body { flex: none; padding-bottom: 24px; }
  #chartbox[data-as="stage"] #chart { flex: none; height: 324px; margin-top: 0; }
  #chartbox[data-as="stage"] #signs svg { height: 26px; margin-bottom: 4px; }
  #bar { margin-top: 0; flex-wrap: wrap; row-gap: 0; }  /* three scales, the two glyphs and the year stepper do not fit one row on a narrow phone */
  #ahead { display: flex; margin-left: auto; }
  #step button { width: 44px; height: 44px; font-size: 26px; }
  #step span { min-width: 44px; }
  #shape { margin-left: 0; }
  #shape button { width: 36px; height: 44px; }
  #chart .h { text-decoration: none; cursor: default; }
  #chart .h:not(.on) { display: none; }  /* the choice is the row of buttons above the chart */
  #hint { font-size: 12.5px; }
  #signs > p { font-size: 12.5px; }
  #signs > div, #signs > button { flex: 1 1 28%; min-height: 44px; font-size: 14px; }
  #signs b { font-size: 18px; }
  #signs.acts > div { flex-basis: 40%; }
  /* the ranked list: a sheet over the lower half, standing on the bulletin's handle. Its bar has the name of
     the list, which pulls it up to the header and back, the file and the way out. */
  #list { left: 0; right: 0; top: var(--list-top); bottom: calc(var(--cap) + var(--peek)); width: auto; z-index: 25; background: var(--ground); transition: top 0.34s cubic-bezier(0.2, 0.7, 0.2, 1), bottom 0.34s cubic-bezier(0.2, 0.7, 0.2, 1); }
  #list[data-at="full"] { top: var(--top); }
  #list-bar { position: static; display: flex; align-items: center; gap: 0; flex: none; height: 50px; padding: 0 4px 0 16px; }
  #list-grab { display: block; flex: 1; align-self: stretch; padding-top: 7px; text-align: left; font: 700 16px/1 var(--cond); letter-spacing: 0.07em; text-transform: uppercase; }
  #list-grab::before { margin: 0 auto 9px; transform: translateX(46px); }
  #list-csv { display: grid; place-items: center; min-width: 48px; height: 44px; padding: 0 8px; font-size: 13px; }
  #list-in { padding: 0 16px; }
  #list-say { margin-right: 0; font-size: 15px; }
  #list-say:empty + #list-rows { padding-top: 0; }
  #list-rows { margin: 0 -16px; }
  #list-rows button { min-height: 44px; align-items: center; padding: 4px 16px; }
  #list-rows.prio button { grid-template-columns: 30px minmax(0, 1fr) 44px 38px; }
  #list-rows .h { padding-right: 16px; }
  #list-rows .nm { font-size: 15.5px; }
  #list-rows .tag { font-size: 12.5px; }
  #list-rows .why { padding: 6px 16px 12px 58px; }
  #list-rows .why p { font-size: 15.5px; }
  /* the story's caption: at the bottom, as tall as its line, the way on large under the thumb */
  #story { left: 0; right: 0; top: auto; bottom: 0; width: auto; display: flex; flex-direction: column; padding: 10px 16px calc(8px + env(safe-area-inset-bottom)); background: var(--ground); pointer-events: auto; }
  #story-line { font-size: 24px; line-height: 1.08; }
  #story-extra { display: none; }
  #story-nav { margin-top: 6px; }
  #story-next { width: 64px; height: 48px; }
  #story-back { width: 48px; height: 48px; }
  /* a panel on the stage has the whole height: its X stands in the header's row, beside the menu; in the story the arrows are the way on and there is no X */
  .pbar { position: fixed; z-index: 61; top: 0; right: 48px; height: var(--top); padding: 0; background: none; align-items: center; }
  .pbar .x { margin: 0; }
  :root[data-story] .pbar { display: none; }
  #about, #api { padding-top: 10px; z-index: 41; }
  #about[data-only] { padding-top: 0; }
  #about[data-only="bench"] #about-body { justify-content: flex-start; padding-top: 14px; }
  /* About fills the screen; in the story it stands between the header and the caption, so the line, the way on and Skip stay in reach */
  #about, #api { --apad: var(--pad); }
  :root[data-story] #about { inset: var(--top) 0 var(--cap) 0; height: auto; z-index: 45; }
  #about p { font-size: 15.5px; }
  #about .lede p { font-size: 21px; }
  #about h3 { font-size: 16px; }
  #about a { padding: 4px 0; }
  #about .bench { font-size: 14.5px; }
  #about .bench th { font-size: 12.5px; }
  #about .bench td.n { font-size: 19px; }
  #about .metric { font-size: 12.5px; }
  #about #model-fig li { font-size: 12.5px; white-space: normal; }
  #about #model-fig li.m { font-size: 17px; }
  #about #model-fig li.o { font-size: 14.5px; }
  #about .bench :is(th, td):nth-child(n+5) { display: none; }  /* who and when give way on a narrow screen: the model's link has both */
  #about .go .btn { height: 50px; }
  /* a phone: the people lead the bulletin's sheet, the photograph across the screen; at rest the sheet shows the photograph and the name, pulled up the rest */
  #people { margin: 0 calc(-1 * var(--cpad)) 10px; }
  .people figcaption, .people h2, .people h3, .people p, .people details { margin-left: 16px; margin-right: 16px; }
  .people h2 { font-size: 21px; }
  .people p, .people summary { font-size: 15.5px; }
  .people summary { min-height: 44px; display: flex; align-items: center; }
  :root[data-people]:not([data-list="true"]) { --peek: var(--peek-user, 356px); }  /* (the photograph, the name and the headline, at rest) */
  :root[data-people] #chartbox[data-as="dock"] { height: auto; max-height: none; }
  :root[data-people] #chartbox[data-as="dock"] #chartin { height: 100%; max-height: none; overflow: hidden; padding-top: 0; padding-bottom: 0; }
  :root[data-people] #chartbox[data-as="dock"] #people :is(p, h3, details) { display: none; }
  #people-x { margin-bottom: -44px; }
  #chartbox[data-as="stage"] #people-x { display: none; }  /* (pulled up, the sheet's own X is right there; the land is let go by the X beside its name) */
  :root[data-people] #chartbox[data-as="dock"] #people figure { max-height: 190px; overflow: hidden; margin-bottom: 8px; }
  :root[data-people] #chartbox[data-as="dock"] #people figcaption { display: none; }
  :root[data-people] #chartbox[data-as="dock"] :is(#level, #sub) { display: none; }
  :root[data-people] #chartbox[data-as="stage"] #chartin { padding-bottom: 30px; }
  #api-top a { min-height: 44px; display: inline-flex; align-items: center; }
  #api-text { font-size: 12px; padding-bottom: 24px; }
}
/* a short phone: the bulletin rests lower, without its hazards, so the Amazon keeps its place above it */
@media (max-width: 860px) and (max-height: 700px) {
  :root { --peek-min: 216px; }
  #chartbox[data-as="dock"] #hazrow { display: none; }
  #chartbox[data-as="dock"] #sheet-grab { margin-bottom: 0; }
}

/* ---------- right to left (Arabic). The page is mirrored: the column of type on the right, the ranked list on
   the left, the docked map in the upper left corner, the arrows of the story turned. Time on the charts still
   runs left to right, as it does in Arabic-language charts of dates, and so do the map and the model's figure. ---------- */
[dir="rtl"] :is(#map, #chart, #signs svg, #model-fig, .years) { direction: ltr; }
[dir="rtl"] .brand { margin-right: 0; margin-left: auto; }
[dir="rtl"] #skip-btn { margin-left: 0; margin-right: 22px; }
[dir="rtl"] #story-nav svg { transform: scaleX(-1); }
[dir="rtl"] #story-marks { margin: 0 0 0 auto; }
[dir="rtl"] .seg { margin-left: 0; margin-right: -9px; }
[dir="rtl"] #list-rows button, [dir="rtl"] #signs > div, [dir="rtl"] #signs > button { text-align: right; }
[dir="rtl"] .pbar .x:not(.ico) { margin-right: 0; margin-left: -10px; }
@media (max-width: 860px) { [dir="rtl"] .pbar { right: auto; left: 48px; } [dir="rtl"] .pbar .x { margin: 0; } }
@media (min-width: 861px) {
  [dir="rtl"] #mappanel { left: auto; right: calc(var(--pad) - var(--in)); }
  [dir="rtl"] #chartbox[data-as="dock"] { left: auto; right: calc(var(--pad) - var(--in)); }
  [dir="rtl"] #list { right: auto; left: 0; }
  [dir="rtl"] #list-bar { right: auto; left: calc(var(--pad) - 10px); }
  [dir="rtl"] #list-in { padding: 10px 18px 0 var(--pad); }
  [dir="rtl"] #list-rows { margin: 0 -18px 0 calc(-1 * var(--pad)); }
  [dir="rtl"] #list-rows button { padding: 4px 18px 4px var(--pad); }
  [dir="rtl"] #list-rows .why { padding: 9px 60px 14px var(--pad); }
  [dir="rtl"] #list-rows .h { padding: 0 0 2px var(--pad); }
  [dir="rtl"] #list-say { margin: 0 0 10px 84px; }
  [dir="rtl"] #story { left: auto; right: var(--pad); }
  [dir="rtl"] #mapbox[data-as="dock"] { right: auto; left: var(--pad); }
  [dir="rtl"] .leaflet-right { right: auto; left: 0; }
  [dir="rtl"] .leaflet-control-zoom { margin: 0 0 var(--pad) var(--pad) !important; float: left; }
  [dir="rtl"]:root[data-list="true"] .leaflet-control-zoom { margin-left: calc(var(--list-w) + 14px) !important; margin-right: 0 !important; }
  [dir="rtl"] #credit { right: auto; left: calc(var(--pad) + 46px); }
  [dir="rtl"] #about, [dir="rtl"] #api { padding-right: var(--apad); padding-left: max(var(--apad), calc(var(--mdock-w) + var(--pad) + 28px)); }
  [dir="rtl"]:root[data-story] #about { padding-right: calc(var(--pad) + var(--rail) + 48px); padding-left: calc(var(--mdock-w) + var(--pad) + 28px); }
  [dir="rtl"] #chartbox[data-as="stage"] :is(#hazrow, #lead) { margin-right: 0; margin-left: max(0px, calc(var(--mdock-w) + var(--pad) + 28px - var(--cpad))); }
}

/* ---------- type by script. Barlow is Latin only. Elsewhere the reader's own system face is used, chosen per
   script for weight and for speed, and a headline is the same idea in that script: the heaviest weight the face
   has, a size a little under the Latin one (these scripts are wider and taller), no tracking, no capitals. ---------- */
:root[lang="ru"] { --sans: "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif; --cond: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", "Segoe UI", Arial, sans-serif; }
:root[lang="ar"] { --sans: "SF Arabic", "Geeza Pro", "Segoe UI", "Noto Sans Arabic", Tahoma, sans-serif; --cond: var(--sans); }
:root[lang="hi"] { --sans: "Kohinoor Devanagari", "Noto Sans Devanagari", "Nirmala UI", Mangal, sans-serif; --cond: var(--sans); }
:root[lang="bn"] { --sans: "Kohinoor Bangla", "Noto Sans Bengali", "Nirmala UI", Vrinda, sans-serif; --cond: var(--sans); }
:root[lang="zh"] { --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif; --cond: var(--sans); }
:root[lang="ja"] { --sans: "Hiragino Sans", "Yu Gothic", Meiryo, "Noto Sans CJK JP", sans-serif; --cond: var(--sans); }
:root[lang="ko"] { --sans: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", sans-serif; --cond: var(--sans); }
:root:is([lang="ar"], [lang="hi"], [lang="bn"], [lang="zh"], [lang="ja"], [lang="ko"]) :is(#nav button, #skip-btn, .pick button, .seg button, #rank-btn, #legend .what, #level b, #scope, #signs > p, #about h3, #about .bench th, #about .go .btn, #list-rows .h, #list-rows .tag, #list-csv, #list-grab, .people h3, #chart text.caps, #chart .h, #api-copy) { letter-spacing: 0; text-transform: none; }
:root:is([lang="ar"], [lang="hi"], [lang="bn"], [lang="zh"], [lang="ja"], [lang="ko"]) :is(#say, #story-line, #about .lede p, .people h2) { font-weight: 700; line-height: 1.25; letter-spacing: 0; }
:root:is([lang="ar"], [lang="hi"], [lang="bn"], [lang="zh"], [lang="ja"], [lang="ko"]) #story-line { font-size: clamp(26px, 2.5vw, 36px); }
:root:is([lang="ar"], [lang="hi"], [lang="bn"], [lang="zh"], [lang="ja"], [lang="ko"]) #say { font-size: clamp(24px, 2.4vw, 34px); }
:root:is([lang="ar"], [lang="hi"], [lang="bn"], [lang="zh"], [lang="ja"], [lang="ko"]) #chartbox[data-as="dock"] #say { font-size: 19px; }
:root:is([lang="ar"], [lang="hi"], [lang="bn"], [lang="zh"], [lang="ja"], [lang="ko"]) :is(.seg button, .pick button, #nav button) { font-size: 14.5px; font-weight: 600; }
.brand { font-family: "Oficina", "Barlow Condensed", "Arial Narrow", sans-serif; }  /* the wordmark is Latin, in its own face, in every language */
@media (max-width: 860px) {
  :root:is([lang="ar"], [lang="hi"], [lang="bn"], [lang="zh"], [lang="ja"], [lang="ko"]) #story-line { font-size: 21px; line-height: 1.2; }
  :root:is([lang="ar"], [lang="hi"], [lang="bn"], [lang="zh"], [lang="ja"], [lang="ko"]) :is(#say, #chartbox[data-as="dock"] #say) { font-size: 19px; }
  [dir="rtl"] #top { padding: 0 16px 0 4px; }
  [dir="rtl"] #list-bar { padding: 0 16px 0 4px; }
  [dir="rtl"] #list-grab { text-align: right; }
  [dir="rtl"] .seg { margin-right: -10px; }
  [dir="rtl"] #nav { right: auto; left: 0; }
  [dir="rtl"] #nav button { text-align: right; }
  [dir="rtl"] #lang-menu { inset-inline-end: 0; }
  [dir="rtl"] #chartbox[data-as="stage"] #chart-front { right: auto; left: 2px; }
  [dir="rtl"] .leaflet-control-zoom { margin: 0 0 calc(var(--peek) + var(--cap) + 10px) 10px !important; float: left; }
  [dir="rtl"] .leaflet-right { right: auto; left: 0; }
  #lang-menu { inset-inline-end: 0; min-width: 0; width: min(100vw, 340px); }
  #lang-menu button { min-height: 44px; }
}

[dir="rtl"] #list-rows .nm > span { direction: ltr; unicode-bidi: isolate; }
@media (min-width: 861px) and (max-height: 780px) {
  :root:is([lang="ar"], [lang="hi"], [lang="bn"], [lang="zh"], [lang="ja"], [lang="ko"]) #story-line { font-size: clamp(22px, 2.1vw, 27px); }
}

/* In Cells the pointer is the square it marks: no cursor while the square is drawn, a crosshair where there is none (no forest, or while the map zooms), and a closed hand only while the map is being dragged. Never the open hand. */
:root[data-mode="cells"] #map, :root[data-mode="cells"] #map .leaflet-interactive { cursor: crosshair; }
:root[data-mode="cells"] #map:has(.cellmark), :root[data-mode="cells"] #map:has(.cellmark) .leaflet-interactive { cursor: none; }
:root[data-mode="cells"] .leaflet-dragging #map, :root[data-mode="cells"] #map.leaflet-dragging, :root[data-mode="cells"] .leaflet-dragging #map .leaflet-interactive { cursor: grabbing; }

#about .by .org img { display: block; margin-top: 14px; height: 48px; width: auto; }

.brand { cursor: pointer; }
#about .by a.org { display: block; width: fit-content; }
