/* Original style section 1; order preserved. */

/* the custom page scrollbar (#pg-sb, end of body) hides the native one; doing it
   here too means the native bar never shows while the page is still loading */
html.pgsb {
  scrollbar-width: none;
}
html.pgsb::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
/* html,body{overflow-x:hidden} makes <body> a scroll box of its own; while the
   page loads it overflows by a few px and drew its own native scrollbar */
body {
  scrollbar-width: none;
}
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Original style section 2; order preserved. */

/* ---- scrollbars: one slim thumb for every scrolling box and the page ----
   Chrome drops these pseudo-elements on any element with scrollbar-color or
   scrollbar-width:thin, so those two are kept for browsers without them in the
   @supports block below. */
/* :where() keeps these at the lowest weight, so any element's own rule wins */
:where(html, body *)::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
:where(html)::-webkit-scrollbar {
  width: 12px;
}
:where(html, body *)::-webkit-scrollbar-track {
  background: transparent;
}
:where(html, body *)::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.13);
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: content-box;
}
:where(html, body *)::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.2);
}
:where(html, body *)::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}
:where(html, body *)::-webkit-scrollbar-corner {
  background: transparent;
}
@supports not selector(::-webkit-scrollbar) {
  html {
    scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
  }
  body * {
    scrollbar-width: thin;
  }
}

/* Original style section 3; order preserved. */

:root {
  --bg: #0a0d16; /* dark navy */
  --bg-soft: #111629;
  --card: #141a2b; /* dark card */
  --card2: #1b2236;
  --ink: #f5ecec; /* primary text */
  --muted: #a8908f; /* secondary */
  --tert: #6b5453; /* tertiary */
  --line: rgba(255, 255, 255, 0.08); /* separator */
  --fill: rgba(255, 255, 255, 0.06);
  --fill2: rgba(255, 255, 255, 0.11);
  --orange: #e23b2e; /* red tint */
  --orange-soft: #2a1210;
  --teal: #4fb0aa;
  --radius: 11px;
  --blur: saturate(160%) blur(20px);
  --shadow: 0 1px 1px rgba(0, 0, 0, 0.4), 0 18px 50px -18px rgba(0, 0, 0, 0.7);
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  overflow-x: clip;
}
body {
  background: var(--bg);
  color: var(--ink);
  background-image:
    radial-gradient(
      1200px 600px at 72% -10%,
      rgba(205, 56, 38, 0.16) 0%,
      rgba(205, 56, 38, 0.1536) 6.96%,
      rgba(205, 56, 38, 0.135) 14.5%,
      rgba(205, 56, 38, 0.1082) 22.04%,
      rgba(205, 56, 38, 0.08) 29%,
      rgba(205, 56, 38, 0.0518) 35.96%,
      rgba(205, 56, 38, 0.025) 43.5%,
      rgba(205, 56, 38, 0.0064) 51.04%,
      rgba(205, 56, 38, 0) 58%
    ),
    radial-gradient(
      1000px 620px at 8% 6%,
      rgba(44, 74, 160, 0.12) 0%,
      rgba(44, 74, 160, 0.1152) 7.2%,
      rgba(44, 74, 160, 0.1012) 15%,
      rgba(44, 74, 160, 0.0812) 22.8%,
      rgba(44, 74, 160, 0.06) 30%,
      rgba(44, 74, 160, 0.0388) 37.2%,
      rgba(44, 74, 160, 0.0187) 45%,
      rgba(44, 74, 160, 0.0048) 52.8%,
      rgba(44, 74, 160, 0) 60%
    );
  background-attachment: fixed;
  font-family:
    Manrope,
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3 {
  letter-spacing: -0.022em;
  line-height: 1.12;
  font-weight: 700;
}
.mono {
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    'IBM Plex Mono',
    Menlo,
    monospace;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}
button {
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 28px;
}
::selection {
  background: #e8590f33;
}

/* ---------- nav : frosted bar ---------- */
nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(26, 13, 13, 0.72);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 0.5px solid rgba(226, 59, 46, 0.14);
}
.nav-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 20px;
}
/* the wordmark is a single image, so the brand scales as one object */
.brand {
  gap: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
/* Logo size rule declared early (intrinsic size is 12500px). */
.brand-logo {
  width: auto;
  height: 60px;
  max-width: none;
  display: block;
  margin-left: -5px;
}
footer .brand-logo {
  height: 62px;
  margin-left: -6px;
}
@media (max-width: 1000px) {
  .brand-logo {
    height: 52px;
  }
  footer .brand-logo {
    height: 54px;
  }
}
.brand svg {
  width: 30px;
  height: 30px;
}
.nav-links {
  display: flex;
  gap: 2px;
  align-items: center;
  background: var(--fill);
  border-radius: 99px;
  padding: 3px;
}
.nav-links a {
  position: relative;
  font-size: 14px;
  font-weight: 590;
  color: var(--muted);
  padding: 7px 16px;
  border-radius: 99px;
  /* Transition only the needed properties. */
  transition: color 0.28s cubic-bezier(0.3, 0.8, 0.35, 1);
}
.nav-links a::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 99px;
  z-index: -1;
  background: rgba(255, 255, 255, 0.055);
  opacity: 0;
  transform: scale(0.9);
  transition:
    opacity 0.3s cubic-bezier(0.3, 0.8, 0.35, 1),
    transform 0.3s cubic-bezier(0.3, 0.8, 0.35, 1);
}
.nav-links a:hover::before {
  opacity: 1;
  transform: scale(1);
}
.nav-links a:hover {
  color: var(--ink);
}
.nav-links a:active {
  transform: scale(0.97);
}
.nav-links a.active {
  color: var(--ink);
  background: var(--fill2);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.12);
}
.nav-links a.active::before {
  opacity: 0;
}
.nav-links a.dis {
  opacity: 0.4;
  pointer-events: none;
}
.burger {
  display: none;
  background: var(--fill);
  border: none;
  border-radius: 12px;
  width: 40px;
  height: 40px;
  font-size: 16px;
  color: var(--ink);
}

/* ---------- hero ---------- */
.hero {
  padding-block: 96px 80px;
  position: relative;
  overflow-x: clip;
}
.hero-grid {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}
.kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}
.hero h1 em {
  font-style: normal;
  color: #ee5d2e;
}
.hero h1 em svg {
  display: none;
}
.hero p {
  color: var(--muted);
  font-size: 17px;
  max-width: 62ch;
  margin: 0 auto;
}
.hero-cta {
  display: flex;
  gap: 12px;
  margin-top: 34px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero::before {
  content: '';
  position: absolute;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(226, 59, 46, 0.2) 0%,
    rgba(226, 59, 46, 0.1921) 8.4%,
    rgba(226, 59, 46, 0.1688) 17.5%,
    rgba(226, 59, 46, 0.1353) 26.6%,
    rgba(226, 59, 46, 0.1) 35%,
    rgba(226, 59, 46, 0.0647) 43.4%,
    rgba(226, 59, 46, 0.0312) 52.5%,
    rgba(226, 59, 46, 0.0079) 61.6%,
    rgba(226, 59, 46, 0) 70%
  );
  pointer-events: none;
  z-index: -1;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 16px;
  padding: 13px 26px;
  border-radius: 99px;
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    background 0.2s,
    opacity 0.2s;
  border: none;
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 6px 20px -6px #e23b2e88;
}
.btn-primary:hover {
  box-shadow: 0 12px 30px -8px #e23b2eaa;
  transform: translateY(-1px);
}
.btn-ghost {
  background: var(--fill);
  color: var(--ink);
}
.btn-ghost:hover {
  background: var(--fill2);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 52px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.stat {
  background: var(--card);
  border: 0.5px solid var(--line);
  border-radius: 10px;
  padding: 16px 14px;
  box-shadow: var(--shadow);
}
.stat b {
  font-size: 26px;
  font-weight: 700;
  display: block;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat b i {
  font-style: normal;
  color: var(--orange);
  font-size: 15px;
  font-weight: 600;
}
.stat > span {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 600;
}

/* floating map window */
.hero-visual {
  position: relative;
  margin-top: -40px;
  max-width: 100%;
  overflow: visible;
}
.orbit {
  position: absolute;
  inset: -8% -6% -8% -6%;
  border-radius: 14px;
  background:
    radial-gradient(120px 120px at 18% 22%, #f7c9a955, transparent 70%),
    radial-gradient(160px 160px at 88% 78%, #e8590f22, transparent 70%);
  filter: blur(4px);
  z-index: -1;
  animation: float 9s ease-in-out infinite;
}
@keyframes float {
  50% {
    transform: translateY(-10px);
  }
}
.ping {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e8590f;
  box-shadow:
    0 0 0 2px #1a0f10,
    0 2px 8px #e23b2e88;
}
.ping::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #e8590f;
  animation: ping 2.6s ease-out infinite;
}
.ping.p1 {
  top: 36%;
  left: 48%;
}
.ping.p2 {
  top: 35%;
  left: 69%;
  animation-delay: 0.8s;
}
.ping.p3 {
  top: 48%;
  left: 59%;
  animation-delay: 1.6s;
}
.ping.p2::after {
  animation-delay: 0.8s;
}
.ping.p3::after {
  animation-delay: 1.6s;
}
@keyframes ping {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  80%,
  100% {
    transform: scale(3.6);
    opacity: 0;
  }
}
.readout {
  position: absolute;
  right: -14px;
  bottom: -72px;
  background: rgba(40, 20, 20, 0.72);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-radius: 11px;
  padding: 16px 20px;
  box-shadow: 0 12px 40px -12px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
  transition: transform 0.25s ease-out;
}
.rd-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.rd-val {
  display: flex;
  align-items: baseline;
  gap: 3px;
}
.rd-val b {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.rd-val em {
  font-style: normal;
  font-size: 17px;
  font-weight: 700;
  color: var(--orange);
}
.rd-spark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
  margin-top: 2px;
}
.rd-spark i {
  flex: 1;
  background: linear-gradient(180deg, #f5722e, var(--orange));
  border-radius: 2px;
  transform-origin: bottom;
  transform: scaleY(0);
  animation: sparkGrow 0.5s ease-out forwards;
}
.rd-spark i:nth-child(1) {
  height: 40%;
  animation-delay: 0.1s;
}
.rd-spark i:nth-child(2) {
  height: 65%;
  animation-delay: 0.15s;
}
.rd-spark i:nth-child(3) {
  height: 50%;
  animation-delay: 0.2s;
}
.rd-spark i:nth-child(4) {
  height: 80%;
  animation-delay: 0.25s;
}
.rd-spark i:nth-child(5) {
  height: 55%;
  animation-delay: 0.3s;
}
.rd-spark i:nth-child(6) {
  height: 90%;
  animation-delay: 0.35s;
}
.rd-spark i:nth-child(7) {
  height: 70%;
  animation-delay: 0.4s;
}
.rd-spark i:nth-child(8) {
  height: 100%;
  animation-delay: 0.45s;
}
@keyframes sparkGrow {
  to {
    transform: scaleY(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .orbit,
  .ping::after,
  .rd-spark i {
    animation: none;
    transform: none;
  }
}
.window {
  background: var(--card);
  border-radius: 13px;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.04),
    0 32px 80px -28px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  transition: transform 0.25s ease-out;
  border: 0.5px solid var(--line);
  max-width: 100%;
}
.win-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: var(--blur);
}
.win-bar .dots {
  display: flex;
  gap: 6px;
}
.win-bar .dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--fill2);
}
.win-bar .dots i:first-child {
  background: #ff5f57;
}
.win-bar .dots i:nth-child(2) {
  background: #febc2e;
}
.win-bar .dots i:nth-child(3) {
  background: #28c840;
}
.win-bar span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.win-body {
  position: relative;
  background:
    radial-gradient(420px 260px at 72% 78%, #f7c9a940, transparent 70%),
    radial-gradient(360px 220px at 12% 30%, #f0902e22, transparent 70%),
    linear-gradient(180deg, #1a0f10, #120a0b);
}
.heromap {
  padding: 26px 10px 40px;
  overflow: hidden;
}
.heromap svg {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.08));
  max-width: 100%;
}
.heromap path {
  fill: #3a2422;
  stroke: #1a0f10;
  stroke-width: 0.6;
}
.heromap path.d1 {
  fill: #7a2418;
}
.heromap path.d2 {
  fill: #a52c1c;
}
.heromap path.d3 {
  fill: #d13a24;
}
.heromap path.d4 {
  fill: #f5502e;
}
@media (prefers-reduced-motion: no-preference) {
  .heromap path.d3,
  .heromap path.d4 {
    animation: heat 4s ease-in-out infinite;
  }
  @keyframes heat {
    50% {
      opacity: 0.78;
    }
  }
}
.win-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  background: rgba(40, 20, 20, 0.72);
  backdrop-filter: var(--blur);
  border-radius: 99px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}
.win-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  animation: blink 2.4s infinite;
}

/* ---------- sections ---------- */
section {
  padding: 88px 0;
}
.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.sec-head h2 {
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 800;
  letter-spacing: -0.025em;
}
.sec-head p {
  color: var(--muted);
  font-size: 15px;
  max-width: 46ch;
}

/* ---------- explorer (flagship layers) ---------- */
.explorer {
  background: var(--card);
  border-radius: 13px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 400px 1fr;
}
.exp-side {
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.seg {
  display: inline-flex;
  background: var(--fill);
  border-radius: 99px;
  padding: 3px;
  gap: 2px;
  align-self: flex-start;
}
.seg button {
  border: none;
  background: transparent;
  padding: 7px 16px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 590;
  color: var(--muted);
  transition: 0.25s;
}
.seg button:hover {
  color: var(--ink);
}
.seg button.on {
  background: var(--fill2);
  color: var(--ink);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.12);
}
.exp-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chip {
  font-size: 11px;
  font-weight: 600;
  color: var(--teal);
  background: rgba(79, 176, 170, 0.14);
  padding: 5px 11px;
  border-radius: 99px;
}
.exp-side h3 {
  font-size: 25px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  letter-spacing: -0.02em;
}
.exp-side h3 .top {
  font-size: 11px;
  font-weight: 700;
  color: var(--orange);
  background: var(--orange-soft);
  padding: 4px 10px;
  border-radius: 99px;
}
.exp-side p {
  font-size: 14.5px;
  color: var(--muted);
}
.exp-side .map-link {
  margin-top: auto;
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  background: var(--orange);
  align-self: flex-start;
  padding: 12px 24px;
  border-radius: 99px;
  transition: 0.2s;
  display: inline-flex;
  gap: 8px;
  box-shadow: 0 6px 18px -8px #e8590f80;
}
.exp-side .map-link:hover {
  transform: translateY(-1px);
}
.exp-side .map-link:active {
  transform: scale(0.97);
}
.exp-view {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(
      420px 300px at 60% 40%,
      rgba(226, 59, 46, 0.1) 0%,
      rgba(226, 59, 46, 0.096) 8.4%,
      rgba(226, 59, 46, 0.0844) 17.5%,
      rgba(226, 59, 46, 0.0677) 26.6%,
      rgba(226, 59, 46, 0.05) 35%,
      rgba(226, 59, 46, 0.0323) 43.4%,
      rgba(226, 59, 46, 0.0156) 52.5%,
      rgba(226, 59, 46, 0.004) 61.6%,
      rgba(226, 59, 46, 0) 70%
    ),
    linear-gradient(180deg, #160c0d, #0f0808);
}
.expmap {
  width: 100%;
  padding: 24px 22px;
}
.expmap svg {
  width: 100%;
  height: auto;
  display: block;
}
.expmap path {
  fill: #3a2422;
  stroke: #160c0d;
  stroke-width: 0.5;
}
.expmap path.d1 {
  fill: #7a2418;
}
.expmap path.d2 {
  fill: #a52c1c;
}
.expmap path.d3 {
  fill: #d13a24;
}
.expmap path.d4 {
  fill: #f5502e;
}
.exp-badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(40, 20, 20, 0.72);
  backdrop-filter: var(--blur);
  border-radius: 99px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.exp-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  animation: blink 2.4s infinite;
}
.exp-fade {
  transition:
    opacity 0.3s 0.05s,
    transform 0.3s 0.05s;
}
.exp-fade.out {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.18s,
    transform 0.18s;
}
.exp-count {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(40, 20, 20, 0.72);
  backdrop-filter: var(--blur);
  border-radius: 99px;
  padding: 7px 13px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

/* ---------- highlights dashboard ---------- */
#highlights {
  background: transparent;
  border: none;
}
.dash {
  border-radius: 13px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 0.5px solid rgba(226, 59, 46, 0.14);
  background:
    radial-gradient(
      600px 340px at 78% 20%,
      rgba(226, 59, 46, 0.16) 0%,
      rgba(226, 59, 46, 0.1536) 8.16%,
      rgba(226, 59, 46, 0.135) 17%,
      rgba(226, 59, 46, 0.1082) 25.84%,
      rgba(226, 59, 46, 0.08) 34%,
      rgba(226, 59, 46, 0.0518) 42.16%,
      rgba(226, 59, 46, 0.025) 51%,
      rgba(226, 59, 46, 0.0064) 59.84%,
      rgba(226, 59, 46, 0) 68%
    ),
    radial-gradient(
      520px 300px at 10% 85%,
      rgba(226, 59, 46, 0.1) 0%,
      rgba(226, 59, 46, 0.096) 7.92%,
      rgba(226, 59, 46, 0.0844) 16.5%,
      rgba(226, 59, 46, 0.0677) 25.08%,
      rgba(226, 59, 46, 0.05) 33%,
      rgba(226, 59, 46, 0.0323) 40.92%,
      rgba(226, 59, 46, 0.0156) 49.5%,
      rgba(226, 59, 46, 0.004) 58.08%,
      rgba(226, 59, 46, 0) 66%
    ),
    linear-gradient(180deg, #1a0d0d, #140a0b);
}
.dash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 26px;
  border-bottom: 0.5px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: var(--blur);
  flex-wrap: wrap;
}
.dash-head .t {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 9px;
}
.dash-head .t i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  animation: blink 2.4s infinite;
}
.dash.in .dash-head {
  animation: fadeDown 0.5s ease both;
}
@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.crow {
  display: grid;
  grid-template-columns: 16px 118px 1fr 52px 72px;
  align-items: center;
  gap: 12px;
  padding: 8px 6px;
  border-bottom: 0.5px solid var(--line);
  border-radius: 9px;
  transition: background 0.15s;
  opacity: 0;
  transform: translateX(-18px);
}
.dash.in .crow {
  animation: slideRow 0.45s ease both;
}
.dash.in .crow:nth-child(1) {
  animation-delay: 0.08s;
}
.dash.in .crow:nth-child(2) {
  animation-delay: 0.16s;
}
.dash.in .crow:nth-child(3) {
  animation-delay: 0.24s;
}
.dash.in .crow:nth-child(4) {
  animation-delay: 0.32s;
}
.dash.in .crow:nth-child(5) {
  animation-delay: 0.4s;
}
.dash.in .crow:nth-child(6) {
  animation-delay: 0.48s;
}
.dash.in .crow:nth-child(7) {
  animation-delay: 0.56s;
}
.dash.in .crow:nth-child(8) {
  animation-delay: 0.64s;
}
@keyframes slideRow {
  to {
    opacity: 1;
    transform: none;
  }
}
.minimap-wrap {
  overflow: hidden;
  border-radius: 10px;
  opacity: 0;
  transform: scale(0.92);
}
.dash.in .minimap-wrap {
  animation: mapPop 0.7s cubic-bezier(0.22, 0.9, 0.36, 1) 0.3s both;
}
@keyframes mapPop {
  to {
    opacity: 1;
    transform: none;
  }
}
.dash-cell .sec-head,
.dash-cell .mini-seg {
  opacity: 0;
  transform: translateY(10px);
}
.dash.in .dash-cell .sec-head {
  animation: fadeUp 0.5s ease 0.05s both;
}
.dash.in .dash-cell .mini-seg {
  animation: fadeUp 0.5s ease 0.15s both;
}
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: none;
  }
}
.dash-main {
  display: grid;
  grid-template-columns: 1fr;
}
.cont-grid {
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: 36px;
  align-items: center;
}
.impact-cell {
  border-top: 0.5px solid var(--line);
}
/* iOS storage-style stacked bar */
.ibar {
  display: flex;
  gap: 3px;
  height: 38px;
  border-radius: 4px;
  margin-bottom: 16px;
}
.ibar span {
  display: block;
  height: 100%;
  border-radius: 3px;
  min-width: 6px;
  position: relative;
  transition:
    flex-grow 0.9s cubic-bezier(0.22, 0.9, 0.36, 1),
    opacity 0.1s,
    transform 0.1s,
    box-shadow 0.1s;
  cursor: pointer;
  flex-grow: 0;
  flex-basis: 0;
  box-shadow: 0 0 4px 0px rgba(255, 255, 255, 0.08);
}
/* Same corner radius on every segment (narrow end segments became half
   circles). */
.ibar span:hover {
  transform: scaleY(1.12);
}
.ibar.dim span {
  opacity: 0.18;
}
.ibar.dim span.hot {
  opacity: 1;
  transform: scaleY(1.12);
}
.impact-cell .cell-head,
.impact-cell #wtip {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}
.impact-cell.in .cell-head {
  opacity: 1;
  transform: none;
}
.impact-cell.in #wtip {
  opacity: 1;
  transform: none;
  transition-delay: 0.15s;
}
.dash-cell {
  padding: 26px 28px;
  min-width: 0;
}
.dash-cell + .dash-cell {
  border-left: 0.5px solid var(--line);
}
.cell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.cell-head h3 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.cell-head .hint {
  font-size: 11.5px;
  color: var(--tert);
  font-weight: 500;
}
.mini-seg {
  display: inline-flex;
  background: var(--fill);
  border-radius: 99px;
  padding: 2px;
  gap: 2px;
}
.mini-seg button {
  border: none;
  background: transparent;
  padding: 5px 13px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 590;
  color: var(--muted);
  transition: 0.25s;
}
.mini-seg button:hover {
  color: var(--ink);
}
.mini-seg button.on {
  background: var(--fill2);
  color: var(--ink);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.12);
}

.minimap-wrap {
  overflow: hidden;
  border-radius: 10px;
}
.minimap {
  width: 100%;
  height: auto;
  display: block;
}
.minimap path {
  fill: #7a6f6c;
  stroke: #1a0d0d;
  stroke-width: 0.5;
  transition:
    fill 0.25s,
    opacity 0.3s;
}
.minimap.dim path {
  opacity: 0.45;
}
.minimap.dim path.lit {
  opacity: 1;
  fill: var(--orange);
}
.crow {
  display: grid;
  grid-template-columns: 16px 118px 1fr 52px 72px;
  align-items: center;
  gap: 12px;
  padding: 8px 6px;
  border-bottom: 0.5px solid var(--line);
  border-radius: 9px;
  transition: background 0.15s;
}
.crow:hover {
  background: var(--fill);
}
.crow:last-child {
  border: none;
}
.arr {
  font-size: 10px;
  text-align: center;
}
.arr.up {
  color: var(--orange);
}
.arr.dn {
  color: var(--teal);
}
.arr.fl {
  color: var(--tert);
}
.crow .cname {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar {
  height: 6px;
  border-radius: 99px;
  background: var(--fill);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #f5722e, var(--orange));
  transition: width 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.crow .pct,
.crow .ppl {
  font-size: 12.5px;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.crow .pct {
  font-weight: 700;
}
.crow .ppl {
  color: var(--tert);
  font-size: 11.5px;
  font-weight: 500;
}

.waffle {
  display: grid;
  grid-template-columns: repeat(25, 1fr);
  gap: 3px;
  margin-bottom: 14px;
}
.waffle i {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--fill);
  cursor: pointer;
  transition:
    transform 0.12s,
    opacity 0.25s;
}
.waffle i:hover {
  transform: scale(1.35);
}
.waffle.dim i {
  opacity: 0.15;
}
.waffle.dim i.hot {
  opacity: 1;
}
#wtip {
  font-size: 12px;
  color: var(--muted);
  min-height: 17px;
  margin-bottom: 10px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
#wtip b {
  color: var(--ink);
  font-weight: 700;
}

.strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 28px 16px;
  border-top: 0.5px solid var(--line);
}
.strip-head h3 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.warn-title {
  color: var(--orange);
  display: flex;
  align-items: center;
  gap: 9px;
}
.warn-title > svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.info {
  position: relative;
  display: inline-flex;
  color: var(--tert);
  cursor: help;
  outline: none;
}
.info > svg {
  width: 15px;
  height: 15px;
  transition: color 0.2s;
}
.info:hover > svg,
.info:focus > svg {
  color: var(--orange);
}
.info .tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: calc(100vw - 32px);
  background: rgba(28, 28, 30, 0.92);
  backdrop-filter: var(--blur);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  padding: 12px 14px;
  border-radius: 12px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.24);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 5;
}
.tip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
/* each legend line stays on one line; the tip grows to fit instead */
@media (min-width: 601px) {
  .info .tip .tip-row {
    white-space: nowrap;
  }
}
.info .tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(28, 28, 30, 0.92);
}
.info:hover .tip,
.info:focus .tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.strip-head .hint {
  font-size: 11.5px;
  color: var(--tert);
  font-weight: 500;
}
.dash-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.rep-cell {
  padding: 18px 20px 16px;
  border-left: 0.5px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  position: relative;
  transition: background 0.2s;
  overflow: hidden;
}
.rep-cell:first-child {
  border-left: none;
}
.rep-cell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(226, 59, 46, 0.08));
  opacity: 0;
  transition: opacity 0.25s;
}
.rep-cell:hover::before {
  opacity: 1;
}
.rep-cell.top1 {
  background: linear-gradient(180deg, rgba(226, 59, 46, 0.1), transparent);
}
.rep-cell .rk {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.rep-cell .rk .num {
  font-size: 10px;
  color: var(--tert);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.rep-cell .rk .row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rep-cell .rk .flag {
  height: 16px;
  width: auto;
  border-radius: 2px;
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.15);
  flex: none;
  display: block;
  object-fit: contain;
}
.rep-cell .cn {
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.rep-cell .cn b {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.rep-cell .cn span {
  font-size: 10.5px;
  color: var(--tert);
  font-weight: 600;
}
.rep-bar {
  height: 5px;
  border-radius: 99px;
  background: var(--fill);
  overflow: hidden;
  position: relative;
}
.rep-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #f5722e, #c62d22);
  width: 0;
  animation: repGrow 1s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
@keyframes repGrow {
  to {
    width: var(--w);
  }
}
/* ---- Country cards: category mix bar ----
   Largest segment first. */
.rep-hit {
  padding: 7px 0;
  margin: -7px 0;
}
.rep-hit .rep-bar {
  transition: transform 0.15s ease;
}
.rep-hit:hover .rep-bar {
  transform: scaleY(1.8);
}
.rep-hit .rep-bar i.mix {
  display: flex;
  gap: 1.5px;
  background: transparent;
}
.rep-hit .rep-bar i.mix b {
  display: block;
  height: 100%;
  flex: none;
  min-width: 2px;
  transition:
    opacity 0.12s ease,
    filter 0.12s ease,
    width 0.35s ease;
}
/* Blocks are share minus the 1.5px gap; the last one fills the
   remainder. */
.rep-hit .rep-bar i.mix b:last-child {
  flex: 1 1 auto;
}
.rep-hit .rep-bar.none {
  visibility: hidden;
}
.rep-hit.dim i.mix b {
  opacity: 0.25;
}
.rep-hit.dim i.mix b.hot {
  opacity: 1;
  filter: brightness(1.2);
}
.cat-pop.below {
  transform: translateY(4px);
}
.cat-pop b {
  font-weight: 800;
}
.cat-pop em {
  font-style: normal;
  color: var(--tert);
  font-weight: 600;
}
.rep-cell .meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--tert);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 10px;
}
.trend.up {
  color: #f5722e;
  background: rgba(226, 59, 46, 0.16);
}
.trend.down {
  color: #4fb0aa;
  background: rgba(79, 176, 170, 0.16);
}
.dash-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 26px;
  border-top: 0.5px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  flex-wrap: wrap;
}
.dash-foot span {
  font-size: 12.5px;
  color: var(--muted);
}
.dash-foot a {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--orange);
}

/* ---------- data explorer (layers) ---------- */
.dx {
  border-radius: 13px;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 0.5px solid rgba(226, 59, 46, 0.14);
  background:
    radial-gradient(
      600px 340px at 78% 20%,
      rgba(226, 59, 46, 0.16) 0%,
      rgba(226, 59, 46, 0.1536) 8.16%,
      rgba(226, 59, 46, 0.135) 17%,
      rgba(226, 59, 46, 0.1082) 25.84%,
      rgba(226, 59, 46, 0.08) 34%,
      rgba(226, 59, 46, 0.0518) 42.16%,
      rgba(226, 59, 46, 0.025) 51%,
      rgba(226, 59, 46, 0.0064) 59.84%,
      rgba(226, 59, 46, 0) 68%
    ),
    radial-gradient(
      520px 300px at 10% 85%,
      rgba(226, 59, 46, 0.1) 0%,
      rgba(226, 59, 46, 0.096) 7.92%,
      rgba(226, 59, 46, 0.0844) 16.5%,
      rgba(226, 59, 46, 0.0677) 25.08%,
      rgba(226, 59, 46, 0.05) 33%,
      rgba(226, 59, 46, 0.0323) 40.92%,
      rgba(226, 59, 46, 0.0156) 49.5%,
      rgba(226, 59, 46, 0.004) 58.08%,
      rgba(226, 59, 46, 0) 66%
    ),
    linear-gradient(180deg, #1a0d0d, #140a0b);
}
.dx-strip {
  display: flex;
  align-items: stretch;
  border-bottom: 0.5px solid var(--line);
  background: rgba(26, 13, 13, 0.55);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}
.dx-arrow {
  flex: none;
  width: 52px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  transition: 0.2s;
}
.dx-arrow:hover {
  color: #fff;
}
.dx-tabs {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  flex: 1;
}
.dx-tabs::-webkit-scrollbar {
  display: none;
}
.dx-tab {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
  padding: 15px 22px 13px;
  border: none;
  background: transparent;
  text-align: left;
  position: relative;
  min-width: 150px;
  transition: background 0.2s;
}
.dx-tab .t-top {
  display: flex;
  align-items: center;
  gap: 9px;
}

.dx-tab .t-name {
  font-weight: 600;
  font-size: 15.5px;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.2s;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.dx-tab .t-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.32);
  white-space: nowrap;
}
.dx-tab::after {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: #fff;
  transform: scaleX(0);
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.dx-tab:hover {
  background: rgba(255, 255, 255, 0.12);
}
.dx-tab:hover .t-name {
  color: rgba(255, 255, 255, 0.8);
}

.dx-tab.on {
  background: rgba(255, 255, 255, 0.1);
}
.dx-tab.on .t-name {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}

.dx-tab.on::after {
  transform: scaleX(1);
}
.dx-body {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  min-height: 236px;
}
.dx-detail {
  padding: 32px 36px;
  transition:
    opacity 0.22s,
    transform 0.22s;
}
.dx-detail.out {
  opacity: 0;
  transform: translateY(6px);
}
.dx-detail h3 {
  font-size: 23px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.dx-detail h3 i.fa-solid {
  font-size: 20px;
}
.dx-spec h4 i.fa-solid {
  margin-right: 6px;
  opacity: 0.5;
}

.dx-detail p {
  font-size: 14.5px;
  color: var(--muted);
  max-width: 56ch;
}
.dx-detail .btn {
  margin-top: 22px;
  font-size: 15px;
  padding: 11px 22px;
  background: rgba(224, 96, 42, 0.85);
  box-shadow: 0 6px 18px -8px rgba(224, 96, 42, 0.5);
}
.dx-spec {
  border-left: 0.5px solid var(--line);
  padding: 32px 36px;
  background: rgba(26, 13, 13, 0.35);
  display: flex;
  flex-direction: column;
  transition: opacity 0.22s;
}
.dx-spec.out {
  opacity: 0;
}
.dx-spec h4 {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tert);
  margin-bottom: 10px;
  font-weight: 600;
}
.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--line);
  font-size: 13.5px;
}
.spec-row:last-of-type {
  border: none;
}
.spec-row span {
  color: var(--muted);
}
.spec-row b {
  font-weight: 600;
  font-size: 13px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.archive-link {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--orange);
  white-space: nowrap;
}

/* ---------- footer ---------- */
footer {
  color: var(--ink);
  border-top: 0.5px solid rgba(226, 59, 46, 0.14);
  background: linear-gradient(180deg, #100707, #0a0505);
}
.f-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 44px;
  padding-top: 56px;
  padding-bottom: 40px;
}
footer .brand {
  margin-bottom: 12px;
}
footer p {
  font-size: 13.5px;
  color: var(--muted);
  max-width: 36ch;
}
footer h4 {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tert);
  margin-bottom: 14px;
  font-weight: 600;
}
footer a.fl {
  display: block;
  font-size: 14px;
  color: var(--muted);
  padding: 4.5px 0;
  transition: color 0.2s;
}
footer a.fl:hover {
  color: var(--orange);
}
.f-logos {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
}
.f-logos span,
.f-logos a {
  display: flex;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.f-logos a:hover {
  opacity: 0.82;
  transform: translateY(-1px);
}
.f-logos img {
  height: 42px;
  width: auto;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 10px rgba(255, 150, 110, 0.22));
}
.f-bottom {
  border-top: 0.5px solid var(--line);
  padding-top: 20px;
  padding-bottom: 28px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 12.5px;
  color: var(--tert);
  flex-wrap: wrap;
}

.rv {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.6s,
    transform 0.6s;
}
.rv.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
  .rv {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 1020px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .explorer {
    grid-template-columns: 1fr;
  }
  .dash-main {
    grid-template-columns: 1fr;
  }
  .dash-cell + .dash-cell {
    border-left: none;
    border-top: 0.5px solid var(--line);
  }
  .dash-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .rep-cell {
    border-top: 0.5px solid var(--line);
  }
  .rep-cell:nth-child(odd) {
    border-left: none;
  }
  .dx-body {
    grid-template-columns: 1fr;
  }
  .dx-spec {
    border-left: none;
    border-top: 0.5px solid var(--line);
  }
  .f-top {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 12px;
    right: 12px;
    background: rgba(22, 12, 13, 0.95);
    backdrop-filter: var(--blur);
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    border-radius: 11px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
  }
  .nav-links.open {
    display: flex;
  }
  .burger {
    display: block;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .crow {
    grid-template-columns: 14px 92px 1fr 48px;
  }
  .cont-grid {
    grid-template-columns: 1fr;
  }
  .minimap-wrap {
    max-width: 240px;
    margin: 8px auto 0;
  }
  .crow .ppl {
    display: none;
  }
  .exp-side,
  .dx-detail,
  .dx-spec {
    padding: 24px;
  }
  .f-top {
    grid-template-columns: 1fr;
  }
}

/* page scrollbar styles: moved to the top of <head> */

/* Original style section 4; order preserved. */

.vw-head {
  padding-block: 44px 22px;
}
.vw-head h1 {
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.vw-head h1 em {
  font-style: normal;
  color: #ee5d2e;
  transition: filter 0.45s ease;
}
body.fc .vw-head h1 em {
  color: #f0a528;
}
body.fc .vw-head .kicker {
  color: #f0a528;
}
.vw-head p {
  color: var(--muted);
  font-size: 15px;
  margin-top: 10px;
  max-width: 62ch;
}

.vw {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 0.5px solid rgba(226, 59, 46, 0.14);
  width: 100%;
  margin: 0 0 16px;
  background: linear-gradient(180deg, rgba(26, 13, 13, 0.86), rgba(20, 10, 11, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 46px -22px rgba(0, 0, 0, 0.75);
}

/* ---------- map stage ---------- */
.vw-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.vw-jump {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    Menlo,
    monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  color: #ffc7b8;
  background: rgba(150, 38, 20, 0.26);
  border: 0.5px solid rgba(226, 90, 31, 0.34);
  padding: 10px 18px;
  border-radius: 99px;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.vw-jump i:last-child {
  font-size: 9px;
  opacity: 0.8;
  transition: transform 0.25s ease;
}
.vw-jump:hover {
  color: #fff1eb;
  background: rgba(226, 90, 31, 0.4);
  box-shadow: 0 8px 24px -10px rgba(226, 90, 31, 0.8);
}
.vw-jump:hover i:last-child {
  transform: translateY(2px);
}
body.fc .vw-jump {
  color: #ffe0ad;
  background: rgba(160, 106, 23, 0.28);
  border-color: rgba(240, 165, 40, 0.34);
}
/* Separate hover rule for forecast mode (same specificity as the base
     rule). */
/* Graphs link styled as a neutral pill (the map link is primary). */
.vw-jump.ghost {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.13);
}
.vw-jump.ghost:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.8);
}
body.fc .vw-jump.ghost {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.13);
}
body.fc .vw-jump.ghost:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
}

body.fc .vw-jump:hover {
  color: #fff6e2;
  background: rgba(240, 165, 40, 0.4);
  border-color: rgba(240, 165, 40, 0.5);
  box-shadow: 0 8px 24px -10px rgba(240, 165, 40, 0.8);
}

.m-wrap {
  position: relative;
  min-width: 0;
  overflow: hidden;
  aspect-ratio: 1431 / 742;
  transition: background 0.55s ease;
  background: radial-gradient(680px 420px at 50% 42%, #10151f, #090b11 70%);
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.m-wrap.drag {
  cursor: grabbing;
}
.m-stage {
  position: absolute;
  inset: 0;
  display: block;
}
/* During rotation (see the script in <head>) the map dims and overlays
     skip their transitions; fades back after layout. */
/* (the stage's own opacity is the layer-opacity control, set inline, so the
     fade goes on what it holds) */
.m-stage > * {
  transition: opacity 0.22s ease;
}
html.td-rotating .m-stage > * {
  opacity: 0.25;
  transition: opacity 0.12s ease;
}
html.td-rotating .m-wrap *:not(.m-stage):not(.m-stage *),
html.td-rotating .m-wrap {
  transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
  html.td-rotating .m-stage > * {
    opacity: 1;
  }
}
.m-stage svg {
  width: 100%;
  height: 100%;
  display: block;
}
.m-stage path {
  fill: #252a36;
  stroke: #3d4454;
  stroke-width: var(--map-border-width, 0.22px);
  vector-effect: non-scaling-stroke;
  transition:
    fill 0.45s ease,
    fill-opacity 0.45s ease,
    opacity 0.25s ease;
  shape-rendering: geometricPrecision;
}
.m-stage path:hover {
  fill: #333a49;
}
/* Short 180 ms fade on the changed countries only. */
/* Transition is set on the stage while the impacts layer is active, so it's
     already in place before a country's colour changes. */
.m-stage.imp path {
  transition-property: fill, fill-opacity !important;
  transition-duration: 180ms !important;
  transition-timing-function: ease !important;
}
/* reported countries (and those fading out) cross-fade from one shade to
     the next, long enough and eased at both ends to read as a fade rather
     than a jump. Hover on the other countries keeps the quick 180 ms.
     Keep TD_FADE_MS in step. */
.m-stage.imp path.td-hit {
  transition-duration: 520ms !important;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.m-stage.imp-busy #mScan {
  visibility: hidden;
}
/* clearing a faded-out country must not fade it back in on the way out */
.m-stage path.td-off {
  transition: none !important;
}
/* stroke-only overlay that keeps borders above the data raster */
/* reported countries: lit-from-within fill with grain, plus a scanline
     that sweeps left to right across the map once every few seconds */
/* the layer-change wipe is gone: the dissolve carries the change on its own */
#mScan {
  pointer-events: none;
  will-change: transform;
  transform: translateZ(0);
}
#mScan rect {
  animation: tdSweep 6.5s linear infinite;
}
@keyframes tdSweep {
  0% {
    transform: translateX(-14%);
    opacity: 0;
  }
  8% {
    opacity: 0.9;
  }
  92% {
    opacity: 0.9;
  }
  100% {
    transform: translateX(114%);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  #mScan {
    display: none;
  }
}
/* Country names sit above the data raster, so they stay readable whatever
     is painted underneath.  The dark halo does the separating. */
.m-stage #labels {
  pointer-events: none;
  paint-order: stroke fill;
  stroke: rgba(8, 10, 17, 0.72);
  stroke-width: 0.5;
  stroke-linejoin: round;
  transition: opacity 0.3s ease;
}
body.fcskin .m-stage #labels {
  fill: #f6ecd8;
  stroke: rgba(20, 12, 3, 0.72);
}
.m-wrap.nolabels .m-stage #labels,
.m-wrap.nolabels .m-stage #mLabels2 {
  opacity: 0 !important;
}
/* generated labels for the countries the base SVG leaves unnamed */
#mLabels2 {
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  paint-order: stroke fill;
  stroke: rgba(10, 13, 22, 0.55);
  stroke-width: 0.12;
  stroke-linejoin: round;
}
body.fc #mLabels2 {
  fill: #f0e2c8;
}
/* The 3603 px plate is drawn at about half size; use smooth downscaling. */
.m-stage image {
  image-rendering: auto;
  image-rendering: smooth;
  image-rendering: high-quality;
  -ms-interpolation-mode: bicubic;
}
.m-stage #mLines {
  pointer-events: none;
}
.m-stage #mLines path {
  fill: none;
  stroke: #0b0e16;
  stroke-width: var(--map-border-width, 0.22px);
  vector-effect: non-scaling-stroke;
  opacity: 0.6;
}
body.fcskin .m-stage #mLines path {
  stroke: #241606;
}
.m-wrap.noborders .m-stage #mLines {
  display: none;
}
/* With a raster shown, the base land fill is removed; the data defines the
     land. */
.m-stage.rasterOn path,
body.fcskin .m-stage.rasterOn path {
  stroke: none;
  fill: #2f3646;
}
/* Slightly wider and brighter borders over the data plate. */
/* the pair only makes sense over data; without a plate the plain border
     already sits on a known background */
.m-stage #mLinesHalo {
  pointer-events: none;
  display: none;
}
.m-stage.rasterOn #mLinesHalo {
  display: block;
}
/* Drought Intensity: light stroke on the country shapes, no overlay line or halo. */
.m-stage.plainlines.rasterOn #mLinesHalo,
.m-stage.plainlines.rasterOn #mLines {
  display: none;
}
/* Lighter land fill under a plate, so a lighter stroke keeps the same contrast
     as #3d4454 on Impacts. */
.m-stage.plainlines.rasterOn path {
  stroke: #525d73;
  stroke-width: var(--map-border-width, 0.22px);
  vector-effect: non-scaling-stroke;
}
body.fcskin .m-stage.plainlines.rasterOn path {
  stroke: #5c5040;
}
.m-wrap.noborders .m-stage.plainlines.rasterOn path {
  stroke: none !important;
}
.m-wrap.noborders .m-stage #mLinesHalo {
  display: none;
}
/* A dark halo and a light line keep borders visible over every raster colour. */
.m-stage.rasterOn #mLinesHalo path {
  fill: none;
  stroke: rgba(10, 10, 14, var(--map-border-halo-alpha, 0.28));
  stroke-width: var(--map-border-halo, 0.42px);
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.m-stage.rasterOn #mLines path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: var(--map-border-width, 0.22px);
  opacity: 1;
}
body.fcskin .m-stage.rasterOn #mLines path {
  stroke: rgba(255, 244, 228, 0.85);
}
.m-wrap.noborders .m-stage path {
  stroke: none !important;
  stroke-width: 0 !important;
  shape-rendering: crispEdges;
}
.m-wrap.noborders .m-stage path:hover {
  fill: #39404f;
}
.m-graticule line {
  stroke: rgba(255, 255, 255, 0.045);
  stroke-width: 0.5;
  vector-effect: non-scaling-stroke;
}

/* floating chrome */
.m-badge {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  font-size: 11.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 99px;
  color: var(--ink);
  background: rgba(22, 12, 13, 0.78);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.m-date {
  top: 16px;
  left: 16px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
}
/* Two classes so this outranks the later .m-badge accent rule; the accent
     properties are restated here. */
/* Width animated from JS; this only keeps the accent cross-fade. */
/* placed under the frame date in a smaller, muted style: it is source
     attribution, not the main content */
.m-upd {
  top: 52px;
  left: 16px;
  padding: 5px 11px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--tert);
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    Menlo,
    monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.m-upd[hidden] {
  display: none;
}
.m-live {
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.m-logos {
  position: absolute;
  z-index: 4;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 7px 15px;
  border-radius: 99px;
  pointer-events: none;
  user-select: none;
}
.m-logos a {
  pointer-events: auto;
  display: flex;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
/* No lift on hover (caused flicker at the edge). */
.m-logos a {
  padding: 4px;
  margin: -4px;
}
.m-logos a:hover {
  opacity: 0.82;
}
/* Logos rendered white with a soft warm halo for contrast. */
/* the artwork is already light: it only needs to be lifted off the map */
.m-logos img {
  height: 28px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 10px rgba(255, 150, 110, 0.22));
}

.m-logos-sep {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.28);
}
@media (max-width: 900px) {
  .m-logos {
    gap: 10px;
    padding: 0;
  }
  .m-logos img {
    height: 21px;
  }
}
@media (max-width: 560px) {
  .m-logos {
    display: none;
  }
}
.m-wrap:fullscreen .m-logos,
.m-wrap.pseudo-full .m-logos {
  top: 16px;
}

.m-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(226, 59, 46, 0.55);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(226, 59, 46, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(226, 59, 46, 0);
  }
}

.m-wrap:fullscreen,
.m-wrap:-webkit-full-screen {
  aspect-ratio: auto;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
}
.m-wrap.pseudo-full {
  position: fixed;
  inset: 0;
  z-index: 9999;
  aspect-ratio: auto;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  background: #090b11;
}
body.map-maximised {
  overflow: hidden;
}
/* In-page fullscreen is position:fixed; ancestors with transform /
     will-change / filter would become its containing block, so they drop
     them while maximised. */
.fs-host {
  transform: none !important;
  will-change: auto !important;
  filter: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  contain: none !important;
  perspective: none !important;
  overflow: visible !important;
  animation: none !important;
  z-index: auto !important;
  isolation: auto !important;
}
/* phone held upright in fullscreen: a one-off nudge to turn it */
.m-rot {
  position: absolute;
  z-index: 9;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  color: #ffd9cf;
  background: rgba(22, 12, 13, 0.86);
  border: 0.5px solid rgba(255, 150, 110, 0.3);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.m-rot.on {
  opacity: 1;
}
.m-rot i {
  font-size: 14px;
  animation: mRot 1.8s ease-in-out infinite;
  transform-origin: 50% 50%;
}
@keyframes mRot {
  0%,
  30% {
    transform: rotate(0);
  }
  60%,
  100% {
    transform: rotate(-90deg);
  }
}

.m-zoom {
  position: absolute;
  z-index: 8;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.m-btn {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink);
  background: rgba(22, 12, 13, 0.82);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  display: grid;
  place-items: center;
  transition:
    background 0.2s ease,
    transform 0.12s ease;
}
.m-btn:hover {
  background: rgba(226, 59, 46, 0.4);
}
.m-btn:active {
  transform: scale(0.92);
}
.m-btn[disabled] {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
.m-btn:focus-visible {
  outline: 2px solid rgba(255, 150, 110, 0.6);
  outline-offset: 2px;
}
/* Zoom factor as plain text on the map (no chip). */
#zLabel {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  line-height: 1;
  color: #fff;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.9),
    0 0 10px rgba(0, 0, 0, 0.6);
}

.m-zbadge {
  position: absolute;
  z-index: 4;
  right: 16px;
  bottom: 16px;
  pointer-events: none;
  user-select: none;
  font-size: 11px;
  font-weight: 700;
  color: #ffc7b8;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
  padding: 6px 11px;
  border-radius: 99px;
  background: rgba(22, 12, 13, 0.78);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
}

/* hover tooltip */
.m-tip {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -140%);
  padding: 7px 11px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ink);
  background: rgba(16, 9, 10, 0.92);
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: opacity 0.14s ease;
}
.m-tip.on {
  opacity: 1;
}
.m-tip b {
  color: #ffc7b8;
  font-variant-numeric: tabular-nums;
  margin-left: 7px;
  font-weight: 700;
}

/* Drought Impacts per-country breakdown: a panel that stays open until X or an outside click. */
.m-pop {
  position: absolute;
  z-index: 7;
  left: 0;
  top: 0;
  min-width: 212px;
  max-width: 330px;
  padding: 14px 16px 13px;
  border-radius: 10px;
  color: var(--ink);
  background: rgba(10, 14, 22, 0.26);
  border: 0.5px solid rgba(255, 255, 255, 0.24);
  -webkit-backdrop-filter: saturate(72%) contrast(104%) brightness(0.92) blur(44px);
  backdrop-filter: saturate(72%) contrast(104%) brightness(0.92) blur(44px);
  box-shadow:
    0 22px 54px -16px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -100%) translateY(-4px) scale(0.92);
  transform-origin: 50% 100%;
  transition:
    opacity 0.13s ease,
    transform 0.13s ease,
    visibility 0.13s;
}
.m-pop.on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -100%) translateY(-11px) scale(1);
  transition:
    opacity 0.2s ease,
    transform 0.34s cubic-bezier(0.2, 1.25, 0.36, 1),
    visibility 0s;
}
/* switching to another country: a short dip instead of a jump */
/* Panel height animates as the category count changes during playback. */
.m-pop.sizing {
  overflow: clip;
  overflow-clip-margin: 14px;
  transition:
    opacity 0.2s ease,
    transform 0.34s cubic-bezier(0.2, 1.25, 0.36, 1),
    height 0.26s cubic-bezier(0.2, 0.9, 0.25, 1),
    width 0.26s cubic-bezier(0.2, 0.9, 0.25, 1);
}
.m-pop.swap {
  opacity: 0.18;
  transform: translate(-50%, -100%) translateY(-11px) scale(0.965);
  transition:
    opacity 0.12s ease,
    transform 0.12s ease;
}
/* the little tail, pointing back down at the country */
.m-pop::after {
  content: '';
  position: absolute;
  left: calc(50% + var(--tailoff, 0px));
  bottom: -6px;
  width: 12px;
  height: 12px;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(10, 14, 22, 0.26);
  border-right: 0.5px solid rgba(255, 255, 255, 0.24);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.16);
  -webkit-clip-path: polygon(100% 0, 100% 100%, 0 100%);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
/* no room above the country: sit under it and turn the tail over */
.m-pop.below {
  transform-origin: 50% 0;
  transform: translate(-50%, 0) translateY(4px) scale(0.92);
}
.m-pop.below.on {
  transform: translate(-50%, 0) translateY(11px) scale(1);
}
.m-pop.below.swap {
  transform: translate(-50%, 0) translateY(11px) scale(0.965);
}
.m-pop.below::after {
  bottom: auto;
  top: -6px;
  border: 0;
  border-left: 0.5px solid rgba(255, 255, 255, 0.16);
  border-top: 0.5px solid rgba(255, 255, 255, 0.16);
  -webkit-clip-path: polygon(0 0, 100% 0, 0 100%);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.m-pop-x {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  padding: 0;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  line-height: 1;
  color: var(--tert);
  background: none;
  transition:
    color 0.15s ease,
    background 0.15s ease;
}
.m-pop-x:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.1);
}
.m-pop-hd {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-right: 24px;
}
/* Flags keep their natural ratio; names don't wrap. */
.m-pop-flag {
  height: 15px;
  width: auto;
  max-width: 30px;
  object-fit: fill;
  flex: none;
  display: block;
  border-radius: 2px;
  box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.18);
}
.m-pop-flag[hidden] {
  display: none;
}
.m-pop-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m-pop-date {
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 4px;
}
.m-pop-total {
  margin-top: 11px;
  padding-top: 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.14);
}
.m-pop-total b {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  text-shadow:
    0 0 22px rgba(255, 255, 255, 0.4),
    0 0 7px rgba(255, 255, 255, 0.22);
}
.m-pop-total span {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}
.m-pop-rows {
  margin-top: 9px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.m-pop-rows .r {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  animation: mPopRow 0.32s cubic-bezier(0.2, 0.9, 0.25, 1) both;
  animation-delay: calc(90ms + var(--i) * 34ms);
}
@keyframes mPopRow {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.m-pop-rows .r i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex: none;
  background: var(--c, #6a717e);
  filter: drop-shadow(0 0 3px var(--c, #6a717e));
}
.m-pop-rows .r span {
  flex: 1;
  min-width: 0;
}
.m-pop-rows .r b {
  color: var(--ink);
  font-weight: 700;
}
.m-pop-none {
  margin-top: 6px;
  font-size: 11px;
  color: var(--tert);
}
@media (max-width: 600px) {
  .m-pop {
    min-width: 0;
    max-width: min(88vw, 300px);
    padding: 12px 13px 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .m-pop,
  .m-pop.on {
    transition-duration: 0.12s;
  }
  .m-pop-rows .r {
    animation: none;
  }
}

/* stepped legend */
.lg-bar.steps {
  display: flex;
  gap: 1px;
  overflow: hidden;
}
.lg-bar.steps span {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
}
.lg-ticks.steps b {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 600;
  color: var(--tert);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
}
/* Named classes: tick row becomes a flex strip, one cell per swatch, text
     may wrap. */
/* Same height as the numeric tick row. */
.lg-ticks.steps.cats {
  display: flex;
  gap: 1px;
}
.lg-ticks.steps.cats b {
  position: static;
  transform: none;
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  line-height: 1.2;
  white-space: normal;
  hyphens: auto;
  /* Labels a size smaller than the ticks so seven fit; long words break. */
  font-size: 8.5px;
  overflow-wrap: anywhere;
  padding: 0 1px;
}
/* legend */
.m-legend {
  transition: opacity 0.35s ease;
  position: absolute;
  z-index: 4;
  pointer-events: none;
  left: 16px;
  bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(22, 12, 13, 0.8);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
}
.m-legend h5 {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 199, 184, 0.75);
  margin-bottom: 9px;
}
.m-legend .ramp {
  display: flex;
  gap: 2px;
}
.m-legend .ramp span {
  width: 26px;
  height: 10px;
}
.m-legend .ramp span:first-child {
  border-radius: 2px 0 0 2px;
}
.m-legend .ramp span:last-child {
  border-radius: 0 2px 2px 0;
}
.m-legend .keys {
  display: flex;
  gap: 2px;
  margin-top: 6px;
}
.m-legend .keys b {
  width: 26px;
  text-align: center;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--tert);
}

/* Bottom centre, clear of the legend and zoom badge; hides itself after a
     few seconds. */
.m-hint {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 22px;
  top: auto;
  transform: translate(-50%, 0) scale(1);
  font-size: 12px;
  color: rgba(245, 236, 236, 0.78);
  background: none;
  padding: 0;
  border: 0;
  letter-spacing: 0.01em;
  white-space: nowrap;
  /* text only, no pill: a soft dark halo keeps it readable over the map */
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.9),
    0 0 12px rgba(0, 0, 0, 0.75);
  opacity: 1;
  pointer-events: none;
  will-change: opacity, transform;
  transition:
    opacity 1.4s cubic-bezier(0.4, 0, 0.5, 1),
    transform 1.4s cubic-bezier(0.32, 0.86, 0.36, 1),
    filter 1.4s ease;
}
/* Disable the reveal animation (fill: both) so the fade-out can run. */
.m-hint.hide,
.vw.in .m-hint.hide {
  animation: none;
  opacity: 0;
  transform: translate(-50%, 10px) scale(0.965);
  filter: blur(2px);
}

/* ---------- side panel ---------- */
/* ---------- compact toolbar ---------- */
.tb {
  width: 100%;
  margin: 0 0 14px;
  border-radius: 11px;
  overflow: hidden;
  border: 0.5px solid var(--line);
  background: rgba(26, 13, 13, 0.42);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.tb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 13px;
}
/* rail with edge fades + arrows so the overflow is obvious */
.tb-picker {
  display: none;
}
.tb-rail {
  position: relative;
  flex: 1;
  min-width: 0;
  display: block;
}
.tb-rail .tb-layers {
  position: relative;
  cursor: grab;
  --fl: 0px;
  --fr: 0px;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 var(--fl),
    #000 calc(100% - var(--fr)),
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 var(--fl),
    #000 calc(100% - var(--fr)),
    transparent 100%
  );
  transition:
    --fl 0.25s ease,
    --fr 0.25s ease;
}
.tb-rail .tb-layers.fade-l {
  --fl: 26px;
}
.tb-rail .tb-layers.fade-r {
  --fr: 26px;
}
.tb-rail .tb-layers.dragging {
  cursor: grabbing;
}
.tb-rail .tb-layers.dragging {
  scroll-behavior: auto;
}

/* compact slider: short track with arrow caps, centred under the rail */
.tb-slider {
  display: none;
  align-items: center;
  gap: 10px;
  margin: 10px 0 1px;
  width: 100%;
}
.tb-rail.scrollable .tb-slider {
  display: flex;
}
.tb-nudge {
  width: 22px;
  height: 22px;
  border-radius: 99px;
  cursor: pointer;
  font-size: 9px;
  color: var(--tert);
  background: rgba(255, 255, 255, 0.05);
  border: 0.5px solid var(--line);
  display: grid;
  place-items: center;
  transition: all 0.18s ease;
}
.tb-nudge:hover {
  color: #ffd9cf;
  background: rgba(226, 59, 46, 0.26);
  border-color: rgba(226, 59, 46, 0.42);
}
.tb-nudge:active {
  transform: scale(0.9);
}
.tb-nudge[disabled] {
  opacity: 0.25;
  cursor: default;
}
.tb-nudge[disabled]:hover {
  color: var(--tert);
  background: rgba(255, 255, 255, 0.05);
}

.tb-prog {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  touch-action: none;
}
.tb-prog::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.06);
}
.tb-prog span {
  position: absolute;
  height: 4px;
  left: 0;
  width: 30%;
  border-radius: 99px;
  background: linear-gradient(
    90deg,
    rgba(255, 122, 77, 0.85),
    rgba(255, 217, 207, 0.95),
    rgba(255, 122, 77, 0.85)
  );
  box-shadow: 0 0 8px rgba(255, 120, 80, 0.5);
  transition:
    transform 0.1s linear,
    width 0.2s ease;
}
.tb-prog:hover span {
  box-shadow: 0 0 12px rgba(255, 140, 100, 0.7);
}

/* dedicated gutters: the rail shrinks, arrows never overlap the tabs */
/* Single line, .tb clips overflow: the sub-layer rail shrinks and scrolls,
     fixed controls keep their size, the spacer collapses first. */
.tb-row2 {
  padding-top: 0;
  border-top: 0.5px solid rgba(255, 255, 255, 0.05);
  padding-top: 11px;
  flex-wrap: nowrap;
  min-width: 0;
}
/* Rail sized to its pills; the spacer takes the rest and shrinks first. */
/* Overflow steps chosen by tbFit(): .snug hides the opacity caption,
     .tight turns overlay labels into icons, .tighter narrows the slider,
     .wrap wraps the row. */
.tb-row2 .tb-sub {
  flex: 0 0 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tb-row2 .tb-sub::-webkit-scrollbar {
  display: none;
}
.tb-row2 .tb-spacer {
  flex: 1 1 0;
  min-width: 0;
}
.tb-row2 .tb-acts,
.tb-row2 .tb-panel {
  flex: 0 0 auto;
}
/* Slider shrinks (and drops its caption) before the depth rail does. */
.tb-row2 .tb-op {
  flex: 0 1 auto;
  min-width: 0;
}
.tb-row2 .tb-op input[type='range'] {
  min-width: 64px;
}
@media (max-width: 1250px) {
  .tb-row2 .tb-op > span {
    display: none;
  }
}
/* Selected pill is scrolled into view. */
.tb-spacer {
  flex: 1;
}

/* ---- angled HUD layer rail ---- */
.tb-layers {
  position: relative;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}
.tb-layers::-webkit-scrollbar {
  display: none;
}
.tb-layers button {
  position: relative;
  flex: none;
  white-space: nowrap;
  font: inherit;
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    'IBM Plex Mono',
    Menlo,
    monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  padding: 11px 17px 12px 18px;
  cursor: pointer;
  color: var(--tert);
  background: rgba(255, 255, 255, 0.14);
  border: none;
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
  display: flex;
  align-items: center;
  gap: 9px;
  overflow: hidden;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}
.tb-layers button > i,
.tb-layers button > span {
  position: relative;
  z-index: 2;
}
.tb-layers button::before {
  content: '';
  position: absolute;
  inset: 1.2px;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    linear-gradient(180deg, #191016, #150d12);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: background 0.2s ease;
}
.tb-layers button i {
  font-size: 10px;
  width: 12px;
  text-align: center;
  flex: none;
  opacity: 0.55;
  transition:
    opacity 0.2s ease,
    color 0.2s ease;
}
.tb-layers button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.16);
}
.tb-layers button:hover::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)),
    linear-gradient(180deg, #191016, #150d12);
}
.tb-layers button:hover i {
  opacity: 0.9;
}

.tb-layers button.on {
  color: #ffd9cf;
  background: rgba(255, 150, 110, 0.85);
}
.tb-layers button.on::before {
  background:
    linear-gradient(180deg, rgba(226, 59, 46, 0.22), rgba(226, 59, 46, 0.09)),
    linear-gradient(180deg, #191016, #150d12);
}
.tb-layers button.on i {
  opacity: 1;
  color: #ff8f6a;
}

/* slow scanline sweep, active tab only */
.tb-layers button.on::after {
  content: '';
  position: absolute;
  inset: 1px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    transparent 22%,
    rgba(255, 190, 160, 0.13) 50%,
    transparent 74%
  );
  transform: translateX(-120%);
  animation: sweep 5s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}
@keyframes sweep {
  0% {
    transform: translateX(-120%);
  }
  55%,
  100% {
    transform: translateX(120%);
  }
}

/* ---- range gauge: one continuous recessed rail ---- */
.tb-sub {
  display: inline-flex;
  gap: 0;
  position: relative;
  flex: none;
  isolation: isolate;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.18));
  border-radius: 8px;
  box-shadow:
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.09),
    inset 0 1px 3px rgba(0, 0, 0, 0.45);
  padding: 3px;
  overflow: hidden;
}
.tb-sub::before {
  content: '';
  position: absolute;
  left: 3px;
  right: 3px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
}
.tb-sub button {
  position: relative;
  flex: none;
  font: inherit;
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    'IBM Plex Mono',
    Menlo,
    monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  padding: 8px 15px 9px;
  cursor: pointer;
  color: var(--tert);
  background: transparent;
  border: none;
  border-radius: 6px;
  transition: color 0.16s ease;
}
.tb-sub button + button::before {
  content: '';
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
  transition: opacity 0.2s ease;
}
.tb-sub button:hover {
  color: var(--ink);
}
.tb-sub button.on {
  color: #ffd0c0;
}
.tb-sub button.on::before,
.tb-sub button.on + button::before {
  opacity: 0;
}
/* the lit block slides between segments instead of snapping */
.tb-sub-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: 0;
  border-radius: 6px;
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  background: linear-gradient(180deg, rgba(226, 90, 31, 0.34), rgba(150, 38, 20, 0.26));
  box-shadow:
    inset 0 1px 0 rgba(255, 200, 170, 0.22),
    inset 0 0 0 0.5px rgba(255, 150, 110, 0.3),
    0 0 14px -4px rgba(226, 90, 31, 0.5);
  will-change: transform, width;
  transition:
    transform 0.26s cubic-bezier(0.2, 0.9, 0.25, 1),
    width 0.26s cubic-bezier(0.2, 0.9, 0.25, 1),
    opacity 0.18s ease;
}
.tb-sub-thumb.on {
  opacity: 1;
}
.tb-sub-thumb::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 2px;
  height: 1.5px;
  border-radius: 2px;
  background: rgba(255, 215, 195, 0.75);
  box-shadow: 0 0 6px rgba(255, 150, 110, 0.6);
}

.tb-op {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--tert);
  flex: none;
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    'IBM Plex Mono',
    Menlo,
    monospace;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
/* Filled part of the track uses the layer colour. */
.tb-op input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 96px;
  height: 3px;
  border-radius: 99px;
  --p: 100%;
  --fill: #b85042;
  background: linear-gradient(
    90deg,
    var(--fill) 0 var(--p),
    rgba(255, 255, 255, 0.14) var(--p) 100%
  );
  outline: none;
  cursor: pointer;
  transition:
    --p 0.12s linear,
    --fill 0.45s ease;
}
/* Forecast mode: track fill turns amber too. */
body.fc .tb-op input[type='range'] {
  --fill: #c98a2e;
}
.tb-op input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--fill);
  cursor: pointer;
  transition: background 0.45s ease;
}
.tb-op input[type='range']::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: none;
  border-radius: 50%;
  background: var(--fill);
  transition: background 0.45s ease;
}
.tb-op b {
  font-size: 10px;
  color: #ffc7b8;
  font-variant-numeric: tabular-nums;
  width: 34px;
}

/* Borders: on/off switch */
.tb-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font: inherit;
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    'IBM Plex Mono',
    Menlo,
    monospace;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0;
  cursor: pointer;
  color: var(--tert);
  background: none;
  border: none;
  flex: none;
  transition: color 0.18s ease;
}
.tb-toggle:hover {
  color: var(--muted);
}
.tb-toggle.on {
  color: #ffc7b8;
}
.tb-toggle i {
  display: none;
}
.tb-toggle .sw {
  position: relative;
  width: 38px;
  height: 20px;
  border-radius: 99px;
  flex: none;
  background: rgba(0, 0, 0, 0.36);
  box-shadow:
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.1),
    inset 0 1px 3px rgba(0, 0, 0, 0.5);
  transition:
    background 0.25s ease,
    box-shadow 0.25s ease;
}
.tb-toggle.on .sw {
  background: linear-gradient(180deg, rgba(226, 90, 31, 0.55), rgba(180, 40, 20, 0.42));
  box-shadow:
    inset 0 0 0 0.5px rgba(255, 150, 110, 0.42),
    0 0 12px -3px rgba(226, 90, 31, 0.7);
}
.tb-toggle .sw::after {
  content: '';
  position: absolute;
  top: 2.5px;
  left: 2.5px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: linear-gradient(180deg, #c9c2c0, #8e8583);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  transition:
    transform 0.26s cubic-bezier(0.2, 0.9, 0.25, 1),
    background 0.25s ease;
}
.tb-toggle.on .sw::after {
  transform: translateX(18px);
  background: linear-gradient(180deg, #fff1ea, #ffc0a6);
}
.tb-toggle .lbl {
  min-width: 56px;
  text-align: left;
}
/* Hover: ring around the track and slightly larger knob. */
.tb-toggle .sw::after {
  will-change: transform;
}
.tb-toggle:hover .sw {
  box-shadow:
    inset 0 0 0 0.5px rgba(255, 150, 110, 0.35),
    inset 0 1px 3px rgba(0, 0, 0, 0.5),
    0 0 0 3px rgba(226, 90, 31, 0.14);
}
.tb-toggle.on:hover .sw {
  box-shadow:
    inset 0 0 0 0.5px rgba(255, 170, 130, 0.6),
    0 0 0 3px rgba(226, 90, 31, 0.18),
    0 0 14px -2px rgba(226, 90, 31, 0.85);
}
.tb-toggle:hover .sw::after {
  transform: scale(1.08);
}
.tb-toggle.on:hover .sw::after {
  transform: translateX(18px) scale(1.08);
}
.tb-toggle:focus-visible {
  outline: none;
}
.tb-toggle:focus-visible .sw {
  outline: 2px solid rgba(255, 150, 110, 0.6);
  outline-offset: 2px;
}
body.fc .tb-toggle:hover .sw {
  box-shadow:
    inset 0 0 0 0.5px rgba(240, 190, 110, 0.35),
    inset 0 1px 3px rgba(0, 0, 0, 0.5),
    0 0 0 3px rgba(240, 165, 40, 0.14);
}
body.fc .tb-toggle.on:hover .sw {
  box-shadow:
    inset 0 0 0 0.5px rgba(240, 200, 130, 0.6),
    0 0 0 3px rgba(240, 165, 40, 0.18),
    0 0 14px -2px rgba(240, 165, 40, 0.85);
}

/* the action pair leads the row */
.tb-acts {
  display: flex;
  gap: 7px;
  flex: none;
}

/* Both toggles share one recessed housing with a caption and divider. */
.tb-panel {
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex: none;
  padding: 6px 10px 6px 11px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.26);
  box-shadow:
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.08),
    inset 0 1px 3px rgba(0, 0, 0, 0.4);
}
.tb-panel-t {
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    Menlo,
    monospace;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: #ffc7b8;
  opacity: 0.9;
  margin-right: 13px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  line-height: 1;
  text-shadow: 0 0 10px rgba(226, 90, 31, 0.35);
}
body.fc .tb-panel-t {
  color: #ffe0ad;
  text-shadow: 0 0 10px rgba(240, 165, 40, 0.35);
}
.tb-panel .tb-toggle {
  padding: 2px 11px;
  gap: 9px;
}
.tb-panel .tb-toggle + .tb-toggle {
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.07);
}
.tb-panel .tb-toggle .lbl {
  min-width: 0;
}
.tb-row2.tight .tb-panel-t {
  display: none;
}
.tb-row2.tight .tb-panel {
  padding: 6px 8px;
}
.tb-row2.tight .tb-panel .tb-toggle {
  padding: 2px 9px;
  gap: 7px;
}
.tb-row2.tight .tb-panel .tb-toggle .lbl {
  display: none;
}
.tb-row2.tight .tb-panel .tb-toggle i {
  display: inline-block;
  font-size: 10.5px;
  color: var(--tert);
  width: 13px;
  text-align: center;
}
.tb-row2.tight .tb-panel .tb-toggle.on i {
  color: #ffc7b8;
}
.tb-row2.snug .tb-op > span {
  display: none;
}
.tb-row2.tighter .tb-op input[type='range'] {
  width: 70px;
}
.tb-row2.wrap {
  flex-wrap: wrap;
  row-gap: 10px;
}
.tb-row2.wrap .tb-spacer {
  display: none;
}
.tb-row2.measure .tb-op {
  flex: 0 0 auto;
}
@media (max-width: 900px) {
  .tb-panel-t {
    display: none;
  }
  .tb-panel {
    padding: 6px 8px;
  }
  .tb-panel .tb-toggle {
    padding: 2px 9px;
  }
  .tb-panel .tb-toggle .lbl {
    display: none;
  }
  .tb-panel .tb-toggle i {
    display: inline-block;
    font-size: 10.5px;
    color: var(--tert);
    width: 13px;
    text-align: center;
  }
  .tb-panel .tb-toggle.on i {
    color: #ffc7b8;
  }
}

/* collapsibles */
.tb-info,
.tb-search {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.38s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tb-info.open,
.tb-search.open {
  grid-template-rows: 1fr;
}
.tb-info-in {
  overflow: hidden;
  padding: 0 18px;
}
.tb-info.open .tb-info-in {
  padding: 14px 18px 18px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.05);
}
.tb-info h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 7px;
}
.tb-info p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  max-width: none;
}
.tb-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.tb-meta span {
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    Menlo,
    monospace;
  font-size: 11px;
  color: #ffc7b8;
  background: rgba(226, 59, 46, 0.13);
  padding: 4px 9px;
  border-radius: 7px;
}
/* link to this layer's card on the About page */
.tb-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: #ffc7b8;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  border: 0.5px solid rgba(226, 59, 46, 0.35);
  background: rgba(226, 59, 46, 0.08);
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}
.tb-more i {
  font-size: 10.5px;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tb-more:hover {
  background: rgba(226, 59, 46, 0.16);
  border-color: rgba(226, 59, 46, 0.55);
}
.tb-more:hover i {
  transform: translateX(3px);
}
.tb-more:focus-visible {
  outline: 2px solid #ffc7b8;
  outline-offset: 2px;
}

/* ---- analytics graph card (sits under the map) ---- */
.gr-card {
  border-radius: 11px;
  border: 0.5px solid var(--line);
  padding: 15px 22px 17px;
  width: 100%;
  margin: -56px 0 80px;
  background: rgba(21, 10, 10, 0.58);
}
#tlPlay.tl-wait i {
  animation: tlWait 1s ease-in-out infinite;
}
@keyframes tlWait {
  50% {
    opacity: 0.35;
  }
}
@media (prefers-reduced-motion: reduce) {
  #tlPlay.tl-wait i {
    animation: none;
    opacity: 0.5;
  }
}
.gr-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 11px;
}
/* section tag: plain mono label led by a short lit hairline */
.gr-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    Menlo,
    monospace;
  font-size: 8.5px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #d9a597;
}
.gr-eyebrow::before {
  content: '';
  flex: none;
  width: 16px;
  height: 1px;
  border-radius: 0;
  background: linear-gradient(90deg, rgba(226, 59, 46, 0.15), #ff8a66);
  box-shadow: 0 0 2px rgba(255, 110, 70, 0.28);
}
.gr-dls {
  display: flex;
  gap: 4px;
}
.gr-head h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.gr-head .gr-sub {
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    Menlo,
    monospace;
  font-size: 9px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--tert);
}
.gr-head .gr-spacer {
  flex: 1;
}
/* the eyebrow sits on its own line above the title */
.gr-head .gr-break {
  flex-basis: 100%;
  height: 0;
}
.gr-head .gr-eyebrow {
  margin-bottom: -11px;
} /* cancels one of the two row gaps the break adds */
.gr-dl {
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    Menlo,
    monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  padding: 5px 11px;
  transition: all 0.18s ease;
}
.gr-dl:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}
.gr-dl.busy {
  opacity: 0.5;
  pointer-events: none;
}
.gr-dl i {
  margin-right: 5px;
  font-size: 9px;
}

/* region segmented control, own row under the title */
.gr-regs {
  flex-basis: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
/* Region rail uses the report editor tab style: recessed track, globe
     icons, sliding active pill. */
.gr-seg {
  position: relative;
  display: inline-flex;
  isolation: isolate;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
  border: 0;
  box-shadow:
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.08),
    inset 0 1px 3px rgba(0, 0, 0, 0.55);
  border-radius: 99px;
  padding: 5px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.gr-seg::-webkit-scrollbar {
  display: none;
}
.gr-seg button {
  position: relative;
  z-index: 1;
  white-space: nowrap;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--tert);
  cursor: pointer;
  background: none;
  border: 0;
  border-radius: 99px;
  padding: 8px 15px;
  transition:
    color 0.22s ease,
    text-shadow 0.22s ease;
}
.gr-seg button i {
  font-size: 10px;
  opacity: 0.55;
  transition:
    opacity 0.22s ease,
    color 0.22s ease,
    transform 0.3s cubic-bezier(0.2, 0.9, 0.25, 1);
}
.gr-seg button:hover {
  color: var(--muted);
}
.gr-seg button:hover i {
  opacity: 0.85;
  transform: translateY(-1px);
}
.gr-seg button.on {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.gr-seg button.on i {
  opacity: 1;
  color: #ffe0d2;
  transform: none;
}
.gr-seg-thumb {
  position: absolute;
  z-index: 0;
  top: 5px;
  bottom: 5px;
  left: 0;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(180deg, #d4514550, #c8463c);
  box-shadow:
    inset 0 1px 0 rgba(255, 190, 175, 0.45),
    0 4px 12px -5px rgba(226, 59, 46, 0.95);
  transition:
    transform 0.3s cubic-bezier(0.2, 0.9, 0.25, 1),
    width 0.3s cubic-bezier(0.2, 0.9, 0.25, 1),
    background 0.45s ease;
}
body.fc .gr-seg-thumb {
  background: linear-gradient(180deg, #e0a13a50, #b07a24);
  box-shadow:
    inset 0 1px 0 rgba(255, 235, 190, 0.45),
    0 4px 12px -5px rgba(240, 165, 40, 0.9);
}
body.fc .gr-seg button.on i {
  color: #fff0d2;
}
/* Styled as a control. */
.gr-fly {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  cursor: pointer;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
  color: #ffc7b8;
  background: rgba(150, 38, 20, 0.28);
  border: 0.5px solid rgba(226, 90, 31, 0.38);
  padding: 10px 16px;
  border-radius: 99px;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}
.gr-fly i {
  font-size: 10px;
}
.gr-fly:hover {
  color: #fff1eb;
  background: rgba(226, 90, 31, 0.42);
  box-shadow: 0 0 14px -4px rgba(226, 90, 31, 0.7);
}
body.fc .gr-fly {
  color: #ffe0ad;
  background: rgba(160, 106, 23, 0.3);
  border-color: rgba(240, 165, 40, 0.38);
}
body.fc .gr-fly:hover {
  color: #fff6e2;
  background: rgba(240, 165, 40, 0.42);
  border-color: rgba(240, 165, 40, 0.55);
  box-shadow: 0 0 14px -4px rgba(240, 165, 40, 0.7);
}
@media (max-width: 640px) {
  .gr-fly span {
    display: none;
  }
  .gr-fly {
    padding: 10px 12px;
  }
}
/* Frame: plain label + viewfinder icon. Declared after the older pill rules to replace them. */
.gr-fly,
body.fc .gr-fly,
.gr-fly:hover,
body.fc .gr-fly:hover {
  background: none;
  border: 0;
  box-shadow: none;
}
.gr-fly {
  gap: 10px;
  padding: 8px 6px 8px 10px;
  color: var(--muted);
  border-radius: 8px;
  transition: color 0.2s ease;
}
.gr-fly:hover {
  color: var(--ink);
}
.gr-fly:focus-visible {
  outline: 1px solid rgba(255, 150, 110, 0.55);
  outline-offset: 2px;
}
.gr-vf {
  position: relative;
  display: block;
  flex: none;
  width: 16px;
  height: 16px;
  color: #ff9b7a;
  transition: color 0.2s ease;
}
.gr-vf::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 3px;
  margin: -1.5px 0 0 -1.5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.25, 1);
}
.gr-vf::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(currentColor, currentColor) left top/5px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) left top/1.5px 5px no-repeat,
    linear-gradient(currentColor, currentColor) right top/5px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) right top/1.5px 5px no-repeat,
    linear-gradient(currentColor, currentColor) left bottom/5px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) left bottom/1.5px 5px no-repeat,
    linear-gradient(currentColor, currentColor) right bottom/5px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) right bottom/1.5px 5px no-repeat;
  transition: inset 0.28s cubic-bezier(0.2, 0.9, 0.25, 1);
}
.gr-fly:hover .gr-vf {
  color: #ffc4ae;
}
.gr-fly:hover .gr-vf::after {
  inset: -3px;
}
.gr-fly:hover .gr-vf::before {
  transform: scale(1.4);
}
.gr-fly:active .gr-vf::after {
  inset: 1px;
}
body.fc .gr-fly {
  color: var(--muted);
}
body.fc .gr-vf {
  color: #f5bd62;
}
body.fc .gr-fly:hover .gr-vf {
  color: #ffdca3;
}

/* one export control, options live in a popover */
.gr-exp {
  position: relative;
}
/* the one action on this card, so it is filled rather than ghosted */
.gr-dl.gr-primary {
  font-size: 9.5px;
  letter-spacing: 0.11em;
  padding: 7px 15px;
  color: #fff1eb;
  background: linear-gradient(180deg, #c65c33, #98301b);
  border-color: rgba(255, 180, 150, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 208, 180, 0.3),
    0 3px 12px -4px rgba(226, 90, 31, 0.75);
}
.gr-dl.gr-primary:hover {
  color: #fff;
  background: linear-gradient(180deg, #d76b3d, #ad3a21);
  border-color: rgba(255, 190, 160, 0.44);
  box-shadow:
    inset 0 1px 0 rgba(255, 208, 180, 0.36),
    0 5px 18px -4px rgba(226, 90, 31, 0.9);
}
body.fc .gr-dl.gr-primary {
  background: linear-gradient(180deg, #cf9433, #a06a17);
  border-color: rgba(255, 220, 160, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 205, 0.32),
    0 3px 12px -4px rgba(240, 165, 40, 0.7);
}
body.fc .gr-dl.gr-primary:hover {
  background: linear-gradient(180deg, #e0a53f, #b57a1d);
}
.gr-dl.gr-primary i {
  opacity: 0.95;
}

/* Snapshot bar under the map, Drought Intensity only (body.snap-on). */
/* under the timeline, with the same gap above and below it */
.vw-snap {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 0 0 80px;
  padding: 14px 16px;
  border-radius: 10px;
  background:
    linear-gradient(rgba(8, 5, 6, 0.3), rgba(8, 5, 6, 0.3)),
    linear-gradient(
      100deg,
      rgba(226, 59, 46, 0.18),
      rgba(226, 59, 46, 0.05) 55%,
      rgba(255, 255, 255, 0.03)
    ),
    var(--card);
  border: 0.5px solid rgba(255, 150, 110, 0.28);
  box-shadow: 0 10px 30px -20px rgba(226, 90, 31, 0.9);
}
/* Snapshot bar collapses on layers without impacts and in forecast mode; the
     timeline gap eases to match. */
#snapBar {
  max-height: 220px;
  overflow: hidden;
  transition:
    max-height 0.5s cubic-bezier(0.3, 0.8, 0.3, 1),
    margin-bottom 0.5s cubic-bezier(0.3, 0.8, 0.3, 1),
    padding 0.5s cubic-bezier(0.3, 0.8, 0.3, 1),
    border-width 0.5s ease,
    box-shadow 0.5s ease,
    opacity 0.35s ease 0.12s,
    transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) 0.08s,
    visibility 0s;
}
body:not(.snap-on) #snapBar,
body.fc #snapBar {
  max-height: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  box-shadow: none;
  opacity: 0;
  transform: translateY(-8px) scale(0.985);
  visibility: hidden;
  pointer-events: none;
  transition:
    max-height 0.5s cubic-bezier(0.3, 0.8, 0.3, 1),
    margin-bottom 0.5s cubic-bezier(0.3, 0.8, 0.3, 1),
    padding 0.5s cubic-bezier(0.3, 0.8, 0.3, 1),
    border-width 0.5s ease,
    box-shadow 0.3s ease,
    opacity 0.22s ease,
    transform 0.3s ease,
    visibility 0s linear 0.5s;
}
@media (prefers-reduced-motion: reduce) {
  #snapBar,
  body:not(.snap-on) #snapBar,
  body.fc #snapBar {
    transition: none;
  }
}
/* Analytics card has a -56px top margin, so the timeline's 80px margin gives a
     24px gap; the bottom gap matches. */
body.snap-on:not(.fc) .vw-time {
  margin-bottom: 24px;
}
@media (max-width: 860px) {
  .vw-snap {
    margin-bottom: 64px;
  }
}
.vw-snap-ico {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 33px;
  line-height: 1;
  color: #ffc4ab;
}
.vw-snap-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.vw-snap-txt b {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.vw-snap-txt span {
  font-size: 12px;
  color: var(--muted);
}
.vw-snap-btn {
  margin-left: auto;
  flex: 0 0 auto;
  cursor: pointer;
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    Menlo,
    monospace;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #fff1eb;
  padding: 10px 18px;
  border-radius: 99px;
  background: linear-gradient(180deg, #c65c33, #98301b);
  border: 0.5px solid rgba(255, 180, 150, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 208, 180, 0.3),
    0 3px 12px -4px rgba(226, 90, 31, 0.75);
  transition:
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.12s ease;
}
.vw-snap-btn:hover {
  background: linear-gradient(180deg, #d76b3d, #ad3a21);
  box-shadow:
    inset 0 1px 0 rgba(255, 208, 180, 0.36),
    0 6px 20px -4px rgba(226, 90, 31, 0.95);
}
.vw-snap-btn:active {
  transform: scale(0.97);
}
.vw-snap-btn i {
  margin-right: 7px;
  font-size: 10px;
}
.vw-snap-btn.busy {
  opacity: 0.55;
  pointer-events: none;
}
@media (max-width: 720px) {
  .vw-snap {
    flex-wrap: wrap;
    gap: 12px;
  }
  .vw-snap-txt {
    flex: 1 1 200px;
  }
  .vw-snap-txt span {
    font-size: 11.5px;
  }
  .vw-snap-btn {
    margin-left: 0;
    width: 100%;
    text-align: center;
    padding: 12px 18px;
  }
}
.gr-exp > .gr-dl .fa-chevron-up {
  margin: 0 0 0 7px;
  font-size: 7px;
  opacity: 0.7;
  transition: transform 0.2s ease;
}
.gr-exp.open > .gr-dl .fa-chevron-up {
  transform: rotate(180deg);
}
.gr-exp.open > .gr-dl {
  box-shadow:
    inset 0 1px 0 rgba(255, 208, 180, 0.3),
    0 5px 18px -4px rgba(226, 90, 31, 0.9);
}

.gr-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
/* ---- Drought Impacts breakdown (lifted from the Impact desk database) ---- */
.gr-card.imp .gr-body,
.gr-card.imp .gr-foot {
  display: none;
}
.gr-card.imp {
  overflow: hidden;
  position: relative;
}
/* Single Download chart control at the end of the region row. The button
     under the time series stays hidden. */
.gr-card .gr-foot {
  display: none;
}
.gr-regs .gr-brk-dl {
  margin-left: auto;
}
@media (max-width: 760px) {
  .gr-regs {
    flex-wrap: wrap;
  }
  .gr-regs .gr-brk-dl {
    flex: 1 0 100%;
    margin-left: 0;
  }
  .gr-regs .gr-brk-dl .dbv-trig {
    width: 100%;
    justify-content: center;
  }
  .gr-regs .gr-brk-dl .dbv-menu {
    left: 0;
    right: 0;
  }
}
/* a legend chip never breaks onto two lines; only its caption wraps */
.tip-row > span:first-child {
  flex: none;
  white-space: nowrap;
}
.gr-brk .warn-title .info {
  margin-left: 2px;
}
.gr-brk .rep-cell {
  cursor: pointer;
}
.gr-brk .rep-cell:focus-visible {
  outline: 1px solid rgba(255, 150, 110, 0.6);
  outline-offset: -3px;
}
.gr-brk[hidden] {
  display: none;
}
.gr-brk-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0 10px;
}
.gr-brk .dbv-tip {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.gr-brk .dbv-tip b {
  color: var(--ink);
  font-weight: 700;
}
.gr-card .dbv-dl {
  position: relative;
  margin-left: auto;
  flex: none;
}
.gr-card .dbv-trig {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  border-radius: 99px;
  border: 0.5px solid rgba(226, 59, 46, 0.55);
  color: #ffe6df;
  background: linear-gradient(180deg, rgba(226, 59, 46, 0.42), rgba(226, 59, 46, 0.24));
  box-shadow:
    0 6px 18px -10px rgba(226, 59, 46, 0.9),
    inset 0 1px 0 rgba(255, 190, 175, 0.28);
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}
.gr-card .dbv-trig:hover {
  border-color: rgba(226, 59, 46, 0.85);
  background: linear-gradient(180deg, rgba(226, 59, 46, 0.56), rgba(226, 59, 46, 0.34));
}
.gr-card .dbv-trig > i.ch {
  font-size: 10px;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.gr-card .dbv-dl.open .dbv-trig > i.ch {
  transform: rotate(180deg);
}
.gr-card .dbv-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 7px);
  right: 0;
  min-width: 186px;
  padding: 6px;
  border-radius: 10px;
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  background: #1b1110;
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.95);
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  pointer-events: none;
  transition:
    opacity 0.16s ease,
    transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.gr-card .dbv-dl.open .dbv-menu {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.gr-card .dbv-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition:
    background 0.14s ease,
    color 0.14s ease;
}
.gr-card .dbv-menu button:hover {
  background: rgba(226, 59, 46, 0.18);
  color: var(--ink);
}
.gr-card .dbv-menu button > i {
  width: 15px;
  text-align: center;
  font-size: 12px;
  color: var(--tert);
}
.gr-card .dbv-menu button > em {
  font-style: normal;
  margin-left: auto;
  font-family:
    JetBrains Mono,
    ui-monospace,
    Menlo,
    monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tert);
}
.gr-card .dbv-menu button.busy {
  color: var(--tert);
  pointer-events: none;
}
/* forecast: the trigger turn amber like the rest of the forecast skin;
     monitoring keeps the red above */
.gr-card .dbv-trig {
  transition:
    border-color 0.5s ease,
    background 0.5s ease,
    box-shadow 0.5s ease,
    color 0.5s ease;
}
body.fc .gr-card .dbv-trig {
  border-color: rgba(240, 165, 40, 0.55);
  color: #fff0d6;
  background: linear-gradient(180deg, rgba(240, 165, 40, 0.4), rgba(240, 165, 40, 0.22));
  box-shadow:
    0 6px 18px -10px rgba(240, 165, 40, 0.9),
    inset 0 1px 0 rgba(255, 225, 170, 0.28);
}
body.fc .gr-card .dbv-trig:hover {
  border-color: rgba(240, 165, 40, 0.85);
  background: linear-gradient(180deg, rgba(240, 165, 40, 0.54), rgba(240, 165, 40, 0.32));
}
body.fc .gr-card .dbv-menu button:hover {
  background: rgba(240, 165, 40, 0.18);
}
.gr-brk .ibar {
  height: 30px;
  border-radius: 4px;
  margin-bottom: 16px;
}
.gr-brk .ibar span {
  transition:
    flex-grow 0.7s cubic-bezier(0.22, 0.9, 0.36, 1),
    opacity 0.12s ease,
    transform 0.12s ease,
    filter 0.12s ease,
    box-shadow 0.18s ease;
}
.gr-brk .ibar span:hover {
  transform: scaleY(1.15);
  filter: brightness(1.18);
  box-shadow: 0 0 9px 1px currentColor;
}
.gr-brk .ibar.dim span.hot {
  filter: brightness(1.2);
  box-shadow: 0 0 10px 1.5px currentColor;
}
.gr-brk .dbv-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 0;
  border-top: 0.5px solid var(--line);
}
.gr-brk .dbv-strip-head .warn-title,
.gr-brk .dbv-strip-head .hint {
  line-height: 20px;
}
.gr-brk .warn-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.gr-brk .warn-title svg {
  width: 17px;
  height: 17px;
}
.gr-brk .dbv-strip-head .hint {
  font-size: 11.5px;
  color: var(--tert);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.gr-brk .dbv-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 0 -22px -17px;
  border-top: 0.5px solid var(--line);
}
.gr-brk .rep-cell {
  padding: 16px 18px 15px;
  animation: grbRise 0.5s cubic-bezier(0.2, 0.85, 0.25, 1) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}
.gr-brk .rep-cell.q,
.gr-brk .rep-cell.q .rep-bar i {
  animation: none;
}
.gr-brk .rep-cell.q .rep-bar i {
  width: var(--w);
  transition: width 0.35s ease;
}
/* Colour square + category name, truncated (full name on hover). */
.gr-brk .rep-cell .meta .sw {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex: none;
  box-shadow: 0 0 7px -1px currentColor;
}
.gr-brk .rep-cell .meta .cat {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #cbbcb6;
}
/* the row is not clipped (the name ellipses on its own), so the swatch glow is whole */
.gr-brk .rep-cell .meta {
  overflow: visible;
}
/* a category name cut short by its card shows in full on hover */
.cat-pop {
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 9px;
  background: #1b1110;
  border: 0.5px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 26px -14px rgba(0, 0, 0, 0.95);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink, #f3ece8);
  white-space: nowrap;
  pointer-events: none;
  transform: translateY(calc(-100% - 7px));
  opacity: 0;
  transition: opacity 0.14s ease;
}
.cat-pop.on {
  opacity: 1;
}
/* the hover wash over a card must not swallow the pointer, or the category
   name under it can never be hovered */
.rep-cell::before {
  pointer-events: none;
}
.cat-pop i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex: none;
}

.gr-brk .rep-cell.out {
  animation: grbOut 0.3s cubic-bezier(0.4, 0, 0.8, 0.4) forwards;
  animation-delay: calc(var(--i, 0) * 35ms);
}
.gr-brk .ibar.out span {
  opacity: 0;
  transform: scaleY(0.3);
  transition:
    opacity 0.28s ease,
    transform 0.3s ease;
}
@keyframes grbOut {
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}
/* a region with nothing in the window says so, in the space the chart held */
.gr-brk-none {
  display: none;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  margin: 0 0 4px;
  border-radius: 10px;
  border: 0.5px dashed rgba(255, 190, 160, 0.22);
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.022) 0 8px, transparent 8px 16px),
    rgba(255, 255, 255, 0.015);
}
.gr-brk.none .gr-brk-none {
  display: flex;
  animation: grbRise 0.45s cubic-bezier(0.2, 0.85, 0.25, 1) both;
}
.gr-brk.none .ibar,
.gr-brk.none .dbv-strip-head,
.gr-brk.none .dbv-strip {
  display: none;
}
.gr-brk.none .dbv-tip {
  visibility: hidden;
}
@media (min-width: 761px) {
  .gr-brk.none .gr-brk-top {
    display: none;
  }
}
.gr-card.imp:has(.gr-brk.none) .gr-brk-dl {
  opacity: 0.45;
  pointer-events: none;
}
.gr-brk-none > i {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 17px;
  color: #ffb89f;
  background: rgba(226, 90, 50, 0.14);
  box-shadow:
    inset 0 0 0 0.5px rgba(255, 170, 140, 0.28),
    0 0 22px -8px rgba(226, 90, 50, 0.8);
}
.gr-brk-none b {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
}
.gr-brk-none span {
  font-size: 12px;
  color: var(--tert);
}
.gr-brk-empty {
  grid-column: 1/-1;
  padding: 22px;
  text-align: center;
  font-size: 12px;
  color: var(--tert);
}
@keyframes grbRise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 760px) {
  .gr-brk .dbv-strip {
    grid-template-columns: repeat(2, 1fr);
    margin: 0 -14px -16px;
  }
  .gr-brk .rep-cell {
    border-top: 0.5px solid var(--line);
  }
  .gr-brk .rep-cell:nth-child(odd) {
    border-left: none;
  }
  .gr-brk-top {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gr-brk .rep-cell,
  .gr-card .dbv-menu {
    animation: none;
    transition: none;
  }
}
.gr-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 40;
  min-width: 186px;
  padding: 5px;
  border-radius: 13px;
  border: 0.5px solid rgba(255, 255, 255, 0.13);
  background: rgba(28, 15, 15, 0.9);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: 0 16px 38px -12px rgba(0, 0, 0, 0.7);
  opacity: 0;
  visibility: hidden;
  transform: translateY(5px) scale(0.97);
  transform-origin: bottom left;
  transition:
    opacity 0.17s ease,
    transform 0.17s cubic-bezier(0.2, 0.9, 0.25, 1),
    visibility 0.17s;
}
.gr-exp.open .gr-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.gr-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 7px 9px;
  border-radius: 9px;
  color: var(--muted);
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.gr-menu button:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
}
.gr-menu button i {
  width: 13px;
  text-align: center;
  font-size: 10.5px;
  color: var(--orange);
  opacity: 0.85;
}
.gr-menu button .t {
  flex: 1;
  min-width: 0;
}
.gr-menu button .t b {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.gr-menu button .t span {
  display: block;
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    Menlo,
    monospace;
  font-size: 8.5px;
  letter-spacing: 0.05em;
  color: var(--tert);
  margin-top: 1px;
}
.gr-menu .gr-msep {
  height: 0.5px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 8px;
}

.gr-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 14px;
  align-items: stretch;
}

.gr-stage {
  position: relative;
  background: rgba(0, 0, 0, 0.34);
  border-radius: 10px;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.06);
  padding: 8px 10px;
  overflow: visible;
}
.gr-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent 0 3px,
    rgba(255, 255, 255, 0.014) 3px 4px
  );
}
.gr-stage svg {
  display: block;
  width: 100%;
  height: 168px;
  position: relative;
  z-index: 1;
}
.gr-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 3;
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    Menlo,
    monospace;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tert);
  background: rgba(10, 13, 22, 0.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.gr-stage.empty .gr-empty {
  opacity: 1;
}
/* The placeholder series keeps the panel geometry but stays hidden behind
     the notice. */
.gr-stage.empty svg {
  visibility: hidden;
}

.gr-band {
  transition: opacity 0.2s ease;
}
.gr-stage.hasHover .gr-band {
  opacity: 0.5;
}
.gr-stage.hasHover .gr-band.hi {
  opacity: 1;
}
.gr-scan {
  opacity: 0;
  transition: opacity 0.16s ease;
}
.gr-stage.hasHover .gr-scan {
  opacity: 1;
}

/* readout card (as on the Impact desk) */
.gr-tip {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  min-width: 150px;
  padding: 9px 12px 8px;
  border-radius: 9px;
  color: var(--ink);
  background: rgba(16, 11, 14, 0.86);
  border: 0.5px solid rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: saturate(72%) contrast(104%) brightness(0.9) blur(30px);
  backdrop-filter: saturate(72%) contrast(104%) brightness(0.9) blur(30px);
  box-shadow:
    0 14px 30px -14px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition:
    opacity 0.2s ease,
    transform 0.26s cubic-bezier(0.22, 0.8, 0.3, 1);
}
.gr-tip.snap {
  transition: opacity 0.2s ease;
}
.gr-stage.hasHover .gr-tip {
  opacity: 1;
}
.gr-tip::after {
  content: '';
  position: absolute;
  top: calc(50% + var(--ty, 0px));
  margin-top: -5.5px;
  width: 11px;
  height: 11px;
  transform: rotate(45deg);
  background: rgba(18, 12, 15, 0.92);
  transition: top 0.26s cubic-bezier(0.22, 0.8, 0.3, 1);
}
.gr-tip.snap::after {
  transition: none;
}
.gr-tip.at-r::after {
  left: -6px;
  border-left: 0.5px solid rgba(255, 255, 255, 0.16);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.22);
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}
.gr-tip.at-l::after {
  right: -6px;
  border-right: 0.5px solid rgba(255, 255, 255, 0.22);
  border-top: 0.5px solid rgba(255, 255, 255, 0.16);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.gr-tip .tp-n {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  white-space: nowrap;
}
.gr-tip .tp-d {
  margin-top: 3px;
  font:
    500 9.5px/1.2 JetBrains Mono,
    ui-monospace,
    Menlo,
    monospace;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}
.gr-tip .tp-rows {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.14);
}
.gr-tip .r {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  line-height: 1.65;
  white-space: nowrap;
}
.gr-tip .r i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex: none;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.25);
}
.gr-tip .r span {
  flex: 1;
  color: rgba(255, 255, 255, 0.72);
}
.gr-tip .r b {
  font:
    700 10.5px JetBrains Mono,
    ui-monospace,
    'SF Mono',
    Menlo,
    monospace;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 760px) {
  .gr-tip {
    padding: 8px 11px 7px;
    min-width: 136px;
  }
}

.gr-key {
  display: flex;
  flex-direction: column;
  gap: 1px;
  align-content: start;
  max-height: 184px;
  overflow: auto;
  padding-right: 2px;
}
/* Key aligned so its last entry ends on the chart's zero line
     (grKeyAlign() sets the gap). Auto margin keeps long lists scrollable. */
@media (min-width: 761px) {
  .gr-key {
    max-height: none;
    align-self: stretch;
  }
  .gr-key > :first-child {
    margin-top: auto;
  }
}
.gr-key::-webkit-scrollbar {
  width: 3px;
}
.gr-key::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 99px;
}
.gr-key button {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 2px 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    Menlo,
    monospace;
  font-size: 9.5px;
  line-height: 1.5;
  color: var(--muted);
  transition:
    color 0.18s ease,
    opacity 0.18s ease;
}
.gr-key button:hover {
  color: var(--ink);
}
.gr-key button.off {
  opacity: 0.32;
}
.gr-key i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex: none;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.2);
}

@media (max-width: 860px) {
  .gr-card {
    border-radius: 10px;
    padding: 14px 14px 16px;
    margin: -40px 0 64px;
  }
  .gr-body {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .gr-key {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 10px;
    max-height: none;
    overflow: visible;
  }
  .gr-key button {
    font-size: 9px;
    gap: 5px;
    padding: 2px 0;
  }
  .gr-stage svg {
    height: 150px;
  }

  /* Title, subtitle, download and region rail each on their own line. */
  .gr-head {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .gr-head .gr-eyebrow {
    font-size: 8px;
  }
  .gr-head .gr-break {
    display: none;
  }
  .gr-head .gr-eyebrow {
    margin-bottom: 0;
  }
  .gr-head h4 {
    font-size: 15px;
    line-height: 1.2;
  }
  .gr-sub {
    font-size: 9px;
    line-height: 1.5;
  }
  .gr-regs {
    margin-top: 2px;
    gap: 8px;
  }
  .gr-seg {
    flex: 1 1 auto;
    min-width: 0;
  }
  .gr-seg button {
    padding: 8px 11px;
    font-size: 10.5px;
    letter-spacing: 0.02em;
  }
  .gr-seg button i {
    display: none;
  }
  .gr-fly {
    flex: 0 0 auto;
  }
  .gr-foot {
    margin-top: 12px;
  }
  .gr-foot .gr-dl.gr-primary {
    width: 100%;
    justify-content: center;
  }
  .gr-menu {
    left: 0;
    right: 0;
    min-width: 0;
  }
}
@media (max-width: 430px) {
  .gr-card {
    padding: 13px 12px 15px;
  }
  .gr-stage svg {
    height: 132px;
  }
  .gr-fly span {
    display: none;
  }
}

/* Search row: height grows while the contents fade/slide in; one clipped
     inner box with fixed padding avoids jumps. */
.tb-search {
  position: relative;
  transition: grid-template-rows 0.42s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tb-search.open {
  grid-template-rows: 1fr;
}
.tb-search-in {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-top: 0.5px solid transparent;
  opacity: 0;
  transform: translateY(-8px);
  visibility: hidden;
  transition:
    opacity 0.22s ease,
    transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.3s ease,
    visibility 0s linear 0.42s;
}
.tb-search.open .tb-search-in {
  opacity: 1;
  transform: none;
  visibility: visible;
  border-top-color: rgba(255, 255, 255, 0.05);
  transition:
    opacity 0.32s ease 0.06s,
    transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.3s ease,
    visibility 0s;
}
.tb-search-in > i {
  position: absolute;
  left: 20px;
  top: 19px;
  font-size: 12px;
  color: var(--tert);
  z-index: 2;
  pointer-events: none;
}
.tb-search input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: transparent;
  border: none;
  padding: 14px 46px 14px 44px;
  outline: none;
}
/* the close control is a plain cross: no chip behind it, it brightens on hover */
.tb-search button {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: none;
  border: 0;
  color: var(--tert);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 13px;
  z-index: 2;
  transition: color 0.18s ease;
}
.tb-search button:hover,
.tb-search button:focus-visible {
  color: var(--ink);
  outline: none;
}
.tb-results {
  overflow: hidden;
  max-height: 190px;
  overflow-y: auto;
}
.tb-results a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.tb-results a:hover,
.tb-results a.hi {
  background: rgba(226, 59, 46, 0.12);
  color: var(--ink);
}
.tb-results a img {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
  flex: none;
}

/* ---------- live cursor readout ---------- */
/* Positioned via transform from JS (follows the pointer). */
.m-read {
  position: absolute;
  z-index: 6;
  left: 0;
  top: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  will-change: transform;
  white-space: nowrap;
  padding: 9px 13px;
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.5;
  background: rgba(22, 12, 13, 0.78);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.m-read.on {
  opacity: 1;
}
.m-read-pos {
  color: #b8a9a3;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.m-read-val {
  color: #ffc7b8;
  font-weight: 700;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
/* the colour of the plate under the pointer, as the legend shows it */
.m-read-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.m-read-sw {
  flex: none;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: transparent;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.35);
  transition: background-color 0.12s linear;
}
.m-read-sw[hidden] {
  display: none;
}
.m-wrap.noread .m-read {
  display: none;
}

/* ---------- legend ---------- */
.m-legend {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  left: 16px;
  bottom: 16px;
  padding: 11px 13px 10px;
  border-radius: 10px;
  background: rgba(22, 12, 13, 0.8);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
}
.m-legend h5 {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 199, 184, 0.75);
  margin-bottom: 8px;
}
.lg-bar {
  width: 210px;
  height: 11px;
  border-radius: 2px;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.14);
}
/* Legend width eases when switching between named and numeric legends. */
.lg-bar,
.lg-ticks {
  transition: width 0.44s cubic-bezier(0.3, 0.85, 0.25, 1);
}
/* Absolutely positioned panel; contain keeps its resizing out of the page
     reflow. */
.m-legend {
  contain: layout paint;
}
@media (prefers-reduced-motion: reduce) {
  .lg-bar,
  .lg-ticks {
    transition: none;
  }
}
/* At 380px each cell fits Exceptional on one line. */
/* Narrow legend with larger class names. */
.lg-bar.wide,
.lg-ticks.cats {
  width: 440px;
}
.lg-ticks {
  position: relative;
  height: 14px;
  width: 210px;
  margin-top: 5px;
}
.lg-ticks span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 9.5px;
  color: var(--tert);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.lg-ticks span:first-child {
  transform: none;
}
.lg-ticks span:last-child {
  transform: translateX(-100%);
}
/* Stepped legend animates class by class (as on the home page); --lg0
     delays it. */
.m-legend {
  --lg0: 0.05s;
}
.vw:not(.in) .m-legend {
  --lg0: 0.72s;
}
.m-legend .lg-bar.steps span {
  transform-origin: 50% 100%;
}
/* only the legend that is actually on screen animates; lg-go is added by
     the observer below, and re-armed on redraw */
.m-legend.lg-go .lg-bar.steps span {
  animation: lgStack 0.44s cubic-bezier(0.2, 1.25, 0.35, 1) both;
  animation-delay: calc(var(--lg0) + var(--i, 0) * 42ms);
}
.m-legend.lg-go .lg-ticks.steps b {
  animation: lgMark 0.34s ease both;
  animation-delay: calc(var(--lg0) + 0.15s + var(--i, 0) * 42ms);
}
@keyframes lgStack {
  from {
    opacity: 0;
    transform: translate3d(0, 110%, 0) scaleY(0.35);
  }
  55% {
    opacity: 1;
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes lgMark {
  from {
    opacity: 0;
    transform: translate(-50%, -5px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%);
  }
}
/* Fade variant without the -50% shift for flex cells. */
.m-legend.lg-go .lg-ticks.steps.cats b {
  animation-name: lgMarkFlow;
}
@keyframes lgMarkFlow {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .m-legend .lg-bar.steps span,
  .m-legend .lg-ticks.steps b {
    animation: none;
  }
  .m-legend .lg-ticks.steps b {
    opacity: 1;
    transform: translateX(-50%);
  }
  .m-legend .lg-ticks.steps.cats b {
    transform: none;
  }
}

/* ---------- timeline ---------- */
.vw-time {
  border-radius: 11px;
  border: 0.5px solid var(--line);
  padding: 16px 22px 18px;
  width: 100%;
  margin: 0 0 80px;
  background: rgba(26, 13, 13, 0.5);
}
/* date left, transport dead centre, counter right so the row stays balanced */
.vw-time-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.vw-time-top .vw-ctrl {
  justify-self: center;
}
.vw-time-count {
  justify-self: end;
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    Menlo,
    monospace;
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--tert);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.vw-time-count kbd {
  font: inherit;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
  border: 0.5px solid rgba(255, 255, 255, 0.13);
  border-radius: 5px;
  padding: 1px 5px;
  margin-left: 8px;
}
@media (max-width: 640px) {
  .vw-time-top {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 10px;
    text-align: center;
  }
  .vw-time-top .vw-time-date {
    order: 1;
  }
  .vw-time-top .vw-ctrl {
    order: 2;
  }
  .vw-time-count {
    order: 3;
    justify-self: center;
  }
  .vw-time-count kbd {
    display: none;
  }
}

/* ---- mode bar above the map ---- */
/* Layers without a forecast hide the mode row. Height is animated from the
     measured px value, not a max-height guess. */
.mode-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 4px 0 16px;
  flex-wrap: wrap;
  padding: 0 2px;
  overflow: hidden;
  transition:
    height 0.42s cubic-bezier(0.3, 0.85, 0.25, 1),
    opacity 0.26s ease 0.06s,
    margin 0.42s cubic-bezier(0.3, 0.85, 0.25, 1);
}
.mode-bar.hid {
  opacity: 0;
  margin-top: 0;
  margin-bottom: 0;
  pointer-events: none;
  transition:
    height 0.42s cubic-bezier(0.3, 0.85, 0.25, 1),
    opacity 0.2s ease,
    margin 0.42s cubic-bezier(0.3, 0.85, 0.25, 1);
}
@media (prefers-reduced-motion: reduce) {
  .mode-bar {
    transition: none;
  }
}
.mode-help {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  flex: 1;
  min-width: 220px;
  transition: color 0.45s ease;
}
.mode-help b {
  color: var(--ink);
  font-weight: 600;
}
body.fc .mode-help b {
  color: #ffe0ad;
}

/* ---- monitoring / forecast switch ---- */
.vw-mode {
  position: relative;
  display: inline-flex;
  gap: 0;
  isolation: isolate;
  padding: 5px;
  border-radius: 99px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
  box-shadow:
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.08),
    inset 0 1px 3px rgba(0, 0, 0, 0.55);
  transition:
    box-shadow 0.45s ease,
    background 0.45s ease;
}
body.fc .vw-mode {
  box-shadow:
    inset 0 0 0 0.5px rgba(255, 210, 150, 0.1),
    inset 0 1px 3px rgba(0, 0, 0, 0.55);
}
.vw-mode button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font: inherit;
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    'IBM Plex Mono',
    Menlo,
    monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 11px 20px;
  border-radius: 99px;
  background: transparent;
  color: var(--muted);
  transition: color 0.18s ease;
}
.vw-mode button i {
  font-size: 10px;
  opacity: 0.55;
  transition:
    opacity 0.22s ease,
    color 0.22s ease,
    transform 0.3s cubic-bezier(0.2, 0.9, 0.25, 1);
}
.vw-mode button:hover i {
  opacity: 0.85;
  transform: translateY(-1px);
}
.vw-mode button:hover {
  color: var(--muted);
}
.vw-mode button.on {
  color: #fff1eb;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);
}
.vw-mode button.on i {
  opacity: 1;
  color: #ffd0bb;
  transform: none;
}
.vw-mode button[disabled] {
  opacity: 0.32;
  cursor: not-allowed;
}
/* Page stays hidden until the layout has settled. */
body.booting *,
body.booting *::before,
body.booting *::after {
  animation: none !important;
  transition: none !important;
}
body.booting main {
  opacity: 0;
}
main {
  opacity: 1;
  transition: opacity 0.28s ease;
}
/* Timeline stride: same recessed track as the mode switch, lighter. */
/* Stride selector inline with the span label. Text only, no box, with a rule
     under the active option. */
.vw-scale-mid {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
/* Opacity + transform only. Same duration/curve as the pill width. */
@keyframes txIn {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.tx-in {
  animation: txIn 0.34s cubic-bezier(0.2, 0.9, 0.25, 1) both;
  will-change: opacity, transform;
}
@media (prefers-reduced-motion: reduce) {
  .tx-in {
    animation: none;
  }
}
/* Timeline date rolls like an odometer (only changed characters move). */
.dr {
  display: inline-block;
  position: relative;
  vertical-align: baseline;
  clip-path: inset(0 -2em);
}
.dr > span {
  display: inline-block;
}
.dr > .dr-o {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}
#tlLabel .dr,
#tlLabel .dr span {
  color: inherit;
}

.vw-dens {
  position: relative;
  display: inline-flex;
  gap: 3px;
}
.vw-dens[hidden] {
  display: none;
}
.vw-dens button {
  position: relative;
  border: 0;
  cursor: pointer;
  background: none;
  color: var(--tert);
  font:
    600 9px/1 JetBrains Mono,
    ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  padding: 4px 7px;
  border-radius: 6px;
  transition:
    color 0.25s ease,
    text-shadow 0.25s ease,
    background 0.25s ease;
}
.vw-dens button[hidden] {
  display: none;
}
.vw-dens button:hover {
  color: var(--muted);
}
/* Active stride is highlighted by brightness, not an underline. */
.vw-dens button.on {
  color: #ffd9cc;
  text-shadow:
    0 0 12px rgba(226, 90, 50, 0.75),
    0 0 3px rgba(255, 150, 120, 0.55);
}
body.fc .vw-dens button.on {
  color: #ffe7c2;
  text-shadow:
    0 0 12px rgba(240, 165, 40, 0.7),
    0 0 3px rgba(255, 215, 150, 0.5);
}
/* Highlight behind the active stride is one sliding element. */
.vw-dens button {
  z-index: 1;
}
.vw-dens-glow {
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    ellipse at 50% 55%,
    rgba(226, 59, 46, 0.26) 0%,
    rgba(226, 59, 46, 0.2497) 8.64%,
    rgba(226, 59, 46, 0.2194) 18%,
    rgba(226, 59, 46, 0.1759) 27.36%,
    rgba(226, 59, 46, 0.13) 36%,
    rgba(226, 59, 46, 0.0841) 44.64%,
    rgba(226, 59, 46, 0.0406) 54%,
    rgba(226, 59, 46, 0.0103) 63.36%,
    rgba(226, 59, 46, 0) 72%
  );
  transition:
    transform 0.44s cubic-bezier(0.2, 0.9, 0.25, 1.12),
    width 0.44s cubic-bezier(0.2, 0.9, 0.25, 1),
    opacity 0.25s ease;
}
.vw-dens:not(.ready) .vw-dens-glow {
  transition: none;
}
body.fc .vw-dens-glow {
  background: radial-gradient(
    ellipse at 50% 55%,
    rgba(240, 165, 40, 0.22) 0%,
    rgba(240, 165, 40, 0.2113) 8.64%,
    rgba(240, 165, 40, 0.1856) 18%,
    rgba(240, 165, 40, 0.1488) 27.36%,
    rgba(240, 165, 40, 0.11) 36%,
    rgba(240, 165, 40, 0.0712) 44.64%,
    rgba(240, 165, 40, 0.0344) 54%,
    rgba(240, 165, 40, 0.0087) 63.36%,
    rgba(240, 165, 40, 0) 72%
  );
}

.vw-mode-thumb {
  position: absolute;
  z-index: -1;
  top: 5px;
  bottom: 5px;
  left: 0;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(180deg, #d4514550, #c8463c);
  box-shadow:
    inset 0 1px 0 rgba(255, 190, 175, 0.45),
    0 4px 12px -5px rgba(226, 59, 46, 0.95);
  transition:
    transform 0.3s cubic-bezier(0.2, 0.9, 0.25, 1),
    width 0.3s cubic-bezier(0.2, 0.9, 0.25, 1),
    background 0.45s ease,
    box-shadow 0.45s ease;
}
body.fc .vw-mode-thumb {
  background: linear-gradient(180deg, #e0a13a50, #a06a17);
  box-shadow:
    inset 0 1px 0 rgba(255, 235, 190, 0.45),
    0 4px 12px -5px rgba(240, 165, 40, 0.9);
}

.vw-time-kind {
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    Menlo,
    monospace;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tert);
  margin-right: 9px;
}
body.fc .vw-time-kind {
  color: #f0a528;
}
body.fc .vw-time-date span:last-child {
  color: #f0a528;
}

/* forecast recolours the live badge and the timeline accent */
body.fc .m-live i {
  background: #f0a528;
  animation: pulseF 2.4s ease-out infinite;
}
@keyframes pulseF {
  0% {
    box-shadow: 0 0 0 0 rgba(240, 165, 40, 0.55);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(240, 165, 40, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(240, 165, 40, 0);
  }
}
body.fc .vw-time input[type='range']::-webkit-slider-thumb {
  background: #f0a528;
  box-shadow: 0 2px 8px rgba(240, 165, 40, 0.55);
}
body.fc .vw-time input[type='range']::-moz-range-thumb {
  background: #f0a528;
}
body.fc .vw-time {
  background: rgba(34, 22, 10, 0.5);
}

/* the map dims briefly while the frame set swaps */
/* .modeswap and .swap are unused; mode changes use the raster crossfade. */
.vw-time-date {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.vw-time-date span {
  color: var(--orange);
}
.vw-ctrl {
  display: flex;
  gap: 7px;
}
.vw-ctrl button {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 0.5px solid var(--line);
  display: grid;
  place-items: center;
  transition: all 0.18s ease;
}
.vw-ctrl button:hover {
  background: rgba(226, 59, 46, 0.24);
  color: #ffd9cf;
}
/* Filled part of the rail ends at the thumb centre. */
.vw-time input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 99px;
  outline: none;
  --f: 0;
  --th: 16px;
  --tlc: var(--orange);
  --tlc0: rgba(226, 59, 46, 0.35);
  background:
    linear-gradient(90deg, var(--tlc0), var(--tlc)) 0 0 /
      calc(var(--th) / 2 + (100% - var(--th)) * var(--f)) 100% no-repeat,
    rgba(255, 255, 255, 0.12);
}
body.fc .vw-time input[type='range'] {
  --tlc: #f0a528;
  --tlc0: rgba(240, 165, 40, 0.35);
}
.vw-time input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--orange);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(226, 59, 46, 0.55);
}
.vw-time input[type='range']::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: var(--orange);
  cursor: pointer;
}
/* Tick marks offset by half a thumb to line up with the stops. */
.vw-ticks {
  position: relative;
  height: 15px;
  margin-top: 5px;
  pointer-events: none;
  --thumb: 16px;
}
.vw-ticks b {
  position: absolute;
  top: 0;
  width: 1px;
  height: 4px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.16);
}
.vw-ticks b.maj {
  height: 7px;
  background: rgba(255, 255, 255, 0.34);
}
.vw-ticks b.yr {
  background: var(--orange);
  opacity: 0.75;
}
.vw-ticks b span {
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    Menlo,
    monospace;
  font-size: 8.5px;
  letter-spacing: 0.04em;
  color: var(--tert);
  white-space: nowrap;
}
body.fc .vw-ticks b.yr {
  background: #f0a528;
}
/* Both ends show full dates: the first label extends right from its
     mark, the last ends on its mark. */
.vw-ticks b.end span {
  color: var(--muted);
  letter-spacing: 0.02em;
}
.vw-ticks b.first span {
  left: 0;
  transform: none;
}
.vw-ticks b.last span {
  left: auto;
  right: 0;
  transform: none;
}
@media (max-width: 760px) {
  .vw-ticks {
    --thumb: 20px;
  }
}
/* Current stop lights up on the ruler with a slow fade-out. */
.vw-ticks b {
  transition:
    background-color 0.9s ease,
    height 0.9s cubic-bezier(0.3, 0.8, 0.3, 1),
    width 0.9s ease,
    margin 0.9s ease,
    opacity 0.9s ease,
    box-shadow 0.9s ease;
}
.vw-ticks b span {
  transition: color 0.9s ease;
}
.vw-ticks b.on {
  height: 7px;
  width: 2px;
  margin-left: -0.5px;
  opacity: 1;
  background: #fff4ee;
  box-shadow:
    0 0 5px rgba(255, 150, 120, 0.95),
    0 0 12px rgba(226, 59, 46, 0.6);
  transition-duration: 0.16s;
}
.vw-ticks b.on span {
  color: var(--ink);
  transition-duration: 0.16s;
}
body.fc .vw-ticks b.on {
  box-shadow:
    0 0 5px rgba(255, 210, 140, 0.95),
    0 0 12px rgba(240, 165, 40, 0.6);
}
@media (prefers-reduced-motion: reduce) {
  .vw-ticks b,
  .vw-ticks b span {
    transition: none;
  }
}
/* Span and stride centred; the updated line on the right. */
.vw-scale {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  color: var(--tert);
  margin-top: 15px;
}
.vw-scale-mid {
  grid-column: 2;
}
#tlFrom,
#tlTo {
  display: none;
}
/* Data age badge: green within ~36 h, amber after a missed nightly run. */
.vw-upd {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  border-radius: 99px;
  background: rgba(95, 208, 138, 0.07);
  border: 0.5px solid rgba(95, 208, 138, 0.28);
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    Menlo,
    monospace;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.vw-upd[hidden] {
  display: none;
}
.vw-upd i {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5fd08a;
  animation: updPulse 2.4s ease-out infinite;
}
.vw-upd b {
  font-weight: 700;
  color: #d8f5e2;
}
.vw-upd em {
  font-style: normal;
  color: var(--tert);
}
.vw-upd.stale {
  background: rgba(240, 165, 40, 0.07);
  border-color: rgba(240, 165, 40, 0.3);
}
.vw-upd.stale i {
  background: #f0a528;
  animation-name: updPulseA;
}
.vw-upd.stale b {
  color: #ffe2b0;
}
@keyframes updPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(95, 208, 138, 0.6);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(95, 208, 138, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(95, 208, 138, 0);
  }
}
@keyframes updPulseA {
  0% {
    box-shadow: 0 0 0 0 rgba(240, 165, 40, 0.6);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(240, 165, 40, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(240, 165, 40, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .vw-upd i {
    animation: none;
  }
}
/* Update chip in the map's top-left corner: dot, relative age, exact
     timestamp. */
/* Baseline alignment (monospace stamp has different metrics). */
/* Legend labels slightly lighter than other secondary text. */
.m-legend .lg-ticks span,
.m-legend .lg-ticks b {
  color: #b9a7a1;
}
body.fc .m-legend .lg-ticks span,
body.fc .m-legend .lg-ticks b {
  color: #c9b394;
}
.m-fresh {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  pointer-events: auto;
  background:
    linear-gradient(180deg, rgba(95, 208, 138, 0.13), rgba(95, 208, 138, 0.05)),
    rgba(20, 14, 14, 0.8);
  border-color: rgba(95, 208, 138, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(170, 255, 200, 0.1),
    0 0 18px -8px rgba(95, 208, 138, 0.55);
}
.m-fresh.stale {
  background:
    linear-gradient(180deg, rgba(240, 165, 40, 0.13), rgba(240, 165, 40, 0.05)),
    rgba(20, 14, 14, 0.8);
  border-color: rgba(240, 165, 40, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 225, 170, 0.1),
    0 0 18px -8px rgba(240, 165, 40, 0.55);
}
.m-fresh > svg {
  align-self: center;
}
.m-fresh[hidden] {
  display: none;
}
.m-fresh {
  transform-origin: left center;
}
/* Same arrow icon as the home page Updated stamp. */
.m-fresh > svg {
  flex: none;
  width: 11px;
  height: 11px;
  fill: none;
  stroke: #8fe3ae;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.m-fresh span {
  color: rgba(226, 232, 238, 0.7);
  font-weight: 600;
}
.m-fresh b {
  font-weight: 700;
  color: #b8f0cb;
}
.m-fresh.stale b {
  color: #ffdca3;
}
.m-fresh-x {
  align-self: center;
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin: -2px -6px -2px 1px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: rgba(232, 238, 244, 0.75);
  transition: color 0.18s ease;
}
.m-fresh-x svg {
  display: block;
  width: 10px;
  height: 10px;
  transform: translateY(1px);
}
.m-fresh-x:hover,
.m-fresh-x:focus-visible {
  color: #fff;
  outline: none;
}
.m-fresh em {
  font-style: normal;
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    Menlo,
    monospace;
  font-size: 9.5px;
  letter-spacing: 0.05em;
  color: rgba(232, 238, 244, 0.78);
  font-variant-numeric: tabular-nums;
}
.m-fresh.stale > svg {
  stroke: #ffc978;
}
@media (max-width: 460px) {
  .m-fresh em {
    display: none;
  }
}
/* green glass, as a small-cornered tag rather than a pill */
.m-badge.m-fresh {
  border-radius: 5px;
  color: #eef2f5;
} /* neutral text only, no warm tint */
/* the outgoing ruler during a stride change, laid over the new one */
.vw-ticks.vw-ghost {
  position: absolute;
  margin: 0;
  pointer-events: none;
}
@media (max-width: 760px) {
  .vw-scale {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 8px;
  }
  .vw-scale-mid,
  .vw-upd {
    grid-column: 1;
    justify-self: center;
  }
}
/* Hover date above the rail, snapped to the nearest stop. */
.vw-time {
  position: relative;
}
.vw-tlhov {
  position: absolute;
  z-index: 6;
  left: 0;
  top: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 13px));
  padding: 5px 10px;
  border-radius: 9px;
  background: #1b1110;
  border: 0.5px solid rgba(255, 255, 255, 0.16);
  color: var(--ink);
  font:
    600 10.5px/1.2 JetBrains Mono,
    ui-monospace,
    'SF Mono',
    Menlo,
    monospace;
  letter-spacing: 0.03em;
  white-space: nowrap;
  box-shadow: 0 12px 26px -14px rgba(0, 0, 0, 0.95);
}
.vw-tlhov::after {
  content: '';
  position: absolute;
  top: 100%;
  left: var(--cx, 50%);
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1b1110;
}
.vw-tlhov[hidden] {
  display: none;
}
.vw-tlhov {
  text-align: center;
}
.vw-tlhov small {
  display: block;
  margin-top: 3px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tert);
}
body.fc .vw-tlhov {
  border-color: rgba(240, 165, 40, 0.3);
}

@media (max-width: 1000px) {
  .vw,
  .vw-time,
  .tb {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  .vw,
  .tb {
    margin-bottom: 14px;
  }
  .vw-time {
    margin-bottom: 80px;
  }
}
@media (max-width: 720px) {
  .tb-row2 {
    flex-wrap: wrap;
  }
  .tb-row2 .tb-sub {
    flex: 1 1 100%;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .tb-sub::-webkit-scrollbar {
    display: none;
  }
  .tb-sub button {
    padding: 8px 12px 9px;
  }
  .tb-op {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }
  .tb-op input[type='range'] {
    flex: 1;
    width: auto;
    margin: 0 4px;
  }

  .lg-bar,
  .lg-ticks {
    width: 150px;
  }
  .lg-bar.wide,
  .lg-ticks.cats {
    width: 370px;
  }
}
@media (max-width: 640px) {
  .m-wrap {
    aspect-ratio: auto;
    height: 300px;
  }

  .m-zoom {
    top: 12px;
    right: 12px;
  }
  .vw-body {
    padding: 18px 16px 20px;
  }
  .vw-time {
    padding: 14px 16px 16px;
  }
  .m-hint {
    display: none;
  }
}

/* Original style section 5; order preserved. */

@media (prefers-reduced-motion: reduce) {
  .tb-layers button.on::after {
    animation: none;
    opacity: 0;
  }
}

/* Original style section 6; order preserved. */

/* icon buttons + their group */
.tb-right {
  display: flex;
  gap: 8px;
  flex: none;
  padding-left: 12px;
  margin-left: 2px;
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.06);
}
.tb-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 14px;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    Menlo,
    monospace;
  color: #ffd0c2;
  background: rgba(226, 59, 46, 0.16);
  border: 0.5px solid rgba(226, 59, 46, 0.4);
  border-radius: 99px;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.tb-icon i {
  font-size: 11px;
}
.tb-icon:hover {
  background: rgba(226, 59, 46, 0.32);
  border-color: rgba(226, 59, 46, 0.62);
  color: #fff;
  box-shadow: 0 0 14px -4px rgba(226, 59, 46, 0.7);
}
.tb-icon.on {
  background: rgba(226, 59, 46, 0.42);
  border-color: rgba(226, 59, 46, 0.75);
  color: #fff;
}
@media (max-width: 900px) {
  .tb-icon span {
    display: none;
  }
  .tb-icon {
    padding: 0 11px;
  }
}

/* Original style section 7; order preserved. */

/* ================= viewer: mobile & tablet ================= */

body.no-icons i.fa-solid,
body.no-icons i.fa-regular,
body.no-icons i.fa-brands {
  display: none !important;
}
body.no-icons .tb-icon span,
body.no-icons .tb-acts .tb-icon span {
  display: inline !important;
}

@media (max-width: 1000px) {
  .vw-head {
    padding-block: 34px 18px;
  }
  .m-zoom {
    top: 12px;
    right: 12px;
  }
}

/* ---------------- phones ---------------- */
@media (max-width: 700px) {
  /* content keeps the page gutter; nothing runs to the screen edge */
  .vw,
  .tb,
  .vw-time,
  .gr-card {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  .tb {
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: visible;
    position: relative;
    z-index: 30;
  }
  .vw {
    border-radius: 10px;
    margin-bottom: 12px;
  }
  .vw-time {
    border-radius: 10px;
    margin-bottom: 64px;
  }

  /* the two jump pills sit side by side while they fit, then stack full width */
  .vw-jumps {
    gap: 8px;
    margin-top: 16px;
  }
  .vw-jump {
    flex: 1 1 auto;
    justify-content: center;
    font-size: 9.5px;
    letter-spacing: 0.1em;
    padding: 12px 14px;
  }

  /* extra spacing around the hero */
  .vw-head {
    padding-block: 32px 22px;
  }
  .vw-head h1 {
    font-size: 25px;
    line-height: 1.12;
  }
  .vw-head .kicker {
    margin-bottom: 10px;
  }
  .vw-head p {
    font-size: 12.5px;
    line-height: 1.6;
    margin-top: 12px;
  }

  /* --- layer picker: a dropdown --- */
  .tb-row {
    padding: 12px;
    display: block;
    position: relative;
    overflow: visible;
  }
  .tb-row2,
  .tb-info,
  .tb-search {
    position: relative;
    z-index: 1;
  }
  .tb-picker {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font: inherit;
    font-family:
      JetBrains Mono,
      ui-monospace,
      'SF Mono',
      'IBM Plex Mono',
      Menlo,
      monospace;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    padding: 14px 15px;
    cursor: pointer;
    color: #ffd9cf;
    position: relative;
    background: rgba(255, 150, 110, 0.5);
    border: none;
    clip-path: polygon(
      10px 0,
      100% 0,
      100% calc(100% - 10px),
      calc(100% - 10px) 100%,
      0 100%,
      0 10px
    );
  }
  .tb-picker::before {
    content: '';
    position: absolute;
    inset: 1px;
    z-index: 0;
    background:
      linear-gradient(180deg, rgba(226, 59, 46, 0.24), rgba(226, 59, 46, 0.1)),
      linear-gradient(180deg, #191016, #150d12);
    clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
  }
  .tb-picker-in {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    text-align: left;
  }
  .tb-picker-in i {
    color: #ff8f6a;
    font-size: 11px;
    flex: none;
  }
  .tb-picker-in span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .tb-picker-chev {
    position: relative;
    z-index: 2;
    font-size: 10px;
    color: #ff8f6a;
    flex: none;
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .tb-picker[aria-expanded='true'] .tb-picker-chev {
    transform: rotate(180deg);
  }

  /* the list drops below the button */
  .tb-rail {
    position: absolute;
    left: 12px;
    right: 12px;
    top: calc(100% - 2px);
    z-index: 60;
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .tb-rail.open {
    grid-template-rows: 1fr;
  }
  .tb-rail .tb-layers {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    max-height: min(58vh, 340px);
    -webkit-overflow-scrolling: touch;
    padding: 0;
    cursor: default;
    -webkit-mask-image: none;
    mask-image: none;
    background: rgba(24, 14, 15, 0.98);
    border-radius: 0 0 10px 10px;
    box-shadow:
      0 18px 40px -12px rgba(0, 0, 0, 0.8),
      inset 0 0 0 0.5px rgba(255, 255, 255, 0.09);
    opacity: 0;
    transition: opacity 0.22s ease;
  }
  .tb-rail.open .tb-layers {
    opacity: 1;
  }
  .tb-layers button {
    width: 100%;
    white-space: nowrap;
    justify-content: flex-start;
    font-size: 10px;
    letter-spacing: 0.07em;
    padding: 14px 15px;
    gap: 10px;
    background: transparent;
    clip-path: none;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.055);
  }
  .tb-layers button::before {
    display: none;
  }
  .tb-layers button::after {
    display: none;
  }
  .tb-layers button:last-child {
    border-bottom: none;
  }
  .tb-layers button i {
    width: 13px;
    font-size: 10px;
    flex: none;
  }
  .tb-layers button.on {
    background: rgba(226, 59, 46, 0.2);
    color: #ffd9cf;
  }
  .tb-slider {
    display: none !important;
  }

  /* --- second row --- */
  /* Phones: the row wraps; higher specificity than the .tb-row2 desktop
     rules. */
  .tb-row2 {
    padding: 0 12px 12px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .tb-row2 .tb-sub {
    order: 1;
    flex: 1 1 100%;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .tb-sub::-webkit-scrollbar {
    display: none;
  }
  .tb-sub button {
    flex: 1 0 auto;
    padding: 9px 14px 10px;
    font-size: 9.5px;
    letter-spacing: 0.05em;
  }
  .tb-row2 .tb-spacer {
    display: none;
  }
  .tb-row2 .tb-op {
    order: 2;
    flex: 1 1 100%;
    justify-content: space-between;
    gap: 10px;
  }
  .tb-op input[type='range'] {
    flex: 1;
    width: auto;
    margin: 0;
  }
  /* Phones: full-width buttons show their labels, not just icons. */
  .tb-row2 .tb-acts {
    order: 3;
    flex: 0 0 auto;
  }
  .tb-acts .tb-icon {
    flex: 0 0 auto;
    justify-content: center;
  }
  .tb-row2 .tb-acts .tb-icon span {
    display: inline;
  }
  .tb-acts .tb-icon.tb-mini {
    flex: 0 0 auto;
    width: 42px;
  }
  .tb-acts .tb-icon.tb-mini span {
    display: none;
  }
  /* Caption shown; the panel fills the rest of the row. */
  .tb-row2 .tb-panel {
    order: 4;
    flex: 1 1 auto;
    margin-left: 0;
    justify-content: center;
    padding: 6px 10px;
  }
  .tb-panel-t {
    display: inline-block !important;
    writing-mode: horizontal-tb;
    transform: none;
    margin: 0 10px 0 2px;
    font-size: 8px;
  }
  .tb-panel .tb-toggle .lbl {
    display: inline;
  }
  @media (max-width: 460px) {
    .tb-panel-t {
      display: none !important;
    }
    .tb-panel .tb-toggle .lbl {
      display: none;
    }
    .tb-row2 .tb-acts {
      flex: 1 1 auto;
    }
    .tb-acts .tb-icon {
      flex: 1;
    }
  }

  .tb-info-in {
    padding: 0 14px;
  }
  .tb-info.open .tb-info-in {
    padding: 12px 14px 16px;
  }
  .tb-info h3 {
    font-size: 14.5px;
  }
  .tb-info p {
    font-size: 12.5px;
    line-height: 1.65;
  }
  .tb-search input {
    font-size: 16px;
    padding: 14px 44px 14px 40px;
  }
  .tb-search-in > i {
    left: 16px;
    top: 18px;
  }

  /* --- Map frame follows the map's aspect ratio (no letterboxing) --- */
  .m-wrap {
    aspect-ratio: auto;
    height: min(44vh, 60vw);
    min-height: 200px;
    max-height: 420px;
  }

  .m-badge {
    font-size: 10px;
    padding: 6px 10px;
  }
  .m-date {
    top: 10px;
    left: 10px;
  }
  .m-upd {
    top: 40px;
    left: 10px;
    font-size: 8px;
    padding: 4px 8px;
  }
  .m-live {
    top: 10px;
    right: 10px;
  }
  .m-live i {
    width: 6px;
    height: 6px;
  }

  /* Touch: zoom buttons hidden, fullscreen button kept and moved up clear of the legend. */
  .m-zoom {
    flex-direction: column;
    top: 46px;
    bottom: auto;
    right: 10px;
    gap: 7px;
    align-items: center;
  }
  #zIn,
  #zOut,
  #zReset {
    display: none;
  }
  .m-btn {
    width: 36px;
    height: 36px;
    font-size: 12px;
    border-radius: 5px;
  }
  .m-zbadge {
    right: 10px;
    top: 10px;
    bottom: auto;
    left: auto;
    font-size: 10px;
    padding: 5px 9px;
  }

  /* Legend spans the full map width (more room for class names). */
  .m-legend {
    left: 10px;
    right: 10px;
    top: auto;
    bottom: 10px;
    height: auto;
    width: auto;
    padding: 7px 10px 6px;
  }
  .m-legend h5 {
    font-size: 7.5px;
    margin-bottom: 5px;
  }
  .lg-bar,
  .lg-bar.wide {
    width: 100%;
    height: 8px;
  }
  .lg-ticks,
  .lg-ticks.cats {
    width: 100%;
    height: 11px;
    margin-top: 4px;
  }
  /* ~45px cells on phones: long class names wrap, so the row grows. */
  .lg-ticks.steps.cats {
    height: auto;
    min-height: 11px;
  }
  .lg-ticks span {
    font-size: 7.5px;
  }
  .lg-ticks.steps.cats b {
    font-size: 6.5px;
  }
  .m-read {
    display: none;
  }
  .m-hint {
    display: none;
  }

  /* --- timeline --- */
  .vw-time {
    padding: 14px 14px 18px;
  }
  .vw-time-date {
    font-size: 13px;
  }
  .vw-ctrl button {
    width: 38px;
    height: 38px;
  }
  .vw-scale {
    font-size: 9.5px;
  }
  .vw-time input[type='range'] {
    height: 6px;
    --th: 20px;
  }
  .vw-time input[type='range']::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
  }
  .vw-time input[type='range']::-moz-range-thumb {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 400px) {
  .vw-head h1 {
    font-size: 23px;
  }
  .m-wrap {
    height: min(46vh, 62vw);
    min-height: 185px;
  }
  .m-btn {
    width: 34px;
    height: 34px;
  }
  .tb-picker {
    font-size: 10px;
    padding: 13px 14px;
  }
  .lg-ticks.steps.cats b {
    font-size: 6px;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .m-wrap {
    aspect-ratio: auto;
    height: 80vh;
    min-height: 240px;
    max-height: none;
  }
  .vw-head {
    padding-block: 20px 12px;
  }
  .vw-head p {
    display: none;
  }
}

@media (pointer: coarse) {
  .tb-icon.tb-mini {
    width: 38px;
  }
  .tb-icon {
    height: 38px;
  }
  .tb-nudge {
    width: 28px;
    height: 28px;
  }
  .tb-prog {
    height: 22px;
  }
  .m-read {
    display: none;
  }
}

@media (max-width: 700px) {
  .m-wrap.pseudo-full {
    height: 100dvh;
    max-height: none;
  }
}

/* Original style section 8; order preserved. */

/* ================= reveal on load / scroll ================= */
.rv {
  opacity: 0;
  transform: translateY(18px);
  will-change: opacity, transform;
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 0.7s ease;
  transition-delay: calc(var(--i, 0) * 70ms);
}
.rv-l {
  transform: translateX(-24px);
}
.rv-r {
  transform: translateX(24px);
}
.rv-s {
  transform: scale(0.96);
}
.rv-b {
  transform: translateY(12px);
  filter: blur(8px);
}
.rv-d {
  transform: translateY(-16px);
}
.rv.in {
  opacity: 1;
  transform: none;
  filter: none;
}
/* heading block: the title drops in, kicker, text and buttons rise */
.vw-head .rv {
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 0.8s ease;
}
.vw-head .wsplit {
  padding-bottom: 0.18em;
  margin-bottom: -0.18em;
}
.vw-head .wsplit > i {
  transition:
    transform 0.85s cubic-bezier(0.2, 0.85, 0.2, 1),
    opacity 0.6s ease;
  transition-delay: calc(var(--w, 0) * 55ms);
}

/* .mode-bar also has .rv, whose transition list would drop the collapse
   transition; restated here with higher specificity. */
.mode-bar.rv {
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 0.7s ease,
    height 0.42s cubic-bezier(0.3, 0.85, 0.25, 1),
    margin 0.42s cubic-bezier(0.3, 0.85, 0.25, 1);
}
.mode-bar.rv.in {
  transition:
    height 0.42s cubic-bezier(0.3, 0.85, 0.25, 1),
    opacity 0.26s ease 0.06s,
    margin 0.42s cubic-bezier(0.3, 0.85, 0.25, 1);
}
.mode-bar.rv.in.hid {
  transition:
    height 0.42s cubic-bezier(0.3, 0.85, 0.25, 1),
    opacity 0.2s ease,
    margin 0.42s cubic-bezier(0.3, 0.85, 0.25, 1);
}

/* headline rises word by word */
.wsplit {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.16em;
  margin-bottom: -0.16em;
}
.wsplit > i {
  display: inline-block;
  font-style: inherit;
  transform: translateY(110%);
  opacity: 0;
  transition:
    transform 0.8s cubic-bezier(0.2, 0.85, 0.2, 1),
    opacity 0.55s ease;
  transition-delay: calc(var(--w, 0) * 55ms);
}
.vw-head h1.in .wsplit > i {
  transform: none;
  opacity: 1;
}

/* toolbar pieces cascade in */
.tb.in .tb-layers button {
  animation: tbIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 45ms + 120ms);
}
.tb.in .tb-sub button {
  animation: tbIn 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 40ms + 260ms);
}
@keyframes tbIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
/* Pills appear first, then the active block slides in. animation-fill
   both keeps the initial state during the delay. */
.tb.in .tb-sub-thumb {
  animation: subPick 0.66s cubic-bezier(0.2, 0.9, 0.25, 1) both;
  animation-delay: 0.66s;
}
/* Block reveal via opacity, filter and box-shadow (transform and width are
   set by moveThumb; clip-path would cut the glow). */
@keyframes subPick {
  0% {
    opacity: 0;
    filter: blur(7px) saturate(1.7);
  }
  46% {
    opacity: 1;
  }
  64% {
    filter: blur(0) saturate(1.3);
    box-shadow:
      inset 0 1px 0 rgba(255, 214, 190, 0.55),
      inset 0 0 0 0.5px rgba(255, 178, 140, 0.62),
      0 0 26px -2px rgba(226, 90, 31, 0.9);
  }
  100% {
    opacity: 1;
    filter: none;
    box-shadow:
      inset 0 1px 0 rgba(255, 200, 170, 0.22),
      inset 0 0 0 0.5px rgba(255, 150, 110, 0.3),
      0 0 14px -4px rgba(226, 90, 31, 0.5);
  }
}
body.fc .tb.in .tb-sub-thumb {
  animation-name: subPickFc;
}
/* After the intro the block animation is removed, otherwise switching mode
   (subPick -> subPickFc) restarts it. */
.tb.in .tb-sub-thumb.settled {
  animation: none;
}
@keyframes subPickFc {
  0% {
    opacity: 0;
    filter: blur(7px) saturate(1.7);
  }
  46% {
    opacity: 1;
  }
  64% {
    filter: blur(0) saturate(1.3);
    box-shadow:
      inset 0 1px 0 rgba(255, 238, 205, 0.55),
      inset 0 0 0 0.5px rgba(245, 205, 140, 0.62),
      0 0 26px -2px rgba(240, 165, 40, 0.9);
  }
  100% {
    opacity: 1;
    filter: none;
    box-shadow:
      inset 0 1px 0 rgba(255, 225, 180, 0.22),
      inset 0 0 0 0.5px rgba(255, 200, 110, 0.3),
      0 0 14px -4px rgba(240, 165, 40, 0.5);
  }
}

/* the rule under the label draws itself outward once the block has landed */
.tb.in .tb-sub-thumb::after {
  animation: subRule 0.46s cubic-bezier(0.2, 0.9, 0.25, 1) both;
  animation-delay: 0.95s;
}
@keyframes subRule {
  from {
    opacity: 0;
    transform: scaleX(0);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

/* the rail's top-edge light belongs to the lit block: it fades in with it
   (same delay, same curve, same flare at 64%) instead of showing on an empty
   rail first. Keyed on the block not having settled yet, so it plays again
   whenever a layer change brings in a new block. */
.tb.in .tb-sub:has(.tb-sub-thumb:not(.settled))::before {
  animation: subEdge 0.66s cubic-bezier(0.2, 0.9, 0.25, 1) both;
  animation-delay: 0.66s;
}
@keyframes subEdge {
  0% {
    opacity: 0;
  }
  46% {
    opacity: 0.85;
  }
  64% {
    opacity: 1;
    filter: brightness(1.6);
  }
  100% {
    opacity: 1;
    filter: none;
  }
}

/* and a single specular pass crosses it, clipped to the block's own corners */
.tb.in .tb-sub-thumb {
  overflow: hidden;
}
.tb.in .tb-sub-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    transparent 36%,
    rgba(255, 231, 214, 0.38) 50%,
    transparent 64%
  );
  animation: subSweep 0.78s cubic-bezier(0.35, 0.7, 0.25, 1) both;
  animation-delay: 0.86s;
}
@keyframes subSweep {
  from {
    transform: translateX(-150%);
  }
  to {
    transform: translateX(150%);
  }
}

/* Scoped to .arrive. Keyed on .in it replayed on every click with a 660 ms dark delay. */
.tb.arrive .tb-sub button.on {
  animation:
    tbIn 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both,
    subLit 0.62s ease both;
  animation-delay: calc(var(--i, 0) * 40ms + 260ms), 0.66s;
}
/* Label brightens to near-white as the block lands, then settles. */
@keyframes subLit {
  0% {
    color: var(--tert);
  }
  58% {
    color: #fff3ee;
  }
  100% {
    color: #ffd0c0;
  }
}
body.fc .tb.arrive .tb-sub button.on {
  animation-name: tbIn, subLitFc;
}
/* .fresh: same entrance after a layer change; cleared once the block settles. */
.tb.in .tb-sub.fresh button.on {
  animation:
    tbIn 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both,
    subLit 0.62s ease both;
  animation-delay: calc(var(--i, 0) * 40ms + 260ms), 0.66s;
}
body.fc .tb.in .tb-sub.fresh button.on {
  animation-name: tbIn, subLitFc;
}
@keyframes subLitFc {
  0% {
    color: var(--tert);
  }
  58% {
    color: #fff8ea;
  }
  100% {
    color: #ffe7c2;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tb.in .tb-sub-thumb,
  .tb.in .tb-sub-thumb::before,
  .tb.in .tb-sub-thumb::after,
  .tb.arrive .tb-sub button.on,
  .tb.in .tb-sub.fresh button.on {
    animation: none;
  }
  .tb.in .tb-sub::before {
    animation: none !important;
  }
  .tb.in .tb-sub-thumb::before {
    display: none;
  }
}

/* map chrome settles after the map itself */
/* Own reveal for the centred hint (the shared keyframe's transform:none
   would remove the translateX(-50%)). */
.vw.in .m-badge,
.vw.in .m-legend,
.vw.in .m-zoom,
.vw.in .m-zbadge {
  animation: chromeIn 0.55s ease both;
}
.vw.in .m-hint {
  animation: hintIn 0.55s ease both;
}
@keyframes hintIn {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
.vw.in .m-date {
  animation-delay: 0.3s;
}
.vw.in .m-live {
  animation-delay: 0.38s;
}
.vw.in .m-zoom {
  animation-delay: 0.46s;
}
.vw.in .m-zbadge {
  animation-delay: 0.54s;
}
.vw.in .m-legend {
  animation-delay: 0.62s;
}
.vw.in .m-hint {
  animation-delay: 0.85s;
}
@keyframes chromeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* the map fades up from black on first paint */
.m-stage {
  opacity: 0;
  transition: opacity 0.9s ease 0.1s;
}
.vw.in .m-stage {
  opacity: 1;
}
/* page shows as soon as the DOM is ready; only the map waits for its first plate */
/* !important: the opacity slider sets an inline opacity on the stage, which
   would otherwise beat both rules and keep the map from fading in */
#mStage.td-mapwait,
.vw:not(.in) .m-stage {
  opacity: 0 !important;
}
/* nav and footer had no entrance; nav fades in with the page uncloak */
body.booting nav {
  opacity: 0;
}
nav {
  animation: navIn 0.6s ease both;
}
@keyframes navIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  nav {
    animation: none;
  }
}

/* switching layer cross-fades the map */

@media (prefers-reduced-motion: reduce) {
  .rv,
  .wsplit > i {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
  .tb.in .tb-layers button,
  .tb.in .tb-sub button,
  .vw.in .m-badge,
  .vw.in .m-legend,
  .vw.in .m-zoom,
  .vw.in .m-zbadge,
  .vw.in .m-hint {
    animation: none;
  }
  .m-stage {
    opacity: 1;
    transition: none;
  }
}

/* Original style section 9; order preserved. */

/* ================= forecast: page-wide accent shift ================= */

/* the whole palette warms toward amber */
body.fc {
  --orange: #f0a528;
}

/* everything that carries the accent cross-fades with it */
.tb,
.vw,
.vw-time,
.m-wrap,
.tb-picker,
.tb-layers button,
.tb-sub button,
.tb-icon,
.tb-toggle .sw,
.m-btn,
.m-badge,
.m-legend,
.m-zbadge,
.tb-prog span,
.tb-nudge,
.vw-ctrl button,
nav,
footer {
  transition:
    background 0.45s ease,
    background-color 0.45s ease,
    border-color 0.45s ease,
    box-shadow 0.45s ease,
    color 0.45s ease;
}

/* the sliding block keeps its movement, and merely tints with the palette */
.tb-sub-thumb {
  transition:
    transform 0.26s cubic-bezier(0.2, 0.9, 0.25, 1),
    width 0.26s cubic-bezier(0.2, 0.9, 0.25, 1),
    opacity 0.18s ease,
    background 0.45s ease,
    box-shadow 0.45s ease;
}

/* panels */

/* layer rail */
body.fc .tb-layers button.on {
  background: rgba(255, 190, 90, 0.85);
  color: #ffe7c2;
}
body.fc .tb-layers button.on::before {
  background:
    linear-gradient(180deg, rgba(240, 165, 40, 0.24), rgba(240, 165, 40, 0.1)),
    linear-gradient(180deg, #191309, #150f07);
}
body.fc .tb-layers button.on i {
  color: #ffbf5e;
}
body.fc .tb-layers button.on::after {
  background: linear-gradient(
    100deg,
    transparent 22%,
    rgba(255, 220, 160, 0.13) 50%,
    transparent 74%
  );
}

/* range gauge */
body.fc .tb-sub button.on {
  color: #ffe7c2;
}
body.fc .tb-sub-thumb {
  background: linear-gradient(180deg, rgba(240, 165, 40, 0.34), rgba(160, 100, 20, 0.26));
  box-shadow:
    inset 0 1px 0 rgba(255, 225, 180, 0.22),
    inset 0 0 0 0.5px rgba(255, 200, 110, 0.3),
    0 0 14px -4px rgba(240, 165, 40, 0.5);
}
body.fc .tb-sub-thumb::after {
  background: rgba(255, 232, 200, 0.75);
  box-shadow: 0 0 6px rgba(240, 165, 40, 0.6);
}

/* controls */
body.fc .tb-icon.on {
  background: rgba(240, 165, 40, 0.22);
  border-color: rgba(240, 165, 40, 0.42);
  color: #ffe7c2;
}
body.fc .tb-icon:hover {
  background: rgba(240, 165, 40, 0.2);
  color: #ffe7c2;
}
body.fc .tb-toggle.on {
  color: #ffe0ad;
}
body.fc .tb-toggle.on .sw {
  background: linear-gradient(180deg, rgba(240, 165, 40, 0.55), rgba(170, 105, 20, 0.42));
  box-shadow:
    inset 0 0 0 0.5px rgba(255, 200, 110, 0.42),
    0 0 12px -3px rgba(240, 165, 40, 0.7);
}
body.fc .tb-toggle.on .sw::after {
  background: linear-gradient(180deg, #fff6e6, #ffd79a);
}
body.fc .m-btn:hover {
  background: rgba(240, 165, 40, 0.4);
}
body.fc .tb-prog span {
  background: linear-gradient(
    90deg,
    rgba(240, 165, 40, 0.85),
    rgba(255, 232, 200, 0.95),
    rgba(240, 165, 40, 0.85)
  );
  box-shadow: 0 0 8px rgba(240, 165, 40, 0.5);
}
body.fc .tb-nudge:hover {
  background: rgba(240, 165, 40, 0.26);
  border-color: rgba(240, 165, 40, 0.42);
}
body.fc .vw-ctrl button:hover {
  background: rgba(240, 165, 40, 0.24);
  color: #ffe7c2;
}

/* map chrome + accent text */
body.fc .m-zbadge {
  color: #ffd79a;
}
body.fc .m-read-val {
  color: #ffd79a;
}
body.fc .m-legend h5 {
  color: rgba(255, 215, 154, 0.75);
}
body.fc .tb-picker {
  background: rgba(255, 190, 110, 0.5);
  color: #ffe7c2;
}
body.fc .tb-picker::before {
  background:
    linear-gradient(180deg, rgba(240, 165, 40, 0.24), rgba(240, 165, 40, 0.1)),
    linear-gradient(180deg, #191309, #150f07);
}
body.fc .tb-picker-in i,
body.fc .tb-picker-chev {
  color: #ffbf5e;
}

/* chrome shell */
body.fc .m-live i {
  background: #f0a528;
}

/* a brief sweep confirms the change */

@media (prefers-reduced-motion: reduce) {
  body,
  .mode-flash,
  .tb,
  .vw,
  .vw-time {
    transition: none;
    animation: none;
  }
}

/* Original style section 10; order preserved. */

/* ================= forecast: map frame + transition ================= */

/* panels ease between palettes */
.vw,
.tb,
.vw-time,
.m-wrap {
  transition:
    border-color 0.55s ease,
    box-shadow 0.55s ease,
    background 0.55s ease;
}
/* the gap under the timeline eases with the overview band folding in and out */
.vw-time {
  transition:
    border-color 0.55s ease,
    box-shadow 0.55s ease,
    background 0.55s ease,
    margin-bottom 0.5s cubic-bezier(0.3, 0.8, 0.3, 1);
}
@media (prefers-reduced-motion: reduce) {
  .vw-time {
    transition: none;
  }
}
/* The two rules above replace the .rv transition list, so it is restated
   here to keep the map card, toolbar and timeline fading in. */
.vw.rv,
.tb.rv {
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 0.7s ease,
    border-color 0.55s ease,
    box-shadow 0.55s ease,
    background 0.55s ease;
}
.vw-time.rv {
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 0.7s ease,
    border-color 0.55s ease,
    box-shadow 0.55s ease,
    background 0.55s ease,
    margin-bottom 0.5s cubic-bezier(0.3, 0.8, 0.3, 1);
}

body.fc .vw {
  border-color: rgba(240, 165, 40, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 225, 180, 0.08),
    0 0 22px -10px rgba(240, 165, 40, 0.28),
    0 18px 46px -22px rgba(0, 0, 0, 0.75);
}
body.fc .tb,
body.fc .vw-time,
body.fc .gr-card {
  border-color: rgba(240, 165, 40, 0.2);
}
body.fc .gr-card {
  background: rgba(28, 18, 8, 0.58);
}
body.fc .gr-eyebrow {
  color: #e2bd8c;
}
body.fc .gr-eyebrow::before {
  background: linear-gradient(90deg, rgba(240, 165, 40, 0.15), #ffc46e);
  box-shadow: 0 0 2px rgba(240, 165, 40, 0.25);
}

/* a light runs around the map frame when the mode changes */
.vw {
  position: relative;
}
.vw::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 12px;
  pointer-events: none;
  z-index: 5;
  padding: 1.2px;
  opacity: 0;
  background: conic-gradient(
    from var(--sweep, 0deg),
    transparent 0deg,
    rgba(240, 165, 40, 0.6) 31deg,
    rgba(255, 232, 200, 0.82) 49deg,
    rgba(240, 165, 40, 0.6) 67deg,
    transparent 102deg
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
}

@property --sweep {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.vw.sweeping::after {
  animation: frameSweep 1.2s cubic-bezier(0.35, 0, 0.25, 1);
}
@keyframes frameSweep {
  0% {
    opacity: 0;
    --sweep: 0deg;
  }
  13% {
    opacity: 1;
  }
  82% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    --sweep: 360deg;
  }
}
/* browsers without @property still get a clean pulse */
@supports not (background: conic-gradient(from var(--x, 0deg), red, blue)) {
  .vw.sweeping::after {
    background: linear-gradient(90deg, transparent, rgba(240, 165, 40, 0.7), transparent);
    animation: framePulse 1s ease-out;
  }
  @keyframes framePulse {
    0% {
      opacity: 0;
    }
    30% {
      opacity: 0.9;
    }
    100% {
      opacity: 0;
    }
  }
}

/* monitoring uses the red version of the same sweep */
body:not(.fc) .vw::after {
  background: conic-gradient(
    from var(--sweep, 0deg),
    transparent 0deg,
    rgba(226, 90, 31, 0.58) 31deg,
    rgba(255, 214, 198, 0.8) 49deg,
    rgba(226, 90, 31, 0.58) 67deg,
    transparent 102deg
  );
}

/* the timeline accent slides across rather than snapping */
.vw-time input[type='range']::-webkit-slider-thumb {
  transition:
    background 0.45s ease,
    box-shadow 0.45s ease;
}
.vw-time input[type='range']::-moz-range-thumb {
  transition: background 0.45s ease;
}
.vw-time-kind,
.vw-time-date span {
  transition: color 0.45s ease;
}

@media (prefers-reduced-motion: reduce) {
  .vw.sweeping::after {
    animation: none;
    opacity: 0;
  }
}

/* Original style section 11; order preserved. */

/* forecast: page background shifts to a warm bronze-navy */
body {
  transition: background-color 0.6s ease;
}
body.fc {
  background-color: #0b0c14;
  background-image:
    radial-gradient(
      900px 600px at 72% 8%,
      rgba(240, 165, 40, 0.09) 0%,
      rgba(240, 165, 40, 0.0864) 7.44%,
      rgba(240, 165, 40, 0.0759) 15.5%,
      rgba(240, 165, 40, 0.0609) 23.56%,
      rgba(240, 165, 40, 0.045) 31%,
      rgba(240, 165, 40, 0.0291) 38.44%,
      rgba(240, 165, 40, 0.0141) 46.5%,
      rgba(240, 165, 40, 0.0036) 54.56%,
      rgba(240, 165, 40, 0) 62%
    ),
    radial-gradient(
      800px 620px at 10% 90%,
      rgba(180, 120, 40, 0.05) 0%,
      rgba(180, 120, 40, 0.048) 7.68%,
      rgba(180, 120, 40, 0.0422) 16%,
      rgba(180, 120, 40, 0.0338) 24.32%,
      rgba(180, 120, 40, 0.025) 32%,
      rgba(180, 120, 40, 0.0162) 39.68%,
      rgba(180, 120, 40, 0.0078) 48%,
      rgba(180, 120, 40, 0.002) 56.32%,
      rgba(180, 120, 40, 0) 64%
    ),
    linear-gradient(180deg, #0d0c10, #08080d) !important;
}

/* Original style section 12; order preserved. */

/* forecast: the map canvas and country fills warm as well */
/* All surfaces transition at the same pace as the raster dissolve. */
.m-wrap,
.m-stage path,
.m-stage #mLines path,
.m-wrap::after {
  transition-duration: 0.42s !important;
  transition-timing-function: cubic-bezier(0.33, 0, 0.2, 1) !important;
}
body.fcskin .m-wrap {
  background: radial-gradient(680px 420px at 50% 42%, #16120d, #0a0805 70%);
}
.m-stage path {
  transition:
    fill 0.45s ease,
    opacity 0.25s ease;
}
body.fcskin .m-stage path {
  fill: #2b2419;
  stroke: #4a4033;
}
body.fcskin .m-wrap.noborders .m-stage path {
  stroke: none !important;
  stroke-width: 0 !important;
}
body.fcskin .m-stage path:hover {
  fill: #3a3123;
}
body.fcskin .m-wrap.noborders .m-stage path:hover {
  fill: #453b2c;
}

/* Original style section 13; order preserved. */

@media (max-width: 700px) {
  .mode-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
    margin-bottom: 12px;
  }
  .vw-mode {
    width: 100%;
  }
  .vw-mode button {
    flex: 1;
    justify-content: center;
    padding: 12px 10px;
  }
  .mode-help {
    font-size: 12px;
  }
}

/* Original style section 14; order preserved. */

body.fc .vw-mode button.on {
  color: #fff3dc;
}
body.fc .vw-mode button.on i {
  color: #f5d69a;
}

/* Original style section 15; order preserved. */

/* forecast: hover glows warm, not red */
body.fc .tb-icon:hover {
  background: rgba(240, 165, 40, 0.3);
  border-color: rgba(240, 165, 40, 0.6);
  box-shadow: 0 0 14px -4px rgba(240, 165, 40, 0.75);
  color: #fff;
}
body.fc .tb-icon {
  color: #ffe0ad;
  background: rgba(240, 165, 40, 0.16);
  border-color: rgba(240, 165, 40, 0.4);
}
body.fc .tb-icon.on {
  background: rgba(240, 165, 40, 0.4);
  border-color: rgba(240, 165, 40, 0.72);
  color: #fff;
}
body.fc .tb-layers button:hover {
  box-shadow: 0 0 14px -6px rgba(240, 165, 40, 0.6);
}
body.fc .m-btn:hover {
  box-shadow: 0 0 14px -4px rgba(240, 165, 40, 0.7);
}
body.fc .tb-nudge:hover {
  box-shadow: 0 0 12px -4px rgba(240, 165, 40, 0.65);
}
body.fc .vw-ctrl button:hover {
  box-shadow: 0 0 12px -4px rgba(240, 165, 40, 0.65);
}
body.fc .ct-mail:hover {
  box-shadow: 0 0 14px -4px rgba(240, 165, 40, 0.6);
}
body.fc .tb-picker:hover {
  box-shadow: 0 0 16px -5px rgba(240, 165, 40, 0.7);
}

/* Original style section 16; order preserved. */

/* About layer leads, Search sits back as a secondary action */
.tb-icon.tb-quiet {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}
.tb-icon.tb-quiet:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: none;
}
.tb-icon.tb-quiet.on {
  background: rgba(226, 59, 46, 0.26);
  border-color: rgba(226, 59, 46, 0.5);
  color: #ffd9cf;
}
body.fc .tb-icon.tb-quiet {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}
body.fc .tb-icon.tb-quiet:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
  box-shadow: none;
}
body.fc .tb-icon.tb-quiet.on {
  background: rgba(240, 165, 40, 0.34);
  border-color: rgba(240, 165, 40, 0.62);
  color: #fff;
}

.tb-icon.tb-primary {
  font-weight: 700;
}

/* keep the action group from crowding the row:
   search collapses to a round icon, labels drop earlier */
.tb-icon.tb-mini {
  width: 32px;
  padding: 0;
  justify-content: center;
  gap: 0;
}
.tb-icon.tb-mini span {
  display: none;
}
.tb-right {
  gap: 7px;
  padding-left: 11px;
}
@media (max-width: 1180px) {
  .tb-icon span {
    display: none;
  }
  .tb-icon {
    width: 32px;
    padding: 0;
    justify-content: center;
    gap: 0;
  }
}
@media (max-width: 1080px) {
  .tb-op input[type='range'] {
    width: 72px;
  }
}
@media (pointer: coarse) {
  .tb-icon {
    width: auto;
    height: 38px;
  }
  .tb-icon.tb-mini {
    width: 38px;
  }
}
@media (pointer: coarse) and (max-width: 1180px) {
  .tb-icon.tb-mini {
    width: 38px;
  }
}

/* Original style section 17; order preserved. */

/* mode switch inside the map, fullscreen only */
.m-mode {
  position: relative;
  z-index: 1;
  display: none;
  gap: 0;
  padding: 4px;
  border-radius: 99px;
  isolation: isolate;
  flex: none;
  background: rgba(22, 12, 13, 0.82);
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  box-shadow: 0 6px 20px -8px rgba(0, 0, 0, 0.9);
}
.m-wrap.pseudo-full .m-mode,
.m-wrap:fullscreen .m-mode {
  display: inline-flex;
}
.m-mode button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font: inherit;
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    Menlo,
    monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 9px 16px;
  border-radius: 99px;
  background: transparent;
  color: var(--muted);
  transition: color 0.18s ease;
}
.m-mode button i {
  font-size: 10px;
  opacity: 0.75;
}
.m-mode button.on {
  color: #fff1eb;
}
.m-mode button.on i {
  opacity: 1;
  color: #ffd0bb;
}
.m-mode button[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}
.m-mode-thumb {
  position: absolute;
  z-index: -1;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(180deg, #c65c33, #98301b);
  box-shadow:
    inset 0 1px 0 rgba(255, 208, 180, 0.3),
    0 0 14px -4px rgba(226, 90, 31, 0.6);
  transition:
    transform 0.28s cubic-bezier(0.2, 0.9, 0.25, 1),
    width 0.28s cubic-bezier(0.2, 0.9, 0.25, 1),
    background 0.45s ease,
    box-shadow 0.45s ease;
}
body.fc .m-mode-thumb {
  background: linear-gradient(180deg, #cf9433, #a06a17);
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 205, 0.32),
    0 0 14px -4px rgba(240, 165, 40, 0.6);
}
body.fc .m-mode button.on {
  color: #fff3dc;
}
body.fc .m-mode button.on i {
  color: #f5d69a;
}
/* ---- Fullscreen dock ----
   Bottom centre, away from the browser's Esc notice at the top. Rails scroll
   horizontally instead of overlapping the legend. */
.m-dock {
  position: absolute;
  z-index: 9;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 9px;
  flex-wrap: nowrap;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 99px;
  width: min(620px, calc(100% - 320px));
  background: rgba(22, 12, 13, 0.8);
  border: 0.5px solid rgba(255, 255, 255, 0.13);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 10px 34px -12px rgba(0, 0, 0, 0.9);
}
.m-wrap.pseudo-full .m-dock,
.m-wrap:fullscreen .m-dock {
  display: flex;
}
.m-dock-date {
  flex: none;
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    Menlo,
    monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  min-width: 64px;
}
.m-dock-ctrl {
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.m-dock-ctrl button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 10px;
  transition:
    background 0.18s ease,
    color 0.18s ease;
}
.m-dock-ctrl button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--ink);
}
.m-dock-ctrl #mDockPlay {
  width: 38px;
  height: 38px;
  font-size: 12px;
  color: #fff1eb;
  background: linear-gradient(180deg, #c65c33, #98301b);
  border-color: rgba(255, 180, 150, 0.28);
}
body.fc .m-dock-ctrl #mDockPlay {
  background: linear-gradient(180deg, #cf9433, #a06a17);
  border-color: rgba(255, 220, 160, 0.3);
}
/* the browser default slider is blue and nothing else here is */
#mDockTl {
  -webkit-appearance: none;
  appearance: none;
  flex: 1 1 auto;
  min-width: 60px;
  height: 4px;
  margin: 0;
  border-radius: 99px;
  outline: none;
  cursor: pointer;
  background: linear-gradient(
    90deg,
    rgba(226, 90, 31, 0.75) 0%,
    rgba(226, 90, 31, 0.75) var(--p, 100%),
    rgba(255, 255, 255, 0.13) var(--p, 100%),
    rgba(255, 255, 255, 0.13) 100%
  );
}
#mDockTl::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--orange);
  cursor: pointer;
  border: 2px solid rgba(22, 12, 13, 0.9);
  box-shadow: 0 0 10px -2px rgba(226, 59, 46, 0.9);
}
#mDockTl::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(22, 12, 13, 0.9);
  border-radius: 50%;
  background: var(--orange);
  cursor: pointer;
}
#mDockTl::-moz-range-track {
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.13);
}
body.fc #mDockTl {
  background: linear-gradient(
    90deg,
    rgba(240, 165, 40, 0.75) 0%,
    rgba(240, 165, 40, 0.75) var(--p, 100%),
    rgba(255, 255, 255, 0.13) var(--p, 100%),
    rgba(255, 255, 255, 0.13) 100%
  );
}
body.fc #mDockTl::-webkit-slider-thumb {
  background: #f0a528;
  box-shadow: 0 0 10px -2px rgba(240, 165, 40, 0.9);
}
body.fc #mDockTl::-moz-range-thumb {
  background: #f0a528;
}

/* mode switch: a small instrument read-out, not a page-sized pill */
.m-dock-mode {
  flex: none;
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.34);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.1);
}
.m-dock-mode button {
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    Menlo,
    monospace;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 6px 9px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  color: var(--tert);
  background: transparent;
  position: relative;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}
.m-dock-mode button:hover:not([disabled]) {
  color: var(--muted);
}
.m-dock-mode button.on {
  color: #ffd0c0;
  background: rgba(226, 90, 31, 0.3);
  box-shadow:
    inset 0 0 0 0.5px rgba(255, 150, 110, 0.42),
    0 0 10px -3px rgba(226, 90, 31, 0.85);
}
body.fc .m-dock-mode button.on {
  color: #ffe0ad;
  background: rgba(240, 165, 40, 0.28);
  box-shadow:
    inset 0 0 0 0.5px rgba(240, 190, 110, 0.42),
    0 0 10px -3px rgba(240, 165, 40, 0.85);
}
.m-dock-mode button[disabled] {
  opacity: 0.3;
  cursor: not-allowed;
}
.m-dock-sep {
  flex: none;
  width: 1px;
  align-self: stretch;
  margin: 4px 0;
  background: rgba(255, 255, 255, 0.12);
}

/* layer stepping, placed at the two ends of the bar */
.m-dock-arrow {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 12px;
  position: relative;
  color: var(--tert);
  background: rgba(255, 255, 255, 0.05);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  transition:
    color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}
.m-dock-arrow:hover {
  color: #ffd0c0;
  background: rgba(226, 90, 31, 0.3);
  border-color: rgba(255, 150, 110, 0.4);
  box-shadow: 0 0 12px -3px rgba(226, 90, 31, 0.85);
}
body.fc .m-dock-arrow:hover {
  color: #ffe0ad;
  background: rgba(240, 165, 40, 0.28);
  border-color: rgba(240, 190, 110, 0.4);
  box-shadow: 0 0 12px -3px rgba(240, 165, 40, 0.85);
}
/* the name of the layer it would take you to */
.m-dock-arrow::after {
  content: attr(data-peek);
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%) translateY(3px);
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    Menlo,
    monospace;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #ffd0c0;
  padding: 5px 9px;
  border-radius: 99px;
  pointer-events: none;
  background: rgba(22, 12, 13, 0.94);
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}
.m-dock-arrow:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
body.fc .m-dock-arrow::after {
  color: #ffe0ad;
}
@media (max-width: 900px) {
  .m-dock-arrow::after {
    display: none;
  }
}
.m-dock-count {
  flex: none;
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    Menlo,
    monospace;
  font-size: 10px;
  color: var(--tert);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .m-dock {
    width: calc(100% - 24px);
    gap: 9px;
    padding: 7px 10px;
  }
  .m-dock-date {
    font-size: 10px;
    min-width: 0;
  }
  .m-dock-count {
    display: none;
  }
}
/* ---- Fullscreen overlay toggles ----
   Borders/Names continue the zoom button rail (top 60px + 4 x 36px + 3 x 6px =
   222px), separated by a divider. */
.m-ov {
  position: absolute;
  z-index: 8;
  top: 188px;
  right: 16px;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.m-wrap.pseudo-full .m-ov,
.m-wrap:fullscreen .m-ov {
  display: flex;
}
.m-ov::before {
  content: '';
  width: 20px;
  height: 1px;
  margin-bottom: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
}

.m-ov-b {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  color: var(--tert);
  display: grid;
  place-items: center;
  background: rgba(22, 12, 13, 0.82);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition:
    color 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.28s ease,
    transform 0.12s ease;
}
.m-ov-b:active {
  transform: scale(0.92);
}
.m-ov-b:focus-visible {
  outline: 2px solid rgba(255, 150, 110, 0.6);
  outline-offset: 2px;
}
.m-ov-b i {
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}
/* Off state: icon dims and a slash is drawn across it. */
.m-ov-b:not(.on) i {
  opacity: 0.42;
}
.m-ov-b::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 21px;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(22, 12, 13, 0.75);
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-45deg) scaleX(0);
  transition:
    opacity 0.18s ease,
    transform 0.3s cubic-bezier(0.2, 0.9, 0.25, 1);
}
.m-ov-b:not(.on)::before {
  opacity: 0.8;
  transform: translate(-50%, -50%) rotate(-45deg) scaleX(1);
}
.m-ov-b:hover {
  color: var(--muted);
}
.m-ov-b.on {
  color: #ffd0c0;
  border-color: rgba(255, 150, 110, 0.4);
  background: linear-gradient(180deg, rgba(226, 90, 31, 0.34), rgba(140, 38, 18, 0.24));
  box-shadow:
    inset 0 1px 0 rgba(255, 190, 160, 0.22),
    0 0 15px -4px rgba(226, 90, 31, 0.95);
}
body.fc .m-ov-b.on {
  color: #ffe0ad;
  border-color: rgba(240, 190, 110, 0.42);
  background: linear-gradient(180deg, rgba(240, 165, 40, 0.3), rgba(150, 95, 15, 0.24));
  box-shadow:
    inset 0 1px 0 rgba(255, 225, 170, 0.22),
    0 0 15px -4px rgba(240, 165, 40, 0.95);
}

/* status LED, the same language as the near-real-time badge */
.m-ov-b .led {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition:
    background 0.28s ease,
    box-shadow 0.28s ease;
}
.m-ov-b.on .led {
  background: var(--orange);
  box-shadow: 0 0 6px 1px rgba(226, 59, 46, 0.85);
}
body.fc .m-ov-b.on .led {
  background: #f0a528;
  box-shadow: 0 0 6px 1px rgba(240, 165, 40, 0.85);
}

/* hover label, same as on the dock's layer arrows */
.m-ov-b::after {
  content: attr(data-tip);
  position: absolute;
  right: calc(100% + 9px);
  top: 50%;
  transform: translateY(-50%) translateX(3px);
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    Menlo,
    monospace;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #ffd0c0;
  padding: 5px 9px;
  border-radius: 5px;
  pointer-events: none;
  background: rgba(22, 12, 13, 0.94);
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}
.m-ov-b:hover::after,
.m-ov-b:focus-visible::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
body.fc .m-ov-b::after {
  color: #ffe0ad;
}
/* First fullscreen visit: labels shown once, staggered. */
.m-ov.peek .m-ov-b::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
.m-ov.peek .m-ov-b + .m-ov-b::after {
  transition-delay: 0.12s;
}
@media (prefers-reduced-motion: reduce) {
  .m-ov-b,
  .m-ov-b i,
  .m-ov-b .led,
  .m-ov-b::before,
  .m-ov-b::after {
    transition: none;
  }
}
/* Below 700px the zoom stack is a row at the bottom; the toggles move under
   the date badge, horizontally. */
@media (max-width: 700px) {
  .m-ov {
    top: 52px;
    left: 10px;
    right: auto;
    flex-direction: row;
    gap: 7px;
  }
  .m-ov::before {
    display: none;
  }
  .m-ov-b {
    width: 34px;
    height: 34px;
    border-radius: 5px;
  }
  /* no room to the left down here, so the label drops underneath */
  .m-ov-b::after {
    right: auto;
    left: 50%;
    top: calc(100% + 7px);
    transform: translateX(-50%) translateY(-3px);
  }
  .m-ov-b:hover::after,
  .m-ov-b:focus-visible::after {
    transform: translateX(-50%) translateY(0);
  }
  /* No first-run label peek here (labels wider than the gap). */
  .m-ov.peek .m-ov-b::after {
    opacity: 0;
    transform: translateX(-50%) translateY(-3px);
  }
}

/* overlay switches: one row of shells on desktop, a menu behind one button on
   a phone */
.m-ov-menu {
  display: contents;
}
.m-ov-t {
  display: none;
}
@media (pointer: coarse) and (max-width: 900px), (pointer: coarse) and (max-height: 500px) {
  .m-ov-t {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    color: #ffd0c0;
    background: rgba(22, 12, 13, 0.82);
    border: 0.5px solid rgba(255, 150, 110, 0.4);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
  .m-ov.open .m-ov-t {
    background: linear-gradient(180deg, rgba(226, 90, 31, 0.34), rgba(140, 38, 18, 0.24));
  }
  .m-ov::before {
    display: none;
  }
  .m-ov-menu {
    display: none;
    position: absolute;
    flex-direction: column;
    gap: 4px;
    padding: 6px;
    border-radius: 5px;
    background: rgba(22, 12, 13, 0.92);
    border: 0.5px solid rgba(255, 255, 255, 0.14);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow: 0 14px 34px -12px rgba(0, 0, 0, 0.9);
  }
  .m-ov.open .m-ov-menu {
    display: flex;
  }
  /* rows with their words, the label pseudo-element set in the flow */
  .m-ov-menu .m-ov-b {
    width: auto;
    height: 34px;
    padding: 0 12px 0 10px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 9px;
    justify-content: flex-start;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .m-ov-menu .m-ov-b::before {
    left: 20px;
  }
  .m-ov-menu .m-ov-b::after,
  .m-ov.peek .m-ov-menu .m-ov-b::after {
    position: static;
    opacity: 1;
    transform: none;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    font-size: 9px;
    transition: none;
  }
  .m-ov-menu .m-ov-b .led {
    position: static;
    flex: none;
    margin-left: auto;
    order: 3;
  }
}
/* the rail on the right (turned phone): the menu opens to its left */
@media (pointer: coarse) and (max-height: 500px) and (orientation: landscape) {
  .m-ov-menu {
    top: 0;
    right: calc(100% + 8px);
  }
}
/* the row under the date (upright phone): the menu drops below */
@media (pointer: coarse) and (max-width: 700px) and (orientation: portrait) {
  .m-ov-menu {
    top: calc(100% + 8px);
    left: 0;
  }
}

/* the hint would sit under the dock, so it is hidden in fullscreen */
.m-wrap.pseudo-full .m-hint,
.m-wrap:fullscreen .m-hint {
  display: none;
}

/* ---- Fullscreen legend ----
   About the dock's height, on the same bottom line, narrow enough to clear the centred dock. */
.m-wrap.pseudo-full .m-legend,
.m-wrap:fullscreen .m-legend {
  bottom: 16px;
  padding: 7px 12px 6px;
  border-radius: 12px;
}
.m-wrap.pseudo-full .m-legend h5,
.m-wrap:fullscreen .m-legend h5 {
  font-size: 7px;
  margin-bottom: 4px;
  letter-spacing: 0.1em;
}
.m-wrap.pseudo-full .lg-bar,
.m-wrap:fullscreen .lg-bar {
  height: 8px;
  border-radius: 2px;
}
.m-wrap.pseudo-full .lg-ticks,
.m-wrap:fullscreen .lg-ticks {
  margin-top: 3px;
  height: 12px;
}
.m-wrap.pseudo-full .lg-bar.wide,
.m-wrap:fullscreen .lg-bar.wide,
.m-wrap.pseudo-full .lg-ticks.cats,
.m-wrap:fullscreen .lg-ticks.cats {
  width: 344px;
}
.m-wrap.pseudo-full .lg-ticks.steps.cats b,
.m-wrap:fullscreen .lg-ticks.steps.cats b {
  font-size: 7px;
  line-height: 1.15;
}
@media (max-width: 700px) {
  /* down here the dock spans the width, so the legend keeps to the band above */
  .m-wrap.pseudo-full .m-legend,
  .m-wrap:fullscreen .m-legend {
    bottom: 82px;
  }
}
/* ---- Phones, fullscreen ----
   Portrait: dock on two rows, legend above it. Landscape: one row, legend moved
   up. Safe-area insets applied. */
@media (max-width: 700px) and (orientation: portrait) {
  .m-wrap.pseudo-full .m-dock,
  .m-wrap:fullscreen .m-dock {
    flex-wrap: wrap;
    row-gap: 8px;
    column-gap: 6px;
    justify-content: space-between;
    width: calc(100% - 20px);
    padding: 8px 10px 10px;
    border-radius: 11px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .m-wrap.pseudo-full .m-dock-sep,
  .m-wrap:fullscreen .m-dock-sep {
    display: none;
  }
  .m-wrap.pseudo-full .m-dock-arrow,
  .m-wrap:fullscreen .m-dock-arrow {
    width: 28px;
    height: 28px;
  }
  .m-wrap.pseudo-full .m-dock-mode button,
  .m-wrap:fullscreen .m-dock-mode button {
    padding: 6px 7px;
  }
  .m-wrap.pseudo-full .m-dock-date,
  .m-wrap:fullscreen .m-dock-date {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .m-wrap.pseudo-full .m-dock-ctrl button,
  .m-wrap:fullscreen .m-dock-ctrl button {
    width: 30px;
    height: 30px;
  }
  .m-wrap.pseudo-full .m-dock-ctrl #mDockPlay,
  .m-wrap:fullscreen .m-dock-ctrl #mDockPlay {
    width: 34px;
    height: 34px;
  }
  .m-wrap.pseudo-full #mDockTl,
  .m-wrap:fullscreen #mDockTl {
    order: 10;
    flex: 1 0 100%;
    margin: 4px 2px 2px;
  }
  .m-wrap.pseudo-full .m-legend,
  .m-wrap:fullscreen .m-legend {
    left: 10px;
    right: 10px;
    bottom: calc(104px + env(safe-area-inset-bottom, 0px));
  }
}
@media (max-height: 500px) and (orientation: landscape) and (pointer: coarse) {
  /* Legend and dock side by side at the bottom: legend up to 44% width on
     the left, dock the rest. */
  /* --lgl: legend uses the margin on the notch side (bottom corner is
     clear). */
  .m-wrap.pseudo-full,
  .m-wrap:fullscreen {
    --lgw: clamp(236px, 38vw, 300px);
    --lgl: max(8px, calc(env(safe-area-inset-left, 0px) - 28px));
  }
  .m-wrap.pseudo-full .m-legend,
  .m-wrap:fullscreen .m-legend {
    left: var(--lgl);
    right: auto;
    width: var(--lgw);
    box-sizing: border-box;
    padding: 6px 10px 5px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .m-wrap.pseudo-full .lg-bar,
  .m-wrap.pseudo-full .lg-bar.wide,
  .m-wrap:fullscreen .lg-bar,
  .m-wrap:fullscreen .lg-bar.wide,
  .m-wrap.pseudo-full .lg-ticks,
  .m-wrap.pseudo-full .lg-ticks.cats,
  .m-wrap:fullscreen .lg-ticks,
  .m-wrap:fullscreen .lg-ticks.cats {
    width: 100%;
  }
  .m-wrap.pseudo-full .m-dock,
  .m-wrap:fullscreen .m-dock {
    left: calc(var(--lgl) + var(--lgw) + 8px);
    right: calc(12px + env(safe-area-inset-right, 0px));
    width: auto;
    max-width: none;
    transform: none;
    gap: 6px;
    padding: 6px 9px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .m-wrap.pseudo-full #mDockTl,
  .m-wrap:fullscreen #mDockTl {
    flex: 1 1 auto;
    min-width: 40px;
  }
  .m-wrap.pseudo-full .m-dock-date,
  .m-wrap:fullscreen .m-dock-date {
    flex: none;
    min-width: 0;
  }
  /* class names stay whole: one line each, slightly smaller */
  .m-wrap.pseudo-full .lg-ticks.steps.cats b,
  .m-wrap:fullscreen .lg-ticks.steps.cats b {
    white-space: nowrap;
    font-size: 6px;
    letter-spacing: -0.01em;
  }
  @media (max-width: 800px) {
    .m-wrap.pseudo-full .lg-ticks.steps.cats b,
    .m-wrap:fullscreen .lg-ticks.steps.cats b {
      font-size: 5.5px;
    }
  }
  .m-wrap.pseudo-full .m-dock-count,
  .m-wrap:fullscreen .m-dock-count {
    display: none;
  }
  .m-wrap.pseudo-full .m-dock-sep,
  .m-wrap:fullscreen .m-dock-sep {
    display: none;
  }
  .m-wrap.pseudo-full .m-dock-arrow,
  .m-wrap:fullscreen .m-dock-arrow {
    width: 28px;
    height: 28px;
  }
  .m-wrap.pseudo-full .m-dock-ctrl button,
  .m-wrap:fullscreen .m-dock-ctrl button {
    width: 30px;
    height: 30px;
  }
  .m-wrap.pseudo-full .m-dock-ctrl #mDockPlay,
  .m-wrap:fullscreen .m-dock-ctrl #mDockPlay {
    width: 34px;
    height: 34px;
  }
  .m-wrap.pseudo-full .m-dock-mode button,
  .m-wrap:fullscreen .m-dock-mode button {
    padding: 6px 7px;
  }
  /* the zoom level is hidden at this size; the dock occupies that space */
  .m-wrap.pseudo-full .m-zbadge,
  .m-wrap:fullscreen .m-zbadge {
    display: none;
  }
  /* Badge and logos share a band here: the badge drops the exact timestamp and both are smaller. */
  .m-wrap.pseudo-full #mUpd,
  .m-wrap:fullscreen #mUpd {
    font-size: 9px;
    padding: 4px 9px;
    gap: 6px;
  }
  .m-wrap.pseudo-full #mUpd em,
  .m-wrap:fullscreen #mUpd em {
    display: none;
  }
  .m-wrap.pseudo-full #mUpd > i,
  .m-wrap:fullscreen #mUpd > i {
    width: 6px;
    height: 6px;
  }
  .m-wrap.pseudo-full .m-logos img,
  .m-wrap:fullscreen .m-logos img {
    height: 17px;
  }
  .m-wrap.pseudo-full .m-logos,
  .m-wrap:fullscreen .m-logos {
    top: 12px;
    gap: 8px;
  }
  .m-wrap.pseudo-full .lg-bar,
  .m-wrap.pseudo-full .lg-bar.wide,
  .m-wrap:fullscreen .lg-bar,
  .m-wrap:fullscreen .lg-bar.wide,
  .m-wrap.pseudo-full .lg-ticks,
  .m-wrap.pseudo-full .lg-ticks.cats,
  .m-wrap:fullscreen .lg-ticks,
  .m-wrap:fullscreen .lg-ticks.cats {
    width: 100%;
  }
}

/* the badges move aside so nothing collides */
.m-wrap.pseudo-full .m-date {
  top: 16px;
}
.m-wrap.pseudo-full .m-upd,
.m-wrap:fullscreen .m-upd {
  top: 52px;
}
.m-wrap.pseudo-full .m-live {
  top: 16px;
}
@media (max-width: 900px) {
  .m-mode button {
    padding: 8px 12px;
    font-size: 9px;
  }
}

/* Original style section 18; order preserved. */

/* the forecast palette must reach inside the fullscreen map too */
.m-wrap.pseudo-full,
.m-wrap:fullscreen {
  background: radial-gradient(680px 420px at 50% 42%, #10151f, #090b11 70%);
  transition: background 0.55s ease;
}
body.fcskin .m-wrap.pseudo-full,
body.fcskin .m-wrap:fullscreen {
  background: radial-gradient(680px 420px at 50% 42%, #1d150d, #0c0805 70%);
}
/* and a thin amber rule across the top makes the change obvious */
.m-wrap.pseudo-full::after,
.m-wrap:fullscreen::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  z-index: 8;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(226, 90, 31, 0.85), transparent);
  transition: background 0.5s ease;
}
body.fcskin .m-wrap.pseudo-full::after,
body.fcskin .m-wrap:fullscreen::after {
  background: linear-gradient(90deg, transparent, rgba(240, 165, 40, 0.9), transparent);
}
/* on a phone the rule is just a bright line across the notch: gone there */
@media (pointer: coarse) and (max-width: 900px), (pointer: coarse) and (max-height: 500px) {
  .m-wrap.pseudo-full::after,
  .m-wrap:fullscreen::after {
    display: none;
  }
}

/* Original style section 19; order preserved. */

/* ============ responsive hardening (shared across all pages) ============ */

/* never allow sideways scroll caused by a single wide child */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}
img {
  display: block;
}

/* long strings (emails, URLs, EPSG codes) must not push the layout */
p,
li,
dd,
td,
th,
a,
h1,
h2,
h3,
h4 {
  overflow-wrap: anywhere;
  word-break: normal;
}

/* ---- container padding scales down on small screens ---- */
@media (max-width: 1020px) {
  .wrap {
    padding-inline: 32px;
  }
}
@media (max-width: 760px) {
  .wrap {
    padding-inline: 26px;
  }
}
@media (max-width: 420px) {
  .wrap {
    padding-inline: 22px;
  }
}

/* full-bleed panels must never eat into the gutter on small screens */
@media (max-width: 900px) {
  .ct {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .lk a {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* slim, unobtrusive scrollbars for the horizontal strips */
.ds-list::-webkit-scrollbar,
.mv-side::-webkit-scrollbar,
.dx-strip::-webkit-scrollbar,
.tbl-scroll::-webkit-scrollbar {
  height: 6px;
}
.ds-list::-webkit-scrollbar-track,
.mv-side::-webkit-scrollbar-track,
.dx-strip::-webkit-scrollbar-track,
.tbl-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.ds-list::-webkit-scrollbar-thumb,
.mv-side::-webkit-scrollbar-thumb,
.dx-strip::-webkit-scrollbar-thumb,
.tbl-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 99px;
}

/* ---- Navigation below ~900px (six links don't fit) ---- */
@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 12px;
    right: 12px;
    background: rgba(22, 12, 13, 0.96);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    border-radius: 11px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    z-index: 60;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a {
    padding: 12px 14px;
  }
  .burger {
    display: block;
  }
  nav .nav-in {
    position: relative;
  }
}

/* ---- comfortable touch targets on finger-driven devices ---- */
@media (pointer: coarse) {
  .car-btn {
    width: 34px;
    height: 34px;
  }
  .chip,
  .pl-tab,
  .seg button,
  .mini-seg button {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .ds-item {
    padding: 14px;
  }
  .lk a {
    padding-top: 18px;
    padding-bottom: 18px;
  }
}

/* ---- tables scroll horizontally instead of breaking the page ---- */
.tbl-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 720px) {
  table.tbl {
    min-width: 560px;
  }
}

/* ---- hero / headline scaling ---- */
@media (max-width: 640px) {
  .hero {
    padding-block: 56px 48px;
  }
  .hero h1 {
    font-size: clamp(30px, 9vw, 40px);
  }
  .hero p,
  .ah p,
  .sec p {
    font-size: 15px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
}
@media (max-width: 380px) {
  .stats {
    grid-template-columns: 1fr;
  }
}

/* ---- footer ---- */
@media (max-width: 760px) {
  .f-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .f-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: left;
  }
  .f-logos {
    flex-wrap: wrap;
  }
}

/* Original style section 20; order preserved. */

/* ================= footer: phone layout ================= */
@media (max-width: 760px) {
  .f-top {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-top: 44px;
    padding-bottom: 32px;
  }
  footer .brand {
    font-size: 15px;
    gap: 9px;
  }
  footer .brand svg {
    width: 26px;
    height: 26px;
  }
  footer p {
    font-size: 13px;
    line-height: 1.65;
    max-width: none;
    margin-top: 12px;
  }
  footer h4 {
    font-size: 11px;
    margin-bottom: 11px;
  }
  footer a.fl {
    font-size: 13.5px;
    padding: 3px 0;
    display: inline-block;
  }

  /* partner logos: room above, aligned, never cramped */
  .f-logos {
    margin-top: 24px;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
  }
  .f-logos img {
    height: 38px;
  }

  /* Legal line on two rows. */
  .f-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-top: 22px;
    padding-bottom: 36px;
    font-size: 12px;
    line-height: 1.6;
  }
}

@media (max-width: 420px) {
  .f-top {
    padding-top: 38px;
    gap: 30px;
  }
  .f-logos {
    gap: 14px;
  }
  .f-logos img {
    height: 34px;
  }
  .f-bottom {
    padding-bottom: 32px;
    font-size: 11.5px;
  }
}

/* Original style section 21; order preserved. */

/* ---- primary CTAs: 22% less saturated than the raw brand red ---- */
:root {
  --orange-btn: #c8463c;
}
.btn-primary,
.exp-side .map-link {
  background: var(--orange-btn);
}

/* Original style section 22; order preserved. */

/* =============================================================
   Colour vision correction
   html[data-cb]: off | protan | deuter | tritan | achroma
   Daltonisation (LMS-based), matrices built in the script below.
   ============================================================= */

/* Filter goes on each direct child of body, not on body/html: a filtered
   ancestor becomes the containing block for position:fixed and would break
   the sticky nav, back-to-top button and intro overlay. */
html[data-cb='protan'] body > * {
  filter: url(#td-cb-protan);
}
html[data-cb='deuter'] body > * {
  filter: url(#td-cb-deuter);
}
html[data-cb='tritan'] body > * {
  filter: url(#td-cb-tritan);
}
html[data-cb='achroma'] body > * {
  filter: grayscale(1) contrast(1.08);
}
html[data-cb]:not([data-cb='off']) #td-cb-defs {
  filter: none;
}

/* colour is never the only signal, whatever the mode */
html[data-cb]:not([data-cb='off']) .ds-item,
html[data-cb]:not([data-cb='off']) .cbtn {
  position: relative;
}
html[data-cb]:not([data-cb='off']) .ds-item.on::after,
html[data-cb]:not([data-cb='off']) .cbtn.on::after {
  content: '';
  position: absolute;
  left: 0;
  top: 12%;
  bottom: 12%;
  width: 3px;
  border-radius: 2px;
  background: currentColor;
}
html[data-cb]:not([data-cb='off']) .tsub button.on {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Nav layout: links are taken out of the flex flow so they stay centred
   regardless of what's on either side. */
@media (min-width: 761px) {
  /* brand keeps the left edge, menu and the control sit together on the right */
  nav .nav-in {
    justify-content: flex-start;
    gap: 18px;
  }
  nav .nav-in > .nav-links {
    margin: 0 0 0 auto;
  }
  nav .nav-in > .td-a11y {
    margin: 0;
  }
  /* Between 761 and 900px the burger is visible; the control sits next to
     it. */
  nav .nav-in > .burger {
    margin-left: auto;
  }
}
@media (min-width: 761px) and (max-width: 900px) {
  nav .nav-in > .td-a11y {
    margin-left: auto;
  }
  nav .nav-in > .burger {
    margin-left: -10px;
  }
}

/* =============================================================
   the control  \00B7   same HUD language as the viewer toolbar
   ============================================================= */
/* Trigger uses the same pill as the nav links (one control group). */
.td-a11y {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  background: var(--fill);
  border-radius: 99px;
  padding: 3px;
}
.td-a11y-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  cursor: pointer;
  border: none;
  padding: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 99px;
  transition:
    color 0.28s cubic-bezier(0.3, 0.8, 0.35, 1),
    background 0.28s cubic-bezier(0.3, 0.8, 0.35, 1),
    box-shadow 0.28s cubic-bezier(0.3, 0.8, 0.35, 1);
}
.td-a11y-btn:hover {
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
}
.td-a11y-btn:active {
  transform: scale(0.97);
}
.td-a11y.open .td-a11y-btn {
  background: var(--fill2);
  color: var(--ink);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.12);
}
.td-a11y.on .td-a11y-btn {
  background: rgba(226, 59, 46, 0.22);
  color: #ffd9cf;
  box-shadow: inset 0 0 0 0.5px rgba(226, 59, 46, 0.4);
}
/* a live dot marks that a correction is running */
.td-a11y.on .td-a11y-btn::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffd9cf;
  box-shadow: 0 0 6px #e23b2e;
}

.td-a11y-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 200;
  width: 246px;
  padding: 14px;
  border-radius: 11px;
  background: rgba(226, 59, 46, 0.2);
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  transform-origin: top right;
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.24s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.td-a11y-pop::before {
  content: '';
  position: absolute;
  inset: 0.5px;
  z-index: 0;
  border-radius: 10.5px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    linear-gradient(180deg, rgba(26, 15, 16, 0.97), rgba(18, 10, 11, 0.98));
  -webkit-backdrop-filter: saturate(170%) blur(20px);
  backdrop-filter: saturate(170%) blur(20px);
}
.td-a11y-pop > * {
  position: relative;
  z-index: 1;
}
.td-a11y.open .td-a11y-pop {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.td-a11y-pop h5 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 11px;
  font:
    700 9.5px/1 JetBrains Mono,
    ui-monospace,
    'SF Mono',
    'IBM Plex Mono',
    Menlo,
    monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 199, 184, 0.72);
}
.td-a11y-pop h5 span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(226, 59, 46, 0.4), transparent);
}

.td-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.td-list button.opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  border: none;
  padding: 8px 10px;
  background: transparent;
  font:
    600 12.5px Manrope,
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--muted);
  border-radius: 99px;
  transition:
    background 0.16s ease,
    color 0.16s ease;
}
.td-list button.opt:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}
.td-list button.opt[aria-pressed='true'] {
  background: rgba(226, 59, 46, 0.2);
  color: #ffd9cf;
}
/* the badge carries the mode code, so the row reads without colour */
.td-list button.opt b {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--tert);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 99px;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.09);
  transition:
    background 0.16s ease,
    color 0.16s ease;
}
.td-list button.opt b svg {
  display: block;
}
.td-list button.opt:hover b {
  color: var(--ink);
}
.td-list button.opt[aria-pressed='true'] b {
  background: rgba(226, 59, 46, 0.34);
  color: #ffd9cf;
  box-shadow: inset 0 0 0 0.5px rgba(226, 59, 46, 0.5);
}
.td-list button.opt span {
  flex: 1;
  min-width: 0;
}
.td-list button.opt em {
  font-style: normal;
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--tert);
  opacity: 0;
  transition: opacity 0.16s ease;
}
.td-list button.opt:hover em,
.td-list button.opt[aria-pressed='true'] em {
  opacity: 1;
}

@media (max-width: 760px) {
  /* Negative margin to offset nav-in's flex gap next to the burger. */
  nav .nav-in {
    gap: 8px;
  }
  .td-a11y {
    margin-left: auto;
    margin-right: 0;
  }
  /* nav carries transform:translateZ(0), so it is the containing block for
     anything fixed inside it; the panel therefore stays absolute here */
  .td-a11y-pop {
    right: -4px;
    width: min(258px, calc(100vw - 26px));
  }
}

/* Original style section 23; order preserved. */

/* Hidden state for #toTop declared early so it doesn't flash unstyled
   before the main styles load. */
#toTop {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  border: 0;
  background: transparent;
  color: transparent;
}

/* Original style section 24; order preserved. */

/* scrollbar track: the page background lives on html, and turns into the footer colour where the footer starts.
   Top glows scroll with the page (they stay at the top instead of following the viewport).
   The warm glow's colour is an animatable property, so monitoring and forecast cross-fade. */
@property --gw {
  syntax: '<color>';
  inherits: false;
  initial-value: rgba(205, 56, 38, 0.16);
}
@property --gb {
  syntax: '<color>';
  inherits: false;
  initial-value: rgba(44, 74, 160, 0.12);
}
@property --pb {
  syntax: '<color>';
  inherits: false;
  initial-value: #0a0d16;
}
html {
  --gw: rgba(205, 56, 38, 0.16);
  --gb: rgba(44, 74, 160, 0.12);
  --pb: #0a0d16;
  transition:
    --gw 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    --gb 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    --pb 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  background:
    radial-gradient(1200px 600px at 72% -10vh, var(--gw), transparent 58%),
    radial-gradient(1000px 620px at 8% 6vh, var(--gb), transparent 60%),
    linear-gradient(180deg, #100707, #0a0505) 0 100%/100% 0 no-repeat scroll,
    var(--pb);
}
/* eased fade (no ring at the edge); browsers without color-mix keep the line above */
html {
  background:
    radial-gradient(
      1200px 600px at 72% -10vh,
      var(--gw) 0%,
      color-mix(in srgb, var(--gw) 96%, transparent) 6.96%,
      color-mix(in srgb, var(--gw) 84.4%, transparent) 14.5%,
      color-mix(in srgb, var(--gw) 67.7%, transparent) 22.04%,
      color-mix(in srgb, var(--gw) 50%, transparent) 29%,
      color-mix(in srgb, var(--gw) 32.3%, transparent) 35.96%,
      color-mix(in srgb, var(--gw) 15.6%, transparent) 43.5%,
      color-mix(in srgb, var(--gw) 4%, transparent) 51.04%,
      transparent 58%
    ),
    radial-gradient(
      1000px 620px at 8% 6vh,
      var(--gb) 0%,
      color-mix(in srgb, var(--gb) 96%, transparent) 7.2%,
      color-mix(in srgb, var(--gb) 84.4%, transparent) 15%,
      color-mix(in srgb, var(--gb) 67.7%, transparent) 22.8%,
      color-mix(in srgb, var(--gb) 50%, transparent) 30%,
      color-mix(in srgb, var(--gb) 32.3%, transparent) 37.2%,
      color-mix(in srgb, var(--gb) 15.6%, transparent) 45%,
      color-mix(in srgb, var(--gb) 4%, transparent) 52.8%,
      transparent 60%
    ),
    linear-gradient(180deg, #100707, #0a0505) 0 100%/100% 0 no-repeat scroll,
    var(--pb);
}
body {
  background: transparent;
}
html:has(body.fc) {
  --gw: rgba(240, 165, 40, 0.13);
  --gb: rgba(180, 120, 40, 0.06);
  --pb: #0c0b10;
} /* warm bronze-navy */
body.fc {
  background: transparent !important;
}
/* heading accent and kicker fade with it */
.vw-head h1 em,
body.fc .vw-head h1 em {
  color: #ee5d2e;
  transition:
    filter 0.45s ease,
    color 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
body.fc .vw-head h1 em {
  color: #f0a528;
}
.vw-head .kicker {
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 0.8s ease,
    color 0.7s cubic-bezier(0.4, 0, 0.2, 1);
} /* keeps the .rv entrance */
@media (prefers-reduced-motion: reduce) {
  html,
  .vw-head h1 em,
  .vw-head .kicker {
    transition: none;
  }
}

/* Original style section 25; order preserved. */

/* colour vision: the page glow is painted on html, which the filter on body > *
   cannot reach, so each mode gets the glow already passed through its own matrix */
html[data-cb='protan'] {
  --gw: rgba(205, 132, 130, 0.16);
  --gb: rgba(44, 59, 141, 0.12);
  --pb: #0a0b14;
  background:
    radial-gradient(
      1200px 600px at 72% -10vh,
      var(--gw) 0%,
      color-mix(in srgb, var(--gw) 96%, transparent) 6.96%,
      color-mix(in srgb, var(--gw) 84.4%, transparent) 14.5%,
      color-mix(in srgb, var(--gw) 67.7%, transparent) 22.04%,
      color-mix(in srgb, var(--gw) 50%, transparent) 29%,
      color-mix(in srgb, var(--gw) 32.3%, transparent) 35.96%,
      color-mix(in srgb, var(--gw) 15.6%, transparent) 43.5%,
      color-mix(in srgb, var(--gw) 4%, transparent) 51.04%,
      transparent 58%
    ),
    radial-gradient(
      1000px 620px at 8% 6vh,
      var(--gb) 0%,
      color-mix(in srgb, var(--gb) 96%, transparent) 7.2%,
      color-mix(in srgb, var(--gb) 84.4%, transparent) 15%,
      color-mix(in srgb, var(--gb) 67.7%, transparent) 22.8%,
      color-mix(in srgb, var(--gb) 50%, transparent) 30%,
      color-mix(in srgb, var(--gb) 32.3%, transparent) 37.2%,
      color-mix(in srgb, var(--gb) 15.6%, transparent) 45%,
      color-mix(in srgb, var(--gb) 4%, transparent) 52.8%,
      transparent 60%
    ),
    linear-gradient(180deg, #100c0d, #0a0808) 0 100%/100% 0 no-repeat scroll,
    var(--pb);
}
html[data-cb='protan']:has(body.fc) {
  --gw: rgba(240, 203, 86, 0.13);
  --gb: rgba(180, 151, 77, 0.06);
  --pb: #0c0c11;
}
html[data-cb='deuter'] {
  --gw: rgba(205, 86, 115, 0.16);
  --gb: rgba(44, 68, 144, 0.12);
  --pb: #0a0c14;
  background:
    radial-gradient(
      1200px 600px at 72% -10vh,
      var(--gw) 0%,
      color-mix(in srgb, var(--gw) 96%, transparent) 6.96%,
      color-mix(in srgb, var(--gw) 84.4%, transparent) 14.5%,
      color-mix(in srgb, var(--gw) 67.7%, transparent) 22.04%,
      color-mix(in srgb, var(--gw) 50%, transparent) 29%,
      color-mix(in srgb, var(--gw) 32.3%, transparent) 35.96%,
      color-mix(in srgb, var(--gw) 15.6%, transparent) 43.5%,
      color-mix(in srgb, var(--gw) 4%, transparent) 51.04%,
      transparent 58%
    ),
    radial-gradient(
      1000px 620px at 8% 6vh,
      var(--gb) 0%,
      color-mix(in srgb, var(--gb) 96%, transparent) 7.2%,
      color-mix(in srgb, var(--gb) 84.4%, transparent) 15%,
      color-mix(in srgb, var(--gb) 67.7%, transparent) 22.8%,
      color-mix(in srgb, var(--gb) 50%, transparent) 30%,
      color-mix(in srgb, var(--gb) 32.3%, transparent) 37.2%,
      color-mix(in srgb, var(--gb) 15.6%, transparent) 45%,
      color-mix(in srgb, var(--gb) 4%, transparent) 52.8%,
      transparent 60%
    ),
    linear-gradient(180deg, #10090c, #0a0608) 0 100%/100% 0 no-repeat scroll,
    var(--pb);
}
html[data-cb='deuter']:has(body.fc) {
  --gw: rgba(240, 180, 79, 0.13);
  --gb: rgba(180, 132, 71, 0.06);
  --pb: #0c0b11;
}
html[data-cb='tritan'] {
  --gw: rgba(255, 146, 38, 0.16);
  --gb: rgba(26, 56, 160, 0.12);
  --pb: #080b16;
  background:
    radial-gradient(
      1200px 600px at 72% -10vh,
      var(--gw) 0%,
      color-mix(in srgb, var(--gw) 96%, transparent) 6.96%,
      color-mix(in srgb, var(--gw) 84.4%, transparent) 14.5%,
      color-mix(in srgb, var(--gw) 67.7%, transparent) 22.04%,
      color-mix(in srgb, var(--gw) 50%, transparent) 29%,
      color-mix(in srgb, var(--gw) 32.3%, transparent) 35.96%,
      color-mix(in srgb, var(--gw) 15.6%, transparent) 43.5%,
      color-mix(in srgb, var(--gw) 4%, transparent) 51.04%,
      transparent 58%
    ),
    radial-gradient(
      1000px 620px at 8% 6vh,
      var(--gb) 0%,
      color-mix(in srgb, var(--gb) 96%, transparent) 7.2%,
      color-mix(in srgb, var(--gb) 84.4%, transparent) 15%,
      color-mix(in srgb, var(--gb) 67.7%, transparent) 22.8%,
      color-mix(in srgb, var(--gb) 50%, transparent) 30%,
      color-mix(in srgb, var(--gb) 32.3%, transparent) 37.2%,
      color-mix(in srgb, var(--gb) 15.6%, transparent) 45%,
      color-mix(in srgb, var(--gb) 4%, transparent) 52.8%,
      transparent 60%
    ),
    linear-gradient(180deg, #150c07, #0d0805) 0 100%/100% 0 no-repeat scroll,
    var(--pb);
}
html[data-cb='tritan']:has(body.fc) {
  --gw: rgba(255, 210, 40, 0.13);
  --gb: rgba(216, 156, 40, 0.06);
  --pb: #0d0c10;
}
html[data-cb='achroma'] {
  --gw: rgba(83, 83, 83, 0.16);
  --gb: rgba(70, 70, 70, 0.12);
  --pb: #040404;
  background:
    radial-gradient(
      1200px 600px at 72% -10vh,
      var(--gw) 0%,
      color-mix(in srgb, var(--gw) 96%, transparent) 6.96%,
      color-mix(in srgb, var(--gw) 84.4%, transparent) 14.5%,
      color-mix(in srgb, var(--gw) 67.7%, transparent) 22.04%,
      color-mix(in srgb, var(--gw) 50%, transparent) 29%,
      color-mix(in srgb, var(--gw) 32.3%, transparent) 35.96%,
      color-mix(in srgb, var(--gw) 15.6%, transparent) 43.5%,
      color-mix(in srgb, var(--gw) 4%, transparent) 51.04%,
      transparent 58%
    ),
    radial-gradient(
      1000px 620px at 8% 6vh,
      var(--gb) 0%,
      color-mix(in srgb, var(--gb) 96%, transparent) 7.2%,
      color-mix(in srgb, var(--gb) 84.4%, transparent) 15%,
      color-mix(in srgb, var(--gb) 67.7%, transparent) 22.8%,
      color-mix(in srgb, var(--gb) 50%, transparent) 30%,
      color-mix(in srgb, var(--gb) 32.3%, transparent) 37.2%,
      color-mix(in srgb, var(--gb) 15.6%, transparent) 45%,
      color-mix(in srgb, var(--gb) 4%, transparent) 52.8%,
      transparent 60%
    ),
    linear-gradient(180deg, #000000, #000000) 0 100%/100% 0 no-repeat scroll,
    var(--pb);
}
html[data-cb='achroma']:has(body.fc) {
  --gw: rgba(175, 175, 175, 0.13);
  --gb: rgba(127, 127, 127, 0.06);
  --pb: #020202;
}
/* with the page content filtered, a translucent panel fill shows the text
   behind it; the panel uses an opaque fill (same colours) and no blur */
html[data-cb]:not([data-cb='off']) .td-a11y-pop::before {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    linear-gradient(180deg, #1a0f10, #120a0b);
}

/* Original style section 26; order preserved. */

/* page scrollbar drawn over the page: the native one is hidden (desktop only, set by
   the script below), so no strip is reserved beside the content */
html.pgsb {
  scrollbar-width: none;
}
html.pgsb::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
#pgSb {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 14px;
  z-index: 2147483000;
  pointer-events: none;
}
#pgSb i {
  position: absolute;
  top: 0;
  right: 3px;
  width: 6px;
  height: 40px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.2);
  opacity: 0;
  pointer-events: auto;
  cursor: default;
  will-change: transform;
  transition:
    opacity 0.45s ease,
    width 0.2s ease,
    right 0.2s ease,
    background-color 0.2s ease;
}
#pgSb.on i {
  opacity: 1;
  transition-duration: 0.18s, 0.2s, 0.2s, 0.2s;
}
#pgSb i:hover,
#pgSb.drag i {
  width: 8px;
  right: 2px;
  background: rgba(255, 255, 255, 0.32);
}
#pgSb.off {
  display: none;
}
html.pgsb-drag,
html.pgsb-drag * {
  user-select: none !important;
  -webkit-user-select: none !important;
}

/* Original style section 27; order preserved. */

/* ===== Control panel, touch screens (< 900px) =====
   Each control of the second toolbar row gets its own full-width band in a fixed order. */
@media (max-width: 900px) {
  .tb-row2 {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
    flex-wrap: nowrap;
  }
  .tb-row2 > * {
    width: 100%;
    margin: 0;
  }
  .tb-row2 .tb-spacer {
    display: none;
  }

  /* 1. Depth or period: one scrollable row of pills. */
  .tb-row2 .tb-sub {
    order: 1;
    display: flex;
    gap: 6px;
    padding: 0;
    overflow-x: auto;
    background: none;
    box-shadow: none;
    border-radius: 0;
    flex: 0 0 auto;
    scrollbar-width: none;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .tb-row2 .tb-sub::before {
    display: none;
  }
  .tb-row2 .tb-sub::-webkit-scrollbar {
    display: none;
  }
  .tb-row2 .tb-sub button {
    flex: 0 0 auto;
    padding: 10px 16px;
    font-size: 9.5px;
    letter-spacing: 0.06em;
    border-radius: 99px;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.09);
  }
  .tb-row2 .tb-sub button::after {
    display: none;
  }
  .tb-row2 .tb-sub button.on {
    color: #ffd0c0;
    background: linear-gradient(180deg, rgba(226, 90, 31, 0.42), rgba(150, 38, 20, 0.32));
    box-shadow:
      inset 0 1px 0 rgba(255, 200, 170, 0.26),
      inset 0 0 0 0.5px rgba(255, 150, 110, 0.42),
      0 0 14px -5px rgba(226, 90, 31, 0.8);
  }
  body.fc .tb-row2 .tb-sub button.on {
    color: #ffe0ad;
    background: linear-gradient(180deg, rgba(240, 165, 40, 0.32), rgba(160, 106, 23, 0.24));
    box-shadow:
      inset 0 1px 0 rgba(255, 235, 200, 0.22),
      inset 0 0 0 0.5px rgba(240, 190, 110, 0.3);
  }
  .tb-sub-thumb {
    display: none !important;
  }

  /* 2. opacity */
  .tb-row2 .tb-op {
    order: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.24);
    box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.08);
  }
  .tb-row2 .tb-op > span {
    display: inline;
    flex: none;
    font-size: 9px;
    letter-spacing: 0.12em;
  }
  .tb-row2 .tb-op input[type='range'] {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    margin: 0;
  }
  .tb-row2 .tb-op b {
    flex: none;
    min-width: 38px;
    text-align: right;
    font-size: 11px;
  }

  /* 3. overlays: three equal switches in one row */
  .tb-row2 .tb-panel {
    order: 3;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    gap: 6px;
    padding: 6px;
    border-radius: 12px;
  }
  .tb-panel-t {
    display: none !important;
  }
  .tb-row2 .tb-panel .tb-toggle {
    width: 100%;
    justify-content: center;
    gap: 9px;
    padding: 9px 6px;
    box-shadow: none;
  }
  .tb-row2 .tb-panel .tb-toggle + .tb-toggle {
    box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.07);
  }
  .tb-row2 .tb-panel .tb-toggle .lbl {
    display: inline !important;
    min-width: 0;
    font-size: 9px;
    letter-spacing: 0.06em;
    text-align: left;
  }
  .tb-row2 .tb-panel .tb-toggle i {
    display: none !important;
  }

  /* 4. actions */
  .tb-row2 .tb-acts {
    order: 4;
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
  }
  .tb-row2 .tb-acts .tb-icon {
    flex: 1 1 auto;
    width: auto;
    height: 42px;
    justify-content: center;
    padding: 0 14px;
    border-radius: 12px;
  }
  .tb-row2 .tb-acts .tb-icon span {
    display: inline;
  }
  .tb-row2 .tb-acts .tb-icon.tb-mini {
    flex: 0 0 46px;
    width: 46px;
    padding: 0;
  }
  .tb-row2 .tb-acts .tb-icon.tb-mini span {
    display: none;
  }
}

/* very narrow: four depths would be 60px each, so let them wrap in two rows */
@media (max-width: 430px) {
  /* the label stays: a bare switch says nothing, and there is no hover on a
     phone to reveal what it does */
  .tb-row2 .tb-panel {
    grid-template-columns: 1fr;
  }
  .tb-row2 .tb-panel .tb-toggle {
    justify-content: flex-start;
    padding: 9px 10px;
  }
  .tb-row2 .tb-panel .tb-toggle + .tb-toggle {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  }
  .tb-row2 .tb-panel .tb-toggle .lbl {
    display: inline;
    font-size: 9.5px;
  }
}

/* ---- brand mark, footer and link colour ------------------------------ */
/* Nav logo is offset left so the T aligns with the page gutter; the footer
   logo does the same and is larger. */
.brand-logo {
  width: auto;
  height: 60px;
  max-width: none;
  display: block;
  margin-left: -5px;
}
footer .brand {
  margin-bottom: 14px;
}
footer .brand-logo {
  height: 62px;
  margin-left: -6px;
}

/* Links use the site accent instead of default blue. */
footer a.fl:hover {
  color: var(--orange);
}
.f-bottom a {
  color: inherit;
  transition: color 0.2s;
}
.f-bottom a:hover,
.f-bottom span a:hover {
  color: var(--orange);
}

/* Tablet footer: three columns don't fit, so the layout changes here. */
@media (max-width: 1020px) {
  .f-top {
    grid-template-columns: 1fr 1fr;
    gap: 34px;
  }
  .f-top > div:first-child {
    grid-column: 1 / -1;
  }
  footer p {
    max-width: 52ch;
  }
  .f-logos {
    flex-wrap: wrap;
    gap: 16px 22px;
  }
}
@media (max-width: 1000px) {
  .brand-logo {
    height: 52px;
  }
  footer .brand-logo {
    height: 54px;
  }
}
@media (max-width: 760px) {
  .f-top {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .f-top > div:first-child {
    grid-column: auto;
  }
  .f-bottom {
    flex-direction: column;
    gap: 10px;
  }
}
@media (max-width: 700px) {
  .brand-logo {
    height: 44px;
  }
  footer .brand-logo {
    height: 46px;
  }
}
@media (max-width: 430px) {
  .brand-logo {
    height: 36px;
  }
  footer .brand-logo {
    height: 40px;
  }
  .f-logos img {
    height: 24px;
  }
}

/* ---- Footer: shared responsive rules for all pages ----
   Fluid sizing, no breakpoint jumps. */
footer .brand {
  margin-bottom: 16px;
}
.f-top {
  padding-top: clamp(40px, 6vw, 64px);
  padding-bottom: clamp(28px, 4vw, 44px);
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
}
.f-top > div {
  min-width: 0;
}
footer p {
  max-width: 38ch;
}
.f-logos {
  gap: clamp(14px, 2vw, 24px);
  margin-top: 24px;
  flex-wrap: wrap;
  align-items: center;
}
.f-logos img {
  height: clamp(30px, 3.4vw, 42px);
  width: auto;
  filter: none;
}
.f-logos span,
.f-logos a {
  display: flex;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.f-logos a:hover {
  opacity: 0.82;
  transform: translateY(-1px);
}
.f-bottom {
  margin-top: 8px;
  padding-top: 22px;
  padding-bottom: clamp(26px, 3vw, 34px);
  align-items: center;
  row-gap: 10px;
}
@media (max-width: 1020px) {
  .f-top {
    grid-template-columns: 1fr 1fr;
  }
  .f-top > div:first-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 640px) {
  .f-top {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  footer .brand {
    margin-bottom: 14px;
  }
  footer p {
    max-width: 46ch;
  }
  .f-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
  }
}

/* ---- Back to top ----
   Shown only after scrolling past the first screen; doesn't overlap the map controls on phones. */
#toTop {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 900;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(26, 13, 13, 0.72);
  color: var(--muted);
  font-size: 14px;
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.9);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.94);
  transition:
    opacity 0.35s ease,
    transform 0.35s cubic-bezier(0.3, 0.9, 0.35, 1),
    visibility 0.35s,
    background 0.25s,
    color 0.25s,
    border-color 0.25s;
}
#toTop.on {
  opacity: 1;
  visibility: visible;
  transform: none;
}
#toTop:hover {
  color: var(--ink);
  background: rgba(226, 59, 46, 0.26);
  border-color: rgba(226, 59, 46, 0.4);
}
#toTop:active {
  transform: scale(0.94);
}
@media (max-width: 760px) {
  #toTop {
    right: 14px;
    bottom: 14px;
    width: 40px;
    height: 40px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #toTop {
    transition: opacity 0.2s;
  }
}

/* ---- Phones: no backdrop-filter ----
   Panels keep their colour, without the blur. */
@media (max-width: 760px) {
  .m-badge,
  .m-legend,
  .m-hint,
  .m-zoom,
  .m-zbadge,
  .m-read,
  .m-dock,
  nav,
  .tb,
  .vw-time,
  .acc,
  .ds,
  .pt-card,
  #toTop {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  /* soft drop shadows are cheap on their own and expensive by the dozen */
  .m-badge,
  .m-legend,
  .m-zoom,
  .m-zbadge,
  .m-read {
    box-shadow: none;
  }
  /* the border halo layer is not built at all on a phone */
  .m-stage #mLinesHalo {
    display: none !important;
  }
}

/* ---- Phones: map viewer ----
   One border overlay remains; the halo and expensive effects are disabled. */
@media (max-width: 760px) {
  /* Raster borders use the same zoom-aware overlay as desktop. */
  .m-stage {
    shape-rendering: optimizeSpeed;
  }
  /* a blurred backdrop is a full screen readback per frame */
  .m-badge,
  .m-legend,
  .m-hint,
  .m-read,
  .m-zbadge,
  .vw-time,
  .tb {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  .m-legend,
  .m-badge {
    background: rgba(16, 9, 10, 0.9);
  }
}

/* ---- Sticky nav ----
   Own compositing layer so the backdrop blur doesn't flash while scrolling.
   Phones get a flat background instead of backdrop-filter. */
/* No contain:paint here: it clipped the mobile dropdown to the 64px nav
   box. The layer promotion stays. */
nav {
  transform: translateZ(0);
  will-change: transform;
}
.nav-links {
  z-index: 60;
}
footer {
  contain: layout paint;
}
/* phones: the footer is simply there, without the scroll reveal */
@media (max-width: 900px), (pointer: coarse) {
  footer .rv {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
}
@media (max-width: 760px) {
  nav {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: rgba(20, 11, 12, 0.96);
  }
}

/* ---- Phones: nav and page heading ----
   44px burger target and spacing below the bar. */
@media (max-width: 760px) {
  .burger {
    width: 44px;
    height: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
  }
  .burger:active {
    background: var(--fill2);
  }
  .vw-head {
    padding-block: 34px 20px;
  }
}

/* ---- Phones: open menu ----
   Larger tap targets for the menu links. */
@media (max-width: 760px) {
  .nav-links.open {
    gap: 2px;
    padding: 8px;
  }
  .nav-links a {
    display: block;
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 15px;
    text-align: left;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  .nav-links a::before {
    border-radius: 12px;
  }
  .nav-links a:active {
    background: rgba(255, 255, 255, 0.08);
  }
}

/* Original style section 28; order preserved. */

/* phones: headings, intros, section labels and footer centred; forms, tables
   and panel content stay left-aligned */
@media (max-width: 760px) {
  .ah,
  .vw-head,
  .ed-gate > .kicker,
  .ed-gate > h1,
  .ed-gate > p {
    text-align: center;
  }
  .ah > h1,
  .ah > p,
  .vw-head > h1,
  .vw-head > p,
  .ed-gate > h1,
  .ed-gate > p {
    margin-inline: auto;
  }
  .vw-jumps {
    justify-content: center;
  }
  .ah-stats .stat {
    text-align: center;
  }
  .sec-t {
    justify-content: center;
  }
  .sec-t::before {
    content: '';
    flex: 1;
    height: 0.5px;
    background: var(--line);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s;
  }
  .sec-t.in::before {
    transform: scaleX(1);
  }
  footer .f-top {
    text-align: center;
  }
  footer .brand,
  footer .f-logos {
    justify-content: center;
  }
  footer .brand-logo {
    margin-left: auto;
    margin-right: auto;
  }
  footer p {
    margin-inline: auto;
  }
  footer .f-bottom {
    align-items: center;
    text-align: center;
  }
}
@media (max-width: 760px) {
  .ah-stats {
    margin-inline: auto;
  }
  .ah-stats .stat,
  .ah-stats .stat:first-child,
  .ah-stats .stat:nth-child(odd) {
    align-items: center;
    padding: 0 12px;
  }
  .perm {
    justify-content: center;
    text-align: center;
  }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .sec-t::before {
    transform: none;
    transition: none;
  }
}
