/* Module 7 — The Live Globe.
 * The ocean at night, not a mapping product. No chrome that isn't earning
 * its place, and every layer states its source and its age.
 */

#globe-wrap{ position: fixed; inset: 0; background: #03060c; }
#map{ position: absolute; inset: 0; z-index: 1; background: #03060c; }

/* NASA's Blue Marble with bathymetry is already dark over open ocean, so it
   is dimmed only a little: enough to read as night and keep the markers'
   contrast, not so much that the deep Pacific goes flat black. .55 was tried
   first and the open ocean disappeared. */
.basemap-nasa{ filter: brightness(.85) saturate(.9) contrast(1.05); }

/* Leaflet's own furniture, quietened down. */
.leaflet-container{ background: #03060c; font-family: var(--sans); outline: 0; }
/* ...but the map is tabbable and pans from the keyboard, so it has to show
   when it has focus. outline:0 above is for the mouse, not for everyone. */
.leaflet-container:focus-visible{ outline: 2px solid #9fe8ff; outline-offset: -2px; }
.leaflet-control-zoom{ border: 1px solid rgba(232,243,250,.16) !important; }
.leaflet-control-zoom a{
  background: rgba(6,14,24,.9) !important; color: rgba(232,243,250,.8) !important;
  border-color: rgba(232,243,250,.12) !important;
}
.leaflet-control-zoom a:hover{ background: rgba(14,30,48,.95) !important; color:#fff !important; }
.leaflet-control-attribution{
  background: rgba(3,6,12,.82) !important; color: rgba(232,243,250,.4) !important;
  font-size: 9.5px !important; letter-spacing: .04em;
}
.leaflet-control-attribution a{ color: rgba(232,243,250,.6) !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip{
  background: rgba(6,12,22,.97); color: rgba(232,243,250,.92);
  border: 1px solid rgba(232,243,250,.16); border-radius: 2px;
  box-shadow: 0 10px 40px rgba(0,0,0,.6);
}
.leaflet-popup-content{ margin: 16px 18px; font-size: .86rem; line-height: 1.55; width: 268px !important; }
.leaflet-popup-close-button{ color: rgba(232,243,250,.5) !important; }

.pop-k{ font-size: 8.5px; letter-spacing: .26em; text-transform: uppercase;
  color: rgba(232,243,250,.42); margin-bottom: .7em; }
.pop-h{ font-family: var(--serif); font-size: 1.18rem; letter-spacing: .03em;
  margin: 0 0 .5em; color: rgba(232,243,250,.98); }
.pop-row{ display: flex; justify-content: space-between; gap: 14px;
  border-top: 1px solid rgba(232,243,250,.1); padding: 6px 0; font-size: .82rem; }
.pop-row span:first-child{ color: rgba(232,243,250,.45); }
.pop-row span:last-child{ font-variant-numeric: tabular-nums; }
.pop-a{ display: inline-block; margin-top: 1em; font-size: 9px;
  letter-spacing: .22em; text-transform: uppercase;
  color: rgba(232,243,250,.75) !important; border-bottom: 1px solid rgba(232,243,250,.3); }
.pop-note{ margin-top: .9em; font-size: .76rem; color: rgba(232,243,250,.42); }

/* ------------------------------------------------------------- markers -- */

.mk{ border-radius: 50%; }
/* AND THE ONE I MISSED. The block further down claims "every marker under
   about 9px now carries a faint halo" and then lists tide, natural events,
   quakes and reefs. .mk-ship was not in that list, which left 690 vessels at
   5px, 50% alpha and no glow — the exact profile that made 2,265 aircraft
   invisible, on the layer a reader is most likely to look for first. A
   comment that describes work it did not do is worse than no comment. */
/* And the vessel takes the cyan it already shares with .mk-science and its
   own cluster bubble, so the whole vessel family reads as one thing at any
   zoom. Dimmer than the science vessel on purpose: there are 690 of these and
   13 of those, and the rare one should still be the one that catches the eye. */
.mk-ship{
  width: 6px; height: 6px; background: rgba(116,206,242,.92);
  box-shadow: 0 0 6px rgba(90,190,235,.5);
}
.mk-science{
  width: 13px; height: 13px; background: #9fe8ff; border: 1px solid #dff5ff;
  box-shadow: 0 0 16px rgba(159,232,255,.95); animation: gpulse 3s ease-in-out infinite;
}
/* AIRCRAFT WERE EFFECTIVELY INVISIBLE AND THE COUNT SAID 2,265.
   4px at 42% opacity, no border and no glow, on a dark map that also drifts
   marine-snow particles of about the same size and brightness. A reader who
   turned the layer on saw no change and reasonably concluded it was broken.
   Bigger, brighter, and with a faint halo so a single plane reads as a mark
   somebody placed rather than as noise in the background. Still the smallest
   marker on the map, because there are two thousand of them. */
/* AIRCRAFT ARE THE ONLY THING ON THIS MAP THAT IS NOT IN THE WATER, and
   after the visibility fix they were a near-copy of the vessel dot: both 6px,
   both circles, both pale blue, halos within a few percent of each other. A
   reader asked, reasonably, whether they were the same icon. They effectively
   were.

   Cyan on this map has always meant a vessel — science vessels, ROVs, the
   vessel cluster bubble. So aircraft take the hue nothing else uses: a plain
   cool white with no colour in it at all, which also reads as "above the
   surface" against a map that is otherwise entirely blues and greens. */
.mk-air{
  width: 6px; height: 6px;
  background: rgba(248,251,255,.96);
  box-shadow: 0 0 7px rgba(215,235,255,.6);
}
.mk-rov{
  width: 15px; height: 15px; background: rgba(127,227,255,.22);
  border: 1.5px solid #7fe3ff; box-shadow: 0 0 22px rgba(127,227,255,.9);
  animation: gpulse 2.2s ease-in-out infinite;
}
.mk-cam{ width: 10px; height: 10px; background: rgba(255,214,150,.85);
  border: 1px solid rgba(255,235,200,.9); box-shadow: 0 0 12px rgba(255,200,120,.7); }
.mk-buoy{ width: 8px; height: 8px; background: rgba(160,225,255,.82);
  box-shadow: 0 0 6px rgba(140,210,255,.45);
  border: 1px solid rgba(190,235,255,.5); }
.mk-usv{ width: 10px; height: 10px; background: rgba(255,200,120,.35);
  border: 1.5px solid rgba(255,214,150,.95); border-radius: 50%; }
.mk-tide{ width: 8px; height: 8px; background: rgba(140,255,220,.6);
  border: 1px solid rgba(190,255,235,.6); }

/* Argo floats. Deliberately quiet: there are hundreds and they are background
   truth, not events. */
.mk-float{ width: 7px; height: 7px; background: rgba(190,208,255,.85);
  box-shadow: 0 0 6px rgba(170,195,255,.45);
  border: 1px solid rgba(210,225,255,.55); }

/* REEF HEAT STRESS, ON NOAA'S SCALE.
   The colour carries the meaning, so it climbs with the category rather than
   being decorative — a reef at Alert Level 2 is one where mortality is likely
   and must not look like a reef at no stress. The top two pulse, because they
   are the only readings on this map describing something dying while the page
   is open. */
.mk-reef{ width: 9px; height: 9px; border-radius: 50%; }
.mk-reef-0{ background: rgba(140,255,220,.55); border: 1px solid rgba(190,255,235,.5); }
.mk-reef-1{ background: rgba(255,240,150,.65); border: 1px solid rgba(255,248,200,.6); }
.mk-reef-2{ background: rgba(255,190,90,.75);  border: 1px solid rgba(255,220,150,.7); }
.mk-reef-3{ background: rgba(255,120,70,.85);  border: 1px solid rgba(255,180,140,.8);
  animation: reefpulse 2.6s ease-in-out infinite; }
.mk-reef-4{ background: rgba(255,70,70,.92);   border: 1px solid rgba(255,150,150,.9);
  animation: reefpulse 1.8s ease-in-out infinite; }
.mk-reef-na{ background: rgba(160,160,170,.45); border: 1px dashed rgba(200,200,210,.5); }
@keyframes reefpulse{
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,90,70,.45); }
  50%      { box-shadow: 0 0 0 7px rgba(255,90,70,0); }
}
@media (prefers-reduced-motion: reduce){
  .mk-reef-3, .mk-reef-4{ animation: none; }
}

/* Icebergs and volcanoes. White for ice, ember for volcanoes, and neither uses
   the alert palette, because neither is a warning. */
.mk-nat{ width: 8px; height: 8px; }
.mk-nat-iceberg{ background: rgba(225,245,255,.85);
  border: 1px solid rgba(255,255,255,.7); border-radius: 2px; }
.mk-nat-volcano{ background: rgba(255,150,80,.8);
  border: 1px solid rgba(255,200,150,.7); border-radius: 50%; }
.mk-nat-storm{ background: rgba(200,190,255,.75);
  border: 1px solid rgba(225,220,255,.7); border-radius: 50%; }
.mk-animal{ width: 10px; height: 10px; background: rgba(190,255,190,.85);
  box-shadow: 0 0 12px rgba(150,255,150,.6); }
/* A COMPLETED JOURNEY IS NOT A POSITION, and the reader should be able to see
   that before reading a word. Same green family as a live animal — it is the
   same layer and the same kind of creature — but hollow at the end and
   deliberately unlit. The glow on .mk-animal means "transmitting now"; these
   animals stopped, some of them years ago, so they do not get it. */
.mk-jstart{ width: 6px; height: 6px; background: rgba(190,255,190,.45);
  border: 1px solid rgba(210,255,210,.5); border-radius: 50%; }
.mk-jend{ width: 11px; height: 11px; background: transparent;
  border: 2px solid rgba(190,255,190,.75); border-radius: 50%; }
.mk-quake{ border: 1px solid rgba(255,190,140,.85); background: rgba(255,150,90,.22); }
.mk-quake-sea{ border-color: rgba(255,225,150,.95); background: rgba(255,190,90,.3); }
.mk-storm{ width: 20px; height: 20px; border: 2px solid rgba(255,190,140,.9);
  background: rgba(255,150,90,.15); animation: gpulse 2.6s ease-in-out infinite; }
.mk-alert{ width: 12px; height: 12px; background: rgba(255,180,120,.5);
  border: 1px solid rgba(255,210,160,.9); }

@keyframes gpulse{ 0%,100%{ opacity:.45 } 50%{ opacity:1 } }
@media (prefers-reduced-motion: reduce){
  .mk-science, .mk-rov, .mk-storm{ animation: none; }
}

/* The per-layer bubble colours below were written without !important and
   this rule has it, so every cluster stayed the same colour and the fix did
   nothing measurable. Kept as the fallback for any layer with no colour of
   its own; the mc-* rules now carry !important so they can win. */
.marker-cluster{ background: rgba(120,180,220,.12) !important; }
.marker-cluster div{
  background: rgba(10,26,44,.9) !important; color: rgba(232,243,250,.85) !important;
  border: 1px solid rgba(150,200,235,.35) !important;
  font: 300 11px/30px Inter, system-ui, sans-serif !important; letter-spacing: .1em;
}

/* --------------------------------------------------------------- panels -- */

.g-panel{
  position: absolute; z-index: 20; background: rgba(3,7,14,.9);
  border: 1px solid rgba(232,243,250,.14); border-radius: 2px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}

/* Height of the top chrome that is actually on screen: the ticker always,
   plus the alert bar when there is an alert. globe.js measures it, because
   the alert bar's height depends on how long the office's text is. Anything
   positioned below the chrome reads this rather than guessing 74px — which
   is what put the layer panel on top of the alert. */
#globe-wrap{ --g-top: 46px; }

/* Two columns. Controls left, reference and detail right — they used to be
   four independently positioned panels with hardcoded offsets, which is why
   the layer panel sat on the alert bar and the legend sat on the layer panel.
   Neither column can overlap the other or the chrome above them. */
#g-left, #g-right{
  position: absolute; z-index: 20;
  top: calc(var(--g-top) + 12px); bottom: 34px;
  display: flex; flex-direction: column; gap: 12px;
  pointer-events: none;      /* the gaps stay map, not panel */
}
#g-left > *, #g-right > *{ pointer-events: auto; }
#g-left{ left: 16px; width: 262px; }
/* Right column hangs from the bottom: the back button pins to the top, the
   legend to the bottom, and the info panel grows between them when it opens. */
#g-right{ right: 16px; width: 290px; align-items: flex-end; }
#g-right #g-back{ flex: 0 0 auto; }
#g-right #g-info{ flex: 0 1 auto; width: 100%; }
/* Pinned to the bottom whether or not the info panel is open, so the legend
   never moves under you when you click a marker. */
#g-right #g-legend{ flex: 0 0 auto; width: 100%; margin-top: auto; }

/* Header and footer are fixed; only the layer list scrolls. */
#g-layers{ position: static; flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column; padding: 16px 16px 12px; }
#g-layers h2, #g-layers h3{ margin: 0 0 .6em; }
#g-layers .g-head{ flex: 0 0 auto; }
#g-layers .g-head p{ font-size: .74rem; line-height: 1.55; margin: 0 0 1.2em;
  color: rgba(232,243,250,.4); }
#g-layers .g-list{ flex: 1 1 auto; min-height: 0; overflow-y: auto;
  border-top: 1px solid rgba(232,243,250,.1); }
#g-layers .g-foot{ flex: 0 0 auto; margin-top: 1em; padding-top: 1em;
  border-top: 1px solid rgba(232,243,250,.1); }
#g-layers .g-foot p{ font-size: .7rem; line-height: 1.5; margin: 0 0 .8em;
  color: rgba(232,243,250,.34); }
#g-layers .g-foot p:last-child{ margin-bottom: 0; color: rgba(232,243,250,.3); }
#g-layers .g-foot b{ font-weight: 400; color: rgba(255,214,160,.75); }
.g-layer{ display: block; padding: 7px 0; border-top: 1px solid rgba(232,243,250,.08); cursor: pointer; }
.g-layer:first-of-type{ border-top: 0; }
/* NOT position:absolute. Absolute took the input out of .g-list's flow, so
   its containing block became #g-left and the browser could no longer scroll
   it into view: focusing the twelfth layer left the list's scrollTop at 0 and
   nine of twelve layers were toggled blind, focus ring and all. The clip
   pattern hides it just as completely while leaving it in flow. */
.g-layer input{
  position: static; width: 1px; height: 1px; margin: 0;
  opacity: 0; pointer-events: none;
  clip-path: inset(50%); overflow: hidden;
}
/* The button sits over the row's top-right corner rather than beside it: a
   flex sibling stole 45px from a 262px column and squeezed every layer
   description into a ladder. */
.g-layer-row{ position: relative; border-top: 1px solid rgba(232,243,250,.08); }
.g-layer-row:first-of-type{ border-top: 0; }
.g-layer-row .g-layer{ border-top: 0; padding-right: 46px; }
.g-listbtn{
  position: absolute; top: 7px; right: 0; cursor: pointer;
  background: transparent; border: 1px solid rgba(232,243,250,.22);
  color: rgba(232,243,250,.6); border-radius: 2px;
  font: 300 8px/1 Inter, system-ui, sans-serif;
  letter-spacing: .2em; text-transform: uppercase; padding: 5px 7px;
}
.g-listbtn:hover{ border-color: rgba(159,232,255,.7); color: #9fe8ff; }
.g-listbtn:focus-visible{ outline: 2px solid #9fe8ff; outline-offset: 2px; }

/* The feature list itself — the keyboard alternative to the map. */
.g-list-items{ list-style: none; margin: 1em 0 0; padding: 0; }
.g-list-items li{ border-top: 1px solid rgba(232,243,250,.09); }
.g-list-items button{
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: transparent; border: 0; padding: 9px 2px;
  color: rgba(232,243,250,.85); font-family: var(--sans); font-weight: 300;
  font-size: .8rem; line-height: 1.5;
}
.g-list-items button:hover{ background: rgba(159,232,255,.07); }
.g-list-items button:focus-visible{ outline: 2px solid #9fe8ff; outline-offset: -2px; }
.g-list-items b{ font-weight: 400; display: block; }
.g-list-items .d, .g-list-items .n{ display: block; color: rgba(232,243,250,.5);
  font-size: .74rem; }
.g-layer .row{ display: flex; align-items: center; gap: 9px; }
.g-layer .box{
  width: 11px; height: 11px; flex: 0 0 auto; border: 1px solid rgba(232,243,250,.4);
  border-radius: 1px; position: relative;
}
.g-layer input:checked + .row .box{ background: rgba(159,232,255,.85); border-color: #9fe8ff; }
/* The real checkbox is transparent, so the browser draws its focus ring on
   something nobody can see. The markers were taken out of the tab order on
   the promise that keyboard users get this panel instead — that promise is
   only kept if you can tell which of the twelve you are on. */
.g-layer input:focus-visible + .row .box{
  outline: 2px solid #9fe8ff; outline-offset: 2px; }
.g-layer input:focus-visible + .row .nm{ color: #9fe8ff; }
.g-layer .nm{ font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(232,243,250,.85); }
.g-layer .dsc{ margin: 4px 0 0 20px; font-size: .7rem; line-height: 1.42;
  color: rgba(232,243,250,.4); }
.g-layer .st{ margin-left: auto; font-size: 8.5px; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(232,243,250,.35); white-space: nowrap; }
.st-ok{ color: rgba(150,225,255,.75) !important; }
.st-off{ color: rgba(255,200,140,.7) !important; }
.st-err{ color: rgba(255,150,120,.85) !important; }

#g-ticker{
  top: 0; left: 0; right: 0; height: 46px; display: flex; align-items: center;
  gap: 22px; padding: 0 18px; overflow-x: auto; white-space: nowrap;
  border-left: 0; border-right: 0; border-top: 0;
}
#g-ticker .lbl{ font-size: 9px; letter-spacing: .3em; text-transform: uppercase;
  color: rgba(232,243,250,.45); flex: 0 0 auto; }
#g-ticker a, #g-ticker span.item{
  font-size: 10px; letter-spacing: .14em; color: rgba(232,243,250,.8);
  border: 0; flex: 0 0 auto; text-transform: uppercase;
}
#g-ticker a:hover{ color: #fff; }
#g-ticker .dot{ display:inline-block; width:6px; height:6px; border-radius:50%;
  background:#7fe3ff; box-shadow:0 0 9px rgba(127,227,255,.9); margin-right:7px;
  animation: gpulse 2.4s ease-in-out infinite; }
#g-ticker .unver{ color: rgba(255,200,140,.7); text-transform: none; letter-spacing: .04em; }

#g-alert{
  top: 46px; left: 0; right: 0; padding: 12px 18px; display: none;
  border-left: 0; border-right: 0;
  background: rgba(28,16,6,.94); border-color: rgba(255,190,120,.42);
}
#g-alert.on{ display: block; }
#g-alert .t{ font-size: 10px; letter-spacing: .24em; text-transform: uppercase;
  color: rgba(255,214,160,.95); }
#g-alert .d{ margin-top: 5px; font-size: .82rem; color: rgba(255,235,205,.75); }
#g-alert a{ color: rgba(255,235,205,.95); border-bottom-color: rgba(255,214,160,.5); }

#g-info{ position: static; padding: 16px; display: none; overflow-y: auto; }
#g-info.on{ display: block; }

/* A <details> now, so ten rows of key can be folded away when you want the
   map instead. Open by default — it is the thing that makes the markers
   readable, and hiding it by default would be hiding the instructions. */
#g-legend{ position: static; max-height: 60%; overflow-y: auto;
  padding: 10px 14px 12px; font-size: 9px;
  letter-spacing: .14em; text-transform: uppercase; color: rgba(232,243,250,.45); }
#g-legend > summary{
  cursor: pointer; list-style: none; padding: 2px 0;
  font-size: 9px; letter-spacing: .3em; text-transform: uppercase;
  color: rgba(232,243,250,.62);
}
#g-legend > summary::-webkit-details-marker{ display: none; }
#g-legend > summary::after{ content: " +"; opacity: .55; }
#g-legend[open] > summary::after{ content: " −"; }
#g-legend[open] > summary{ margin-bottom: 8px;
  border-bottom: 1px solid rgba(232,243,250,.1); padding-bottom: 8px; }
#g-legend > summary:focus-visible{ outline: 2px solid #9fe8ff; outline-offset: 2px; }
/* :not(.lg-ramp): the reef-heat ramp is a div holding six labelled rows of
   its own; flattening IT into a flex row strung all six severity levels
   into one 657px line and pushed "Alert Level 2" — the mortality-likely
   state the ramp exists to explain — off the side of every phone. */
#g-legend div:not(.lg-ramp){ display: flex; align-items: center; gap: 8px; margin: 4px 0; }
#g-legend i{ width: 9px; height: 9px; border-radius: 50%; display: inline-block;
  flex: 0 0 auto; }

/* Sits under the top chrome like everything else, so an active alert does not
   get a button parked on top of its text. */
#g-back{ position: static; z-index: 21; }

/* THE GLOBE'S CONTROLS MUST OUTRANK THE SITE'S OVERLAYS.
   .dv-ask — the "one question, then never again" survey — is injected by
   curiosity.js at z-index 60. Every control on this page topped out at 21,
   so the survey landed over the legend, the back button and the open layer
   panel, covered the bottom 43% of a phone screen, and stole taps outright:
   hit-testing the legend bar returned the survey's answer button.

   This is the same failure as the .dv-floor collision that check_css_clash.py
   was written for — a bridge script injecting CSS at runtime and winning on
   load order — and that checker never looked at this file, so it passed clean
   every time. It looks at globe.css now too.

   70 clears .dv-ask (60) and the nudge panels, and stays under the depth
   chamber overlay. The map itself stays at 1: this raises the CONTROLS, not
   the canvas. */
#g-left, #g-right, #g-ticker, #g-alert{ z-index: 70; }
#g-left > *, #g-right > *{ z-index: 70; }

.g-embed{ width: 100%; aspect-ratio: 16/9; border: 1px solid rgba(232,243,250,.14);
  margin: 10px 0; background: #000; }

/* The phone sheet's own title bar. Hidden on a desktop, where both columns
   fit beside the map and there is nothing to collapse. */
#g-sheet{ display: none; }

@media (max-width: 760px){
  /* THE MAP IS THE PAGE, AND IT HAD 14% OF THE SCREEN.
     The previous rule here made the left column a top sheet at 46vh and the
     right a bottom sheet at 40vh. That solved the bug it was written for —
     the two no longer overlapped — by giving 86% of a phone screen to two
     panels and leaving the globe a band between them. Both panels were
     open by default, so this was the FIRST thing anybody saw on a phone.
     A control panel that hides the thing it controls is not a control panel.

     So on a phone both columns default to closed, and each costs one bar:
     "Layers & sources" on top, the collapsed legend at the bottom. The map
     gets everything in between, which is what somebody came for. */
  #g-left{ width: auto; right: 16px; bottom: auto; max-height: none; }

  #g-sheet{
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 10px; width: 100%; cursor: pointer; text-align: left;
    padding: 11px 14px; border-radius: 2px;
    background: rgba(3,7,14,.9); border: 1px solid rgba(232,243,250,.14);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    color: rgba(232,243,250,.9);
    font: 300 13px/1.2 Inter, system-ui, sans-serif;
    /* 44px of tappable height including padding. A 28px bar is a bar you
       miss on a moving bus, and this is the only way into the layer list. */
    min-height: 44px;
  }
  #g-sheet .g-sheet-n{
    font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
    color: rgba(232,243,250,.42); flex: none;
  }
  /* The chevron says which way it goes, so a closed bar does not read as a
     heading somebody is meant to ignore. */
  #g-sheet .g-sheet-t::after{ content: " \2304"; opacity: .5; }
  #globe-wrap.g-open #g-sheet .g-sheet-t::after{ content: " \2303"; }

  #g-layers{ display: none; }
  /* ONE SCROLL, NOT THREE PINNED PARTS. On a desktop the head and foot are
     pinned and only .g-list scrolls, which is right where the panel is tall.
     On a phone with an active alert the same layout left the flex:1 list
     with clientHeight 0 — head and foot ate the whole budget and all
     seventeen toggles were in a scroll area no finger could find. So below
     760px the open sheet is a single scrolling column: head, every layer,
     foot, all reachable by the one gesture a phone already knows. The
     disclaimer is no longer pinned here; it is at the end of a short scroll,
     not hidden. */
  #globe-wrap.g-open #g-layers{ display: block; overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: rgba(232,243,250,.35) transparent; }
  #globe-wrap.g-open #g-layers .g-list{ overflow-y: visible; }
  /* Bounded so .g-list can scroll inside it — .g-list is flex:1 with
     overflow-y:auto, and an unbounded parent means it never overflows and
     never scrolls, which silently strands the layers below the fold. */
  /* 76vh + 44vh = 120vh. TWO MAX-HEIGHTS IN ONE VIEWPORT THAT NEVER FIT.
     I wrote both in this block and never added them up. The left column
     hangs from the top and the right from the bottom, so whenever both are
     near their maximum they run through each other — measured at 229px of
     overlap on a 683px screen, with the layer panel's footer landing under
     the back button. It looked fine in testing only because the legend was
     collapsed and the right column was well short of its cap.
     46vh + 40vh leaves 14vh of map between them at worst, which is the
     point: you must always be able to see what the controls control. */
  /* Bounded by what is actually left, not by a guessed fraction.
     46vh + 40vh still left one pixel of clearance on a 667px iPhone SE, which
     is not a fix, it is the same bug with a smaller number. The left panel can
     have everything the right column and the chrome are not using, minus a
     72px strip of map so you can always see what the controls control. */
  /* And "what the right column is using" is now measured, not the guessed
     40vh: globe.js writes the right column's real height to --g-right-h the
     same way it already measures the alert bar into --g-top (opening the
     sheet also folds the legend, so on a phone that height is one back
     button and one bar, not 40vh). The max() floor is the last resort for a
     giant alert: a sheet the reader just asked for must never open shorter
     than its own title, even if it costs some of the map strip. */
  #globe-wrap.g-open #g-left{
    max-height: max(calc(100vh - var(--g-top) - 12px - 34px
                         - var(--g-right-h, 40vh) - 12px - 72px), 15rem);
  }

  #g-right{ left: 16px; width: auto; top: auto; bottom: 34px;
            max-height: 40vh; align-items: stretch; }
  /* Was display:none, then always-open. The legend is the only key to twelve
     marker shapes, so hiding it hides the instructions — but opening it by
     default on a phone spent 40vh explaining symbols nobody had looked at
     yet. It stays, closed (globe.js drops the open attribute below 760px),
     and costs one line until it is wanted. */
  #g-legend{ display: block; max-height: none; }
  /* 9px caps were transcription, not reading, on a phone held at arm's
     length — and the 30vh cap cut the last visible line clean in half,
     which reads as "that is all" rather than "there is more". Slightly
     larger type, a thin real scrollbar, and edge shadows that appear only
     while there is more key above or below — the covers ride the content
     (background-attachment: local) and hide the shadows at either end. */
  #g-legend{ font-size: 10.5px; letter-spacing: .1em; }
  #g-legend > summary{ font-size: 10.5px; }
  /* The .lg-note mobile treatment lives at the END of this file: the base
     rule sits later than this block at equal specificity, so anything
     written here loses on source order — it did, silently, twice. */
  #g-legend[open]{ max-height: 30vh; overflow-y: auto; padding-bottom: 16px;
    scrollbar-width: thin; scrollbar-color: rgba(232,243,250,.35) transparent;
    background:
      linear-gradient(rgba(3,7,14,.92) 30%, rgba(3,7,14,0)) top    / 100% 26px no-repeat local,
      linear-gradient(rgba(3,7,14,0), rgba(3,7,14,.92) 70%) bottom / 100% 26px no-repeat local,
      linear-gradient(rgba(232,243,250,.22), rgba(232,243,250,0)) top    / 100% 8px no-repeat scroll,
      linear-gradient(rgba(232,243,250,0), rgba(232,243,250,.22)) bottom / 100% 8px no-repeat scroll,
      rgba(3,7,14,.9);
  }
  /* An empty info panel is still a bordered box. It has no content until
     something is tapped, and a 1px rectangle floating over the map reads as
     a rendering fault. */
  #g-info:empty{ display: none; }

  /* The ticker scrolls sideways on a phone and the only hint was a word cut
     in half at the edge — an overlay scrollbar that never shows is no cue at
     all. Same pattern as the legend, turned on its side: covers ride the
     content, shadows sit at the edges, so the right shadow says "more this
     way" and disappears when the end of the strip arrives. */
  #g-ticker{
    scrollbar-width: thin; scrollbar-color: rgba(232,243,250,.3) transparent;
    background:
      linear-gradient(90deg,  rgba(3,7,14,.92) 30%, rgba(3,7,14,0)) left  / 26px 100% no-repeat local,
      linear-gradient(270deg, rgba(3,7,14,.92) 30%, rgba(3,7,14,0)) right / 26px 100% no-repeat local,
      linear-gradient(90deg,  rgba(232,243,250,.22), rgba(232,243,250,0)) left  / 9px 100% no-repeat scroll,
      linear-gradient(270deg, rgba(232,243,250,.22), rgba(232,243,250,0)) right / 9px 100% no-repeat scroll,
      rgba(3,7,14,.9);
  }
}

/* Underwater gliders — the one vehicle class that publishes real measured
   depth. Marked differently from the stated-depth ROV markers on purpose. */
.mk-glider{
  width: 11px; height: 11px; background: rgba(160,255,220,.3);
  border: 1.5px solid #7fffd4; box-shadow: 0 0 16px rgba(127,255,212,.8);
}

/* Module 8 cross-link: where history happened. */
.mk-history{
  width: 10px; height: 10px; background: rgba(224,196,150,.32);
  border: 1.5px solid rgba(240,214,170,.9);
  box-shadow: 0 0 14px rgba(230,200,150,.55);
}

/* Module 9 — community contributions. Warm, and visually distinct from every
   institutional feed on the map, because conflating the two would be a lie. */
.mk-community{
  width: 10px; height: 10px; background: rgba(255,196,150,.35);
  border: 1.5px solid rgba(255,214,170,.85);
  box-shadow: 0 0 12px rgba(255,190,140,.45);
}
.mk-cstream{
  width: 14px; height: 14px; background: rgba(255,196,150,.25);
  border: 2px solid #ffd7a0; box-shadow: 0 0 18px rgba(255,215,160,.85);
  animation: gpulse 2.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce){ .mk-cstream{ animation: none } }

/* Module 10 — surf spots, sized/coloured by live buoy swell where it exists. */
/* A live cam is a filled gold disc, so a surf break must not be one too — it
   is a hollow ring. Shape carries the difference; colour only carries size. */
.mk-surf{
  width: 12px; height: 12px; background: transparent;
  border: 2px solid rgba(255,224,170,.9);
  box-shadow: 0 0 10px rgba(255,200,140,.45);
}
.mk-surf-big{ border-color: rgba(255,140,100,.98);
  background: rgba(255,140,100,.3); box-shadow: 0 0 18px rgba(255,140,100,.75); }

/* Module 12 — fishing season spotlights. A pin, not a boat: nothing on this
   globe identifies a vessel. */
.mk-fishing{ width:11px; height:11px; background: rgba(150,235,200,.28);
  border:1.5px solid rgba(150,235,200,.9);
  box-shadow: 0 0 10px rgba(150,235,200,.45); }
.mk-fishing-open{ border-color: rgba(150,255,210,1);
  background: rgba(150,255,210,.4); box-shadow: 0 0 16px rgba(150,255,210,.75); }


/* Module 17 — cave systems. A downward triangle: a hole, and a shape used by
   nothing else on this globe. Fill carries one fact and one only — solid
   means somebody has reached the bottom, hollow means the deepest published
   figure is where the equipment stopped. */
.mk-cave{
  width: 13px; height: 13px;
  background: rgba(198,182,255,.72);
  border: 0;
  box-shadow: 0 0 12px rgba(180,160,255,.5);
}
/* clip-path clips borders, outlines and box-shadows along with the box, so
   the hollow variant cannot be drawn as an outline. It is a paler fill and a
   larger triangle instead — the same two-signal treatment .mk-surf-big uses.
   The distinction that actually has to survive is carried in words: the
   marker's aria-label and the popup both say the bottom has never been
   reached. */
.mk-cave-open{ background: rgba(198,182,255,.22); }

/* --------------------------------------------------- shape, not just hue --
   Every marker was a circle distinguished only by colour, which collapses to
   one dark olive under deuteranopia — an open fishery and a closed one landed
   12 ΔE apart. Shape carries the family; colour is now the second signal. */
.mk-cam, .mk-cstream{ border-radius: 2px; }                    /* cameras: squares */
.mk-quake, .mk-quake-sea{ border-radius: 50%; background: transparent !important; }
.mk-surf, .mk-surf-big{ border-radius: 50%; }                  /* breaks: rings */
.mk-fishing, .mk-fishing-open{ border-radius: 2px; transform: rotate(45deg); }
.mk-history{ border-radius: 0; }                               /* history: square */
.mk-cave, .mk-cave-open{ border-radius: 0;                     /* caves: a hole */
  clip-path: polygon(50% 100%, 0 4%, 100% 4%); }
.mk-community, .mk-cstream{ border-radius: 2px; }
.mk-storm{ border-radius: 50%; border-style: dashed !important; }
.mk-alert{ border-radius: 0; transform: rotate(45deg); }       /* alerts: diamond */

/* The legend swatches were flat colours that did not match how a marker
   actually composites over the dark basemap, so the key was unusable against
   the map for everyone. Mirror the marker rules instead. */
#g-legend i{ box-sizing: border-box; }
#g-legend i.lg-square{ border-radius: 2px; }
#g-legend i.lg-diamond{ border-radius: 2px; transform: rotate(45deg); }
#g-legend i.lg-ring{ border-radius: 50%; background: transparent; }

#g-legend .lg-note{ margin: 10px 0 0; font-size: 9px; line-height: 1.5;
  letter-spacing: .06em; text-transform: none; color: var(--dimmer);
  max-width: 26ch; }

/* --------------------------------------------- encounters at sea (layer 16) */

/* Two vessels alongside. Deliberately quieter than the fishing-effort tiles
   underneath: this is a point where something specific happened, not a
   density surface. */
.mk-enc{
  background: rgba(255,225,170,.72);
  border: 1px solid rgba(255,240,205,.55);
  box-shadow: 0 0 8px rgba(255,215,150,.35);
}
/* GFW's own screening flag, and no stronger than that. Amber rather than red
   because red on this site means a reading that says harm is happening — a
   reef at Alert Level 2 — and an encounter flagged for review is a question,
   not an answer. */
.mk-enc-risk{
  background: rgba(255,170,90,.9);
  border: 1px solid rgba(255,205,150,.85);
  box-shadow: 0 0 11px rgba(255,160,80,.5);
}

/* Cluster bubbles, told apart by what is inside them. Aircraft take the same
   pale blue as .mk-air so a bubble and the planes it breaks into are visibly
   the same thing; vessels keep the cyan they have always had. */
/* THE BUBBLES HAD TO SEPARATE TOO, or the marker fix stops at the zoom
   where almost nothing is a marker. An audit put these side by side at world
   zoom — rgba(150,185,235,.3) against rgba(127,227,255,.22) — and could not
   tell them apart in a screenshot, which is the honest result: both were
   pale desaturated blue at 22-30% over the same dark ocean. Most of both
   layers lives inside a bubble at the zoom the page opens at.

   Aircraft now carry the white their markers carry, with a ring instead of
   more fill so the difference survives at 30% alpha; vessels keep the cyan
   and gain a cyan ring. Hue alone was not enough at these alphas. */
/* EONET RETURNS FOUR CATEGORIES AND THIS FILE STYLED THREE.
   A waterColor event becomes .mk-nat.mk-nat-water-colour, and .mk-nat alone
   sets only width and height — no background — so it painted as an 8x8
   fully transparent square: present in the DOM, clickable, invisible. There
   were none in the feed the day this was found, which is the only reason it
   went unseen. Bloom and sediment discolouration, so: pale sea-green. */
.mk-nat-water-colour{
  background: rgba(150,225,255,.6);
  box-shadow: 0 0 8px rgba(120,210,255,.4);
}

.marker-cluster.mc-sky{
  background: rgba(240,247,255,.34) !important;
  box-shadow: 0 0 0 1.5px rgba(255,255,255,.55), 0 0 10px rgba(215,235,255,.35);
}
.marker-cluster.mc-sky span{ color: rgba(236,245,255,.98); }
.marker-cluster.mc-vessels{
  background: rgba(90,205,245,.30) !important;
  box-shadow: 0 0 0 1.5px rgba(116,206,242,.7), 0 0 10px rgba(90,190,235,.3);
}
.marker-cluster.mc-vessels span{ color: rgba(216,242,255,.98); }
/* REMOVED: .marker-cluster.mc-encounters. The encounters layer is built with
   group("encounters", false) — unclustered by design, because each of those
   400 dots is one event and collapsing them would hide the thing worth
   seeing. No .mc-encounters element is ever produced at any zoom, so this
   rule was dead code, and the legend note that promised an amber bubble was
   pointing at something that cannot appear. Both are gone. */


/* SMALL MARKERS WITH NO HALO READ AS BACKGROUND NOISE.
   The aircraft layer proved it: 4px at 42% opacity was reported as "not
   there" while the feed carried 2,265 of them. (An earlier version of this
   note blamed the drifting marine-snow particles for the confusion; an audit
   found no such canvas on /globe — that is the descent. The marker was simply
   too faint on its own.) Every marker under
   about 9px now carries a faint halo — not to shout, but so a reader can tell
   a placed mark from the weather. */
.mk-tide{ box-shadow: 0 0 5px rgba(150,200,255,.4); }
.mk-nat{ box-shadow: 0 0 6px rgba(255,255,255,.28); }
.mk-quake{ box-shadow: 0 0 7px rgba(255,190,140,.45); }
.mk-reef{ box-shadow: 0 0 6px rgba(200,255,235,.3); }

/* The reef scale as one ramp rather than six loose rows. Six entries scattered
   through a flat list read as six unrelated things; NOAA's levels are a
   sequence and the whole point is where a reef sits on it. */
.lg-ramp{ margin: .55rem 0 .2rem; }
.lg-ramp b{ display: block; font-size: .66rem; letter-spacing: .12em;
            text-transform: uppercase; color: rgba(232,243,250,.5);
            margin-bottom: .35rem; font-weight: 400; }
.lg-ramp span{ display: flex; align-items: center; gap: .5rem;
               padding: .1rem 0 .1rem .55rem; }

/* The site-wide first-visit prompt renders in page flow — which on this one
   page is BEHIND the fixed full-viewport map. Only its Save/Skip strip poked
   above the fold, painting over the legend bar and swallowing its taps while
   the question the buttons answer stayed invisible. The globe cannot host it
   honestly, so it does not host it at all; the reader meets the same prompt,
   whole, on any other page. */
#interest-prompt{ display: none; }

/* The 26ch cap on legend notes suits the desktop corner panel; inside the
   full-width mobile legend it wrapped the notes into a 144px ribbon at 9px
   beside a hand-span of dead space. This lives at the end of the file
   because the base .lg-note rule has equal specificity and the cascade is
   settled by source order — an earlier attempt inside the media block
   higher up lost that contest without an error anywhere. */
@media (max-width: 760px){
  #g-legend .lg-note{ max-width: none; font-size: 10.5px; }
}

/* In the installed app the thumb bar owns the bottom edge; the map ends
   where the bar begins instead of hiding its legend beneath it. */
@media (display-mode: standalone) and (max-width: 760px){
  #globe-wrap{ bottom: calc(50px + env(safe-area-inset-bottom)); }
}
@media (max-width: 760px){
  html.dv-standalone #globe-wrap{ bottom: calc(50px + env(safe-area-inset-bottom)); }
}
