/* VEGA // facility monitor. Fonts: OFL, icons: Simple Icons (CC0) + Lucide (ISC), see assets/licenses */
@font-face { font-family: "Michroma"; font-weight: 400; font-display: swap; src: url("assets/fonts/Michroma-400.woff2") format("woff2"); }
@font-face { font-family: "Rajdhani"; font-weight: 500; font-display: swap; src: url("assets/fonts/Rajdhani-500.woff2") format("woff2"); }
@font-face { font-family: "Rajdhani"; font-weight: 600; font-display: swap; src: url("assets/fonts/Rajdhani-600.woff2") format("woff2"); }
@font-face { font-family: "Rajdhani"; font-weight: 700; font-display: swap; src: url("assets/fonts/Rajdhani-700.woff2") format("woff2"); }
@font-face { font-family: "Share Tech Mono"; font-weight: 400; font-display: swap; src: url("assets/fonts/ShareTechMono-400.woff2") format("woff2"); }

:root {
  --bg: #03070b;
  --ice: #4bbbe8;
  --ice-hi: #a6e4ff;
  --teal: #5fcfd8;
  --bar: #2c8fa3;
  --line: rgba(75, 187, 232, .28);
  --text: #cfe9f6;
  --dim: #6f93a6;
  --ok: #49e6b0;
  --warn: #ff9a2e;
  --bad: #ff4b3a;
  --panel: rgba(4, 13, 20, .78);
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: transparent; color: var(--text); font-family: "Rajdhani", sans-serif; font-weight: 500; min-height: 100vh; overflow-x: hidden; }

/* ── atmosphere ── */
.bg {
  position: fixed; inset: 0; z-index: -4;
  background: url("assets/img/security_station.jpg") center 35% / cover;
  filter: brightness(.62) saturate(.95) contrast(1.05);
  transform: scale(1.06);
  animation: drift 60s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: scale(1.12) translate(-1%, -1%); } }
.vignette {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 25%, transparent 35%, rgba(3,7,11,.6) 75%, #03070b 100%),
    linear-gradient(to bottom, rgba(3,7,11,.05), rgba(3,7,11,.55) 45%, rgba(3,7,11,.9) 85%);
}
.grain {
  position: fixed; inset: -50%; z-index: 49; pointer-events: none; opacity: .07;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain { 50% { transform: translate(-3%, 2%); } }
.scan {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.025) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}
#frost { position: fixed; inset: 0; z-index: -2; pointer-events: none; }

/* icons: third-party SVGs used as masks, so they take the theme colour */
.ico { display: inline-block; width: 18px; height: 18px; background: currentColor; flex: none;
  -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat; }
.uac { display: inline-block; background: currentColor; -webkit-mask: url("assets/img/uac-logo.svg") center / contain no-repeat; mask: url("assets/img/uac-logo.svg") center / contain no-repeat; }

/* ── top bar ── */
.embed .topbar, .embed .boot { display: none; }
.topbar {
  display: flex; align-items: center; gap: 18px; padding: 12px 28px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(to bottom, rgba(3,7,11,.92), rgba(3,7,11,.55));
  backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: Michroma; font-size: 15px; letter-spacing: .14em; }
.brand svg { width: 26px; height: 26px; }
.tabs { display: flex; gap: 4px; margin: 0 auto; }
.tab {
  font-family: Michroma; font-size: 9px; letter-spacing: .18em; color: var(--dim);
  padding: 7px 12px; border: 1px solid transparent; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 7px; background: none;
}
.tab .ico { width: 13px; height: 13px; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--ice-hi); border-color: var(--line); background: rgba(75,187,232,.09); box-shadow: inset 0 -2px 0 var(--ice); }
.right { display: flex; align-items: center; gap: 14px; }
.right .uac { width: 26px; height: 24px; color: var(--dim); }
.clock { font-family: "Share Tech Mono"; font-size: 13px; color: var(--dim); letter-spacing: .08em; text-align: right; }
.clock b { color: var(--ice-hi); font-weight: 400; }

/* ── hero ── */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 28px 40px; position: relative; }
.hero { display: grid; grid-template-columns: 250px 1fr; gap: 44px; align-items: center; padding: 50px 0 26px; position: relative; }
.hero .watermark { position: absolute; right: -10px; top: 30px; width: 300px; height: 275px; color: rgba(166,228,255,.06); }
.emblem { width: 250px; height: 250px; position: relative; display: grid; place-items: center; }
.emblem > svg { width: 210px; height: 210px; position: relative; z-index: 1; }
.emblem .ticks { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 40s linear infinite; }
.emblem::after {
  content: ""; position: absolute; inset: -20px; border-radius: 50%;
  background: radial-gradient(circle, rgba(75,187,232,.30), transparent 62%);
  animation: glow 4s ease-in-out infinite;
}
.spin { transform-origin: 100px 100px; animation: spin 14s linear infinite reverse; }   /* counter-clockwise */
.core { transform-origin: 100px 100px; animation: pulse 4s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { transform: scale(1.07); filter: brightness(1.3); } }
@keyframes glow { 50% { opacity: .55; } }

.kicker { font-family: "Share Tech Mono"; color: var(--dim); font-size: 12px; letter-spacing: .25em; }
h1 { font-family: Michroma; font-weight: 400; font-size: clamp(42px, 7vw, 88px); letter-spacing: .32em; margin: 6px 0 4px; line-height: 1;
  color: #e8f7ff; text-shadow: 0 0 24px rgba(75,187,232,.55); }
.sub { font-family: Michroma; font-size: 11px; letter-spacing: .32em; color: var(--ice); }
.comms {
  margin-top: 22px; display: flex; gap: 14px; align-items: flex-start; max-width: 720px;
  background: linear-gradient(90deg, rgba(75,187,232,.13), rgba(75,187,232,.02) 70%, transparent);
  border-left: 2px solid var(--ice); padding: 12px 16px;
}
.comms .who { display: flex; align-items: center; gap: 8px; font-family: Michroma; font-size: 10px; letter-spacing: .2em; color: var(--ice-hi); padding-top: 3px; white-space: nowrap; }
.comms .who svg { width: 18px; height: 18px; }
.comms .msg { font-size: 20px; font-weight: 600; letter-spacing: .02em; min-height: 1.3em; }
.comms .msg::after { content: "▌"; color: var(--ice); animation: blink 1s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.stats { display: flex; margin-top: 22px; flex-wrap: wrap; }
.stat { padding: 4px 26px 4px 0; margin-right: 26px; border-right: 1px solid var(--line); }
.stat:last-child { border: 0; }
.stat .k { font-family: Michroma; font-size: 8.5px; letter-spacing: .22em; color: var(--dim); }
.stat .v { font-family: "Share Tech Mono"; font-size: 30px; color: #e8f7ff; }
.stat .v small { font-size: 14px; color: var(--dim); margin-left: 3px; }

/* floor light strips, after the security station floor */
.strips { display: block; width: 100%; height: 46px; margin: 4px 0 6px; overflow: visible; }
.strips path { fill: none; stroke: #e6f8ff; stroke-width: 3; filter: drop-shadow(0 0 4px #a6e4ff) drop-shadow(0 0 10px rgba(75,187,232,.8)); }
.strips path.thin { stroke-width: 1; opacity: .5; filter: none; }

/* ── sections ── */
.section { margin-top: 26px; }
.section[hidden] { display: none; }
.sec-head {
  display: flex; align-items: center; gap: 12px; padding: 6px 12px 6px 6px;
  background: linear-gradient(90deg, var(--bar), rgba(44,143,163,.35) 55%, transparent);
  color: #e8f7ff; text-shadow: 0 0 8px rgba(0,0,0,.6);
  font-family: Michroma; font-size: 11px; letter-spacing: .28em;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
.hex {
  width: 34px; height: 30px; display: grid; place-items: center; flex: none;
  background: var(--warn); color: #1a0d00; text-shadow: none;
  font-family: "Share Tech Mono"; font-size: 13px; letter-spacing: 0;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}
.sec-head .ico { width: 16px; height: 16px; color: var(--ice-hi); }
.sec-head .count { font-family: "Share Tech Mono"; letter-spacing: .05em; color: #021015; background: rgba(207,233,246,.75); padding: 0 6px; text-shadow: none; }
.sec-head .code { margin-left: auto; font-family: "Share Tech Mono"; font-size: 11px; letter-spacing: .1em; color: rgba(207,233,246,.75); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; margin-top: 10px; }

.card {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  padding: 14px 14px 12px; display: grid; grid-template-columns: 54px 1fr; gap: 4px 14px;
  backdrop-filter: blur(3px); transition: border-color .2s, transform .2s;
}
.card:hover { border-color: rgba(166,228,255,.6); transform: translateY(-1px); }
.card::before, .card::after { content: ""; position: absolute; width: 10px; height: 10px; border: 0 solid var(--ice); }
.card::before { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.card::after { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }
.ring { grid-row: span 2; width: 54px; height: 54px; position: relative; }
.ring svg { width: 54px; height: 54px; transform: rotate(-90deg); }
.ring .track { stroke: rgba(75,187,232,.15); }
.ring .val { stroke: var(--ok); filter: drop-shadow(0 0 3px var(--ok)); }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-family: "Share Tech Mono"; font-size: 11px; color: #e8f7ff; }
.name { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 18px; letter-spacing: .06em; text-transform: uppercase; min-width: 0; }
.name .ico { color: var(--ice); }
.name em { font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 7px; height: 7px; margin-left: auto; background: var(--ok); box-shadow: 0 0 8px var(--ok); transform: rotate(45deg); flex: none; }
.meta { display: flex; justify-content: space-between; align-items: center; font-family: "Share Tech Mono"; font-size: 12px; color: var(--dim); }
.meta b { color: var(--text); font-weight: 400; }
.state { font-family: Michroma; font-size: 8px; letter-spacing: .2em; color: var(--ok); }
.beats { grid-column: 1 / -1; display: flex; gap: 2px; height: 16px; margin-top: 8px; }
.beats i { flex: 1; background: var(--ok); opacity: .75; }
.beats i.d { background: var(--bad); opacity: 1; }
.beats i:last-child { opacity: 1; box-shadow: 0 0 6px var(--ok); }
.card.down { border-color: rgba(255,75,58,.55); background: repeating-linear-gradient(-45deg, rgba(255,154,46,.10) 0 8px, transparent 8px 16px), var(--panel); }
.card.down::before, .card.down::after { border-color: var(--warn); }
.card.down .dot { background: var(--bad); box-shadow: 0 0 10px var(--bad); animation: blink 1s steps(1) infinite; }
.card.down .state { color: var(--bad); }
.card.down .name .ico { color: var(--warn); }
.card.down .ring .val { stroke: var(--warn); filter: drop-shadow(0 0 3px var(--warn)); }

/* ── facility: fastfetch dossier + btop telemetry ── */
.facility { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 10px; margin-top: 10px; }
.panel { position: relative; background: var(--panel); border: 1px solid var(--line); padding: 16px; backdrop-filter: blur(3px); }
.panel::before, .panel::after { content: ""; position: absolute; width: 12px; height: 12px; border: 0 solid var(--ice); }
.panel::before { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.panel::after { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }
.ptitle { display: flex; align-items: center; gap: 8px; font-family: Michroma; font-size: 9px; letter-spacing: .24em; color: var(--ice-hi); margin-bottom: 12px; }
.ptitle .ico { width: 14px; height: 14px; color: var(--ice); }
.ptitle small { margin-left: auto; font-family: "Share Tech Mono"; font-size: 11px; letter-spacing: .08em; color: var(--dim); }

.dossier .who { display: flex; gap: 14px; align-items: center; padding-bottom: 12px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.dossier .who .ico { width: 44px; height: 44px; color: #d70a53; }
.dossier .who b { display: block; font-family: Michroma; font-weight: 400; font-size: 18px; letter-spacing: .18em; color: #e8f7ff; }
.dossier .who span { font-family: "Share Tech Mono"; font-size: 12px; color: var(--dim); }
.ff { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; font-family: "Share Tech Mono"; font-size: 13px; }
.ff dt { color: var(--ice); letter-spacing: .08em; }
.ff dd { margin: 0; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swatch { display: flex; gap: 0; margin-top: 12px; }
.swatch i { flex: 1; height: 10px; }

.tele { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px 22px; }
.blk .lbl { display: flex; justify-content: space-between; font-family: Michroma; font-size: 8.5px; letter-spacing: .22em; color: var(--dim); margin-bottom: 6px; }
.blk .lbl b { font-family: "Share Tech Mono"; font-size: 13px; font-weight: 400; letter-spacing: .04em; color: #e8f7ff; }
.big { font-family: "Share Tech Mono"; font-size: 34px; color: #e8f7ff; line-height: 1; }
.big small { font-size: 14px; color: var(--dim); margin-left: 2px; }
.spark { width: 100%; height: 44px; display: block; }
.spark path.l { fill: none; stroke: var(--ice); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.spark path.f { fill: url(#sparkfill); stroke: none; }
.threads { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; height: 58px; margin: 8px 0 20px; }
.threads div { position: relative; background: rgba(75,187,232,.08); display: flex; flex-direction: column-reverse; }
.threads div i { display: block; background: linear-gradient(to top, var(--ok), var(--ice)); transition: height .6s ease; }
.threads div span { position: absolute; bottom: -15px; left: 0; right: 0; text-align: center; font-family: "Share Tech Mono"; font-size: 9px; color: var(--dim); }
.meter { height: 8px; background: rgba(75,187,232,.1); position: relative; overflow: hidden; }
.meter i { position: absolute; top: 0; bottom: 0; left: 0; background: var(--ice); transition: width .6s ease; }
.meter i.c { background: rgba(75,187,232,.35); }
.meter.seg { background-image: repeating-linear-gradient(90deg, transparent 0 9px, rgba(3,7,11,.9) 9px 11px); }
.meter.seg i { z-index: -1; }
.temps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.temp { text-align: center; }
.temp .t { height: 50px; width: 10px; margin: 0 auto 4px; background: rgba(75,187,232,.1); position: relative; }
.temp .t i { position: absolute; left: 0; right: 0; bottom: 0; transition: height .6s ease, background .6s; }
.temp b { display: block; font-family: "Share Tech Mono"; font-weight: 400; font-size: 13px; color: #e8f7ff; }
.temp span { font-family: "Share Tech Mono"; font-size: 9px; color: var(--dim); letter-spacing: .08em; }
.kv { display: flex; justify-content: space-between; font-family: "Share Tech Mono"; font-size: 12px; color: var(--dim); margin-top: 6px; }
.kv b { color: var(--text); font-weight: 400; }
.net { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.net .big { font-size: 22px; }
.net .dn { color: var(--ok); } .net .upl { color: var(--warn); }
.power { display: flex; align-items: center; gap: 12px; }
.batt { width: 54px; height: 22px; border: 2px solid var(--ice); position: relative; padding: 2px; }
.batt::after { content: ""; position: absolute; right: -6px; top: 5px; width: 4px; height: 8px; background: var(--ice); }
.batt i { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--ok) 0 8px, transparent 8px 10px); }

/* ── footer: Polar Core banner ── */
.polar {
  margin-top: 44px; position: relative; height: 170px; overflow: hidden; border: 1px solid var(--line);
  background: url("assets/img/polar_core.jpg") center 40% / cover;
}
.polar::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(3,7,11,.92) 0%, rgba(3,7,11,.55) 45%, rgba(3,7,11,.2) 100%); }
.polar .in { position: absolute; inset: 0; display: flex; align-items: center; gap: 22px; padding: 0 26px; }
.polar .uac { width: 64px; height: 58px; color: rgba(232,247,255,.85); }
.polar .t1 { font-family: Michroma; font-size: 14px; letter-spacing: .3em; color: #e8f7ff; }
.polar .t2 { font-family: "Share Tech Mono"; font-size: 12px; letter-spacing: .14em; color: var(--ice-hi); margin-top: 6px; }
footer {
  margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: flex-start;
  font-family: "Share Tech Mono"; font-size: 11px; color: var(--dim); letter-spacing: .06em;
}
footer .codes { display: flex; gap: 10px; flex-wrap: wrap; }
footer .codes span { border: 1px solid var(--line); padding: 2px 6px; }
footer .credit { margin-left: auto; text-align: right; line-height: 1.6; }
footer a { color: var(--dim); }

/* boot */
.boot { position: fixed; inset: 0; z-index: 100; background: #020508; display: grid; place-items: center; font-family: "Share Tech Mono"; color: var(--ice);
  transition: opacity .5s ease, visibility .5s; }
.boot.gone { opacity: 0; visibility: hidden; }
.boot .b { display: grid; justify-items: center; gap: 18px; font-size: 13px; letter-spacing: .25em; }
.boot svg { width: 72px; height: 72px; }
.boot .bar { width: 320px; height: 2px; background: rgba(75,187,232,.2); }
.boot .bar i { display: block; height: 100%; width: 0; background: var(--ice); box-shadow: 0 0 10px var(--ice); transition: width 1.3s ease; }


@media (max-width: 760px) {
  .topbar { padding: 10px 16px; gap: 10px; }
  .tabs { display: none; }
  .right .uac { display: none; }
  .wrap { padding: 0 16px 30px; }
  .hero { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 18px; padding-top: 26px; }
  .hero .watermark { display: none; }
  .emblem { width: 190px; height: 190px; }
  .emblem > svg { width: 160px; height: 160px; }
  h1 { letter-spacing: .2em; }
  .sub { letter-spacing: .18em; }
  .comms { text-align: left; }
  .stats { justify-content: center; }
  .stat { padding-right: 14px; margin-right: 14px; }
  .stat .v { font-size: 22px; }
  .grid { grid-template-columns: 1fr; }
  .polar { height: 130px; }
  .sec-head { letter-spacing: .16em; font-size: 10px; }
  .sec-head .code { display: none; }
  .facility, .tele { grid-template-columns: 1fr; }
  .strips { height: 26px; }
  footer .credit { margin-left: 0; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .bg, .grain, .emblem::after, .emblem .ticks { animation: none; }
  .spin { animation-duration: 30s; }   /* VEGA keeps turning, slower */
}

/* ── live states ── */
.card.pend { border-color: rgba(255,154,46,.5); }
.card.pend::before, .card.pend::after { border-color: var(--warn); }
.card.pend .dot { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.card.pend .state { color: var(--warn); }
.card.pend .ring .val { stroke: var(--warn); filter: drop-shadow(0 0 3px var(--warn)); }
.card.maint { border-color: rgba(42,120,216,.6); }
.card.maint .dot { background: #2a78d8; box-shadow: 0 0 8px #2a78d8; }
.card.maint .state { color: #6fa8ff; }
.beats i.p { background: var(--warn); opacity: 1; }
.beats i.m { background: #2a78d8; opacity: 1; }
.beats i.n { background: rgba(75,187,232,.12); }
.beats i.d:last-child { box-shadow: 0 0 6px var(--bad); }
.linklost {
  display: none; margin-top: 14px; padding: 8px 14px; font-family: Michroma; font-size: 10px; letter-spacing: .22em;
  color: #1a0d00; background: repeating-linear-gradient(-45deg, var(--warn) 0 10px, #e0851f 10px 20px);
}
.linklost.on { display: block; }
.stale { font-family: "Share Tech Mono"; font-size: 11px; color: var(--warn); display: none; }
.stale.on { display: inline; }
.panel.is-stale .tele { opacity: .45; }
