/* =====================================================================
   SAMARQAND SPACE WEATHER — design system
   Night sky over Registan: deep indigo, solar gold, tile turquoise.
   Display: Unbounded · Text: Onest · Data: JetBrains Mono
   ===================================================================== */
:root {
  --bg: #04060d;
  --bg-2: #080d1c;
  --bg-3: #0d1428;
  --panel: rgba(13, 19, 38, .66);
  --panel-solid: #0c1226;
  --panel-hi: rgba(22, 32, 62, .78);
  --line: rgba(150, 175, 255, .11);
  --line-2: rgba(150, 175, 255, .2);
  --ink: #eef1fb;
  --ink-2: #aab4d2;
  --muted: #69749a;
  --sun: #ff9a3c;
  --sun-2: #ffd27a;
  --gold: #ffc24f;
  --flare: #ff5d3d;
  --turq: #39d3d8;
  --lapis: #5b86ff;
  --violet: #a68bff;
  --ok: #43d69b;
  --warn: #ffc24f;
  --bad: #ff6a57;
  --sev: #e46bff;
  --chart-grid: rgba(150, 175, 255, .08);
  --card: var(--panel-solid);
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .7);
  --r: 18px;
  --r-sm: 11px;
  --f-display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --f-text: "Onest", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --glow-sun: 0 0 40px rgba(255, 154, 60, .35);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f3eee3; --bg-2: #ebe4d5; --bg-3: #e2d9c6;
  --panel: rgba(255, 252, 245, .78); --panel-solid: #fffcf5; --panel-hi: rgba(255, 255, 255, .92);
  --line: rgba(40, 45, 80, .12); --line-2: rgba(40, 45, 80, .22);
  --ink: #11162a; --ink-2: #3c4566; --muted: #737b97;
  --sun: #e07612; --sun-2: #c98a10; --gold: #b7790b; --flare: #d8401f; --turq: #0a8f96; --lapis: #2c55d8; --violet: #6b4fd8;
  --ok: #17905e; --warn: #b98000; --bad: #cf3a27; --sev: #9a2db3;
  --chart-grid: rgba(40, 45, 80, .08); --shadow: 0 18px 50px -24px rgba(60, 50, 20, .35);
  --glow-sun: 0 0 30px rgba(224, 118, 18, .25);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #f3eee3; --bg-2: #ebe4d5; --bg-3: #e2d9c6;
    --panel: rgba(255, 252, 245, .78); --panel-solid: #fffcf5; --panel-hi: rgba(255, 255, 255, .92);
    --line: rgba(40, 45, 80, .12); --line-2: rgba(40, 45, 80, .22);
    --ink: #11162a; --ink-2: #3c4566; --muted: #737b97;
    --sun: #e07612; --sun-2: #c98a10; --gold: #b7790b; --flare: #d8401f; --turq: #0a8f96; --lapis: #2c55d8; --violet: #6b4fd8;
    --ok: #17905e; --warn: #b98000; --bad: #cf3a27; --sev: #9a2db3;
    --chart-grid: rgba(40, 45, 80, .08); --shadow: 0 18px 50px -24px rgba(60, 50, 20, .35);
    --glow-sun: 0 0 30px rgba(224, 118, 18, .25);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 15.5px/1.6 var(--f-text);
  -webkit-font-smoothing: antialiased; overflow-x: hidden; overflow-x: clip; min-height: 100vh;
}
::selection { background: color-mix(in srgb, var(--sun) 45%, transparent); }
a { color: var(--turq); text-decoration: none; }
a:hover { color: var(--sun-2); }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.15; font-weight: 600; letter-spacing: -.01em; }
h1 { font-family: var(--f-display); font-weight: 600; }
h2 { font-size: 1.05rem; }
h3 { font-size: .95rem; }
p { margin: 0 0 .85em; }
small, .muted { color: var(--muted); }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 20px; }
button { font-family: inherit; }
:where(svg[aria-hidden="true"]:not([width])) { width: 1.1em; height: 1.1em; vertical-align: -.18em; flex: none; }
.strip::-webkit-scrollbar, .tbl-wrap::-webkit-scrollbar { height: 6px; width: 6px; }
.strip::-webkit-scrollbar-thumb, .tbl-wrap::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }
.strip::-webkit-scrollbar-track, .tbl-wrap::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--turq); outline-offset: 2px; border-radius: 6px; }

/* -------------------------------------------------------- background */
#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none; }
.bg-girih {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(255, 140, 40, .13), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(57, 211, 216, .07), transparent 60%),
    radial-gradient(800px 800px at 50% 120%, rgba(91, 134, 255, .09), transparent 60%);
}
.bg-girih::after {
  content: ""; position: absolute; inset: 0; opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%237f95d6' stroke-opacity='.10' stroke-width='1'%3E%3Cpath d='M60 18l12 30 30 12-30 12-12 30-12-30-30-12 30-12z'/%3E%3Crect x='39' y='39' width='42' height='42' transform='rotate(45 60 60)'/%3E%3Crect x='39' y='39' width='42' height='42'/%3E%3Cpath d='M0 0l18 18M120 0l-18 18M0 120l18-18M120 120l-18-18'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
}
:root[data-theme="light"] .bg-girih::after { opacity: .5; }

/* ------------------------------------------------------------- top bar */
.bar {
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid var(--line);
}
/* blur on a separate layer: a backdrop-filter on .bar itself would make the fixed mobile menu
   (nav#nav) position against the 68px header instead of the screen */
.bar::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
}
.bar-in { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); flex: none; }
.brand:hover { color: var(--ink); }
.brand svg { width: 42px; height: 42px; flex: none; filter: drop-shadow(0 0 12px rgba(255, 160, 60, .35)); }
.wm { display: flex; flex-direction: column; line-height: 1; }
.wm b { font-family: var(--f-display); font-weight: 700; font-size: 15px; letter-spacing: .16em; }
.wm i { font-style: normal; font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .32em; color: var(--sun-2); margin-top: 5px; text-transform: uppercase; }
nav#nav { display: flex; gap: 2px; margin-left: 12px; }
.nav-i { position: relative; }
.nav-i > a, .nav-i > button {
  display: flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; border: 0; background: none;
  color: var(--ink-2); font-size: 14px; font-weight: 500; cursor: pointer; transition: color .2s, background .2s;
}
.nav-i > a:hover, .nav-i > button:hover, .nav-i.open > button { color: var(--ink); background: var(--line); }
.nav-i.active > a, .nav-i.active > button { color: var(--ink); }
.nav-i.active > a::after, .nav-i.active > button::after {
  content: ""; position: absolute; left: 50%; bottom: 1px; width: 18px; height: 2px; margin-left: -9px; border-radius: 2px;
  background: linear-gradient(90deg, var(--sun), var(--sun-2)); box-shadow: var(--glow-sun);
}
.nav-i svg.chev { width: 12px; height: 12px; transition: transform .25s var(--ease); opacity: .6; }
.nav-i.open svg.chev { transform: rotate(180deg); }
.mega {
  position: absolute; top: calc(100% + 10px); left: -10px; width: 560px; padding: 10px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top left; pointer-events: none;
  transition: opacity .2s var(--ease), transform .25s var(--ease);
}
.nav-i.open .mega { opacity: 1; transform: none; pointer-events: auto; }
.mega a { display: flex; gap: 12px; padding: 11px 12px; border-radius: 11px; color: var(--ink); align-items: flex-start; }
.mega a:hover, .mega a.on { background: var(--line); color: var(--ink); }
.mega .ic { width: 36px; height: 36px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: linear-gradient(140deg, color-mix(in srgb, var(--sun) 22%, transparent), color-mix(in srgb, var(--turq) 14%, transparent));
  border: 1px solid var(--line-2); color: var(--sun-2); }
.mega .ic svg { width: 18px; height: 18px; }
.mega b { display: block; font-size: 14px; font-weight: 600; }
.mega small { display: block; font-size: 12.5px; line-height: 1.4; margin-top: 2px; }
.bar-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.ib {
  height: 36px; min-width: 36px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  cursor: pointer; font-size: 13px; transition: border-color .2s, color .2s, background .2s; position: relative;
}
.ib:hover { color: var(--ink); border-color: var(--line-2); background: var(--line); }
.ib svg { width: 17px; height: 17px; }
.ib kbd { font-family: var(--f-mono); font-size: 10.5px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 5px; padding: 0 5px; }
.ib .dotn { position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px; border-radius: 9px; padding: 0 4px;
  background: var(--flare); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; cursor: pointer;
  background: conic-gradient(from 200deg, var(--sun), var(--flare), var(--violet), var(--turq), var(--sun)); color: #0b0f1d; border: 0; padding: 0; }
.avatar span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--sun-2); }
.btn-login { height: 36px; padding: 0 16px; border-radius: 999px; border: 0; cursor: pointer; font-weight: 600; font-size: 13.5px;
  color: #1a1004; background: linear-gradient(135deg, var(--sun-2), var(--sun)); box-shadow: var(--glow-sun); }
.menu-btn { display: none; }

/* dropdown panels (bell, account) */
.pop {
  position: absolute; top: calc(100% + 10px); right: 0; width: 360px; max-height: 70vh; overflow: auto;
  background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow); padding: 8px;
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .2s, transform .25s var(--ease); z-index: 50;
}
.pop.open { opacity: 1; transform: none; pointer-events: auto; }
.pop h4 { margin: 6px 10px 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); display: flex; justify-content: space-between; }
.pop a.item, .pop button.item { display: flex; gap: 10px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 10px; color: var(--ink); background: none; border: 0; cursor: pointer; font-size: 14px; align-items: center; }
.pop .item:hover { background: var(--line); }
.pop .item svg { width: 16px; height: 16px; color: var(--muted); }
.notif { display: grid; grid-template-columns: 10px 1fr; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink); }
.notif:hover { background: var(--line); color: var(--ink); }
.notif i { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: var(--muted); }
.notif.unread { background: color-mix(in srgb, var(--sun) 8%, transparent); }
.notif small { display: block; font-family: var(--f-mono); font-size: 11px; }

/* ------------------------------------------------------------- ticker */
.ticker { border-bottom: 1px solid var(--line); overflow: hidden; height: 34px; position: relative;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); background: color-mix(in srgb, var(--bg-2) 60%, transparent); }
.ticker-track { display: flex; gap: 42px; width: max-content; animation: tick 60s linear infinite; padding-left: 20px; height: 100%; align-items: center; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.tk { display: inline-flex; gap: 8px; align-items: baseline; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.tk b { font-family: var(--f-mono); color: var(--ink); font-weight: 600; }
.tk .up { color: var(--flare); } .tk .ok { color: var(--ok); }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------------------------------------------------------------- main */
main { padding: 34px 0 60px; min-height: 72vh; }
main.enter > * { animation: rise .6s var(--ease) both; }
main.enter > *:nth-child(2) { animation-delay: .06s; } main.enter > *:nth-child(3) { animation-delay: .12s; }
main.enter > *:nth-child(4) { animation-delay: .18s; } main.enter > *:nth-child(n+5) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

.eyebrow { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--turq); display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: .7; }
.page-head { display: flex; align-items: flex-end; gap: 22px; flex-wrap: wrap; margin-bottom: 26px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.page-head h1 { margin: 0; font-size: clamp(1.7rem, 3.4vw, 2.7rem); letter-spacing: -.02em; }
.page-head h1 em { font-style: normal; background: linear-gradient(100deg, var(--sun-2), var(--sun) 45%, var(--flare)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-head p { margin: 10px 0 0; color: var(--ink-2); max-width: 780px; font-size: 1.02rem; }
.page-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.span3 { grid-column: span 3; }

/* panels */
.card, .panel {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px 22px; min-width: 0; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: border-color .3s;
}
.card::before, .panel::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 170, 80, .08), transparent 45%);
}
.card:hover::before, .panel:hover::before { opacity: 1; }
.card:hover { border-color: var(--line-2); }
.card h2 { display: flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 600; margin-bottom: 14px; }
.card h2 .ic { color: var(--sun-2); display: inline-flex; } .card h2 .ic svg { width: 18px; height: 18px; }
.card h2 .sub { font-weight: 400; color: var(--muted); font-size: .8rem; margin-left: auto; font-family: var(--f-mono); }
.card h2 a.sub:hover { color: var(--sun-2); }
.card-foot { font-size: .78rem; color: var(--muted); margin-top: 12px; font-family: var(--f-mono); }
.ticks { --t: 12px; }
.ticks::after {
  content: ""; position: absolute; inset: 8px; pointer-events: none; border-radius: 10px;
  background:
    linear-gradient(var(--sun), var(--sun)) top left / var(--t) 1px no-repeat, linear-gradient(var(--sun), var(--sun)) top left / 1px var(--t) no-repeat,
    linear-gradient(var(--sun), var(--sun)) top right / var(--t) 1px no-repeat, linear-gradient(var(--sun), var(--sun)) top right / 1px var(--t) no-repeat,
    linear-gradient(var(--sun), var(--sun)) bottom left / var(--t) 1px no-repeat, linear-gradient(var(--sun), var(--sun)) bottom left / 1px var(--t) no-repeat,
    linear-gradient(var(--sun), var(--sun)) bottom right / var(--t) 1px no-repeat, linear-gradient(var(--sun), var(--sun)) bottom right / 1px var(--t) no-repeat;
  opacity: .55;
}
.section { margin-top: 64px; }
.section-head { display: flex; align-items: flex-end; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--f-display); font-size: clamp(1.3rem, 2.4vw, 1.9rem); font-weight: 600; margin: 0; letter-spacing: -.015em; }
.section-head p { margin: 6px 0 0; color: var(--ink-2); max-width: 640px; }
.section-head .right { margin-left: auto; }
.section-title { margin: 40px 0 14px; font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .22em; color: var(--muted); }

/* status tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; }
.tile { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 12px; overflow: hidden; }
.tile::after { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px; border-radius: 2px; background: var(--line-2); }
.tile .k { font-size: 12px; color: var(--muted); }
.tile .v { font-family: var(--f-mono); font-size: 1.6rem; font-weight: 600; line-height: 1.25; letter-spacing: -.02em; }
.tile .d { font-size: 11.5px; color: var(--ink-2); font-family: var(--f-mono); }
.tile.lv0::after { background: var(--ok); } .tile.lv1::after { background: var(--warn); }
.tile.lv2::after { background: var(--bad); box-shadow: 0 0 12px var(--bad); } .tile.lv3::after { background: var(--sev); box-shadow: 0 0 12px var(--sev); }
.txt-lv0 { color: var(--ok); } .txt-lv1 { color: var(--warn); } .txt-lv2 { color: var(--bad); } .txt-lv3 { color: var(--sev); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--muted); flex: none; position: relative; }
.dot.lv0 { background: var(--ok); } .dot.lv1 { background: var(--warn); } .dot.lv2 { background: var(--bad); } .dot.lv3 { background: var(--sev); }
.dot.live::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid currentColor; color: inherit; animation: ping 2s infinite; }
.dot.lv0.live::after { border-color: var(--ok); } .dot.lv1.live::after { border-color: var(--warn); } .dot.lv2.live::after { border-color: var(--bad); }
@keyframes ping { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(2.2); opacity: 0; } }

.scales { display: flex; gap: 10px; }
.scale { flex: 1; text-align: center; border-radius: 13px; padding: 12px 4px; background: var(--line); border: 1px solid var(--line); }
.scale b { display: block; font-family: var(--f-display); font-size: 1.5rem; font-weight: 600; }
.scale small { font-size: .72rem; color: var(--ink-2); }
.scale.s1 { background: #f6d77a; color: #3a2a00; } .scale.s2 { background: #f2a43a; color: #2e1a00; }
.scale.s3 { background: #e5532f; color: #fff; } .scale.s4 { background: #c22121; color: #fff; } .scale.s5 { background: #6d0f3d; color: #fff; }
.scale.s1 small, .scale.s2 small { color: inherit; } .scale.s3 small, .scale.s4 small, .scale.s5 small { color: #fff; }

/* buttons & inputs */
.btn, select, input[type=date], input[type=month], input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], textarea {
  font: inherit; font-size: 14px; padding: 8px 13px; border-radius: 11px; border: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--panel-solid) 80%, transparent); color: var(--ink); transition: border-color .2s, background .2s, transform .15s;
}
.btn { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.btn svg { width: 16px; height: 16px; }
.btn:hover { border-color: var(--sun); }
.btn:active { transform: scale(.97); }
.btn.primary, .btn.sun { background: linear-gradient(135deg, var(--sun-2), var(--sun)); border-color: transparent; color: #1a1004; font-weight: 600; box-shadow: var(--glow-sun); }
.btn.ghost { background: transparent; }
.btn.danger { border-color: color-mix(in srgb, var(--bad) 50%, transparent); color: var(--bad); }
.btn.sm { padding: 4px 10px; font-size: 12.5px; border-radius: 8px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--turq); box-shadow: 0 0 0 3px color-mix(in srgb, var(--turq) 20%, transparent); }
textarea { width: 100%; min-height: 90px; resize: vertical; }
select { cursor: pointer; }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 12px; background: color-mix(in srgb, var(--panel-solid) 70%, transparent); }
.seg button { border: 0; background: none; color: var(--ink-2); padding: 6px 12px; font-size: 13px; cursor: pointer; border-radius: 9px; transition: background .2s, color .2s; }
.seg button.on { background: var(--ink); color: var(--bg); }
input[type=range] { width: 110px; accent-color: var(--sun); }
input[type=checkbox] { accent-color: var(--sun); width: 16px; height: 16px; vertical-align: -3px; }
.ctrl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-2); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: 13px; color: var(--ink-2); }
.field input, .field select, .field textarea { width: 100%; }
.field.row { flex-direction: row; align-items: center; gap: 10px; }

/* charts */
.chart { position: relative; width: 100%; height: 240px; }
.chart.tall { height: 320px; }
.chart.short { height: 150px; }
.chart canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.chart .tip {
  position: absolute; pointer-events: none; background: var(--panel-solid); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 10px; padding: 7px 10px; font-size: 12px; font-family: var(--f-mono);
  box-shadow: var(--shadow); white-space: nowrap; display: none; z-index: 2;
}
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin-top: 8px; }
.legend i { display: inline-block; width: 16px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }

/* tables */
.tbl-wrap { overflow-x: auto; border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-weight: 500; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; position: sticky; top: 0; background: var(--panel-solid); z-index: 1; }
td { font-variant-numeric: tabular-nums; }
tr.click { cursor: pointer; transition: background .15s; } tr.click:hover td { background: var(--line); }
td.num { text-align: right; font-family: var(--f-mono); font-size: 12.5px; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 7px; padding: 2px 8px; font-size: 11.5px; font-weight: 600; background: var(--line); color: var(--ink-2); font-family: var(--f-mono); }
.b-III { background: color-mix(in srgb, var(--lapis) 22%, transparent); color: color-mix(in srgb, var(--lapis) 60%, var(--ink)); }
.b-II { background: color-mix(in srgb, var(--flare) 22%, transparent); color: color-mix(in srgb, var(--flare) 70%, var(--ink)); }
.b-IV { background: color-mix(in srgb, var(--violet) 24%, transparent); color: color-mix(in srgb, var(--violet) 70%, var(--ink)); }
.b-V, .b-VI, .b-VII { background: color-mix(in srgb, var(--turq) 20%, transparent); color: color-mix(in srgb, var(--turq) 70%, var(--ink)); }
.b-step { opacity: .6; }
.b-X { background: var(--sev); color: #fff; } .b-M { background: var(--bad); color: #fff; } .b-C { background: color-mix(in srgb, var(--warn) 30%, transparent); color: var(--warn); }
.b-ok { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); }
.b-no { background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--bad); }
.role { display: inline-block; font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line-2); }
.role.admin { color: var(--sun-2); border-color: color-mix(in srgb, var(--sun) 50%, transparent); }
.role.researcher { color: var(--turq); border-color: color-mix(in srgb, var(--turq) 50%, transparent); }

/* spectrogram */
.spec { position: relative; width: 100%; user-select: none; border-radius: 12px; overflow: hidden; }
.spec canvas { display: block; width: 100%; }
.spec .readout { position: absolute; right: 10px; top: 8px; font-size: 11.5px; background: rgba(5, 8, 18, .8); color: #fff; padding: 4px 9px; border-radius: 7px; font-family: var(--f-mono); pointer-events: none; border: 1px solid rgba(255, 255, 255, .12); }
.spec-hint { font-size: 12px; color: var(--muted); margin-top: 8px; }
.listen { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.wave { display: inline-flex; gap: 2px; align-items: center; height: 18px; }
.wave i { width: 3px; border-radius: 2px; background: var(--sun); height: 30%; }
.wave.on i { animation: eq 0.9s ease-in-out infinite; }
.wave i:nth-child(2) { animation-delay: .15s; } .wave i:nth-child(3) { animation-delay: .3s; } .wave i:nth-child(4) { animation-delay: .45s; } .wave i:nth-child(5) { animation-delay: .6s; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }

/* images */
.imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.imgcard { background: #000; border-radius: 16px; overflow: hidden; cursor: zoom-in; position: relative; aspect-ratio: 1; border: 1px solid var(--line); }
.imgcard img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s var(--ease), filter .6s; }
.imgcard:hover img { transform: scale(1.08); filter: saturate(1.2); }
.imgcard span { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); color: #fff; font-size: 12.5px; padding: 30px 14px 12px; }
.imgcard span b { font-family: var(--f-mono); font-weight: 600; letter-spacing: .05em; }
.thumb { width: 100%; border-radius: 12px; display: block; background: #000; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.strip .imgcard { scroll-snap-align: start; }

/* misc */
.summary-text li { margin-bottom: 6px; color: var(--ink-2); }
.summary-text ul { padding-left: 18px; margin: 0 0 12px; }
.alert-item { border-left: 2px solid var(--sun); padding: 6px 12px; margin-bottom: 10px; font-size: 13.5px; background: color-mix(in srgb, var(--sun) 4%, transparent); border-radius: 0 10px 10px 0; }
.alert-item small { display: block; font-family: var(--f-mono); font-size: 11px; }
.alert-item summary { cursor: pointer; }
.alert-item pre { white-space: pre-wrap; font-size: 12px; background: var(--line); padding: 10px; border-radius: 8px; margin: 8px 0 0; font-family: var(--f-mono); }
.empty { color: var(--muted); font-size: 14px; padding: 14px 0; }
.err { color: var(--bad); font-size: 13.5px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.prose { max-width: 860px; }
.prose p, .prose li { color: var(--ink-2); }
.prose td, .prose th { white-space: normal; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.toc a { border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 14px; font-size: 13px; color: var(--ink-2); }
.toc a:hover { border-color: var(--sun); color: var(--ink); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .dow { font-size: 11px; color: var(--muted); text-align: center; font-family: var(--f-mono); }
.cal .day { border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; min-height: 58px; cursor: pointer; font-size: 11.5px; transition: border-color .2s, transform .2s; color: var(--ink-2); }
.cal .day:hover { border-color: var(--sun); transform: translateY(-2px); }
.cal .day b { display: block; font-size: 15px; color: var(--ink); font-family: var(--f-mono); }
.cal .day.full { background: color-mix(in srgb, var(--turq) 16%, transparent); }
.cal .day.part { background: color-mix(in srgb, var(--sun) 13%, transparent); }
.cal .day.none { opacity: .45; }
.cal .day.sel { outline: 2px solid var(--sun); }
.bar-cov { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--line); }
.bar-cov i { flex: 1; } .bar-cov i.on { background: linear-gradient(var(--turq), color-mix(in srgb, var(--turq) 60%, var(--lapis))); }
.sketch { width: 100%; max-width: 260px; height: auto; background: var(--line); border-radius: 12px; color: var(--ink-2); }
.burst-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.loading { color: var(--muted); padding: 30px 0; text-align: center; font-size: 14px; }
.loading::before { content: ""; display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line-2); border-top-color: var(--sun); border-radius: 50%; animation: spin 1s linear infinite; margin-right: 10px; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { background: linear-gradient(90deg, var(--line) 0%, var(--line-2) 50%, var(--line) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12.5px; color: var(--ink-2); background: color-mix(in srgb, var(--panel-solid) 60%, transparent); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs button { background: none; border: 0; color: var(--ink-2); padding: 10px 14px; cursor: pointer; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.tabs button svg { width: 16px; height: 16px; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--sun); }
.vote { display: inline-flex; gap: 4px; }
.vote button { border: 1px solid var(--line-2); background: none; color: var(--ink-2); border-radius: 8px; padding: 2px 8px; font-size: 12px; cursor: pointer; }
.vote button:hover { border-color: var(--sun); color: var(--ink); }
.vote button.on-ok { background: color-mix(in srgb, var(--ok) 25%, transparent); color: var(--ok); border-color: var(--ok); }
.vote button.on-no { background: color-mix(in srgb, var(--bad) 22%, transparent); color: var(--bad); border-color: var(--bad); }

/* modal, toast, palette */
.modal { position: fixed; inset: 0; background: rgba(2, 4, 10, .72); backdrop-filter: blur(6px); z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .25s; }
.modal[hidden] { display: none; }
.modal-box { background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 18px; max-width: min(980px, 100%); max-height: 92vh; overflow: auto; padding: 18px; position: relative; animation: pop .35s var(--ease); box-shadow: var(--shadow); }
.modal-box img { max-width: 100%; max-height: 80vh; display: block; margin: 0 auto; border-radius: 10px; }
.modal-x { position: absolute; right: 12px; top: 10px; background: var(--line); border: 0; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; color: var(--ink); z-index: 2; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--panel-solid); border: 1px solid var(--line-2); border-left: 3px solid var(--sun); border-radius: 12px; padding: 11px 16px; min-width: 260px; max-width: 380px; box-shadow: var(--shadow); font-size: 14px; animation: pop .35s var(--ease); }
.toast.bad { border-left-color: var(--bad); } .toast.ok { border-left-color: var(--ok); }
.palette { position: fixed; inset: 0; z-index: 85; background: rgba(2, 4, 10, .6); backdrop-filter: blur(5px); display: flex; justify-content: center; padding-top: 12vh; animation: fade .2s; }
.palette[hidden] { display: none; }
.pal-box { width: min(620px, calc(100% - 32px)); background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; animation: pop .3s var(--ease); align-self: flex-start; }
.pal-box input { width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 18px 20px; font-size: 17px; background: transparent; }
.pal-box input:focus { box-shadow: none; }
.pal-list { max-height: 50vh; overflow: auto; padding: 8px; }
.pal-list a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--ink); }
.pal-list a.on { background: var(--line); }
.pal-list a svg { width: 17px; height: 17px; color: var(--sun-2); }
.pal-list a small { margin-left: auto; font-family: var(--f-mono); font-size: 11px; }
.pal-foot { padding: 9px 16px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); font-family: var(--f-mono); display: flex; gap: 16px; }

/* auth pages */
.auth { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 640px; border: 1px solid var(--line); border-radius: 26px; overflow: hidden; background: var(--panel); }
.auth-art { position: relative; overflow: hidden; background: radial-gradient(circle at 30% 70%, rgba(255, 140, 40, .28), transparent 55%), linear-gradient(160deg, #0a1230, #05070f); padding: 40px; display: flex; flex-direction: column; justify-content: flex-end; color: #eef1fb; }
.auth-art h2 { font-family: var(--f-display); font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.1; position: relative; z-index: 2; font-weight: 600; }
.auth-art p { color: #aab4d2; position: relative; z-index: 2; max-width: 420px; }
.auth-art .orb { position: absolute; width: 520px; height: 520px; left: -60px; top: -120px; }
.auth-form { padding: 48px clamp(22px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; }
.auth-form h1 { font-size: 1.8rem; margin-bottom: 6px; }
.auth-form .sub { color: var(--ink-2); margin-bottom: 26px; }
.auth-form .btn.primary { width: 100%; justify-content: center; padding: 12px; font-size: 15px; margin-top: 6px; }
.auth-form .alt { margin-top: 18px; font-size: 14px; color: var(--ink-2); text-align: center; }
.pw-meter { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; margin-top: 6px; }
.pw-meter i { display: block; height: 100%; width: 0; transition: width .3s, background .3s; }
.form-err { color: var(--bad); font-size: 13.5px; min-height: 20px; margin-bottom: 6px; }

/* admin */
.admin { display: grid; grid-template-columns: 230px 1fr; gap: 22px; align-items: start; }
.admin-side { position: sticky; top: 120px; display: flex; flex-direction: column; gap: 3px; }
.admin-side button { display: flex; gap: 10px; align-items: center; padding: 10px 13px; border-radius: 11px; background: none; border: 0; color: var(--ink-2); cursor: pointer; font-size: 14px; text-align: left; }
.admin-side button svg { width: 17px; height: 17px; }
.admin-side button:hover { background: var(--line); color: var(--ink); }
.admin-side button.on { background: linear-gradient(90deg, color-mix(in srgb, var(--sun) 18%, transparent), transparent); color: var(--ink); box-shadow: inset 2px 0 0 var(--sun); }
.kpi { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi .tile .v { font-size: 1.9rem; }

/* footer */
.foot { border-top: 1px solid var(--line); margin-top: 40px; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--bg-2) 80%, transparent)); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; padding-top: 44px; padding-bottom: 20px; font-size: 13.5px; color: var(--ink-2); }
.foot b { color: var(--ink); display: block; margin-bottom: 10px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; }
.foot a { color: var(--ink-2); display: block; margin-bottom: 6px; } .foot a:hover { color: var(--sun-2); }
.foot-brand p { max-width: 360px; }
.foot-partner { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.foot-partner img { width: 44px; height: 44px; object-fit: contain; }
.foot-end { border-top: 1px solid var(--line); padding-top: 14px; padding-bottom: 22px; color: var(--muted); font-size: 12px; display: flex; gap: 14px; flex-wrap: wrap; font-family: var(--f-mono); }
.foot-end span:last-child { margin-left: auto; }

/* --------------------------------------------------------------- mobile */
@media (max-width: 1120px) {
  nav#nav .nav-i > a span, nav#nav .nav-i > button span { font-size: 13px; }
  .ib kbd { display: none; }
}
@media (max-width: 980px) {
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span3 { grid-column: span 2; }
  .menu-btn { display: inline-flex; }
  nav#nav { position: fixed; inset: 68px 0 0 0; flex-direction: column; margin: 0; padding: 20px; gap: 4px; background: var(--bg); z-index: 39; overflow: auto;
    opacity: 0; pointer-events: none; transform: translateY(-10px); transition: opacity .25s, transform .3s var(--ease); }
  nav#nav.open { opacity: 1; pointer-events: auto; transform: none; }
  .nav-i > a, .nav-i > button { font-size: 18px; font-family: var(--f-display); padding: 12px 6px; width: 100%; justify-content: flex-start; }
  .nav-i.active > a::after, .nav-i.active > button::after { display: none; }
  .mega { position: static; width: auto; grid-template-columns: 1fr; opacity: 1; transform: none; pointer-events: auto; display: none; box-shadow: none; background: transparent; border: 0; padding: 0 0 8px; }
  .nav-i.open .mega { display: grid; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { min-height: 260px; }
  .admin { grid-template-columns: 1fr; }
  .admin-side { position: static; flex-direction: row; overflow-x: auto; }
  .admin-side button { white-space: nowrap; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .span2, .span3 { grid-column: auto; }
  .wm i { display: none; }
  .wm b { font-size: 12.5px; letter-spacing: .12em; }
  .bar-in { gap: 8px; }
  .bar-tools { gap: 4px; }
  .brand { gap: 8px; }
  .brand svg { width: 34px; height: 34px; }
  .ib { min-width: 34px; height: 34px; padding: 0 8px; }
  .ib.hide-sm { display: none; }
  .foot-grid { grid-template-columns: 1fr; }
  .chart { height: 210px; }
  main { padding-top: 24px; }
  .pop { position: fixed; left: 12px; right: 12px; width: auto; top: 76px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* admin: Telegram and social media */
.tg-steps { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; }
.tg-steps code { font-family: var(--f-mono); font-size: 12.5px; background: var(--line); padding: 1px 6px; border-radius: 6px; }
.soc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.soc-grid .card { display: flex; flex-direction: column; gap: 12px; }
.soc-pv { display: block; width: 100%; aspect-ratio: 1080 / 1350; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); background: #070b1d; }
.soc-pv.tall { aspect-ratio: 1080 / 1920; }
.soc-pv video { width: 100%; height: 100%; border-radius: 14px; display: block; }
.soc-empty { display: grid; place-items: center; }
.soc-bursts { display: grid; grid-template-columns: 1fr 360px; gap: 18px; align-items: start; }
.soc-bursts tr.on td { background: color-mix(in srgb, var(--sun) 14%, transparent); }
.soc-bursts img { margin-bottom: 10px; }
@media (max-width: 980px) { .soc-grid, .soc-bursts { grid-template-columns: 1fr; } }
.tg-code { margin-top: 12px; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: 12px; }
.tg-code code { font-family: var(--f-mono); font-size: 18px; letter-spacing: .06em; padding: 6px 12px; border-radius: 8px; background: var(--line); }

/* glossary */
.glo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.glo h3 { display: flex; gap: 10px; align-items: center; margin: 0 0 8px; font-size: 17px; }
.glo h3 .ic { color: var(--sun-2); display: inline-flex; }
.glo p { margin: 0 0 10px; font-size: 14px; color: var(--ink-2); }
.glo .glo-you { margin: 0; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--turq) 10%, transparent); font-size: 13.5px; }
.glo .glo-you b { color: var(--turq); }
