:root {
  --bg: #f5f5f2;
  --surface: #ffffff;
  --ink: #16201b;
  --muted: #5f6b65;
  --line: #dcdfd9;
  --line-strong: #c6cbc4;
  --accent: #2c6a4c;
  --stage: #121a16;
  --stage-2: #1a2520;
  --stage-ink: #eef2ef;
  --stage-muted: #a5b2ab;
  --stage-line: #2c3832;
  --live: #e5443a;
  --warn-bg: #fff4d6;
  --warn-ink: #5a4300;
  --r: 2px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1411;
    --surface: #161d19;
    --ink: #e6ebe8;
    --muted: #97a39c;
    --line: #26302b;
    --line-strong: #34403a;
    --accent: #74c39a;
    --stage: #0a0f0c;
    --stage-2: #111914;
    --warn-bg: #3a2f0e;
    --warn-ink: #f5dd9a;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  font-feature-settings: "tnum" 1;
}
a { color: var(--accent); text-underline-offset: 2px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.muted-light { color: var(--stage-muted); }
.small { font-size: 12.5px; }
.eyebrow { display: block; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* Top bar */
.bar { background: var(--stage); color: var(--stage-ink); border-bottom: 1px solid var(--stage-line); }
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand img { border-radius: var(--r); }
.brand strong { display: block; font-size: 16px; letter-spacing: -.005em; }
.brand small { display: block; font-size: 12px; color: var(--stage-muted); }
.links { display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px;
  border: 1px solid var(--stage-line); border-radius: var(--r);
  color: var(--stage-ink); text-decoration: none; font-size: 13px; font-weight: 600; background: var(--stage-2);
}
.btn:hover, .btn:focus-visible { border-color: var(--stage-muted); outline: none; }
.btn .sw { width: 8px; height: 8px; border-radius: 1px; }

/* Stage: player + weather */
.stage { background: linear-gradient(180deg, var(--stage) 0%, var(--stage-2) 100%); color: var(--stage-ink); padding: 20px 0 28px; }
.stage-in { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.label-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 13px; }
.live-pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 3px 9px;
  border: 1px solid var(--stage-line); border-radius: var(--r);
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.live-pill.off .dot { background: var(--stage-muted); animation: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--stage-line); border-radius: var(--r); overflow: hidden; }
.player iframe, .player img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; display: block; }

.wx { border: 1px solid var(--stage-line); border-radius: var(--r); background: rgba(255,255,255,.03); padding: 16px 18px; }
.wx .eyebrow { color: var(--stage-muted); }
.wx-now { display: flex; align-items: center; gap: 14px; margin: 10px 0 14px; }
.wx-temp { font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.wx-cond { font-size: 16px; font-weight: 600; }
.wx-feels { font-size: 13px; }
.wx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0; border-top: 1px solid var(--stage-line); }
.wx-grid > div { padding: 9px 0; border-bottom: 1px solid var(--stage-line); }
.wx-grid > div:nth-child(odd) { padding-right: 10px; }
.wx-grid dt { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--stage-muted); }
.wx-grid dd { margin: 2px 0 0; font-size: 14px; font-weight: 600; }
.wx-alert { margin: 12px 0 0; padding: 8px 10px; background: var(--warn-bg); color: var(--warn-ink); border-radius: var(--r); font-size: 13px; font-weight: 600; }
.wx-fc { margin: 12px 0 0; font-size: 13px; color: var(--stage-ink); }
.wx-fc .eyebrow { margin-bottom: 2px; }
.src { margin: 10px 0 0; font-size: 11.5px; color: var(--stage-muted); }

/* Stats strip */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 16px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); }
.stat { padding: 14px 18px; border-left: 1px solid var(--line); min-width: 0; }
.stat:first-child { border-left: 0; }
.stat strong { display: block; font-size: 20px; line-height: 1.25; margin-top: 2px; overflow-wrap: anywhere; }
.stat small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; margin-top: 2px; }

/* Panels */
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.panel-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel-h h2 { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: .01em; }
.panel p { margin: 12px 16px; }
.visitor img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--line); border-radius: 0 0 var(--r) var(--r); }

.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px 16px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 8px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl .name { font-weight: 600; overflow-wrap: anywhere; }
.tbl .sci { display: block; font-style: italic; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.tag { display: inline-block; margin-left: 6px; padding: 0 5px; border: 1px solid var(--line-strong); border-radius: var(--r); font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); vertical-align: 1px; }
.bar-conf { display: inline-block; width: 44px; height: 4px; background: var(--line); margin-right: 8px; vertical-align: middle; position: relative; }
.bar-conf i { position: absolute; inset: 0 auto 0 0; background: var(--accent); }
.empty td { color: var(--muted); }

.foot { margin-top: 24px; border-top: 1px solid var(--line); background: var(--surface); }
.foot-in { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 20px; font-size: 13px; }

@media (max-width: 900px) {
  .stage-in { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stat strong { font-size: 16px; }
  .cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .tbl th, .tbl td { padding-left: 12px; padding-right: 12px; }
  .bar-conf { display: none; }
  .wx-temp { font-size: 38px; }
}
