/* ════════════════════════════════════════════════════════════════════════
   OBSIDIAN GLASS — SG7 Serverpit design system
   "Minecraft aesthetic evolved into a futuristic luxury control interface."

   A dark, cinematic glassmorphism system. Translucent obsidian panels float
   over a stylized voxel-tech atmosphere. Emerald/diamond + cyan energy carry
   the accent; everything else is restrained graphite and ice.

   Token contract: ALL colors live in :root. Never write raw hex outside it.
   ════════════════════════════════════════════════════════════════════════ */

:root {
  /* ─── Base materials — obsidian / graphite / blue-black ─────────────── */
  --void:        #04060c;   /* deepest backdrop */
  --obsidian:    #070a12;   /* page base */
  --graphite:    #0b0f1a;   /* sunken regions */
  --charcoal:    #10151f;   /* solid panels */
  --slate:       #161c2a;   /* raised solids, inputs */
  --slate-2:     #1e2536;   /* hover solids */

  /* Glass fills — translucent so the atmosphere shows through */
  --glass-1:     rgba(146, 178, 230, 0.045);  /* default panel */
  --glass-2:     rgba(150, 184, 240, 0.075);  /* raised panel */
  --glass-3:     rgba(156, 190, 245, 0.11);   /* hover / active panel */
  --glass-frost: rgba(10, 14, 22, 0.66);      /* heavy frosted (nav, modal) */

  /* ─── Foreground ramp — ice whites to deep steel ───────────────────── */
  --fg:        #eaf1ff;   /* primary text */
  --fg-2:      #c4d1e8;   /* secondary */
  --muted:     #8694b1;   /* captions, labels */
  --meta:      #5b6884;   /* metadata, faint */
  --fg-on-accent: #04130d; /* text on emerald fills */

  /* ─── Borders & luminous edges ─────────────────────────────────────── */
  --border:       rgba(150, 180, 225, 0.14);
  --border-soft:  rgba(150, 180, 225, 0.07);
  --border-lum:   rgba(120, 232, 214, 0.40);   /* glowing edge */
  --hairline-top: rgba(255, 255, 255, 0.10);   /* inset top sheen */

  /* ─── Accents — diamond emerald, cyan, ice, magic ──────────────────── */
  --emerald:   #2fe6a6;   /* PRIMARY accent — enchantment / diamond */
  --emerald-d: #14b885;
  --cyan:      #3ce0ff;   /* energy / portal glow */
  --ice:       #82b4ff;   /* cool secondary */
  --teal:      #119d97;   /* deep teal */
  --silver:    #aeb9cf;   /* neutral metal */
  --amber:     #ffb454;   /* warning */
  --danger:    #ff5468;   /* destructive / nether */
  --magic:     #ad6bff;   /* magical-tech, used very sparingly */

  --accent:    var(--emerald);
  --accent-2:  var(--cyan);

  /* Soft accent washes */
  --emerald-soft: rgba(47, 230, 166, 0.14);
  --cyan-soft:    rgba(60, 224, 255, 0.13);
  --amber-soft:   rgba(255, 180, 84, 0.14);
  --danger-soft:  rgba(255, 84, 104, 0.14);
  --magic-soft:   rgba(173, 107, 255, 0.13);

  /* ─── Glows (box-shadow strings) ───────────────────────────────────── */
  --glow-emerald: 0 0 0 1px rgba(47,230,166,0.30), 0 0 24px rgba(47,230,166,0.28), 0 0 60px rgba(47,230,166,0.12);
  --glow-cyan:    0 0 0 1px rgba(60,224,255,0.30), 0 0 22px rgba(60,224,255,0.26);
  --glow-amber:   0 0 0 1px rgba(255,180,84,0.32), 0 0 20px rgba(255,180,84,0.22);
  --glow-danger:  0 0 0 1px rgba(255,84,104,0.34), 0 0 20px rgba(255,84,104,0.22);

  /* ─── Elevation ────────────────────────────────────────────────────── */
  --elev-1: 0 1px 0 var(--hairline-top) inset, 0 8px 24px rgba(0,0,0,0.45);
  --elev-2: 0 1px 0 var(--hairline-top) inset, 0 18px 50px rgba(0,0,0,0.55), 0 4px 14px rgba(0,0,0,0.4);
  --elev-3: 0 1px 0 var(--hairline-top) inset, 0 30px 80px rgba(0,0,0,0.65), 0 8px 24px rgba(0,0,0,0.5);

  /* ─── Typography ───────────────────────────────────────────────────── */
  --font-display: 'Space Grotesk', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', ui-monospace, Menlo, monospace;
  --font-pixel:   'Space Grotesk', 'JetBrains Mono', monospace; /* block-accent, used tiny + tracked */

  --fs-display: clamp(40px, 6vw, 78px);
  --fs-h1: clamp(32px, 4vw, 52px);
  --fs-h2: clamp(25px, 2.6vw, 34px);
  --fs-h3: 20px;
  --fs-lead: clamp(16px, 1.4vw, 19px);
  --fs-body: 15px;
  --fs-sm: 13px;
  --fs-meta: 12px;

  /* ─── Spacing / radius / motion ────────────────────────────────────── */
  --gap-xs: 8px;  --gap-sm: 12px; --gap-md: 18px;
  --gap-lg: 28px; --gap-xl: 48px; --gap-2xl: 84px;
  --container: 1240px;
  --gutter: 32px;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --ease: cubic-bezier(0.22, 0.61, 0.30, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 140ms;
  --t-base: 240ms;
  --t-slow: 460ms;
}

/* ─── reset & base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--obsidian);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  letter-spacing: -0.005em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; color: inherit; background: none; border: none; }
input, select, textarea { font: inherit; }
p { text-wrap: pretty; margin: 0; }
h1,h2,h3,h4 { text-wrap: balance; margin: 0; font-family: var(--font-display); font-weight: 600; }
::selection { background: var(--emerald-soft); color: var(--fg); }

/* ─── Atmospheric background system ──────────────────────────────────── */
/* Layer 0: fixed canvas (drawn by atmosphere.js). Layers below add fog,
   pixel-grid micro-texture and depth gradients with pure CSS so the page
   still reads beautifully even if JS is disabled. */
.atmos {
  position: fixed; inset: 0; z-index: -3;
  background:
    radial-gradient(1200px 800px at 78% -8%, rgba(47,230,166,0.10), transparent 60%),
    radial-gradient(1000px 700px at 12% 8%, rgba(60,224,255,0.08), transparent 55%),
    radial-gradient(900px 900px at 50% 120%, rgba(173,107,255,0.06), transparent 60%),
    linear-gradient(180deg, var(--void), var(--obsidian) 40%, var(--graphite));
}
.atmos::before {            /* pixel-grid micro texture */
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(150,180,225,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150,180,225,0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(120% 120% at 50% 0%, #000 30%, transparent 78%);
  opacity: 0.5;
}
.atmos::after {             /* depth fog at base */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(4,6,12,0.7) 100%);
}
#atmos-canvas { position: fixed; inset: 0; z-index: -2; pointer-events: none; }
/* vignette to focus the center */
.vignette { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  box-shadow: inset 0 0 240px 40px rgba(0,0,0,0.55); }

/* ─── Layout primitives ──────────────────────────────────────────────── */
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-wide { max-width: 1480px; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(56px, 9vw, var(--gap-2xl)); position: relative; }
.stack { display: flex; flex-direction: column; }
.stack-sm > * + * { margin-top: var(--gap-sm); }
.stack-md > * + * { margin-top: var(--gap-md); }
.stack-lg > * + * { margin-top: var(--gap-lg); }
.row { display: flex; align-items: center; gap: var(--gap-md); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--gap-md); }
.wrap { flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: var(--gap-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--gap-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--gap-md); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: var(--gap-lg); }
@media (max-width: 980px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-3.keep-2, .grid-4.keep-2 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 600px) { .grid-3.keep-2, .grid-4.keep-2 { grid-template-columns: 1fr; } }

/* ─── Typography helpers ─────────────────────────────────────────────── */
.display { font-family: var(--font-display); font-size: var(--fs-display); line-height: 1.02; letter-spacing: -0.03em; font-weight: 600; }
.h1 { font-size: var(--fs-h1); line-height: 1.06; letter-spacing: -0.025em; }
.h2 { font-size: var(--fs-h2); line-height: 1.12; letter-spacing: -0.02em; }
.h3 { font-size: var(--fs-h3); line-height: 1.3; letter-spacing: -0.01em; font-weight: 600; font-family: var(--font-display); }
.lead { font-size: var(--fs-lead); color: var(--fg-2); line-height: 1.6; max-width: 60ch; }
.body-muted { color: var(--muted); }
.sm { font-size: var(--fs-sm); }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.gradient-text {
  background: linear-gradient(100deg, var(--fg) 30%, var(--emerald) 70%, var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Eyebrow / kicker — the "block-accent" pixel marker, used sparingly */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-pixel);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--emerald);
}
.eyebrow::before {
  content: ""; width: 9px; height: 9px;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  clip-path: polygon(0 0,100% 0,100% 100%,0 100%);
  /* tiny voxel cube */
}

/* ─── Glass material — the core surface ──────────────────────────────── */
.glass {
  position: relative;
  background:
    linear-gradient(155deg, var(--glass-2), var(--glass-1) 60%),
    var(--glass-frost);
  backdrop-filter: blur(20px) saturate(125%);
  -webkit-backdrop-filter: blur(20px) saturate(125%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--elev-2);
  overflow: hidden;
}
/* luminous top edge sweep */
.glass::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), transparent 18%);
  mix-blend-mode: screen;
}
.glass-flat { box-shadow: var(--elev-1); }
.glass-raise { box-shadow: var(--elev-3); }

/* Card = glass with padding */
.card { padding: 26px; }
.card-sm { padding: 18px; }
.card-lg { padding: 34px; }

/* Interactive cards lift + edge-light on hover */
.card-hover { transition: transform var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease); }
.card-hover:hover {
  transform: translateY(-4px);
  border-color: var(--border-lum);
  box-shadow: var(--elev-3), 0 0 0 1px rgba(47,230,166,0.18), 0 0 40px rgba(47,230,166,0.10);
}

/* Beveled voxel corner cuts — removed: the clip-path severed the rounded
   rim on the top-left & bottom-right corners (the "mutilated" edge). Panels
   now keep the full, uninterrupted rounded border from .glass (--radius-lg). */
.bevel { /* intentionally no clip-path — preserve the whole rounded rim */ }

/* Active / energized card — animated border energy */
.card-active { border-color: transparent; }
.card-active::after {
  content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit;
  background: linear-gradient(120deg, var(--emerald), var(--cyan), transparent 60%, var(--emerald));
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: borderflow 5s linear infinite;
  pointer-events: none;
}
@keyframes borderflow { 0%{background-position:0% 50%} 100%{background-position:300% 50%} }

/* ─── Buttons ────────────────────────────────────────────────────────── */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 22px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; letter-spacing: -0.01em;
  border: 1px solid var(--border);
  background: var(--glass-2);
  backdrop-filter: blur(8px);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease), background var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
/* shimmer sweep on hover */
.btn::after {
  content: ""; position: absolute; top: 0; left: -120%; width: 70%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: skewX(-18deg); transition: left var(--t-slow) var(--ease);
}
.btn:hover::after { left: 130%; }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--emerald-soft), 0 0 0 1px var(--emerald); }

.btn-primary {
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  color: var(--fg-on-accent); border-color: transparent;
  box-shadow: 0 0 0 1px rgba(47,230,166,0.4), 0 8px 26px rgba(47,230,166,0.28);
}
.btn-primary:hover { box-shadow: var(--glow-emerald), 0 10px 30px rgba(47,230,166,0.40); transform: translateY(-2px); }

.btn-secondary { color: var(--fg); }
.btn-secondary:hover { border-color: var(--border-lum); box-shadow: 0 0 18px rgba(60,224,255,0.14); background: var(--glass-3); }

.btn-ghost { background: transparent; border-color: transparent; padding-inline: 12px; color: var(--fg-2); }
.btn-ghost:hover { color: var(--emerald); }

.btn-danger { color: var(--danger); border-color: var(--danger-soft); background: var(--danger-soft); }
.btn-danger:hover { box-shadow: var(--glow-danger); border-color: transparent; }

.btn-amber { color: var(--amber); border-color: var(--amber-soft); background: var(--amber-soft); }
.btn-amber:hover { box-shadow: var(--glow-amber); border-color: transparent; }

.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 15px 30px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { padding: 10px; width: 40px; height: 40px; }

/* ─── Pills / badges / tags ──────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--glass-2); border: 1px solid var(--border); color: var(--fg-2);
}
.pill-emerald { color: var(--emerald); border-color: var(--emerald-soft); background: var(--emerald-soft); }
.pill-cyan { color: var(--cyan); border-color: var(--cyan-soft); background: var(--cyan-soft); }
.pill-amber { color: var(--amber); border-color: var(--amber-soft); background: var(--amber-soft); }
.pill-danger { color: var(--danger); border-color: var(--danger-soft); background: var(--danger-soft); }
.pill-magic { color: var(--magic); border-color: var(--magic-soft); background: var(--magic-soft); }

/* Status orb — pulsing */
.orb { width: 9px; height: 9px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 0 rgba(47,230,166,0.6); animation: pulse 2.6s var(--ease-out) infinite; flex: none; }
.orb.cyan { background: var(--cyan); box-shadow: 0 0 0 0 rgba(60,224,255,0.6); }
.orb.amber { background: var(--amber); animation-duration: 1.8s; }
.orb.danger { background: var(--danger); animation-duration: 1.2s; }
.orb.off { background: var(--meta); animation: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(47,230,166,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(47,230,166,0); }
  100% { box-shadow: 0 0 0 0 rgba(47,230,166,0); }
}

/* ─── Forms ──────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 12px; color: var(--muted); font-family: var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; }
.input, .textarea, .select {
  width: 100%; padding: 13px 15px; color: var(--fg);
  background: var(--graphite); border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--meta); }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--emerald);
  background: var(--charcoal);
  box-shadow: 0 0 0 3px var(--emerald-soft), 0 0 22px rgba(47,230,166,0.12);
}
.input-icon { position: relative; }
.input-icon .input { padding-left: 44px; }
.input-icon svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.textarea { min-height: 110px; resize: vertical; line-height: 1.6; }

/* Toggle switch */
.switch { position: relative; width: 46px; height: 26px; border-radius: 999px; background: var(--slate); border: 1px solid var(--border); transition: background var(--t-base) var(--ease); flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--silver); transition: transform var(--t-base) var(--ease-out), background var(--t-base); }
.switch[aria-checked="true"] { background: linear-gradient(135deg, var(--emerald), var(--teal)); border-color: transparent; box-shadow: 0 0 16px rgba(47,230,166,0.4); }
.switch[aria-checked="true"]::after { transform: translateX(20px); background: var(--fg-on-accent); }

/* ─── Tables / data ──────────────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 13px 16px; text-align: left; }
.table th { color: var(--muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500; border-bottom: 1px solid var(--border); }
.table tbody tr { border-bottom: 1px solid var(--border-soft); transition: background var(--t-fast); }
.table tbody tr:hover { background: var(--glass-1); }
.table .num { text-align: right; }

/* ─── Voxel / image placeholder ──────────────────────────────────────── */
.ph {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background:
    repeating-linear-gradient(45deg, rgba(150,180,225,0.05) 0 8px, transparent 8px 16px),
    linear-gradient(150deg, var(--emerald-soft), var(--cyan-soft) 60%, transparent),
    var(--graphite);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--muted); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em;
  aspect-ratio: 16/10;
}
.ph.square { aspect-ratio: 1/1; } .ph.tall { aspect-ratio: 3/4; } .ph.wide { aspect-ratio: 16/9; }

/* ─── Divider with redstone-energy accent ────────────────────────────── */
.rule { height: 1px; border: 0; background: var(--border); margin: 0; }
.rule-energy { height: 1px; border: 0; margin: 0;
  background: linear-gradient(90deg, transparent, var(--emerald) 18%, var(--cyan) 50%, var(--emerald) 82%, transparent);
  opacity: 0.55; }

/* ─── Top navigation ─────────────────────────────────────────────────── */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, rgba(7,10,18,0.85), rgba(7,10,18,0.55));
  backdrop-filter: blur(18px) saturate(120%);
  border-bottom: 1px solid var(--border-soft);
}
.topnav-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--gap-lg); padding-block: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.brand .mark { width: 34px; height: 34px; flex: none; }
.brand small { font-family: var(--font-pixel); font-size: 10px; letter-spacing: 0.28em; color: var(--emerald); text-transform: uppercase; display: block; line-height: 1; margin-top: 3px; }
.navlinks { display: flex; gap: 26px; }
.navlinks a { font-size: 14px; color: var(--muted); transition: color var(--t-base); position: relative; }
.navlinks a:hover, .navlinks a.active { color: var(--fg); }
.navlinks a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -22px; height: 2px; background: var(--emerald); box-shadow: 0 0 10px var(--emerald); }
@media (max-width: 860px){ .navlinks { display: none; } }

/* ─── App shell (sidebar layouts) ────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 268px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  padding: 24px 18px;
  background: linear-gradient(180deg, rgba(10,14,22,0.78), rgba(7,10,18,0.62));
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-soft);
  display: flex; flex-direction: column; gap: 6px;
}
.sidebar .navgroup { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--meta); padding: 16px 12px 6px; }
.navitem {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 10px;
  color: var(--muted); font-size: 14px; font-weight: 500;
  transition: background var(--t-base), color var(--t-base), box-shadow var(--t-base);
}
.navitem svg { width: 18px; height: 18px; flex: none; opacity: 0.85; }
.navitem:hover { background: var(--glass-1); color: var(--fg-2); }
.navitem.active { color: var(--fg); background: var(--glass-2); box-shadow: inset 2px 0 0 var(--emerald), 0 0 22px rgba(47,230,166,0.08); }
.navitem.active svg { color: var(--emerald); opacity: 1; }
.main { min-width: 0; padding: 30px clamp(20px, 3vw, 44px) 64px; }
.topstrip { display: flex; align-items: center; justify-content: space-between; gap: var(--gap-md); margin-bottom: 28px; flex-wrap: wrap; }
@media (max-width: 940px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; border-right: 0; border-bottom: 1px solid var(--border-soft); }
  .sidebar .navgroup { display: none; }
  .sidebar .brand-row { width: 100%; }
}

/* ─── Stat / metric block ────────────────────────────────────────────── */
.stat-num { font-family: var(--font-display); font-size: clamp(30px, 4vw, 46px); font-weight: 600; line-height: 1; letter-spacing: -0.03em; }
.stat-label { color: var(--muted); font-size: 13px; margin-top: 6px; }
.stat-delta { font-family: var(--font-mono); font-size: 12px; }
.up { color: var(--emerald); } .down { color: var(--danger); }

/* ─── Terminal / log window ──────────────────────────────────────────── */
.terminal {
  background: linear-gradient(180deg, rgba(4,6,12,0.92), rgba(7,10,18,0.88));
  border: 1px solid var(--border); border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 13px; line-height: 1.75;
  box-shadow: var(--elev-2), inset 0 0 60px rgba(0,0,0,0.4);
  overflow: hidden;
}
.terminal-bar { display: flex; align-items: center; gap: 8px; padding: 11px 15px; border-bottom: 1px solid var(--border-soft); background: var(--glass-1); }
.terminal-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--meta); }
.terminal-body { padding: 16px 18px; max-height: 320px; overflow-y: auto; }
.logline { display: flex; gap: 12px; white-space: pre-wrap; }
.logline .ts { color: var(--meta); flex: none; }
.lvl-ok { color: var(--emerald); } .lvl-info { color: var(--ice); } .lvl-warn { color: var(--amber); } .lvl-err { color: var(--danger); }
.terminal-body code, .logline .msg { color: var(--fg-2); }

/* ─── Progress / meter ───────────────────────────────────────────────── */
.meter { height: 8px; border-radius: 999px; background: var(--graphite); overflow: hidden; border: 1px solid var(--border-soft); }
.meter > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--emerald), var(--cyan)); box-shadow: 0 0 12px rgba(47,230,166,0.5); }
.meter.amber > span { background: linear-gradient(90deg, var(--amber), var(--danger)); box-shadow: 0 0 12px rgba(255,180,84,0.5); }

/* ─── Scroll reveal (driven by atmosphere.js) ────────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
[data-delay="1"]{ transition-delay: 70ms; } [data-delay="2"]{ transition-delay: 140ms; }
[data-delay="3"]{ transition-delay: 210ms; } [data-delay="4"]{ transition-delay: 280ms; }
[data-delay="5"]{ transition-delay: 350ms; }

/* breathing glow for hero focal elements */
.breathe { animation: breathe 6s var(--ease-out) infinite; }
@keyframes breathe { 0%,100%{ filter: drop-shadow(0 0 12px rgba(47,230,166,0.3)); } 50%{ filter: drop-shadow(0 0 28px rgba(47,230,166,0.55)); } }
.float { animation: float 8s ease-in-out infinite; }
@keyframes float { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-12px); } }
.spin-slow { animation: spin 26s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Footer ─────────────────────────────────────────────────────────── */
.pagefoot { border-top: 1px solid var(--border-soft); padding-block: var(--gap-xl); color: var(--muted); font-size: 13px; }
.pagefoot .row-between { flex-wrap: wrap; gap: var(--gap-md); }

/* ─── Utilities ──────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.full { width: 100%; }
.mt-0{margin-top:0}.mt-sm{margin-top:var(--gap-sm)}.mt-md{margin-top:var(--gap-md)}.mt-lg{margin-top:var(--gap-lg)}.mt-xl{margin-top:var(--gap-xl)}
.maxw-sm{max-width:520px}.maxw-md{max-width:680px}.maxw-lg{max-width:820px}
.hide-mobile{} @media (max-width:600px){ .hide-mobile{display:none!important} }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
