:root {
  --bg: #050a12;
  --bg2: #0a1422;
  --panel: rgba(255,255,255,0.045);
  --line: rgba(255,255,255,0.10);
  --text: #eef4fb;
  --muted: rgba(238,244,251,0.62);
  --dim: rgba(238,244,251,0.38);
  --cyan: #00a0da;
  --cyan2: #4fd3ff;
  --pink: #ff0084;
  --green: #4cdb81;
  --yellow: #fffc00;
  --teal: #005878;
  --orange: #ffb020;
  --font: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); overflow: hidden; }
#viewport { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); }
#stage {
  width: 1920px; height: 1080px; position: relative; overflow: hidden;
  transform-origin: center center;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(0,160,218,0.22), transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 110%, rgba(255,0,132,0.14), transparent 60%),
    radial-gradient(ellipse 50% 40% at 5% 100%, rgba(76,219,129,0.10), transparent 60%),
    var(--bg);
  display: grid; grid-template-rows: 96px 1fr 84px; grid-template-columns: minmax(0, 1fr);
}
#stage > * { min-width: 0; width: 1920px; overflow: hidden; }
#stage::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 34px 34px; opacity: .5;
}

/* ── Top bar ─────────────────────────────────────────── */
#top {
  position: relative; z-index: 2; display: grid; grid-template-columns: 400px minmax(0,1fr) 470px; align-items: center;
  padding: 0 44px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(5,10,18,0.85), rgba(5,10,18,0.45));
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-name { font-size: 30px; font-weight: 700; letter-spacing: 0.08em; }
.logo { height: 66px; width: auto; display: block; }
.brand-tld { color: var(--cyan2); font-weight: 500; letter-spacing: 0; }
.brand-live { font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: .2em; color: var(--bg); background: var(--pink); padding: 4px 9px; border-radius: 4px; }
.live-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 0 rgba(255,0,132,0.7); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,0,132,0.7);} 70% { box-shadow: 0 0 0 14px rgba(255,0,132,0);} 100% { box-shadow: 0 0 0 0 rgba(255,0,132,0);} }

.clocks { display: flex; justify-content: center; gap: 26px; }
.clock { text-align: center; min-width: 104px; }
.clock .city { font-size: 12px; letter-spacing: .18em; color: var(--muted); text-transform: uppercase; }
.clock .time { font-family: var(--mono); font-size: 27px; font-weight: 500; line-height: 1.15; font-variant-numeric: tabular-nums; }
.clock.utc .time { color: var(--cyan2); }

.status { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.badges { display: flex; gap: 8px; }
.badge { font-family: var(--mono); font-size: 14px; font-weight: 700; padding: 5px 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); letter-spacing: .04em; }
.badge.lvl0 { color: var(--green); border-color: rgba(76,219,129,.35); }
.badge.lvl1 { color: var(--yellow); border-color: rgba(255,252,0,.35); }
.badge.lvl2 { color: var(--orange); border-color: rgba(255,176,32,.45); }
.badge.lvl3 { color: var(--pink); border-color: rgba(255,0,132,.5); background: rgba(255,0,132,.12); }
.date { font-size: 15px; color: var(--muted); letter-spacing: .04em; }

/* ── Slides ─────────────────────────────────────────── */
#slides { position: relative; z-index: 1; }
.slide { position: absolute; inset: 0; padding: 36px 64px 28px; opacity: 0; transition: opacity .7s ease; display: none; }
.slide.active { opacity: 1; display: block; }
.slide.leaving { display: block; opacity: 0; }

.slide-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; }
.slide-title { font-size: 48px; font-weight: 700; letter-spacing: -0.01em; line-height: 1; }
.slide-title small { display: block; font-size: 16px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--cyan2); margin-bottom: 10px; }
.slide-src { font-family: var(--mono); font-size: 14px; color: var(--dim); text-align: right; line-height: 1.5; }

.grid { display: grid; gap: 22px; }
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 26px 30px; position: relative; overflow: hidden; }
.panel.accent::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c, var(--cyan)); }
.label { font-size: 15px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.big { font-family: var(--mono); font-weight: 700; font-size: 96px; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.big.xl { font-size: 150px; }
.big small { font-size: 32px; color: var(--muted); font-weight: 500; margin-left: 8px; }
.sub { font-size: 20px; color: var(--muted); margin-top: 8px; line-height: 1.35; }
.val { font-family: var(--mono); font-weight: 700; font-size: 44px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.val.md { font-size: 34px; }
.c-cyan { color: var(--cyan2); } .c-pink { color: var(--pink); } .c-green { color: var(--green); } .c-yellow { color: var(--yellow); } .c-orange { color: var(--orange); }
.row { display: flex; gap: 22px; align-items: stretch; }
.stack { display: flex; flex-direction: column; gap: 22px; }
.fill { flex: 1; min-width: 0; }

table.list { width: 100%; border-collapse: collapse; font-size: 22px; }
table.list td { padding: 9px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.list tr:last-child td { border-bottom: 0; }
table.list td.m { font-family: var(--mono); font-weight: 700; width: 92px; }
table.list td.t { font-family: var(--mono); color: var(--muted); text-align: right; width: 160px; font-size: 18px; }
table.list td.p { max-width: 520px; }

.bars { display: flex; flex-direction: column; gap: 10px; }
.bar { display: grid; grid-template-columns: 300px 1fr 130px; align-items: center; gap: 16px; font-size: 24px; }
.bar .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .track { height: 26px; background: rgba(255,255,255,0.06); border-radius: 6px; overflow: hidden; }
.bar .fillbar { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--teal), var(--cyan), var(--cyan2)); transition: width .8s ease; }
.bar .n { font-family: var(--mono); font-weight: 700; text-align: right; }
.bar .n .tr { font-size: 16px; margin-left: 8px; color: var(--muted); }
.bar.pos .fillbar { background: linear-gradient(90deg, #1e7a48, var(--green)); }

.img-panel { padding: 0; background: #000; display: grid; place-items: center; }
.img-panel img { width: 100%; height: 100%; object-fit: contain; display: block; }
.caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 22px; background: linear-gradient(0deg, rgba(0,0,0,0.85), transparent); font-size: 17px; color: var(--muted); font-family: var(--mono); }

svg.chart { width: 100%; height: 100%; display: block; }
svg.chart text { font-family: var(--mono); fill: var(--muted); font-size: 15px; }
canvas#map { width: 100%; height: 100%; display: block; border-radius: 12px; }

.alert { display: grid; grid-template-columns: 170px 1fr 220px; gap: 18px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 24px; }
.alert:last-child { border-bottom: 0; }
.alert .kind { font-family: var(--mono); font-size: 14px; font-weight: 700; letter-spacing: .12em; padding: 6px 10px; border-radius: 6px; text-align: center; }
.alert .kind.ALERT, .alert .kind.CONTINUED { background: rgba(255,176,32,.16); color: var(--orange); }
.alert .kind.WARNING, .alert .kind.EXTENDED { background: rgba(255,0,132,.16); color: var(--pink); }
.alert .kind.WATCH { background: rgba(255,252,0,.14); color: var(--yellow); }
.alert .kind.SUMMARY, .alert .kind.INFO, .alert .kind.CANCEL { background: rgba(0,160,218,.16); color: var(--cyan2); }
.alert .when { font-family: var(--mono); color: var(--muted); font-size: 18px; text-align: right; }

.tile { display: flex; flex-direction: column; justify-content: space-between; min-height: 250px; }
.tile .big { font-size: 84px; }
.empty { color: var(--dim); font-size: 22px; padding: 20px 0; }
.foot { font-family: var(--mono); font-size: 14px; color: var(--dim); margin-top: 14px; }
.stale-note { position: absolute; right: 64px; bottom: 10px; font-family: var(--mono); font-size: 13px; color: var(--orange); z-index: 3; }

/* ── Bottom / Ticker ─────────────────────────────────── */
#bottom { position: relative; z-index: 2; border-top: 1px solid var(--line); background: rgba(5,10,18,0.9); display: grid; grid-template-rows: 4px 1fr; }
#progress { background: rgba(255,255,255,0.06); }
#progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--cyan2)); }
.ticker { display: grid; grid-template-columns: 220px 1fr; align-items: center; height: 80px; }
.ticker-label { height: 100%; display: grid; place-items: center; background: var(--cyan); color: var(--bg); font-family: var(--mono); font-weight: 700; font-size: 16px; letter-spacing: .2em; }
.ticker-track { overflow: hidden; height: 100%; display: flex; align-items: center; mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.ticker-text { white-space: nowrap; font-size: 28px; font-weight: 500; will-change: transform; animation: ticker linear infinite; padding-left: 100%; }
.ticker-text .sep { color: var(--cyan2); margin: 0 26px; }
.ticker-text b { font-family: var(--mono); font-weight: 700; color: var(--cyan2); }
.ticker-text b.hot { color: var(--pink); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* ── Music ───────────────────────────────────────────── */
.sound { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 22px; cursor: pointer; display: grid; place-items: center; }
.sound.on { border-color: rgba(79,211,255,.6); box-shadow: 0 0 0 4px rgba(0,160,218,.15); }
.sound-hint { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); z-index: 5; background: var(--cyan); color: var(--bg); font-weight: 700; font-size: 28px; padding: 18px 34px; border-radius: 14px; cursor: pointer; box-shadow: 0 10px 40px rgba(0,160,218,.45); animation: pulse 1.6s infinite; }
