/* The page's own style, first of five files in this order (page, panel, charts, overlay, small), each linked in the head so that it is
   in before the first paint: the faces, the page's base, the title block and the search, the legend, the imprint, the time bar and the
   column of the map's tools. The design values every file uses are tokens.css, linked before them; the interface's sheet and pin are
   interface.css, the measuring tool selection.css. */
/* Inter, the face the map labels are rendered in (pipeline/11), vendored
     with its OFL licence in vendor/inter/. */
@font-face {
  font-family: Inter;
  font-weight: 400;
  font-display: swap;
  src: url(../../vendor/inter/Inter-Regular.woff2) format('woff2');
}
@font-face {
  font-family: Inter;
  font-weight: 600;
  font-display: swap;
  src: url(../../vendor/inter/Inter-SemiBold.woff2) format('woff2');
}
/* Every colour and size the page uses is a token in tokens.css, linked above: both themes' colours, the type scale, the sizes, and the
     phone layout's own values. No :root block is written here. */
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
/* The page's first layout, in steps. Each size and weight of type costs a font lookup the first time it is laid out, about
     30 ms all told on a slow phone, so with everything in one pass that task is over 50 ms: the top text and the status first,
     the bar and the window's shell a frame later, the corner's controls, the imprint and the legend a frame after that. */
.boot #panel,
.boot #foot,
.boot2 #mapcorner,
.boot2 #imprint,
.boot2 #legend {
  display: none;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font:
    400 var(--fs-body)/1.4 Inter,
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
#wrap {
  position: fixed;
  inset: 0;
}
#gl {
  cursor: grab;
}
#gl:active {
  cursor: grabbing;
}
button {
  font: inherit;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 0 12px;
  min-height: 32px;
  cursor: pointer;
  white-space: nowrap;
}
button:active {
  background: var(--press);
}
@media (hover: hover) {
  button:hover {
    border-color: var(--dim);
  }
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
a {
  color: var(--accent-text);
}
.icon {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}
.icon svg {
  width: 18px;
  height: 18px;
  overflow: visible;
}
.help {
  font-size: var(--fs-small);
  color: var(--dim);
  line-height: 1.35;
}
/* Title block, top left: what this is, the year, the one claim. No box:
     ink on the map with a soft halo in the page colour. */
#head {
  position: absolute;
  z-index: 1;
  left: var(--gutter);
  top: 12px;
  max-width: min(30em, calc(100% - var(--panel-w) - 2 * var(--gutter) - 8px));
  pointer-events: none;
  text-shadow: var(--halo);
}
/* a soft wash of the page colour from the corner, so the title reads over
     dense columns without a box around it */
#head::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: calc(-1 * var(--gutter));
  top: -12px;
  right: -90px;
  bottom: -40px;
  background: radial-gradient(
    farthest-side at 0 0,
    color-mix(in srgb, var(--bg) 90%, transparent) 0,
    color-mix(in srgb, var(--bg) 78%, transparent) 55%,
    transparent 100%
  );
}
/* a tile of people on its way: the figures it will change wait, dimmed, and a thin line runs along the window's head */
@keyframes waitingline {
  from {
    opacity: 0.2;
  }
  to {
    opacity: 1;
  }
}
/* the search: in the title block on a desktop, opened from the stack on a phone */
#head:focus-within {
  z-index: 40;
}
#searchbox {
  position: relative;
  margin-top: 8px;
  max-width: 22em;
  pointer-events: auto;
  text-shadow: none;
}
.sb-row {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 4px 0 8px;
  background: var(--field);
  border: 1px solid var(--field-rule);
  border-radius: 8px;
}
.sb-glass {
  flex: none;
  width: 14px;
  height: 14px;
  color: var(--dim);
}
#searchq {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0 4px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-body);
  appearance: none;
}
#searchq::placeholder {
  color: var(--dim);
  opacity: 1;
}
#searchq::-webkit-search-cancel-button {
  appearance: none;
}
/* the field has no outline of its own (its row is the box): the row takes the page's focus ring, the colour change alone was not one */
.sb-row:focus-within {
  border-color: var(--dim);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
#nearme {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 6px;
  border: 0;
  border-radius: 6px;
  background: var(--ctl);
  color: var(--ink);
  font-size: var(--fs-small);
  white-space: nowrap;
  cursor: pointer;
}
#nearme svg {
  width: 13px;
  height: 13px;
}
#nearme[aria-busy='true'] {
  opacity: 0.6;
}
#searchclose,
#barfind,
.barbtn,
#band,
#bandafter,
#bandyears {
  display: none;
}
#datahelp header form .x {
  display: none;
}
#searchlist {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-height: min(60vh, 26em);
  overflow-y: auto;
  font-size: var(--fs-body);
}
#searchlist [role='option'] {
  display: block;
  padding: 5px 6px;
  border-radius: 5px;
  cursor: pointer;
}
#searchlist [aria-selected='true'] {
  background: var(--press);
}
@media (hover: hover) {
  #searchlist [role='option']:hover {
    background: var(--hover);
  }
}
.sb-name {
  display: block;
  color: var(--ink);
  font-weight: 600;
}
.sb-name i {
  font-style: normal;
  font-weight: 400;
  color: var(--ink-2);
}
.sb-ctx {
  display: block;
  color: var(--ink-2);
  font-size: var(--fs-small);
}
.sb-line {
  padding: 5px 6px;
  color: var(--ink-2);
}
.sb-head {
  font-size: var(--fs-small);
  letter-spacing: 0.02em;
}
#searchsay {
  margin: 4px 0 0;
  padding: 5px 8px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  color: var(--ink);
  font-size: var(--fs-small);
}
#head h1 {
  margin: 0;
  font-size: var(--fs-title);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.01em;
}
#sub {
  margin: 3px 0 0;
  font-size: var(--fs-body);
  color: var(--ink-2);
}
.nb {
  white-space: nowrap;
}
#year {
  margin-top: 8px;
  font-size: var(--fs-year);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 10px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
#stack button[hidden] {
  display: none;
}
#imprint .s[hidden] {
  display: none;
}
#imprint .s {
  font:
    400 calc(var(--imp) * 0.78)/1.3 Inter,
    system-ui,
    sans-serif;
}
#headline {
  margin: 6px 0 0;
  font-size: var(--fs-caption);
  line-height: 1.4;
  max-width: 28em;
  font-weight: 600;
}
/* The measuring tool's overlay canvas is made when the panel is, and its style sheet (web/selection.css) may come after it: a canvas is a
   300 x 150 box in the page's flow until then, and when the sheet arrives it moves everything after it (0.625 of a
   slow link's layout shift). Its place is the page's from the first frame; the sheet says the same. */
.selection-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
#status,
#nojs {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
  font-size: var(--fs-caption);
}
/* once the map is up, the percentage moves out of its way, and stays until everything is in */
.map-up #status {
  top: auto;
  bottom: calc(var(--foot-h, 96px) + 10px);
  transform: translateX(-50%);
  padding: 4px 12px;
  font-size: var(--fs-small);
}
#themetoggle .moon,
[data-theme='dark'] #themetoggle .sun {
  display: none;
}
[data-theme='dark'] #themetoggle .moon {
  display: block;
}
/* The legend: one thin line, the colour ramp with its years, above the bar at the left. What it means is in (i). */
#legend {
  position: absolute;
  z-index: 2;
  left: calc(var(--gutter) - 5px);
  bottom: calc(var(--foot-h, 44px) + 3px);
  width: 310px;
  padding: 3px 5px 0;
  border-radius: 4px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  text-shadow: var(--halo);
}
#ramp {
  height: 5px;
  display: flex;
  border-radius: 2px;
  overflow: hidden;
}
#ramp i {
  flex: 1;
}
#keyrow {
  position: relative;
  height: 14px;
  margin-top: 1px;
  font-size: 12px;
  line-height: 14px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
#keyrow span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}
#keyrow span:last-child {
  transform: translateX(-100%);
}
/* the base under every year is today's, said once: beside the years, so the legend keeps its height and the imprint above it stays clear */
#groundkey {
  position: absolute;
  left: 100%;
  bottom: 0;
  margin: 0 0 0 4px;
  padding: 0 5px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  font-size: 12px;
  line-height: 15px;
  color: var(--ink-2);
  white-space: nowrap;
}
.sat-all #groundkey {
  display: none;
}
/* The bottom right corner: the view controls in a vertical stack, and under them the credit, small, as map credits are. A licence obligation: it stays. */
#mapcorner {
  position: absolute;
  z-index: 4;
  right: calc(var(--gutter) - 4px);
  bottom: calc(var(--foot-h, 44px) + 3px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  pointer-events: none;
}
#stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
#stackpill {
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--bar-bg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
#stack button {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1;
}
#stack #north {
  pointer-events: auto;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--bar-bg);
  box-shadow: var(--shadow);
}
#stack svg {
  width: 18px;
  height: 18px;
  overflow: visible;
}
#stack #north svg {
  width: 22px;
  height: 22px;
}
#tilt {
  font-size: 12px !important;
  font-weight: 600;
}
@media (hover: hover) {
  #stack button:hover {
    color: var(--ink);
    background: var(--hover);
    border-color: var(--rule);
  }
}
#stack button:active {
  color: var(--ink);
  background: var(--press);
}
#stack #live[aria-pressed='true'],
#stack #satbtn[aria-pressed='true'],
#stack #svbtn[aria-pressed='true'],
#stack #fullscreen[aria-pressed='true'] {
  background: var(--ink);
  color: var(--bg);
}
#credit {
  margin: 0;
  padding: 0 4px;
  border-radius: 3px;
  font-size: 12px;
  line-height: 14px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  color: var(--ink-2);
  text-align: right;
  text-shadow: var(--halo);
  pointer-events: none;
}
#credit a {
  color: inherit;
  pointer-events: auto;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  text-underline-offset: 1px;
}
/* The imprint: bottom left, above the legend, in the map's typeface. One line: whose map, and whose site. A satellite picture's credit, while
     one shows, takes a line of its own under it. It scales with the screen, with its own contrast there (the tokens); a phone has the fixed small
     one (its block below). Exported images size their own. */
#imprint {
  --imp: clamp(13px, 1vw, 17px);
  position: absolute;
  z-index: 2;
  left: calc(var(--gutter) - 5px);
  bottom: calc(var(--foot-h, 44px) + 25px);
  display: flex;
  flex-flow: row wrap;
  align-items: baseline;
  column-gap: 0.55em;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--imprint-bg);
  color: var(--imprint-ink);
  pointer-events: none;
  white-space: nowrap;
}
#imprint .h {
  display: flex;
  align-items: baseline;
  gap: 0.36em;
  font:
    600 var(--imp)/1.27 Inter,
    system-ui,
    sans-serif;
}
#imprint .a {
  font:
    400 max(12px, calc(var(--imp) * 0.88))/1.3 Inter,
    system-ui,
    sans-serif;
}
#imprint svg {
  width: 0.92em;
  height: 0.92em;
  fill: currentColor;
  flex: none;
  align-self: center;
}
#imprint .s {
  flex: 0 0 100%;
}
.touring #imprint {
  bottom: 4px;
}
/* One slim, quiet bar along the bottom holds time: Play and the timeline, and (i) and the story. Quiet until touched. */
#foot {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px var(--gutter) max(2px, env(safe-area-inset-bottom));
  background: var(--bar-bg);
  border-top: 1px solid var(--rule);
  color: var(--dim);
}
#foot .row {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
#foot button:focus-visible {
  outline-offset: -2px;
}
#play {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  border-radius: 50%;
  padding: 0;
  background: none;
  color: var(--ink);
  border: 1px solid var(--field-rule);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#play svg {
  width: 12px;
  height: 12px;
}
#play .pause,
#play.on .go {
  display: none;
}
#play.on .pause {
  display: block;
}
.track {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ty {
  flex: none;
  font-size: 12px;
  line-height: 1;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}
.tl {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 30px;
  display: flex;
  align-items: center;
}
input[type='range'] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 30px;
  background: transparent;
  margin: 0;
  position: relative;
  z-index: 1;
}
input[type='range']::-webkit-slider-runnable-track {
  height: 2px;
  background: var(--rule);
}
input[type='range']::-moz-range-track {
  height: 2px;
  background: var(--rule);
}
/* The slider's thumb and the filled part of its track are these two, moved by transform (web/map.js, placeTime): as the year moves, two layers
   move and nothing is painted. The input stays under them, unseen, for the pointer, the keyboard and assistive technology. */
#time::-webkit-slider-thumb {
  opacity: 0;
}
#time::-moz-range-thumb {
  opacity: 0;
}
#time::-moz-range-progress {
  background: transparent;
}
#tlfill,
#tlthumb {
  position: absolute;
  left: 0;
  pointer-events: none;
  will-change: transform;
}
#tlfill {
  top: 14px;
  width: 100%;
  height: 2px;
  background: var(--ink-2);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 2;
}
#tlthumb {
  top: 8px;
  width: 14px;
  height: 14px;
  box-sizing: border-box;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--ink);
  z-index: 3;
}
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--ink);
  margin-top: -6px;
}
input[type='range']::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--ink);
}
#ticks {
  position: absolute;
  left: 7px;
  right: 7px;
  top: 50%;
  height: 5px;
  margin-top: -2.5px;
  pointer-events: none;
}
#ticks i {
  position: absolute;
  top: 0;
  width: 1px;
  height: 5px;
  background: var(--rule);
  transform: translateX(-0.5px);
}
#bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 2px;
}
#bar button {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 10px;
  background: none;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--dim);
  font-size: 18px;
  line-height: 1;
}
#bar svg {
  width: 18px;
  height: 18px;
  overflow: visible;
}
@media (hover: hover) {
  #bar button:hover,
  #play:hover {
    color: var(--ink);
    background: var(--hover);
    border-color: var(--field-rule);
  }
  #bar button:hover {
    border-color: transparent;
  }
}
#bar button:active {
  color: var(--ink);
  background: var(--press);
}
#north svg {
  transition: transform 0.2s;
}
#fullscreen .leave,
#fullscreen[aria-pressed='true'] .go {
  display: none;
}
#fullscreen[aria-pressed='true'] .leave {
  display: block;
}
@media (pointer: coarse) {
  #stack #zin,
  #stack #zout {
    display: none;
  }
}
