/* The public page: the Hub's pixel language, in its own small sheet. */
@font-face { font-family: "Pixelify Sans"; src: url("../fonts/pixelify-sans.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  color-scheme: light;
  --bg: #f6f0e5; --surface: #fffaf2; --surface-2: #f1e7d8; --line: #e0d4c4; --frame: #9b8b88; --shadow: #e3d6ca;
  --text: #291f30; --text-2: #57495a; --accent: #7b430b; --ok: #326342; --err: #a73849; --warn: #854d06;
  --map-filter: saturate(.55) brightness(1.03) contrast(.96); --map-ground: #e9e4da; --map-edge: rgba(90, 70, 50, .16); --glass: rgba(255, 250, 242, .86);
  --series: #2a78d6; --series-soft: #cce3fd; --room: #b0562f;
  --h0: #f1e7d8; --h1: #cce3fd; --h2: #9dc8f7; --h3: #6aabf1; --h4: #257de0; --h5: #1757ac;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #151720; --surface: #1b1b28; --surface-2: #242131; --line: #343145; --frame: #776e92; --shadow: #332e48;
    --text: #f7eddf; --text-2: #c6bdd5; --accent: #f0bb79; --ok: #aed79f; --err: #f19aa6; --warn: #f2bd72;
    --map-filter: invert(1) hue-rotate(190deg) brightness(.82) contrast(.92) saturate(.45); --map-ground: #14161f; --map-edge: rgba(5, 6, 14, .6); --glass: rgba(24, 24, 36, .82);
    --series: #3987e5; --series-soft: #22344f; --room: #d4793f;
    --h0: #242131; --h1: #0e3d7e; --h2: #1757ac; --h3: #2370cd; --h4: #519ced; --h5: #9dc8f7;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151720; --surface: #1b1b28; --surface-2: #242131; --line: #343145; --frame: #776e92; --shadow: #332e48;
  --text: #f7eddf; --text-2: #c6bdd5; --accent: #f0bb79; --ok: #aed79f; --err: #f19aa6; --warn: #f2bd72;
  --map-filter: invert(1) hue-rotate(190deg) brightness(.82) contrast(.92) saturate(.45); --map-ground: #14161f; --map-edge: rgba(5, 6, 14, .6); --glass: rgba(24, 24, 36, .82);
  --series: #3987e5; --series-soft: #22344f; --room: #d4793f;
  --h0: #242131; --h1: #0e3d7e; --h2: #1757ac; --h3: #2370cd; --h4: #519ced; --h5: #9dc8f7;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 Inter, system-ui, sans-serif; }
h1, h2 { font-family: "Pixelify Sans", Inter, sans-serif; font-weight: 600; line-height: 1.2; margin: 0; text-wrap: balance; }
h1 { font-size: 26px; overflow-wrap: anywhere; } h2 { font-size: 18px; }
p { margin: 0; } .muted { color: var(--text-2); font-size: 13px; }
button, input, select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--frame); border-radius: 2px; padding: 7px 12px; min-height: 38px; }
button { cursor: pointer; } button:hover { background: var(--surface-2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.top, main, footer { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 28px); }
.top { display: flex; align-items: center; gap: 14px; padding-top: 22px; padding-bottom: 18px; flex-wrap: wrap; }
.top img { image-rendering: pixelated; } .who { flex: 1 1 220px; min-width: 0; }
.live { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--frame); padding: 6px 11px; font-size: 13px; background: var(--surface); }
.live i { width: 9px; height: 9px; background: var(--text-2); } .live.on i { background: var(--ok); } .live.off i { background: var(--err); }
main { display: grid; gap: 18px; } main > * { min-width: 0; }
.intro { max-width: 70ch; white-space: pre-line; overflow-wrap: anywhere; }
.problem { border: 1px solid var(--err); background: var(--surface); padding: 12px 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.tile, .card { background: var(--surface); border: 1px solid var(--frame); box-shadow: 3px 3px 0 var(--shadow); }
.tile { padding: 13px 15px; } .tile b { display: block; font: 650 29px/1.2 Inter, system-ui, sans-serif; letter-spacing: -.02em; }
.tile span { color: var(--text-2); font-size: 13px; } .tile small { display: block; color: var(--text-2); font-size: 12.5px; }
.card { padding: 16px; min-width: 0; } .card > p { max-width: 75ch; }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; margin-bottom: 12px; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr)); gap: 18px; }
.stage { position: relative; border: 1px solid var(--frame); background: var(--surface-2); overflow: hidden; }
#map { height: min(74vh, 680px); min-height: 360px; background: var(--map-ground); z-index: 0; }
.stage:fullscreen #map { height: 100vh; }
.stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 90px var(--map-edge); z-index: 1; }
.leaflet-tile-pane { filter: var(--map-filter); }
.leaflet-bar { border: 1px solid var(--frame) !important; border-radius: 2px !important; } .leaflet-bar a { background: var(--surface) !important; color: var(--text) !important; border-color: var(--line) !important; border-radius: 0 !important; }
.leaflet-control-attribution { background: var(--glass) !important; color: var(--text-2) !important; } .leaflet-control-attribution a { color: var(--text-2) !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--text); border-radius: 2px; border: 1px solid var(--frame); box-shadow: 3px 3px 0 var(--shadow); }
.leaflet-popup-tip { border: 0; box-shadow: none; } .leaflet-container a.leaflet-popup-close-button { color: var(--text-2); }
.leaflet-tooltip.nm { background: var(--surface); color: var(--text); border: 1px solid var(--frame); border-radius: 2px; box-shadow: 2px 2px 0 var(--shadow); padding: 2px 7px; } .leaflet-tooltip.nm::before { display: none; }
.beacon { position: relative; width: 26px; height: 26px; } .beacon b { position: absolute; inset: 6px; background: #ff4d5e; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.beacon i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid #ff4d5e; opacity: 0; }
.feed { position: absolute; z-index: 2; top: 12px; left: 12px; width: min(292px, calc(100% - 24px)); background: var(--glass); backdrop-filter: blur(9px); border: 1px solid var(--frame); padding: 10px 12px; pointer-events: none; }
.feed-head { display: flex; align-items: center; gap: 8px; font-size: 13px; } .feed-head span { margin-left: auto; color: var(--text-2); font-variant-numeric: tabular-nums; } .feed-head i { width: 9px; height: 9px; background: var(--err); border-radius: 50%; }
.feed ol { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 7px; } .feed li { display: grid; grid-template-columns: 4px 1fr; gap: 9px; font-size: 13px; line-height: 1.35; } .feed li i { border-radius: 2px; }
.feed li > div { min-width: 0; } .feed li b { font-weight: 600; } .feed li span { color: var(--text-2); margin-left: 7px; font-size: 12px; } .feed li small { display: block; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.feed li:nth-child(4) { opacity: .65; } .feed li:nth-child(5) { opacity: .4; }
#full { position: absolute; z-index: 2; top: 12px; right: 12px; min-height: 34px; padding: 4px 11px; font-size: 13px; background: var(--glass); }
.leaflet-container { font: 13px/1.45 Inter, system-ui, sans-serif; }
.leaflet-popup-content b { font-size: 14px; }
.toggles { display: flex; gap: 8px; flex-wrap: wrap; }
.toggles button { min-height: 34px; padding: 4px 11px; font-size: 13px; } .toggles button[aria-pressed="true"] { background: var(--series-soft); border-color: var(--series); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; } .legend i { width: 14px; height: 14px; border: 1px solid rgba(0, 0, 0, .35); }
.legend i.dot { border-radius: 50%; width: 11px; height: 11px; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .4); } .legend i.sq { border-radius: 2px; } .legend i.trail { width: 22px; height: 5px; border: 0; border-radius: 3px; }
.chart { min-height: 180px; } .chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--text-2); font: 11px Inter, system-ui, sans-serif; } .chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .bar { fill: var(--series); } .chart .hit { fill: transparent; } .chart g.m:hover .bar, .chart g.m:focus .bar { opacity: .72; } .chart g.m:focus { outline: none; }
.chart .line { fill: none; stroke: var(--series); stroke-width: 2; stroke-linejoin: round; } .chart .cross { stroke: var(--text-2); stroke-width: 1; }
.chart .pt { fill: var(--series); stroke: var(--surface); stroke-width: 2; }
.hb { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 8px 10px; align-items: center; font-size: 13.5px; }
.hb > span:nth-child(3n + 1) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .hb > span:nth-child(3n) { text-align: right; font-variant-numeric: tabular-nums; }
.hb i { display: block; height: 12px; background: var(--series); border-radius: 0 3px 3px 0; min-width: 2px; }
.heat { display: grid; grid-template-columns: 30px repeat(24, minmax(0, 1fr)); gap: 2px; font-size: 11px; color: var(--text-2); }
.heat i { height: clamp(11px, 2vw, 19px); } .heat i:hover { outline: 2px solid var(--text); } .heat span { align-self: center; white-space: nowrap; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; } .filters input { flex: 1 1 200px; min-width: 0; }
.scroll { overflow-x: auto; } table { border-collapse: collapse; width: 100%; font-size: 14px; } th, td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--text-2); font-weight: 500; font-size: 13px; } td:first-child { max-width: 340px; overflow: hidden; text-overflow: ellipsis; } .n { text-align: right; font-variant-numeric: tabular-nums; }
#more { margin-top: 12px; } .empty { color: var(--text-2); padding: 22px 0; text-align: center; }
footer { padding-top: 26px; padding-bottom: 40px; display: grid; gap: 4px; font-size: 13.5px; color: var(--text-2); }
#tip { position: fixed; z-index: 1000; pointer-events: none; background: var(--surface); border: 1px solid var(--frame); box-shadow: 3px 3px 0 var(--shadow); padding: 6px 10px; font-size: 13px; max-width: 240px; }
#tip b { display: block; font-size: 15px; } #tip span { color: var(--text-2); }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: no-preference) { .live.on i { animation: blink 2.4s steps(2, jump-none) infinite; } @keyframes blink { 50% { opacity: .35; } }
  .beacon i { animation: beat 2.6s cubic-bezier(.2, .6, .3, 1) infinite; } .beacon i:nth-child(2) { animation-delay: 1.3s; } @keyframes beat { 0% { transform: scale(.5); opacity: .9; } 100% { transform: scale(2.6); opacity: 0; } }
  .feed-head i { animation: blink 1.6s ease-in-out infinite; } .feed li { animation: slide .35s cubic-bezier(.2, .8, .3, 1); } @keyframes slide { from { opacity: 0; transform: translateX(-14px); } } }
@media (max-width: 620px) { .feed { width: auto; right: 12px; padding: 8px 10px; } .feed li:nth-child(n + 3) { display: none; } #full { top: auto; bottom: 12px; right: auto; left: 12px; } #map { height: 70vh; } }

.exploration-link { color: var(--accent); border: 1px solid var(--frame); padding: 6px 11px; text-underline-offset: 3px; }
