/* SEVEX Status — "budova s výťahovou šachtou" */

:root {
  --shaft: #0A111C;
  --steel: #111B2A;
  --steel-2: #172437;
  --rail: #243650;
  --rail-2: #33496A;
  --brushed: #8697AE;
  --ink: #E7EEF6;
  --led: #FF9E3D;
  --go: #3DDC97;
  --slow: #F2C94C;
  --stop: #FF5A5F;
  --idle: #3A4A60;

  --f-display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "Martian Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --radius: 14px;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 700px at 78% -10%, rgba(255, 158, 61, .10), transparent 60%),
    radial-gradient(900px 600px at 10% 20%, rgba(61, 220, 151, .06), transparent 60%),
    linear-gradient(180deg, #0C1524 0%, var(--shaft) 40%, #070C14 100%);
  color: var(--ink);
  font: 400 15px/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--led); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--led); color: #1a0f02; padding: 8px 14px; border-radius: 8px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ── Top bar ─────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter);
  max-width: 1320px; margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 22px/1 var(--f-display); letter-spacing: .06em; }
.brand b { color: var(--led); font-weight: 600; margin-left: 4px; letter-spacing: .02em; }
.brand-mark { width: 28px; height: 28px; }
.brand-mark rect { fill: none; stroke: var(--led); stroke-width: 2.4; }
.brand-mark path { fill: none; stroke: var(--go); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.pulse {
  display: inline-flex; align-items: center; gap: 10px;
  font: 400 12px/1.2 var(--f-mono); color: var(--brushed);
  padding: 8px 14px 8px 10px; border: 1px solid var(--rail); border-radius: 999px; background: rgba(17, 27, 42, .7);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.pulse-ring { width: 18px; height: 18px; transform: rotate(-90deg); }
.pulse-ring circle { fill: none; stroke-width: 3; }
.pulse-ring circle:first-child { stroke: var(--rail); }
/* obvod kruhu r=8 (2πr ≈ 50.27) v skutočných jednotkách — funguje aj bez podpory pathLength */
#pulseArc { stroke: var(--go); stroke-dasharray: 50.27; stroke-dashoffset: 50.27; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.pulse.is-loading #pulseArc { stroke: var(--led); animation: spin-arc 1s linear infinite; stroke-dashoffset: 35.19; }
.pulse.is-error #pulseArc { stroke: var(--stop); stroke-dashoffset: 0; }
@keyframes spin-arc { to { transform: rotate(360deg); transform-origin: 10px 10px; } }

main { max-width: 1320px; margin: 0 auto; padding-inline: var(--gutter); }

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center; gap: 24px;
  min-height: 600px; padding-block: 12px 24px;
}

.eyebrow {
  margin: 0 0 30px;
  font: 500 12px/1 var(--f-mono); letter-spacing: .28em; color: var(--led);
  display: flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--led); box-shadow: 0 0 12px var(--led); }

h1 {
  margin: 0;
  font: 900 clamp(52px, 7.4vw, 104px)/.94 var(--f-display);
  letter-spacing: -.01em; text-transform: uppercase;
  text-wrap: balance;
}
h1 .hl-go { color: var(--go); }
h1 .hl-stop { color: var(--stop); }
h1 .hl-slow { color: var(--slow); }

.lede { margin: 18px 0 0; max-width: 46ch; color: var(--brushed); font-size: 17px; }
.lede strong { color: var(--ink); font-weight: 600; }

/* Ukazovateľ poschodia ako v kabíne výťahu */
.indicator {
  margin-top: 30px;
  display: inline-grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 14px;
  padding: 12px 20px 12px 16px; min-width: 300px;
  background: linear-gradient(180deg, #05080D, #0B1119);
  border: 1px solid #2A3647; border-radius: 12px;
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, .8), 0 1px 0 rgba(255, 255, 255, .04);
}
.ind-arrow, .ind-floor {
  font: 700 22px/1 var(--f-mono); color: var(--led);
  text-shadow: 0 0 10px rgba(255, 158, 61, .75), 0 0 24px rgba(255, 158, 61, .35);
}
.ind-arrow { font-size: 16px; transition: transform .4s ease; }
.ind-arrow.up { transform: rotate(180deg); }
.ind-floor { font-size: 44px; min-width: 1.2ch; text-align: center; }
.ind-floor.flip { animation: led-flip .35s ease; }
@keyframes led-flip { 0% { opacity: .1; transform: translateY(-6px); } 100% { opacity: 1; transform: none; } }
.ind-info { display: grid; gap: 3px; border-left: 1px solid #253043; padding-left: 14px; }
.ind-info b { font: 600 13px/1.2 var(--f-mono); color: #F3D2AE; letter-spacing: .04em; }
.ind-info em { font: 400 11px/1.2 var(--f-mono); font-style: normal; color: var(--go); }
.ind-info em.bad { color: var(--stop); }
.ind-info em.slow { color: var(--slow); }

.kpis {
  margin: 30px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  background: var(--rail); border: 1px solid var(--rail); border-radius: var(--radius); overflow: hidden;
}
.kpi { margin: 0; padding: 14px 16px; background: var(--steel); }
.kpi dt { font: 400 11px/1.3 var(--f-mono); color: var(--brushed); letter-spacing: .04em; }
.kpi dd { margin: 6px 0 0; font: 700 22px/1 var(--f-mono); letter-spacing: -.02em; white-space: nowrap; }
.kpi-main dd { color: var(--go); }

/* ── 3D budova ─────────────────────────────────────────────── */
.scene {
  position: relative; height: 600px;
  -webkit-perspective: 1700px; perspective: 1700px; perspective-origin: 50% 35%;
  display: grid; place-items: center;
}
.rig {
  --rx: -21deg; --ry: -36deg;
  -webkit-transform-style: preserve-3d; transform-style: preserve-3d;
  transform: translateY(24px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .9s cubic-bezier(.2, .7, .2, 1);
}
.sway { -webkit-transform-style: preserve-3d; transform-style: preserve-3d; animation: sway 16s ease-in-out infinite; }
@keyframes sway { 0%, 100% { transform: rotateY(-5deg); } 50% { transform: rotateY(5deg); } }

.tower {
  --w: 250px; --d: 164px; --h: 60px; --gap: 12px; --n: 5; --ci: 0;
  position: relative; width: var(--w); height: calc(var(--n) * (var(--h) + var(--gap)));
  -webkit-transform-style: preserve-3d; transform-style: preserve-3d;
}

/* Prehliadače bez skutočných CSS 3D transformácií (preserve-3d + perspective) by budovu
   sploštili do neprehľadnej koláže — radšej ju skryť a nechať len textový prehľad. */
@supports not ((transform-style: preserve-3d) and (perspective: 1px)) {
  .scene { display: none; }
  .hero { grid-template-columns: 1fr; }
}

.floor {
  position: absolute; left: 0; top: calc(var(--i) * (var(--h) + var(--gap)));
  width: var(--w); height: var(--h);
  -webkit-transform-style: preserve-3d; transform-style: preserve-3d;
  cursor: pointer;
  /* len transform — animovaná opacity by v Chrome sploštila 3D steny */
  animation: floor-in 1s cubic-bezier(.2, .8, .2, 1) backwards;
  animation-delay: calc(var(--i) * 90ms);
}
@keyframes floor-in { from { transform: translateY(-260px); } }

.face { position: absolute; left: 0; top: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.f-front {
  width: var(--w); height: var(--h);
  transform: translateZ(calc(var(--d) / 2));
  background: linear-gradient(180deg, #22344D 0%, #1A283C 100%);
  border-top: 2px solid #3D5577;
  box-shadow: inset 0 -10px 20px rgba(0, 0, 0, .35);
}
.f-back { width: var(--w); height: var(--h); transform: translateZ(calc(var(--d) / -2)) rotateY(180deg); background: #0E1725; }
.f-right {
  width: var(--d); height: var(--h);
  transform: translateX(calc(var(--w) - var(--d) / 2)) rotateY(90deg);
  background: linear-gradient(180deg, #16243A, #101B2C);
  border-top: 2px solid #2E4363;
  display: flex; align-items: center; gap: 10px; padding: 0 16px;
}
.f-left { width: var(--d); height: var(--h); transform: translateX(calc(var(--d) / -2)) rotateY(-90deg); background: #0E1725; }
.f-top {
  width: var(--w); height: var(--d);
  transform: translateY(calc(var(--d) / -2)) rotateX(90deg);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(0deg, rgba(255, 255, 255, .03) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(135deg, #2A405E, #1B2A40);
  display: grid; place-items: center; overflow: hidden;
}

.f-right .led {
  font: 700 30px/1 var(--f-mono); color: var(--led);
  text-shadow: 0 0 12px rgba(255, 158, 61, .8);
  min-width: 1ch;
}
.f-right span { font: 600 12px/1.15 var(--f-mono); color: #B8C6D8; letter-spacing: .02em; }
.floor.alert .f-right .led { color: var(--stop); text-shadow: 0 0 12px rgba(255, 90, 95, .9); animation: blink 1.1s steps(2, start) infinite; }
.floor.alert .f-front { border-top-color: var(--stop); box-shadow: inset 0 -10px 20px rgba(0, 0, 0, .35), 0 -6px 30px rgba(255, 90, 95, .35); }
.floor.current .f-front { border-top-color: var(--led); }
.floor:hover .f-front { background: linear-gradient(180deg, #2A3F5C, #1F304A); }

.wins {
  position: absolute; inset: 9px 12px 9px 68px;
  display: flex; flex-wrap: wrap; align-content: center; gap: 5px 6px;
}
.win {
  width: 17px; height: 19px; border-radius: 2px;
  background: var(--idle);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35);
  transition: background .6s ease, box-shadow .6s ease;
}
.win.s-up { background: linear-gradient(180deg, #7DF2C0, var(--go)); box-shadow: 0 0 10px rgba(61, 220, 151, .55); }
.win.s-degraded { background: linear-gradient(180deg, #FFE08A, var(--slow)); box-shadow: 0 0 10px rgba(242, 201, 76, .6); }
.win.s-down { background: var(--stop); box-shadow: 0 0 14px rgba(255, 90, 95, .9); animation: blink 1s steps(2, start) infinite; }
.win.s-unknown { background: #4A5870; }
.win.scan { animation: scan .7s ease; }
@keyframes scan { 40% { filter: brightness(2.2); } }
@keyframes blink { to { opacity: .35; } }

/* Strecha: radar */
.ring {
  grid-area: 1 / 1; width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--go); opacity: 0;
  animation: radar 3.6s cubic-bezier(.1, .6, .3, 1) infinite;
}
.ring:nth-child(2) { animation-delay: 1.2s; }
.ring:nth-child(3) { animation-delay: 2.4s; }
.tower.alert .ring { border-color: var(--stop); }
@keyframes radar { 0% { transform: scale(.2); opacity: .9; } 100% { transform: scale(5); opacity: 0; } }
.beacon { grid-area: 1 / 1; width: 12px; height: 12px; border-radius: 50%; background: var(--go); box-shadow: 0 0 16px 4px rgba(61, 220, 151, .8); }
.tower.alert .beacon { background: var(--stop); box-shadow: 0 0 16px 4px rgba(255, 90, 95, .9); }

.mast {
  position: absolute; left: calc(var(--w) * .72); top: -64px; width: 3px; height: 64px;
  background: linear-gradient(180deg, #8FA3BD, #3C4E68);
  transform: translateZ(10px);
}
.mast i {
  position: absolute; left: -3px; top: -6px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--stop); box-shadow: 0 0 12px 3px rgba(255, 90, 95, .8);
  animation: blink 1.6s steps(2, start) infinite;
}

/* Výťahová šachta pred fasádou */
.shaft {
  --sw: 44px; --sd: 40px; --top: 34px;
  position: absolute; left: 12px; top: calc(var(--top) * -1);
  width: var(--sw); height: calc(100% + var(--top) + 6px);
  transform: translateZ(calc(var(--d) / 2 + var(--sd) / 2 + 2px));
  -webkit-transform-style: preserve-3d; transform-style: preserve-3d;
}
.shaft .face { -webkit-backface-visibility: visible; backface-visibility: visible; }
.s-front, .s-back { width: var(--sw); height: 100%; }
.s-front {
  transform: translateZ(calc(var(--sd) / 2));
  background: linear-gradient(100deg, rgba(160, 200, 255, .10), rgba(160, 200, 255, .03) 40%, rgba(255, 255, 255, .12) 55%, rgba(160, 200, 255, .03) 70%);
  border: 1px solid rgba(160, 200, 255, .28);
}
.s-back { transform: translateZ(calc(var(--sd) / -2)); background: rgba(8, 14, 24, .7); border: 1px solid rgba(160, 200, 255, .12); }
.s-right, .s-left { width: var(--sd); height: 100%; background: rgba(160, 200, 255, .06); border: 1px solid rgba(160, 200, 255, .22); }
.s-right { transform: translateX(calc(var(--sw) - var(--sd) / 2)) rotateY(90deg); }
.s-left { transform: translateX(calc(var(--sd) / -2)) rotateY(-90deg); }
.s-cap { width: var(--sw); height: var(--sd); transform: translateY(calc(var(--sd) / -2)) rotateX(90deg); background: #33465F; border: 1px solid #4B6283; }

.cable {
  position: absolute; left: calc(var(--sw) / 2 - 1px); top: 0; width: 2px;
  height: calc(var(--top) + var(--ci) * (var(--h) + var(--gap)) + (var(--h) - 46px) / 2);
  background: repeating-linear-gradient(180deg, #9AB0CB 0 3px, #56698A 3px 6px);
  transition: height 1.8s cubic-bezier(.65, 0, .35, 1);
}
.cabin {
  --cw: 34px; --cd: 30px; --ch: 46px;
  position: absolute; left: calc((var(--sw) - var(--cw)) / 2); top: 0;
  width: var(--cw); height: var(--ch);
  -webkit-transform-style: preserve-3d; transform-style: preserve-3d;
  transform: translateY(calc(var(--top) + var(--ci) * (var(--h) + var(--gap)) + (var(--h) - var(--ch)) / 2));
  transition: transform 1.8s cubic-bezier(.65, 0, .35, 1);
}
.cabin .face { -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.c-front {
  width: var(--cw); height: var(--ch); transform: translateZ(calc(var(--cd) / 2));
  background: linear-gradient(180deg, #FFD7A6, var(--led) 45%, #C86A12);
  box-shadow: 0 0 26px 6px rgba(255, 158, 61, .55);
}
.c-front::after { content: ""; position: absolute; left: 50%; top: 5px; bottom: 5px; width: 1px; background: rgba(90, 40, 0, .5); }
.c-right { width: var(--cd); height: var(--ch); transform: translateX(calc(var(--cw) - var(--cd) / 2)) rotateY(90deg); background: linear-gradient(180deg, #E8903A, #9C4F0B); }
.c-top { width: var(--cw); height: var(--cd); transform: translateY(calc(var(--cd) / -2)) rotateX(90deg); background: #FFC27A; }
.tower.alert .c-front { background: linear-gradient(180deg, #FFB3B5, var(--stop) 45%, #A8252A); box-shadow: 0 0 26px 6px rgba(255, 90, 95, .55); }
.tower.alert .c-right { background: linear-gradient(180deg, #E0484D, #8E1D22); }
.tower.alert .c-top { background: #FF9EA1; }

/* Zem */
.ground {
  position: absolute; left: calc(var(--w) / 2 - 330px); top: calc(100% - 330px);
  width: 660px; height: 660px;
  transform: rotateX(90deg);
  background:
    radial-gradient(circle at 50% 50%, rgba(61, 220, 151, .22), transparent 28%),
    linear-gradient(90deg, rgba(134, 151, 174, .16) 1px, transparent 1px) 0 0 / 30px 30px,
    linear-gradient(0deg, rgba(134, 151, 174, .16) 1px, transparent 1px) 0 0 / 30px 30px;
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%);
  mask: radial-gradient(circle, #000 20%, transparent 68%);
  pointer-events: none;
}
.tower.alert .ground { background:
    radial-gradient(circle at 50% 50%, rgba(255, 90, 95, .26), transparent 28%),
    linear-gradient(90deg, rgba(134, 151, 174, .16) 1px, transparent 1px) 0 0 / 30px 30px,
    linear-gradient(0deg, rgba(134, 151, 174, .16) 1px, transparent 1px) 0 0 / 30px 30px; }

/* ── Tlačidlá poschodí ─────────────────────────────────────── */
.callpanel {
  position: sticky; top: 10px; z-index: 20;
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  width: fit-content; max-width: 100%; margin: 8px auto 28px;
  padding: 8px; border-radius: 999px;
  background: rgba(13, 21, 33, .82); border: 1px solid var(--rail);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 10px 40px rgba(0, 0, 0, .4);
}
.call {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px; border-radius: 999px;
  text-decoration: none; font: 500 13px/1 var(--f-body); color: #B8C6D8;
  transition: background .2s ease, color .2s ease;
}
.call b {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  font: 700 14px/1 var(--f-mono); color: var(--ink);
  background: radial-gradient(circle at 40% 35%, #3A4E6C, #1B283B);
  border: 2px solid #4A6184;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, .5);
  transition: border-color .3s ease, box-shadow .3s ease, color .3s ease;
}
.call:hover { background: var(--steel-2); color: var(--ink); }
.call.lit b { border-color: var(--led); color: var(--led); box-shadow: 0 0 14px rgba(255, 158, 61, .6), inset 0 -2px 4px rgba(0, 0, 0, .5); }
.call.alert b { border-color: var(--stop); color: var(--stop); box-shadow: 0 0 14px rgba(255, 90, 95, .7); }

/* ── Poschodia (sekcie) ─────────────────────────────────────── */
.floors { display: grid; gap: 22px; }
/* kým nie sú dáta (bez data/latest.json), rezervovať miesto — obsah pod tým by inak poskočil */
.floors:empty { min-height: 100vh; }
.callpanel:empty { visibility: hidden; min-height: 62px; }
.booting .hero-copy, .booting .callpanel, .booting .todo { visibility: hidden; }

.level {
  scroll-margin-top: 80px;
  background: linear-gradient(180deg, rgba(23, 36, 55, .75), rgba(15, 24, 37, .75));
  border: 1px solid var(--rail); border-radius: 20px;
  padding: 22px clamp(16px, 2.4vw, 28px) 18px;
  position: relative; overflow: hidden;
  /* poschodia mimo obrazovky prehliadač nevykresľuje — na mobile výrazne menej práce pri načítaní */
  content-visibility: auto; contain-intrinsic-size: auto 520px;
  transition: border-color .4s ease;
}
.level.is-alert { border-color: rgba(255, 90, 95, .55); }
.level.reveal { opacity: 0; transform: translateY(18px); }
.level.reveal.in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }

.level-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; margin-bottom: 14px; }
.level-code {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px;
  font: 700 26px/1 var(--f-mono); color: var(--led);
  background: #070B11; border: 1px solid #2A3647;
  text-shadow: 0 0 12px rgba(255, 158, 61, .7);
}
.level.is-alert .level-code { color: var(--stop); text-shadow: 0 0 12px rgba(255, 90, 95, .8); }
.level-head h2 { margin: 0; font: 800 30px/1 var(--f-display); letter-spacing: .01em; text-transform: uppercase; }
.level-head p { margin: 4px 0 0; font: 400 12px/1.3 var(--f-mono); color: var(--brushed); }
.level-count { font: 500 13px/1 var(--f-mono); color: var(--go); padding: 8px 12px; border-radius: 999px; background: rgba(61, 220, 151, .08); border: 1px solid rgba(61, 220, 151, .25); white-space: nowrap; }
.level.is-alert .level-count { color: var(--stop); background: rgba(255, 90, 95, .08); border-color: rgba(255, 90, 95, .3); }

/* Riadok služby */
.svc-list { list-style: none; margin: 0; padding: 0; }
.svc {
  display: grid; grid-template-columns: 14px minmax(160px, 1.1fr) minmax(0, 1.4fr) 88px 78px;
  align-items: center; gap: 18px;
  padding: 12px 6px; border-top: 1px solid rgba(36, 54, 80, .7);
}
.svc:first-child { border-top: 0; }
.svc:hover { background: rgba(255, 255, 255, .015); }

.lamp { width: 12px; height: 12px; border-radius: 50%; background: var(--idle); position: relative; }
.s-up > .lamp, .s-up .lamp { background: var(--go); box-shadow: 0 0 10px rgba(61, 220, 151, .8); }
.s-up .lamp::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--go); animation: lamp-ping 2.8s ease-out infinite; }
.s-degraded .lamp { background: var(--slow); box-shadow: 0 0 10px rgba(242, 201, 76, .8); }
.s-down .lamp { background: var(--stop); box-shadow: 0 0 12px rgba(255, 90, 95, .9); animation: blink 1s steps(2, start) infinite; }
@keyframes lamp-ping { 0% { transform: scale(1); opacity: .7; } 70%, 100% { transform: scale(2.6); opacity: 0; } }

.svc-id { min-width: 0; display: grid; gap: 2px; }
.svc-id strong { font: 600 15px/1.25 var(--f-body); }
.svc-id span, .svc-id a { font: 400 11.5px/1.3 var(--f-mono); color: var(--brushed); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-id a:hover { color: var(--led); text-decoration: underline; }
/* väčšia klikacia plocha (min. 24 px) bez zmeny rozloženia */
.svc-id a { padding-block: 5px; margin-block: -5px; }
.svc-err { font: 500 11.5px/1.3 var(--f-mono); font-style: normal; color: var(--stop); }
.s-degraded .svc-err { color: var(--slow); }

.bars { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 2px; height: 28px; align-items: end; }
.bars i { display: block; height: 100%; border-radius: 2px; background: #243247; transform-origin: bottom; }
.bars i.b-ok { background: linear-gradient(180deg, #58E3A7, #2BAF77); }
.bars i.b-warn { background: linear-gradient(180deg, #FFE08A, #D9A92E); }
.bars i.b-bad { background: linear-gradient(180deg, #FF8A8D, #D8383D); }
.bars i.b-none { height: 40%; background: #1C293B; }
.level.reveal.in .bars i { animation: bar-rise .6s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--k) * 12ms); }
@keyframes bar-rise { from { transform: scaleY(0); } }

.svc-num { text-align: right; display: grid; gap: 3px; }
.svc-num small { font: 400 11px/1 var(--f-mono); color: var(--brushed); letter-spacing: .04em; }
.svc-num b { font: 600 14px/1 var(--f-mono); white-space: nowrap; }
.svc-ms b.slow { color: var(--slow); }

/* Herné servery */
.games { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.game {
  display: grid; gap: 10px; padding: 14px 16px;
  background: rgba(7, 12, 19, .5); border: 1px solid var(--rail); border-radius: 14px;
  transition: transform .25s ease, border-color .25s ease;
}
.game:hover { transform: translateY(-3px); border-color: var(--rail-2); }
.game.s-down { border-color: rgba(255, 90, 95, .45); }
.game-top { display: flex; align-items: center; gap: 10px; }
.game-top strong { font: 600 15px/1.2 var(--f-body); }
.game-players { font: 400 12px/1.2 var(--f-mono); color: var(--brushed); }
.game-players b { font: 700 22px/1 var(--f-mono); color: var(--ink); margin-right: 2px; }
.game-sub { font: 400 11px/1.3 var(--f-mono); color: var(--brushed); min-height: 1.3em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game .bars { height: 16px; }
.game-foot { display: flex; justify-content: space-between; font: 400 11px/1 var(--f-mono); color: var(--brushed); }

/* VPS */
.vps { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px 28px; margin-bottom: 16px; padding-bottom: 18px; border-bottom: 1px solid rgba(36, 54, 80, .7); }
.gauges { display: flex; gap: 14px; flex-wrap: wrap; }
.gauge { margin: 0; position: relative; width: 132px; height: 132px; }
.gauge svg { width: 100%; height: 100%; transform: rotate(135deg); }
.gauge circle { fill: none; }
/* Dĺžky v skutočných SVG jednotkách (2πr), nie v pathLength percentách — staršie Safari (<16)
   pathLength nepodporuje a oblúky by mali zlú dĺžku. r=57 obvod ≈358,14; r=46 obvod ≈288,90. */
.g-ticks { stroke: #2C3D56; stroke-width: 3; stroke-dasharray: 4.775 10.505; }
.g-track { stroke: #1A2739; stroke-width: 9; stroke-dasharray: 216.68 288.90; stroke-linecap: round; }
.g-val {
  stroke: var(--go); stroke-width: 9; stroke-linecap: round;
  stroke-dasharray: calc(var(--p) * 2.1668) 288.90;
  filter: drop-shadow(0 0 6px rgba(61, 220, 151, .55));
  transition: stroke-dasharray 1.4s cubic-bezier(.2, .8, .2, 1), stroke .4s ease;
}
.gauge.g-warn .g-val { stroke: var(--slow); filter: drop-shadow(0 0 6px rgba(242, 201, 76, .55)); }
.gauge.g-bad .g-val { stroke: var(--stop); filter: drop-shadow(0 0 6px rgba(255, 90, 95, .6)); }
.gauge figcaption { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 2px; padding-top: 6px; }
.gauge figcaption b { font: 700 26px/1 var(--f-mono); letter-spacing: -.03em; }
.gauge figcaption b small { font-size: 12px; color: var(--brushed); margin-left: 1px; }
.gauge figcaption span { font: 800 14px/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: #C9D5E3; }
.gauge figcaption em { font: 400 11px/1.2 var(--f-mono); font-style: normal; color: var(--brushed); position: absolute; left: 0; right: 0; bottom: 4px; }

.vps-side { display: grid; gap: 14px; align-content: start; min-width: 0; }
.vps-stats { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1px; background: var(--rail); border: 1px solid var(--rail); border-radius: 12px; overflow: hidden; }
.vps-stats div { background: #0E1725; padding: 10px 12px; }
.vps-stats dt { font: 400 11px/1.2 var(--f-mono); color: var(--brushed); }
.vps-stats dd { margin: 5px 0 0; font: 600 13.5px/1.3 var(--f-mono); }
.vps-stats dd.ok { color: var(--go); }
.vps-stats dd.bad { color: var(--stop); }
.spark { display: grid; gap: 6px; }
.spark-head { display: flex; gap: 16px; font: 400 11px/1 var(--f-mono); color: var(--brushed); }
.spark-head i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.spark svg { width: 100%; height: 64px; display: block; background: linear-gradient(0deg, rgba(36, 54, 80, .35) 1px, transparent 1px) 0 0 / 100% 25%; border-radius: 8px; }
.spark polyline { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }

/* Čo treba spraviť */
.todo {
  margin: 0 0 22px; padding: 22px clamp(16px, 2.4vw, 28px) 12px;
  border-radius: 20px; border: 1px solid rgba(255, 158, 61, .35);
  background:
    repeating-linear-gradient(135deg, rgba(255, 158, 61, .07) 0 12px, transparent 12px 24px) top / 100% 6px no-repeat,
    linear-gradient(180deg, rgba(34, 28, 22, .55), rgba(15, 24, 37, .8));
  scroll-margin-top: 80px;
}
.todo.is-clear { border-color: rgba(61, 220, 151, .3); background: linear-gradient(180deg, rgba(20, 38, 34, .55), rgba(15, 24, 37, .8)); }
.todo-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 6px; }
.todo-head h2 { margin: 0; font: 800 34px/1 var(--f-display); text-transform: uppercase; letter-spacing: .01em; }
.todo-head .panel-sub { margin-bottom: 0; }
.todo-tally { display: flex; gap: 8px; flex-wrap: wrap; }
.tally { font: 500 12px/1 var(--f-mono); padding: 7px 11px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.tally.critical { color: var(--stop); border-color: rgba(255, 90, 95, .4); background: rgba(255, 90, 95, .08); }
.tally.warn { color: var(--slow); border-color: rgba(242, 201, 76, .4); background: rgba(242, 201, 76, .07); }
.tally.task { color: var(--led); border-color: rgba(255, 158, 61, .4); background: rgba(255, 158, 61, .07); }

.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-item {
  display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 13px 0; border-top: 1px solid rgba(36, 54, 80, .7);
}
.todo-item:first-child { border-top: 0; }
.todo-level { justify-self: start; font: 700 11px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; padding: 6px 8px; border-radius: 6px; }
.todo-item.critical .todo-level { color: #1B0506; background: var(--stop); box-shadow: 0 0 14px rgba(255, 90, 95, .45); }
.todo-item.warn .todo-level { color: #1C1503; background: var(--slow); }
.todo-item.task .todo-level { color: var(--led); background: rgba(255, 158, 61, .1); border: 1px solid rgba(255, 158, 61, .45); }
.todo-text { display: grid; gap: 3px; min-width: 0; }
.todo-text strong { font: 600 15.5px/1.3 var(--f-body); }
.todo-text span { font: 400 12px/1.45 var(--f-mono); color: var(--brushed); }
.todo-go { font: 500 12px/1 var(--f-mono); color: var(--brushed); text-decoration: none; white-space: nowrap; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--rail); }
.todo-go:hover { color: var(--led); border-color: var(--led); }
.todo-clear { display: flex; align-items: center; gap: 12px; padding: 12px 0 14px; font: 500 14px/1.4 var(--f-body); color: var(--go); }

.call.todo-call b { border-color: var(--led); color: var(--led); font-size: 12px; }
.call.todo-call.critical b { border-color: var(--stop); color: var(--stop); box-shadow: 0 0 14px rgba(255, 90, 95, .6); }

/* Easter egg: Konami kód (↑↑↓↓←→←→BA) */
@keyframes party-hue { to { filter: hue-rotate(360deg) saturate(1.4); } }
.scene.party { animation: party-hue 1.6s linear infinite; }

.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 200; max-width: min(92vw, 480px);
  padding: 14px 20px; border-radius: 14px;
  background: linear-gradient(180deg, #16233A, #0C1524); border: 1px solid rgba(255, 158, 61, .4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .03) inset;
  color: var(--ink); font: 500 14px/1.5 var(--f-body); text-align: center;
  opacity: 0; transform: translate(-50%, 14px); pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Offline */
.offline {
  margin: 0 0 20px; padding: 12px 16px; border-radius: 12px;
  border: 1px solid rgba(255, 90, 95, .4); background: rgba(255, 90, 95, .08);
  color: #FFC9CA; font: 500 13px/1.4 var(--f-mono);
}

/* ── SSL + udalosti ─────────────────────────────────────── */
.annex { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 22px; }
.panel { background: linear-gradient(180deg, rgba(23, 36, 55, .75), rgba(15, 24, 37, .75)); border: 1px solid var(--rail); border-radius: 20px; padding: 22px clamp(16px, 2.4vw, 28px); min-width: 0; }
.panel h2 { margin: 0; font: 800 26px/1 var(--f-display); text-transform: uppercase; letter-spacing: .01em; }
.panel-sub { margin: 6px 0 14px; font: 400 12px/1.4 var(--f-mono); color: var(--brushed); }
.muted { color: var(--brushed); font: 400 13px/1.4 var(--f-mono); }

.ssl { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.ssl li { display: grid; grid-template-columns: minmax(0, 1fr) 110px 62px; gap: 12px; align-items: center; }
.ssl .host { font: 400 12.5px/1.2 var(--f-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ssl .meter { height: 6px; border-radius: 3px; background: #1A2739; overflow: hidden; }
.ssl .meter i { display: block; height: 100%; width: var(--v); background: var(--go); border-radius: 3px; }
.ssl .warn .meter i { background: var(--slow); }
.ssl .bad .meter i { background: var(--stop); }
.ssl .days { text-align: right; font: 600 12.5px/1 var(--f-mono); }
.ssl .warn .days { color: var(--slow); }
.ssl .bad .days, .ssl .err { color: var(--stop); }

.events { list-style: none; margin: 0; padding: 0; position: relative; }
.events li { display: grid; grid-template-columns: 96px 14px minmax(0, 1fr); gap: 12px; align-items: start; padding: 8px 0; }
.events time { font: 400 11.5px/1.5 var(--f-mono); color: var(--brushed); }
.events .ev-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; background: var(--go); box-shadow: 0 0 8px rgba(61, 220, 151, .7); }
.events .ev-down .ev-dot { background: var(--stop); box-shadow: 0 0 8px rgba(255, 90, 95, .8); }
.events .ev-text { font-size: 14px; }
.events .ev-text small { display: block; font: 400 11.5px/1.3 var(--f-mono); color: var(--brushed); }
.events li.muted { display: block; }

.foot { max-width: 1320px; margin: 40px auto 0; padding: 26px var(--gutter) 40px; border-top: 1px solid var(--rail); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font: 400 12px/1.5 var(--f-mono); color: var(--brushed); }
.foot p { margin: 0; }
.foot a:hover { color: var(--led); }

/* ── Responzívne ─────────────────────────────────────── */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .scene { height: 520px; order: -1; margin-top: -10px; }
  .svc { grid-template-columns: 14px minmax(140px, 1fr) minmax(0, 1fr) 80px 70px; gap: 14px; }
  .annex { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .scene { height: 400px; }
  .rig { transform: translateY(10px) scale(.72) rotateX(var(--rx)) rotateY(var(--ry)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .indicator { min-width: 0; width: 100%; }
  .svc { grid-template-columns: 14px minmax(0, 1fr) auto auto; gap: 6px 12px; }
  .svc .bars { grid-column: 2 / -1; grid-row: 2; height: 18px; }
  .vps { grid-template-columns: 1fr; }
  .gauges { justify-content: space-between; gap: 6px; }
  .gauge { width: calc((100% - 12px) / 3); height: auto; aspect-ratio: 1; max-width: 132px; }
  .gauge figcaption b { font-size: 19px; }
  .gauge figcaption em { display: none; }
  .level-head { grid-template-columns: auto 1fr; }
  .level-count { grid-column: 1 / -1; justify-self: start; }
  .call span { display: none; }
  .call { padding: 4px; }
  .callpanel { border-radius: 16px; }
  .pulse span { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ssl li { grid-template-columns: minmax(0, 1fr) 60px 52px; }
  .todo-item { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .todo-level { grid-column: 1 / -1; }
  .todo-head h2 { font-size: 28px; }
  .events li { grid-template-columns: 70px 12px minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .pulse span { max-width: 96px; }
  .scene { height: 370px; }
  .rig { transform: translateY(-4px) scale(.56) rotateX(var(--rx)) rotateY(var(--ry)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .sway, .scene.party { animation: none; }
}
