/******* Do not edit this file *******
Simple Custom CSS and JS - by Silkypress.com
Saved: Feb 16 2026 | 20:25:12 */
/*
 * COMMUTE CONSTELLATION — CSS
 * ============================
 * Dot-density commute visualization.  Each dot ≈ 75 workers.
 *
 * Color palette exposed as CSS custom properties for easy theming.
 * Typography: Bebas Neue (display), IBM Plex Mono (data), Work Sans (body).
 * Layout: full-viewport map hero with glass-morphism overlays,
 *         followed by dark-themed editorial text sections.
 */

:root {
  --bg: #0e0e0c;
  --dot-low: 224, 124, 79;     /* coral  — lower earnings tertile */
  --dot-mid: 212, 168, 67;     /* amber  — middle earnings tertile */
  --dot-high: 93, 158, 130;    /* sage   — upper earnings tertile */
  --glass-bg: rgba(20,20,18,0.85);
  --glass-border: rgba(255,255,255,0.08);
  --text-primary: rgba(255,255,255,1);
  --text-secondary: rgba(255,255,255,0.6);
  --content-max: 960px;
  --panel-bg: rgba(255,255,255,0.025);
  --panel-border: rgba(255,255,255,0.06);
  --panel-radius: 14px;
  --accent-dark: #0066B3;
  --accent-mid: #2E8AD8;
  --accent-light: #5BA3E6;
  --accent-border: rgba(0,102,179,0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* --- Focus visible (WCAG) --- */
.jf-content *:focus-visible {
  outline: 2px solid #5BA3E6;
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Animations --- */
@keyframes jf-fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes jf-dotPulse {
  0%, 100% { opacity: 0.45; }
  50%      { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Page label --- */
.jf-page-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5BA3E6;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.jf-page-label::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #5BA3E6;
  animation: jf-dotPulse 2.4s ease-in-out infinite;
}

/* --- h1 accent span --- */
.jf-content h1 span { color: #2E8AD8; }

/* --- Dot separator --- */
.jf-dot-sep {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 36px 0;
}
.jf-dot-sep::before,
.jf-dot-sep::after,
.jf-dot-sep span {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(0,102,179,0.3);
}
.jf-dot-sep span {
  display: block;
}

html, body {
  width: 100%; height: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: #fff;
  font-family: "Work Sans", system-ui, sans-serif;
}

/* ===================
   MAP HERO SECTION
   =================== */
#map-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

#map {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}

.maplibregl-ctrl-top-right { top: 60px !important; }
.maplibregl-ctrl-group {
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-border) !important;
  backdrop-filter: blur(12px);
}
.maplibregl-ctrl-group button {
  filter: invert(1) brightness(1.4);
}

/* --- Intro Overlay --- */
#intro-overlay {
  position: absolute; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,10,8,0.92);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
#intro-overlay.fade-out {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}
.intro-card {
  text-align: center;
  padding: 40px;
}
.intro-card h1 {
  font-family: "Bebas Neue", sans-serif;
  font-size: 4rem;
  letter-spacing: 0.06em;
  line-height: 1;
  color: #fff;
}
.intro-card p {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 10px;
  letter-spacing: 0.02em;
}

/* --- Title (top-left) --- */
#title-block {
  position: absolute;
  top: 18px; left: 18px;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
#title-block.visible { opacity: 1; pointer-events: auto; }
#title-block h2 {
  font-family: "Bebas Neue", sans-serif;
  font-size: 2.2rem;
  letter-spacing: 0.04em;
  line-height: 1;
  color: #fff;
}
#title-block p {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}
#details-btn {
  display: inline-block;
  margin-top: 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-light);
  background: var(--glass-bg);
  border: 1px solid var(--accent-border);
  border-radius: 20px;
  padding: 6px 16px;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.2s ease, border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
#details-btn:hover {
  background: rgba(46,138,216,0.15);
  border-color: var(--accent-mid);
}

/* --- Control Strip (top-center) --- */
#control-strip {
  position: absolute;
  top: 14px;
  left: 50%; transform: translateX(-50%);
  z-index: 100;
  display: flex;
  gap: 2px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 4px;
  opacity: 0;
  transition: opacity 0.5s ease;
}
#control-strip.visible { opacity: 1; }

.ctrl-group {
  display: flex;
  gap: 2px;
}
.ctrl-group + .ctrl-group {
  margin-left: 4px;
  padding-left: 6px;
  border-left: 1px solid var(--glass-border);
}

.ctrl-btn {
  font-family: "Work Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 14px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.ctrl-btn:hover { color: rgba(255,255,255,0.8); }
.ctrl-btn.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* --- Filter Row (below control strip) --- */
#filter-row {
  position: absolute;
  top: 58px;
  left: 50%; transform: translateX(-50%);
  z-index: 100;
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(20,20,18,0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 999px;
  opacity: 0;
  transition: opacity 0.5s ease;
  max-width: 92vw;
  overflow-x: auto;
  scrollbar-width: none;
}
#filter-row::-webkit-scrollbar { display: none; }
#filter-row.visible { opacity: 1; }

.filter-chip {
  font-family: "Work Sans", sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 5px 10px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.filter-chip:hover { color: rgba(255,255,255,0.75); }
.filter-chip.active {
  background: rgba(255,255,255,0.13);
  color: #fff;
}
.filter-chip .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* --- Legend (bottom-right) --- */
#legend {
  position: absolute;
  bottom: 24px; right: 18px;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 16px 20px;
  opacity: 0;
  transition: opacity 0.5s ease;
  min-width: 180px;
}
#legend.visible { opacity: 1; }

.legend-title {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}
.legend-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Work Sans", sans-serif;
  font-size: 0.76rem;
  color: rgba(255,255,255,0.8);
}
.legend-swatch {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.legend-count {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* --- Tooltip --- */
#tooltip {
  position: fixed;
  z-index: 200;
  pointer-events: auto;
  background: rgba(20,20,18,0.92);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px 16px;
  opacity: 0;
  transition: opacity 0.15s ease;
  max-width: 260px;
}
#tooltip:not(.visible) { pointer-events: none; }
#tooltip.visible { opacity: 1; }
.tt-city {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  color: #fff;
  margin-bottom: 4px;
}
.tt-city-link {
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease;
}
.tt-city-link:hover { color: var(--accent-light); }
.tt-arrow {
  font-family: "Work Sans", sans-serif;
  font-size: 0.85rem;
  color: var(--accent-light);
  transition: transform 0.15s ease;
}
.tt-city-link:hover .tt-arrow { transform: translateX(3px); }
.tt-workers {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.tt-bar-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}
.tt-bar-swatch {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tt-bar-label {
  font-family: "Work Sans", sans-serif;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.7);
  flex: 1;
}
.tt-bar-val {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.5);
}

/* --- Back to Map button --- */
#back-to-map {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-light);
  background: var(--panel-bg);
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  margin-bottom: 24px;
  transition: border-color 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
#back-to-map:hover {
  border-color: var(--accent-light);
  color: #fff;
}
#back-to-map .back-arrow {
  font-size: 0.9rem;
  transition: transform 0.15s ease;
}
#back-to-map:hover .back-arrow { transform: translateY(-2px); }

/* --- Attribution --- */
.maplibregl-ctrl-attrib {
  background: rgba(20,20,18,0.6) !important;
  color: rgba(255,255,255,0.3) !important;
  font-size: 10px !important;
}
.maplibregl-ctrl-attrib a { color: rgba(255,255,255,0.4) !important; }

/* ===================
   TEXT CONTENT BELOW MAP
   =================== */
.jf-content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 64px 24px 96px;
}

.jf-content h1 {
  font-family: "Bebas Neue", sans-serif;
  font-size: 2.8rem;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 6px;
}

.jf-content .jf-subhead {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  letter-spacing: 0.01em;
}

/* --- Stats Cards --- */
.jf-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 48px;
}

.jf-stat-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-top: 2px solid var(--accent-border);
  border-radius: 2px 2px 14px 14px;
  padding: 20px;
  text-align: center;
  position: relative;
  animation: jf-fadeUp 0.5s ease both;
}
.jf-stat-card:nth-child(1) { animation-delay: 0s; }
.jf-stat-card:nth-child(2) { animation-delay: 0.05s; }
.jf-stat-card:nth-child(3) { animation-delay: 0.1s; }
.jf-stat-card:nth-child(4) { animation-delay: 0.15s; }
.jf-stat-card::after {
  content: "";
  position: absolute;
  bottom: 10px; right: 10px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent-mid);
  animation: jf-dotPulse 2.4s ease-in-out infinite;
}
.jf-stat-card:hover {
  border-top-color: rgba(46,138,216,0.6);
}
.jf-stat-card h3 {
  font-family: "Work Sans", sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.jf-stat-card p {
  font-family: "Bebas Neue", sans-serif;
  font-size: 2rem;
  letter-spacing: 0.03em;
  color: #fff;
  line-height: 1;
}

/* --- Panels (tables, industry, trend) --- */
.jf-section-title {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.03em;
  color: #fff;
  margin-bottom: 16px;
}

.jf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.jf-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-left: 3px solid var(--accent-border);
  border-radius: 2px 14px 14px 2px;
  padding: 24px;
  animation: jf-fadeUp 0.5s ease both;
}
.jf-panel:hover {
  border-left-color: rgba(46,138,216,0.6);
}
.jf-panel h2 {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.03em;
  color: #fff;
  margin-bottom: 14px;
}

.jf-panel table {
  width: 100%;
  border-collapse: collapse;
}
.jf-panel thead {
  background: rgba(0,102,179,0.08);
}
.jf-panel th {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-weight: 500;
  color: #5BA3E6;
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--panel-border);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.jf-panel tr:hover td {
  background: rgba(255,255,255,0.015);
}
.jf-panel td {
  font-family: "Work Sans", sans-serif;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.8);
  padding: 8px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.jf-panel tr:last-child td { border-bottom: none; }

/* --- Industry Mix --- */
.jf-industry {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.jf-industry-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.jf-industry-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}
.jf-industry-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.jf-industry-copy small {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}
.jf-industry-copy span {
  font-family: "Work Sans", sans-serif;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.85);
}
.jf-industry-item strong {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  white-space: nowrap;
}

/* Industry avatar tones */
.jf-tone-marigold { background: rgba(212,168,67,0.25); }
.jf-tone-orange   { background: rgba(224,124,79,0.25); }
.jf-tone-mint     { background: rgba(93,158,130,0.25); }
.jf-tone-teal     { background: rgba(0,150,136,0.25); }
.jf-tone-coral    { background: rgba(224,124,79,0.2); }
.jf-tone-sky      { background: rgba(100,181,246,0.2); }
.jf-tone-berry    { background: rgba(171,71,188,0.2); }
.jf-tone-gold     { background: rgba(255,213,79,0.2); }
.jf-tone-violet   { background: rgba(126,87,194,0.2); }
.jf-tone-slate    { background: rgba(120,144,156,0.25); }
.jf-tone-leaf     { background: rgba(104,159,56,0.2); }
.jf-tone-sun      { background: rgba(255,179,0,0.2); }
.jf-tone-ink      { background: rgba(69,90,100,0.3); }
.jf-tone-peach    { background: rgba(255,138,101,0.2); }

/* --- Sparkline --- */
.jf-sparkline {
  margin: 8px 0 12px;
}
.jf-sparkline svg {
  width: 100%;
  height: 60px;
}
.jf-sparkline polyline {
  stroke: #2E8AD8;
}
.jf-sparkline-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}
.jf-sparkline-axis span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.jf-small {
  font-family: "Work Sans", sans-serif;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.jf-empty {
  font-family: "Work Sans", sans-serif;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* --- Methodology --- */
.jf-methodology {
  margin-bottom: 32px;
}
.jf-methodology p {
  font-family: "Work Sans", sans-serif;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.65;
  margin-bottom: 8px;
}
.jf-methodology strong {
  color: rgba(255,255,255,0.85);
}

/* --- FAQ --- */
.jf-faq {
  margin-bottom: 32px;
}
.jf-faq h2 {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.03em;
  color: #fff;
  margin-bottom: 16px;
}
.jf-faq-item {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-left: 3px solid var(--accent-border);
  border-radius: 2px 14px 14px 2px;
  margin-bottom: 8px;
  overflow: hidden;
}
.jf-faq-item[open] {
  border-left-color: rgba(46,138,216,0.6);
}
.jf-faq-item summary {
  font-family: "Work Sans", sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.jf-faq-item summary::-webkit-details-marker { display: none; }
.jf-faq-item summary::after {
  content: "+";
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.1rem;
  color: #5BA3E6;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.jf-faq-item[open] summary::after {
  content: "\2212";
}
.jf-faq-item p {
  font-family: "Work Sans", sans-serif;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.65;
  padding: 0 20px 16px;
}

/* --- Nearby/Related Links --- */
.jf-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}
.jf-links > div {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-left: 3px solid var(--accent-border);
  border-radius: 2px 14px 14px 2px;
  padding: 20px;
}
.jf-links h3 {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  color: #fff;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.jf-links h3::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent-mid);
  flex-shrink: 0;
}
.jf-links a {
  font-family: "Work Sans", sans-serif;
  font-size: 0.8rem;
  color: #5BA3E6;
  text-decoration: none;
  border-bottom: 1px solid rgba(91,163,230,0.3);
  margin-right: 12px;
  line-height: 2;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.jf-links a:hover { color: #fff; border-bottom-color: #fff; }

.jf-empty-inline {
  font-family: "Work Sans", sans-serif;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* ===================
   RESPONSIVE
   =================== */
@media (max-width: 768px) {
  /* ---- WP header clearance ---- */
  /* WordPress injects a ~60-70px header above our content.
     Push all absolute-positioned map overlays down to clear it. */
  #title-block {
    top: auto;
    bottom: calc(16% + env(safe-area-inset-bottom, 0px));
    left: 12px; right: 12px;
    text-align: center;
  }
  #title-block h2 { font-size: 1.5rem; }
  #title-block p { font-size: 0.68rem; }

  #control-strip {
    top: 72px;
    padding: 3px;
    gap: 1px;
  }
  .ctrl-btn {
    font-size: 0.68rem;
    padding: 5px 9px;
  }

  #filter-row {
    top: 112px;
    max-width: 96vw;
    gap: 2px;
    padding: 3px;
  }
  .filter-chip {
    font-size: 0.66rem;
    padding: 4px 8px;
    gap: 4px;
  }
  .filter-chip .dot { width: 6px; height: 6px; }

  .maplibregl-ctrl-top-right { top: 110px !important; }

  /* ---- Intro overlay ---- */
  .intro-card h1 { font-size: 2.6rem; }
  .intro-card p { font-size: 0.76rem; }

  /* ---- Legend — compact horizontal strip ---- */
  #legend {
    bottom: auto; top: 150px;
    right: 8px; left: auto;
    min-width: 0;
    padding: 8px 12px;
    border-radius: 10px;
    max-width: 56vw;
  }
  .legend-title {
    font-size: 0.62rem;
    margin-bottom: 6px;
  }
  .legend-items {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 10px;
  }
  .legend-item { font-size: 0.66rem; gap: 5px; }
  .legend-swatch { width: 7px; height: 7px; }
  .legend-count { display: none; }

  /* ---- Text content responsive ---- */
  .jf-content { padding: 40px 16px 64px; }
  .jf-content h1 { font-size: 2rem; }
  .jf-stats { grid-template-columns: repeat(2, 1fr); }
  .jf-grid { grid-template-columns: 1fr; }
  .jf-links { grid-template-columns: 1fr; }
  .jf-stat-card p { font-size: 1.5rem; }
}

/* ---- Extra small (phones in portrait) ---- */
@media (max-width: 480px) {
  #control-strip {
    top: 66px;
    left: 4px; right: 4px;
    transform: none;
    justify-content: center;
  }
  .ctrl-btn { font-size: 0.62rem; padding: 5px 7px; }
  .ctrl-group + .ctrl-group { margin-left: 2px; padding-left: 4px; }

  #filter-row {
    top: 104px;
    left: 4px; right: 4px;
    transform: none;
    justify-content: center;
  }

  #title-block { bottom: calc(14% + env(safe-area-inset-bottom, 0px)); }
  #title-block h2 { font-size: 1.3rem; }

  #legend {
    top: 140px;
    right: 6px;
    padding: 6px 10px;
  }
  .legend-title { font-size: 0.58rem; margin-bottom: 4px; }
  .legend-item { font-size: 0.6rem; }

  .jf-stats { gap: 8px; }
  .jf-stat-card { padding: 14px 10px; }
  .jf-stat-card p { font-size: 1.3rem; }
  .jf-stat-card h3 { font-size: 0.66rem; }
}
