/* ══════════════════════════════════════════════════════════════
   EarthLog
   A quiet instrument for watching a loud planet.

   On colour: every text token below is checked against the panel
   surface (#0b0e14) and clears WCAG AA at 4.5:1 — including the
   9.5px uppercase micro-labels, which is the size at which a dark
   UI usually starts cheating. Hierarchy is carried by size, weight
   and letter-spacing rather than by fading text into the void.
   ══════════════════════════════════════════════════════════════ */

:root{
  /* surfaces */
  --bg:          #06080b;
  --bg-2:        #0a0d12;
  --panel:       rgba(9,12,18,.93);   /* opaque enough to stay legible over satellite imagery */
  --panel-solid: #0b0e14;
  --raise:       rgba(255,255,255,.04);
  --raise-2:     rgba(255,255,255,.07);
  --line:        rgba(255,255,255,.10);
  --line-soft:   rgba(255,255,255,.055);

  /* ink — every one of these clears 4.5:1 on --panel-solid */
  --text:        #ece9e3;   /* 15.9 : 1 */
  --text-2:      #b6bac1;   /*  9.9 : 1 */
  --muted:       #9aa1ac;   /*  7.4 : 1 */
  --dim:         #848b97;   /*  5.6 : 1 */
  --faint:       #757c88;   /*  4.6 : 1 — the floor for anything that is words */
  --hair:        #454b55;   /* decoration only: rules, inert glyphs, never text */

  /* event families */
  --quake:    #F2A93B;
  --volcano:  #FF5C42;
  --fire:     #FF8B57;
  --storm:    #57C7F2;
  --flood:    #5B8DEF;
  --ice:      #A8DBFF;
  --dry:      #C8B583;
  --slide:    #B08968;
  --eclipse:  #B9A7FF;
  --lunar:    #CBB2FF;
  --meteor:   #86E3C8;
  --aurora:   #6BE39B;
  --planetc:  #E8C89A;
  --iss:      #8FD8FF;
  --wx:       #7FB3E8;
  --archive:  #A9B2BE;

  --focus:    #FFC55C;

  /* geometry */
  --r-lg: 16px;
  --r-md: 11px;
  --r-sm: 8px;
  --pad: 22px;

  --shadow: 0 24px 70px -18px rgba(0,0,0,.85), 0 2px 10px rgba(0,0,0,.4);
  /* a lighter layered shadow (via Open Props) for smaller floating chrome —
     the search bar, header buttons — where the panel's heavy --shadow is too much */
  --shadow-soft: var(--shadow-2, 0 3px 5px -2px rgba(0,0,0,.3), 0 7px 14px -5px rgba(0,0,0,.38));
  --blur: saturate(140%) blur(22px);

  --sans: "Public Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Fraunces", ui-serif, Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease: cubic-bezier(.22,.61,.36,1);
  /* Open Props' out-cubic — used for the smaller, snappier hover/press
     transitions so they read as one considered motion system */
  --ease-ui: var(--ease-out-3, cubic-bezier(0,0,.3,1));
}

*,*::before,*::after{ box-sizing:border-box; }

/* An author `display` rule beats the UA stylesheet's [hidden] { display:none },
   which would otherwise leave .panel-reopen (display:grid) permanently on screen. */
[hidden]{ display:none !important; }

html,body{ height:100%; }
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family:var(--sans); font-size:14px; line-height:1.6;
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
  overflow:hidden; overscroll-behavior:none;
}
::selection{ background:rgba(242,169,59,.3); color:#fff; }

/* ── focus: one ring, everywhere, never suppressed ──────────
   A two-tone ring so it stays visible over the dark panel AND over
   bright satellite imagery. */
:focus-visible{
  outline:2px solid var(--focus);
  outline-offset:2px;
  border-radius:var(--r-sm);
}
.maplibregl-canvas:focus-visible{ outline:3px solid var(--focus); outline-offset:-3px; }
/* Mouse users do not get the ring, but keyboard users always do — no
   blanket `outline:none` lives in this file. */

.sr-only{
  position:absolute !important; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap; border:0;
}

.skiplinks a{
  position:fixed; top:-100px; left:14px; z-index:200;
  padding:11px 16px; border-radius:var(--r-sm);
  background:var(--panel-solid); border:1px solid var(--line);
  color:var(--text); font-size:13px; text-decoration:none;
  box-shadow:var(--shadow);
}
.skiplinks a:focus{ top:14px; }
.skiplinks a + a{ left:190px; }

#map{ position:fixed; inset:0; background:var(--bg); }
.maplibregl-ctrl-attrib, .maplibregl-ctrl-bottom-left{ display:none !important; }
.maplibregl-ctrl-bottom-right{ margin:0 8px 74px 0; }
.maplibregl-ctrl-group{
  background:var(--panel) !important; border:1px solid var(--line) !important;
  box-shadow:var(--shadow) !important;
}
.maplibregl-ctrl-group button + button{ border-top:1px solid var(--line-soft) !important; }
.maplibregl-ctrl-group button .maplibregl-ctrl-icon{ filter:invert(1) opacity(.62); }
.maplibregl-ctrl-group button:hover .maplibregl-ctrl-icon{ filter:invert(1) opacity(.95); }

/* atmosphere framing — a lens, not a filter */
.vignette{
  position:fixed; inset:0; pointer-events:none; z-index:2;
  background:
    radial-gradient(130% 92% at 50% 46%, transparent 52%, rgba(0,0,0,.42) 88%, rgba(0,0,0,.7) 100%);
}
.grain{
  position:fixed; inset:-50%; pointer-events:none; z-index:3; opacity:.022;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ─────────────────────────  header  ───────────────────────── */
.topbar{
  position:fixed; top:0; left:0; right:0; z-index:20;
  display:flex; align-items:center; gap:26px;
  /* viewport-fit=cover lets the page draw under the notch/Dynamic Island —
     these insets are 0 on any device without one, so it's a no-op there. */
  padding:calc(18px + env(safe-area-inset-top)) calc(22px + env(safe-area-inset-right)) 18px calc(22px + env(safe-area-inset-left));
  pointer-events:none;
}
.topbar > *{ pointer-events:auto; }

.brand{
  display:flex; align-items:center; gap:11px; flex:0 0 auto;
  background:none; border:0; padding:4px; margin:-4px; cursor:pointer;
  color:var(--text); font-family:inherit; text-align:left;
}
.brand-mark{ display:flex; color:var(--text); opacity:.92; transition:transform .6s var(--ease); }
.brand:hover .brand-mark{ transform:rotate(-18deg); }
.brand-text{ display:flex; flex-direction:column; line-height:1; }
.brand-name{ font-family:var(--serif); font-size:23px; letter-spacing:-.005em; }
.brand-sub{
  font-size:9.5px; letter-spacing:.16em; text-transform:uppercase;
  color:var(--faint); margin-top:5px;
}

/* search */
.search{ position:relative; flex:1 1 auto; max-width:430px; }
.search-icon{ position:absolute; left:14px; top:50%; transform:translateY(-50%); color:var(--dim); pointer-events:none; }
#q{
  width:100%; height:44px; padding:0 36px 0 38px;
  background:var(--panel); backdrop-filter:var(--blur); -webkit-backdrop-filter:var(--blur);
  border:1px solid var(--line); border-radius:var(--r-md);
  color:var(--text); font-family:var(--sans); font-size:13.5px;
  transition:border-color .2s var(--ease-ui), background .2s var(--ease-ui);
  box-shadow:var(--shadow-soft);
}
#q::placeholder{ color:var(--faint); opacity:1; }
#q:focus{ border-color:rgba(255,255,255,.24); background:rgba(12,16,22,.96); }
.q-clear{
  position:absolute; right:9px; top:50%; transform:translateY(-50%);
  width:26px; height:26px; border:0; border-radius:50%; cursor:pointer;
  background:var(--raise-2); color:var(--muted); font-size:16px; line-height:1;
}
.q-clear:hover{ color:var(--text); background:var(--raise-2); }

.results{
  position:absolute; top:calc(100% + 8px); left:0; right:0;
  background:var(--panel-solid); backdrop-filter:var(--blur); -webkit-backdrop-filter:var(--blur);
  border:1px solid var(--line); border-radius:var(--r-md);
  box-shadow:var(--shadow); overflow:hidden; max-height:52vh; overflow-y:auto;
}
.result{
  display:flex; align-items:baseline; gap:10px; width:100%;
  padding:12px 15px; background:none; border:0; border-bottom:1px solid var(--line-soft);
  text-align:left; cursor:pointer; color:var(--text); font-family:var(--sans); font-size:13px;
}
.result:last-child{ border-bottom:0; }
.result:hover,.result.is-active{ background:var(--raise-2); }
.result.is-active{ box-shadow:inset 2px 0 0 var(--quake); }
.result-name{ font-weight:500; }
.result-ctx{ color:var(--dim); font-size:11.5px; margin-left:auto; white-space:nowrap; }
.results-note{ padding:12px 15px; color:var(--dim); font-size:12px; }

/* header buttons */
.topbar-actions{ position:relative; margin-left:auto; flex:0 0 auto; }
.ghost-btn{
  display:inline-flex; align-items:center; gap:7px; height:44px; padding:0 15px;
  background:var(--panel); backdrop-filter:var(--blur); -webkit-backdrop-filter:var(--blur);
  border:1px solid var(--line); border-radius:var(--r-md);
  color:var(--text-2); font-family:var(--sans); font-size:12.5px; cursor:pointer;
  transition:color .18s var(--ease-ui), border-color .18s var(--ease-ui);
  box-shadow:var(--shadow-soft);
}
.ghost-btn:hover{ color:var(--text); border-color:rgba(255,255,255,.2); }
.ghost-btn[aria-expanded="true"]{ color:var(--text); border-color:rgba(255,255,255,.26); background:rgba(14,18,26,.96); }

.popover{
  position:absolute; top:calc(100% + 8px); right:0; width:272px;
  background:var(--panel-solid); backdrop-filter:var(--blur); -webkit-backdrop-filter:var(--blur);
  border:1px solid var(--line); border-radius:var(--r-md);
  box-shadow:var(--shadow); padding:8px; z-index:30;
  max-height:min(76vh, 620px); overflow-y:auto;
}
.pop-label{
  font-size:9.5px; letter-spacing:.15em; text-transform:uppercase; color:var(--faint);
  padding:10px 10px 6px;
}
.pop-row{
  display:flex; align-items:center; gap:10px; width:100%; padding:9px 10px;
  background:none; border:0; border-radius:var(--r-sm); cursor:pointer;
  color:var(--text-2); font-family:var(--sans); font-size:13px; text-align:left;
}
.pop-row:hover{ background:var(--raise-2); color:var(--text); }
.pop-swatch{ width:8px; height:8px; border-radius:50%; flex:0 0 auto; }
.pop-check{ margin-left:auto; opacity:0; color:var(--quake); }
.pop-row[aria-pressed="true"] .pop-check{ opacity:1; }
.pop-row[aria-pressed="true"]{ color:var(--text); }
.pop-sep{ height:1px; background:var(--line-soft); margin:8px 4px; }
.seg{ display:flex; gap:4px; padding:4px 6px 8px; }
.seg button{
  flex:1; padding:8px 0; border:1px solid transparent; border-radius:var(--r-sm);
  background:var(--raise); color:var(--dim); font-family:var(--mono); font-size:11px; cursor:pointer;
  transition:background .16s var(--ease-ui), color .16s var(--ease-ui);
}
.seg button:hover{ color:var(--text-2); background:var(--raise-2); }
.seg button[aria-pressed="true"]{ background:rgba(242,169,59,.16); color:var(--quake); border-color:rgba(242,169,59,.34); }

/* ─────────────────────────  ask chips  ───────────────────────── */
.asks{
  position:fixed; left:22px; bottom:50px; z-index:18;
  max-width:min(560px, calc(100vw - 510px));
}
.asks-label{
  display:block; font-size:9.5px; letter-spacing:.16em; text-transform:uppercase;
  color:var(--faint); margin:0 0 9px 3px;
}
.asks-row{ display:flex; flex-wrap:wrap; gap:7px; }
.ask{
  display:inline-flex; align-items:center; gap:7px;
  padding:8px 13px; border-radius:999px; cursor:pointer;
  background:var(--panel); backdrop-filter:var(--blur); -webkit-backdrop-filter:var(--blur);
  border:1px solid var(--line); color:var(--text-2);
  font-family:var(--sans); font-size:12.5px; white-space:nowrap;
  transition:color .18s var(--ease-ui), border-color .18s var(--ease-ui), transform .18s var(--ease);
}
.ask:hover{ color:var(--text); border-color:rgba(255,255,255,.24); transform:translateY(-1px); }
.ask.is-busy{ opacity:.55; pointer-events:none; }
.ask .dotk{ width:6px; height:6px; border-radius:50%; flex:0 0 auto; }

/* ─────────────────────────  panel  ───────────────────────── */
.panel{
  position:fixed; top:calc(18px + env(safe-area-inset-top)); right:calc(18px + env(safe-area-inset-right)); bottom:calc(18px + env(safe-area-inset-bottom)); z-index:19;
  width:428px; display:flex; flex-direction:column;
  background:var(--panel); backdrop-filter:var(--blur); -webkit-backdrop-filter:var(--blur);
  border:1px solid var(--line); border-radius:var(--r-lg);
  box-shadow:var(--shadow); overflow:hidden;
  transition:transform .42s var(--ease), opacity .3s;
}
.panel.is-hidden{ transform:translateX(calc(100% + 28px)); opacity:0; pointer-events:none; }

.panel-head{
  display:flex; align-items:stretch; gap:2px; padding:5px 6px 0;
  border-bottom:1px solid var(--line-soft); flex:0 0 auto;
  background:linear-gradient(180deg, rgba(255,255,255,.03), transparent);
}
.panel-tabs{ display:flex; align-items:stretch; gap:2px; flex:1 1 auto; min-width:0; }
.tab{
  position:relative; padding:13px 12px 12px; background:none; border:0; cursor:pointer;
  color:var(--dim); font-family:var(--sans); font-size:12.5px; font-weight:500;
  letter-spacing:.005em; transition:color .18s var(--ease-ui); white-space:nowrap;
}
.tab:hover{ color:var(--text-2); }
.tab[aria-selected="true"]{ color:var(--text); }
.tab[aria-selected="true"]::after{
  content:""; position:absolute; left:12px; right:12px; bottom:-1px; height:2px;
  background:var(--text); border-radius:2px;
}
.panel-collapse{
  align-self:center; margin-left:auto; width:32px; height:32px;
  display:grid; place-items:center;
  background:none; border:0; border-radius:var(--r-sm); cursor:pointer; color:var(--dim);
  flex:0 0 auto;
}
.panel-collapse:hover{ background:var(--raise-2); color:var(--text); }
.panel-reopen{
  position:fixed; top:calc(22px + env(safe-area-inset-top)); right:calc(18px + env(safe-area-inset-right)); z-index:19;
  width:40px; height:40px; display:grid; place-items:center; cursor:pointer;
  background:var(--panel); backdrop-filter:var(--blur); -webkit-backdrop-filter:var(--blur);
  border:1px solid var(--line); border-radius:var(--r-md); color:var(--text-2);
  box-shadow:var(--shadow);
}
.panel-reopen:hover{ color:var(--text); }

.panel-body{ flex:1 1 auto; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; }
.panel-body::-webkit-scrollbar{ width:10px; }
.panel-body::-webkit-scrollbar-thumb{ background:rgba(255,255,255,.11); border-radius:10px; border:3px solid transparent; background-clip:content-box; }
.panel-body::-webkit-scrollbar-thumb:hover{ background:rgba(255,255,255,.2); background-clip:content-box; }
.pad{ padding:var(--pad) var(--pad) 40px; }

/* ── panel typography ── */
.eyebrow{
  font-size:9.5px; letter-spacing:.16em; text-transform:uppercase;
  color:var(--faint); margin:0 0 10px; font-weight:500;
}
.place-name{
  font-family:var(--serif); font-size:32px; line-height:1.08; letter-spacing:-.01em;
  margin:0 0 10px; color:var(--text); text-wrap:balance;
}
.place-name em{ font-style:italic; color:var(--muted); }
.coordline{
  font-family:var(--mono); font-size:11px; color:var(--dim);
  letter-spacing:.02em; display:flex; flex-wrap:wrap; gap:3px 14px; margin-bottom:20px;
}
.coordline b{ color:var(--muted); font-weight:400; }

.sect{ margin-top:30px; }
.sect:first-of-type{ margin-top:0; }
.sect-head{
  display:flex; align-items:baseline; gap:10px; margin-bottom:12px;
  padding-bottom:9px; border-bottom:1px solid var(--line-soft);
}
.sect-title{
  font-size:10px; letter-spacing:.16em; text-transform:uppercase; color:var(--muted);
  margin:0; font-weight:600;
}
.sect-count{ font-family:var(--mono); font-size:10.5px; color:var(--faint); margin-left:auto; }
.subhead{
  font-size:9.5px; letter-spacing:.16em; text-transform:uppercase; color:var(--faint);
  margin:22px 0 4px; font-weight:600;
}

.hintlist{ margin-top:28px; }
.hintlist ul{ list-style:none; margin:12px 0 0; padding:0; }
.hintlist li{ color:var(--dim); font-size:12.5px; padding:5px 0; }
.hintlist b{
  font-family:var(--mono); font-size:11px; color:var(--text-2);
  background:var(--raise-2); border:1px solid var(--line-soft);
  border-radius:5px; padding:2px 6px; margin-right:8px;
}

/* headline answers */
.answers{ display:flex; flex-direction:column; gap:1px; margin-bottom:6px; }
.answer{
  display:flex; align-items:flex-start; gap:12px; padding:12px 10px 12px 13px;
  border-radius:var(--r-sm); background:none; border:0; width:100%;
  text-align:left; font-family:var(--sans); color:var(--text-2); transition:background .16s var(--ease-ui);
}
button.answer{ cursor:pointer; }
button.answer:hover{ background:var(--raise-2); }
button.answer:hover .answer-go{ color:var(--text-2); transform:translateX(2px); }
.answer-bar{ width:2px; align-self:stretch; border-radius:2px; flex:0 0 auto; opacity:.85; }
.answer-body{ flex:1 1 auto; min-width:0; display:block; }
.answer-k{
  font-size:9.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--faint);
  display:block; margin-bottom:4px; font-weight:500;
}
.answer-v{ display:block; font-size:13.5px; color:var(--text); line-height:1.45; }
.answer-v .num{ font-family:var(--mono); font-size:12.5px; }
.answer-v .soft{ color:var(--muted); }
.answer-m{ display:block; font-size:11.5px; color:var(--dim); margin-top:4px; line-height:1.5; }
.answer-go{
  flex:0 0 auto; align-self:center; color:var(--hair);
  transition:color .16s, transform .16s var(--ease);
}

/* event rows */
.rows{ display:flex; flex-direction:column; }
.row{
  display:flex; gap:13px; padding:13px 12px; margin:0 -12px;
  border-radius:var(--r-sm); cursor:pointer; background:none; border:0; width:calc(100% + 24px);
  text-align:left; font-family:var(--sans); transition:background .16s var(--ease-ui);
  border-bottom:1px solid var(--line-soft);
}
.row:hover{ background:var(--raise-2); }
.row:last-child{ border-bottom:0; }
.row-mark{ flex:0 0 auto; width:36px; text-align:center; padding-top:2px; }
.row-mag{ display:block; font-family:var(--mono); font-size:15px; font-weight:500; letter-spacing:-.02em; line-height:1.2; }
.row-unit{ font-size:8.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--faint); display:block; margin-top:1px; }
.row-glyph{ width:9px; height:9px; border-radius:50%; display:inline-block; margin-top:6px; }
.row-body{ flex:1 1 auto; min-width:0; display:block; }
/* the kind in words, so colour is never the only thing carrying it */
.row-kind{
  display:block; font-size:8.5px; letter-spacing:.15em; text-transform:uppercase;
  color:var(--faint); margin-bottom:3px; font-weight:500;
}
.row-title{ display:block; font-size:13.5px; color:var(--text); line-height:1.4; }
.row-meta{
  font-family:var(--mono); font-size:10.5px; color:var(--dim);
  margin-top:5px; display:flex; flex-wrap:wrap; gap:3px 8px; align-items:baseline;
}
.row-meta .sep{ color:var(--hair); }
.row-note{ display:block; font-size:12px; color:var(--muted); margin-top:7px; line-height:1.55; }

.empty{
  padding:18px 2px; color:var(--muted); line-height:1.65;
  font-family:var(--serif); font-style:italic; font-size:15px;
}
.note{ font-size:11.5px; color:var(--dim); margin:10px 2px 0; line-height:1.55; }
.note b{ color:var(--text); font-weight:500; }
.loading{ padding:14px 2px; color:var(--dim); font-family:var(--mono); font-size:11.5px; }
.loading::after{ content:"..."; animation:dots 1.3s steps(4,end) infinite; }
@keyframes dots{ 0%{content:""} 25%{content:"."} 50%{content:".."} 75%{content:"..."} }

.linkbtn{
  display:inline-flex; align-items:center; gap:6px; margin-top:16px;
  padding:9px 13px; border-radius:999px; cursor:pointer;
  background:var(--raise); border:1px solid var(--line-soft); color:var(--text-2);
  font-family:var(--sans); font-size:12px;
  transition:background .16s var(--ease-ui), color .16s var(--ease-ui), border-color .16s var(--ease-ui);
}
.linkbtn:hover{ background:var(--raise-2); color:var(--text); border-color:var(--line); }

/* pills / chips inside panel */
.pill{
  display:inline-flex; align-items:center; gap:6px; padding:4px 11px; border-radius:999px;
  background:var(--raise); border:1px solid var(--line-soft);
  font-family:var(--mono); font-size:10.5px; letter-spacing:.05em; color:var(--muted);
  text-transform:uppercase;
}
.filters{ display:flex; flex-wrap:wrap; gap:5px; margin-bottom:16px; }
.filter{
  padding:7px 12px; border-radius:999px; cursor:pointer;
  background:transparent; border:1px solid var(--line); color:var(--dim);
  font-family:var(--sans); font-size:11.5px; transition:background .16s var(--ease-ui), color .16s var(--ease-ui), border-color .16s var(--ease-ui);
}
.filter:hover{ color:var(--text-2); border-color:rgba(255,255,255,.2); }
.filter[aria-pressed="true"]{ background:var(--raise-2); color:var(--text); border-color:rgba(255,255,255,.26); }

/* ─────────────────  weather  ───────────────── */
.wx-strip{
  display:flex; align-items:center; gap:14px; width:100%;
  padding:14px 14px 14px 15px; margin:0 0 22px;
  border-radius:var(--r-md); cursor:pointer; text-align:left;
  background:linear-gradient(180deg, rgba(127,179,232,.09), rgba(127,179,232,.03));
  border:1px solid rgba(127,179,232,.18); color:var(--text-2);
  font-family:var(--sans); transition:border-color .18s var(--ease-ui), background .18s var(--ease-ui);
}
.wx-strip:hover{ border-color:rgba(127,179,232,.34); }
.wx-strip.is-empty{ cursor:default; display:block; padding:14px; }
.wx-strip-icon{ flex:0 0 auto; display:flex; }
.wx-strip-main{ flex:1 1 auto; min-width:0; display:block; }
.wx-strip-temp{
  font-family:var(--serif); font-size:30px; line-height:1; color:var(--text);
  display:inline-block; margin-right:9px;
}
.wx-strip-temp .deg{ font-size:15px; color:var(--muted); }
.wx-strip-label{ font-size:13px; color:var(--text-2); }
.wx-strip-bits{
  display:block; margin-top:6px; font-family:var(--mono); font-size:10.5px;
  color:var(--dim); line-height:1.5;
}
.wx-strip-bits .sep{ color:var(--hair); margin:0 6px; }
.wx-strip-go{ flex:0 0 auto; color:var(--hair); transition:color .16s, transform .16s var(--ease); }
.wx-strip:hover .wx-strip-go{ color:var(--text-2); transform:translateX(2px); }

.wx-hero{ display:flex; align-items:center; gap:20px; margin:4px 0 26px; }
.wx-hero-icon{ flex:0 0 auto; display:flex; }
.wx-hero-main{ min-width:0; }
.wx-hero-temp{
  font-family:var(--serif); font-size:56px; line-height:.95; margin:0; color:var(--text);
  letter-spacing:-.02em;
}
.wx-hero-temp .deg{ font-size:22px; color:var(--muted); letter-spacing:0; }
.wx-hero-label{ margin:8px 0 0; font-size:15px; color:var(--text-2); }
.wx-hero-feels{ margin:4px 0 0; font-family:var(--mono); font-size:11px; color:var(--dim); }

.statgrid{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:1px; background:var(--line-soft); border-radius:var(--r-sm); overflow:hidden; }
.stat{ background:var(--panel-solid); padding:11px 13px; display:flex; flex-direction:column; gap:3px; }
.stat-k{ font-size:9px; letter-spacing:.15em; text-transform:uppercase; color:var(--faint); font-weight:500; }
.stat-v{ font-family:var(--mono); font-size:14px; color:var(--text); }
.stat-v small{ font-size:10px; color:var(--dim); }

.hours{
  display:flex; gap:2px; overflow-x:auto; padding:4px 0 10px;
  scrollbar-width:thin; scroll-snap-type:x proximity;
}
.hours::-webkit-scrollbar{ height:6px; }
.hours::-webkit-scrollbar-thumb{ background:rgba(255,255,255,.13); border-radius:6px; }
.hour{
  flex:0 0 auto; width:46px; display:flex; flex-direction:column; align-items:center;
  gap:5px; padding:8px 2px; border-radius:var(--r-sm); scroll-snap-align:start;
}
.hour:hover{ background:var(--raise); }
.hour-t{ font-family:var(--mono); font-size:9.5px; color:var(--faint); }
.hour-icon{ color:var(--muted); display:flex; height:18px; }
.hour-bar{
  width:3px; border-radius:3px; align-self:center;
  background:linear-gradient(180deg, var(--wx), rgba(127,179,232,.25));
}
.hour-temp{ font-family:var(--mono); font-size:11.5px; color:var(--text); }
.hour-pop{ font-family:var(--mono); font-size:9.5px; color:var(--faint); min-height:13px; }
.hour-pop.is-wet{ color:var(--wx); }
.scroll-hint{ font-size:10.5px; color:var(--faint); margin:0 2px; font-family:var(--mono); }

.days{ display:flex; flex-direction:column; }
.day{
  display:grid; grid-template-columns:52px 24px 34px 34px 1fr 34px;
  align-items:center; gap:8px; padding:10px 0;
  border-bottom:1px solid var(--line-soft);
}
.day:last-child{ border-bottom:0; }
.day-name{ font-size:12px; color:var(--text-2); }
.day-icon{ display:flex; }
.day-pop{ font-family:var(--mono); font-size:10px; color:var(--faint); text-align:right; }
.day-pop.is-wet{ color:var(--wx); }
.day-lo{ font-family:var(--mono); font-size:11.5px; color:var(--dim); text-align:right; }
.day-hi{ font-family:var(--mono); font-size:11.5px; color:var(--text); text-align:right; }
.day-track{ position:relative; height:4px; border-radius:4px; background:var(--raise-2); }
.day-range{
  position:absolute; top:0; height:100%; border-radius:4px;
  background:linear-gradient(90deg, #6FA8DC, #F2A93B);
}

/* ─────────────────  sky  ───────────────── */
.sect-tonight .tonight-head{ margin-bottom:14px; }
.moon{ display:flex; align-items:center; gap:16px; padding:6px 0 14px; }
.moon-disc{ flex:0 0 auto; }
.moon-txt{ display:flex; flex-direction:column; gap:3px; min-width:0; }
.moon-txt b{ font-size:13.5px; color:var(--text); font-weight:500; }
.moon-txt span{ font-size:11.5px; color:var(--dim); }

.row-planet .planet-disc{
  width:13px; height:13px; border-radius:50%; display:inline-block; margin-top:3px;
  box-shadow:0 0 0 1px rgba(0,0,0,.5), 0 0 10px -1px currentColor;
}
.alt-track{
  display:block; height:3px; border-radius:3px; background:var(--raise-2);
  margin-top:8px; overflow:hidden;
}
.alt-fill{ display:block; height:100%; border-radius:3px; opacity:.8; }
.pass-el{
  display:block; font-family:var(--mono); font-size:16px; color:var(--iss);
  line-height:1.1; font-weight:500;
}
.pass-el .deg{ font-size:10px; color:var(--dim); }

.more{ margin-top:14px; }
.more summary{
  cursor:pointer; font-size:11.5px; color:var(--dim); padding:8px 2px;
  list-style:none; display:flex; align-items:center; gap:7px;
}
.more summary::-webkit-details-marker{ display:none; }
.more summary::before{
  content:""; width:0; height:0; border-left:5px solid currentColor;
  border-top:4px solid transparent; border-bottom:4px solid transparent;
  transition:transform .18s var(--ease);
}
.more[open] summary::before{ transform:rotate(90deg); }
.more summary:hover{ color:var(--text-2); }

/* detail card */
.detail-hero{ margin-bottom:18px; }
.detail-kind{
  display:inline-flex; align-items:center; gap:7px; margin:0 0 12px;
  font-size:9.5px; letter-spacing:.16em; text-transform:uppercase; font-weight:500;
}
.detail-title{
  font-family:var(--serif); font-size:28px; line-height:1.14; margin:0 0 12px;
  letter-spacing:-.01em; text-wrap:balance;
}
.detail-title em{
  display:block; font-style:italic; color:var(--muted); font-size:.72em; margin-top:4px;
}
.detail-body{ font-size:13.5px; color:var(--text-2); line-height:1.7; }
.detail-body p{ margin:0 0 12px; }
.detail-body b{ color:var(--text); font-weight:500; }
.dl{ display:grid; grid-template-columns:auto 1fr; gap:9px 18px; margin:18px 0 0; }
.dl dt{ font-size:9.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--faint); padding-top:3px; font-weight:500; }
.dl dd{ margin:0; font-family:var(--mono); font-size:12px; color:var(--text-2); }
.dl dd .soft{ color:var(--dim); }
.backlink{
  display:inline-flex; align-items:center; gap:6px; margin-bottom:18px;
  background:var(--raise); border:1px solid var(--line-soft); padding:7px 13px 7px 10px;
  border-radius:999px; cursor:pointer;
  color:var(--text-2); font-family:var(--sans); font-size:12px;
  transition:background .16s var(--ease-ui), color .16s var(--ease-ui);
}
.backlink:hover{ color:var(--text); background:var(--raise-2); }
.linkrow{ margin:18px 0 0; }
.extlink{ color:var(--text-2); text-decoration:none; border-bottom:1px solid var(--line); }
.extlink:hover{ color:var(--text); border-color:var(--muted); }

.caveat{
  margin-top:16px; padding:12px 14px; border-radius:var(--r-sm);
  background:rgba(255,255,255,.03); border:1px solid var(--line-soft);
  font-size:11.5px; color:var(--dim); line-height:1.65;
}
.caveat b{ color:var(--text-2); }
.caveat .dotk{ width:7px; height:7px; border-radius:50%; display:inline-block; margin-right:5px; }
.caveat.is-eclipse{ border-color:rgba(185,167,255,.26); background:rgba(185,167,255,.06); }
.caveat.is-lunar{ border-color:rgba(203,178,255,.26); background:rgba(203,178,255,.06); }
.caveat.is-meteor{ border-color:rgba(134,227,200,.26); background:rgba(134,227,200,.06); }
.caveat.is-launch{ border-color:rgba(159,224,255,.26); background:rgba(159,224,255,.06); }

/* sky meters */
.meter{ margin:14px 0 4px; }
.meter-top{ display:flex; align-items:baseline; gap:8px; margin-bottom:7px; }
.meter-name{ font-size:12.5px; color:var(--text-2); }
.meter-val{ font-family:var(--mono); font-size:12px; color:var(--text); margin-left:auto; }
.meter-track{ height:4px; border-radius:4px; background:var(--raise-2); overflow:hidden; }
.meter-fill{ height:100%; border-radius:4px; transition:width .6s var(--ease); }

/* ─────────────────────────  status bar  ───────────────────────── */
.statusbar{
  position:fixed; left:0; right:0; bottom:0; z-index:17;
  display:flex; align-items:center; gap:16px; padding:11px 22px;
  font-family:var(--mono); font-size:10.5px; letter-spacing:.03em;
  pointer-events:none;
  background:linear-gradient(180deg, transparent, rgba(4,6,10,.72));
}
.statusbar p{ margin:0; }
.status-left{ display:flex; align-items:center; gap:8px; color:var(--dim); }
.status-right{ margin-left:auto; }
.dot{ width:5px; height:5px; border-radius:50%; background:var(--quake); box-shadow:0 0 0 3px rgba(242,169,59,.16); flex:0 0 auto; }
.dot.live{ animation:pulse 2.6s var(--ease) infinite; }
@keyframes pulse{ 0%,100%{ box-shadow:0 0 0 3px rgba(242,169,59,.16);} 50%{ box-shadow:0 0 0 6px rgba(242,169,59,.03);} }
.attrib{ color:var(--faint); }

/* ─────────────────────────  map popup  ───────────────────────── */
.maplibregl-popup-content{
  background:var(--panel-solid) !important; backdrop-filter:var(--blur);
  border:1px solid var(--line); border-radius:var(--r-md);
  box-shadow:var(--shadow); padding:12px 14px !important;
  font-family:var(--sans); color:var(--text); max-width:280px;
}
.maplibregl-popup-tip{ display:none !important; }
.maplibregl-popup-close-button{ display:none; }
.tip-kind{ font-size:9px; letter-spacing:.16em; text-transform:uppercase; margin-bottom:5px; font-weight:500; }
.tip-title{ font-size:13px; line-height:1.4; margin-bottom:5px; }
.tip-meta{ font-family:var(--mono); font-size:10.5px; color:var(--dim); }
.tip-hint{ font-size:10.5px; color:var(--faint); margin-top:8px; }

/* ─────────────────────────  boot  ───────────────────────── */
.boot{
  position:fixed; inset:0; z-index:60; display:grid; place-items:center;
  background:var(--bg); transition:opacity .7s var(--ease), visibility .7s;
}
.boot.gone{ opacity:0; visibility:hidden; }
.boot-inner{ text-align:center; }
.boot-ring{
  width:44px; height:44px; margin:0 auto 20px; border-radius:50%;
  border:1px solid rgba(255,255,255,.1); border-top-color:var(--quake);
  animation:spin 1.1s linear infinite;
}
@keyframes spin{ to{ transform:rotate(360deg); } }
.boot p{ font-family:var(--serif); font-size:20px; color:var(--muted); margin:0; letter-spacing:.01em; }

/* ─────────────────────────  responsive  ───────────────────────── */
@media (max-width: 1120px){
  .panel{ width:390px; }
  .asks{ max-width:calc(100vw - 470px); }
}
@media (max-width: 900px){
  .topbar{
    flex-wrap:wrap; gap:12px;
    padding:calc(12px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 12px calc(12px + env(safe-area-inset-left));
  }
  .search{ order:3; flex:1 1 100%; max-width:none; }
  .brand-sub{ display:none; }
  .skiplinks a + a{ left:14px; top:-100px; }
  .skiplinks a + a:focus{ top:64px; }
  .panel{
    top:auto; left:calc(10px + env(safe-area-inset-left)); right:calc(10px + env(safe-area-inset-right));
    bottom:calc(10px + env(safe-area-inset-bottom)); width:auto; height:56vh;
    border-radius:var(--r-lg);
  }
  .panel.is-hidden{ transform:translateY(calc(100% + 20px)); }
  .panel-reopen{ top:auto; bottom:calc(16px + env(safe-area-inset-bottom)); right:calc(12px + env(safe-area-inset-right)); }
  .asks{
    left:calc(12px + env(safe-area-inset-left)); right:calc(12px + env(safe-area-inset-right));
    bottom:calc(56vh + 20px); max-width:none;
    transition:bottom .3s var(--ease-ui);
  }
  /* Collapsing the sheet frees its 56vh, but the chip row (and the layers
     popover, anchored the same way) don't know that on their own — without
     this they just hold their spot, and the reclaimed space sits empty
     under them instead of going anywhere. */
  body.panel-hidden .asks{ bottom:calc(16px + env(safe-area-inset-bottom)); }
  body.panel-hidden .popover{ bottom:calc(16px + env(safe-area-inset-bottom)); }
  .asks-row{ flex-wrap:nowrap; overflow-x:auto; padding-bottom:4px; scrollbar-width:none; }
  .asks-row::-webkit-scrollbar{ display:none; }
  /* The layers popover normally hangs below its trigger button, but on a
     phone the topbar wraps to two rows and the button sits in the first
     one — anchoring there would bury the popover under the search bar.
     Anchor it from the bottom sheet's edge instead: same trick as the
     "where is…" row above, no dependency on the topbar's (variable)
     wrapped height. */
  .popover{
    position:fixed; left:calc(12px + env(safe-area-inset-left)); right:calc(12px + env(safe-area-inset-right));
    /* top is a deliberately generous clearance under the wrapped topbar
       (brand row + search row) rather than a measured value — a few
       spare pixels of gap costs nothing, but growing past the top of the
       screen (clipping the first rows off-canvas) is a real break. With
       both top and bottom set, height is whatever's left between them,
       and the popover's own overflow-y:auto scrolls that. */
    top:136px; bottom:calc(56vh + 20px); width:auto; max-height:none;
  }
  .statusbar{ display:none; }
  .maplibregl-ctrl-bottom-right{ display:none !important; }
  .place-name{ font-size:27px; }
  .wx-hero-temp{ font-size:46px; }
  .statgrid{ grid-template-columns:repeat(2, minmax(0,1fr)); }
}

/* A landscape phone is short as well as narrow — the topbar's wrapped
   height (brand row + search row) stays roughly fixed while 56vh of a
   ~375px-tall viewport shrinks a lot, so the bottom sheet and the "where
   is…" row (both sized off vh) end up colliding with the topbar instead
   of sitting below it. Give both a smaller share on short viewports so
   there's still a gap. */
@media (max-width: 900px) and (max-height: 480px){
  .panel{ height:44vh; }
  .asks{ bottom:calc(44vh + 14px); }
  .popover{ bottom:calc(44vh + 14px); }
}

/* Fingers need a bigger target than a mouse pointer does. */
@media (pointer: coarse){
  .tab{ padding:15px 13px 14px; }
  .row{ padding:15px 12px; }
  .filter{ padding:9px 14px; }
  .pop-row{ padding:12px 10px; }
  .seg button{ padding:11px 0; }
  .q-clear{ width:38px; height:38px; }
  .ask{ padding:12px 14px; }
  .panel-collapse, .panel-reopen{ width:44px; height:44px; }
  .backlink{ padding:10px 15px 10px 11px; }
}

/* People who ask their OS for more contrast get harder edges and
   brighter secondary ink, not just a slightly different grey. */
@media (prefers-contrast: more){
  :root{
    --muted:#c2c8d1; --dim:#b3bac4; --faint:#a5acb7; --hair:#6d7480;
    --line:rgba(255,255,255,.24); --line-soft:rgba(255,255,255,.16);
    --panel:rgba(4,6,10,.99); --panel-solid:#04060a;
  }
  .row, .answer{ border-bottom-color:var(--line); }
  .ask, .filter, .ghost-btn, #q{ border-color:var(--line); }
  .vignette, .grain{ display:none; }
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.01ms !important; animation-iteration-count:1 !important;
     transition-duration:.01ms !important; scroll-behavior:auto !important; }
  .brand:hover .brand-mark{ transform:none; }
}
