/* ==========================================================================
   TES MONITORING — tesmonitoring.com
   High-Tech Enterprise DCIM / Cyber-Blue Dark UI
   Pure static CSS, no build step. All paths are relative.
   ========================================================================== */

:root {
  --bg-primary: #060B19;
  --bg-secondary: #0D162D;
  --bg-card: rgba(13, 22, 45, 0.75);
  --bg-card-strong: rgba(13, 22, 45, 0.92);
  --accent-blue: #1E6BFF;
  --accent-cyan: #00E5FF;
  --ok: #10B981;
  --warn: #F59E0B;
  --crit: #EF4444;
  --text: #F8FAFC;
  --text-2: #94A3B8;
  --text-3: #64748B;
  --line: rgba(30, 107, 255, 0.22);
  --line-strong: rgba(0, 229, 255, 0.45);
  --glow: 0 0 0 1px rgba(30, 107, 255, 0.25), 0 10px 40px -12px rgba(30, 107, 255, 0.45);
  --radius: 14px;
  --radius-sm: 8px;
  --font-sans: "Inter", "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --header-h: 72px;
  --container: 1240px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
  scrollbar-color: #1E3A6E var(--bg-primary);
  @media (prefers-reduced-motion: reduce) { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(30, 107, 255, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(0, 229, 255, 0.07), transparent 60%),
    var(--bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

::selection { background: rgba(0, 229, 255, 0.3); color: #fff; }

img, svg { max-width: 100%; display: block; }
a { color: var(--accent-cyan); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, kbd, pre, .mono { font-family: var(--font-mono); }
:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--accent-blue); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

.container { width: min(var(--container), 100% - 40px); margin-inline: auto; }

/* Background grid used in hero & sections */
.grid-bg {
  position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background-image:
    linear-gradient(rgba(30, 107, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 107, 255, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(6, 11, 25, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: 100%;
  display: flex; align-items: center; gap: 20px;
  width: min(1440px, 100% - 32px); margin-inline: auto;
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--text); flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 44px; height: 44px; filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.35)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 800; letter-spacing: 0.06em; font-size: 17px; }
.brand-name span { color: var(--accent-cyan); }
.brand-sub { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.14em; color: var(--text-2); margin-top: 4px; }

.primary-nav { margin-inline: auto; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.primary-nav a {
  display: block; padding: 8px 11px; border-radius: 8px;
  color: var(--text-2); font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: color .2s, background-color .2s;
}
.primary-nav a:hover, .primary-nav a.is-active { color: var(--text); background: rgba(30, 107, 255, 0.12); text-decoration: none; }
.primary-nav a.is-active { box-shadow: inset 0 -2px 0 var(--accent-cyan); }

.header-tools { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.lang-switch {
  display: inline-flex; align-items: center; padding: 3px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(13, 22, 45, 0.6);
  font-family: var(--font-mono); font-size: 12px;
}
.lang-switch button {
  appearance: none; border: 0; background: transparent; color: var(--text-2);
  font: inherit; font-weight: 600; padding: 5px 10px; border-radius: 999px; cursor: pointer;
  transition: color .2s, background-color .2s, box-shadow .2s;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button[aria-pressed="true"] {
  color: #fff; background: var(--accent-blue);
  box-shadow: 0 0 14px rgba(30, 107, 255, 0.85), 0 0 0 1px rgba(0, 229, 255, 0.5);
}
.lang-switch .sep { color: var(--text-3); padding-inline: 1px; user-select: none; }

.node-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--text-2);
  padding: 6px 10px; border: 1px solid rgba(16, 185, 129, 0.35); border-radius: 999px;
  background: rgba(16, 185, 129, 0.07); white-space: nowrap;
}
.node-status b { color: var(--ok); font-weight: 600; }
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 2s infinite;
  @media (prefers-reduced-motion: reduce) { animation: none; }
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.nav-toggle {
  display: none; appearance: none; background: transparent; border: 1px solid var(--line);
  color: var(--text); width: 42px; height: 42px; border-radius: 10px; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ==========================================================================
   Buttons, badges, generic UI
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px; border-radius: 10px; font-weight: 600; font-size: 15px; line-height: 1.2;
  border: 1px solid transparent; cursor: pointer; text-align: center;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s, border-color .2s, color .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-blue), #3D86FF 60%, #12B8FF);
  box-shadow: 0 8px 30px -8px rgba(30, 107, 255, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.btn-primary:hover { box-shadow: 0 10px 38px -6px rgba(0, 229, 255, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
.btn-ghost { color: var(--text); background: rgba(13, 22, 45, 0.6); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent-cyan); background: rgba(0, 229, 255, 0.08); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-mail { font-family: var(--font-mono); font-size: 12px; font-weight: 500; }

.badge {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; color: var(--accent-cyan);
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, 0.35); background: rgba(0, 229, 255, 0.06);
}

.eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent-cyan); margin: 0 0 14px; display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--accent-cyan); box-shadow: 0 0 8px var(--accent-cyan); }

.card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.card:hover { border-color: rgba(0, 229, 255, 0.4); box-shadow: var(--glow); }
.card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.35), transparent 30%, transparent 70%, rgba(30, 107, 255, 0.35));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude; padding: 1px; opacity: .55;
}
.card h3 { margin: 0 0 10px; font-size: 19px; line-height: 1.3; }
.card p { margin: 0; color: var(--text-2); }
.card-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(30, 107, 255, 0.25), rgba(0, 229, 255, 0.12));
  border: 1px solid rgba(0, 229, 255, 0.3); color: var(--accent-cyan);
}
.card-icon svg { width: 24px; height: 24px; }
.card-num {
  position: absolute; top: 20px; right: 22px;
  font-family: var(--font-mono); font-size: 12px; color: var(--text-3); letter-spacing: .1em;
}

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 12px; color: var(--text);
  padding: 6px 11px; border-radius: 8px;
  background: rgba(30, 107, 255, 0.1); border: 1px solid var(--line);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

code.inline, .card code, p code, li code {
  font-size: .86em; color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.07); border: 1px solid rgba(0, 229, 255, 0.15);
  padding: 1px 6px; border-radius: 5px; white-space: nowrap;
}
/* long inline code inside prose must be able to wrap on narrow screens */
.card p code, .card li code { white-space: normal; overflow-wrap: break-word; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { position: relative; padding: 110px 0; isolation: isolate; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(13, 22, 45, 0.55) 15%, rgba(13, 22, 45, 0.55) 85%, transparent); }
.section-head { max-width: 860px; margin-bottom: 54px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.15; margin: 0 0 18px; letter-spacing: -0.02em; }
.section-head p { color: var(--text-2); font-size: 17.5px; margin: 0; }
.grad-text {
  background: linear-gradient(90deg, #fff, var(--accent-cyan) 55%, var(--accent-blue));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.grid-3 { display: grid; gap: 22px; grid-template-columns: repeat(3, 1fr); }
.grid-4 { display: grid; gap: 22px; grid-template-columns: repeat(4, 1fr); }
.grid-2 { display: grid; gap: 22px; grid-template-columns: repeat(2, 1fr); }

/* Decorative scroll reveal: progressive enhancement only */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes reveal-up { from { opacity: 0; translate: 0 28px; } }
    .reveal {
      animation: reveal-up auto ease-out backwards;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; padding: 64px 0 90px; isolation: isolate; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 48px; align-items: center; }
.hero h1 {
  font-size: clamp(30px, 3.7vw, 50px); line-height: 1.1; letter-spacing: -0.025em;
  margin: 22px 0 22px; font-weight: 800; text-wrap: balance;
}
.hero-sub { font-size: 17.5px; color: var(--text-2); margin: 0 0 32px; max-width: 640px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 36px; }
.hero-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 640px; }
.kpi {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: rgba(13, 22, 45, 0.55);
}
.kpi b { display: block; font-family: var(--font-mono); font-size: 20px; color: var(--accent-cyan); line-height: 1.2; }
.kpi span { font-size: 12px; color: var(--text-2); line-height: 1.35; display: block; margin-top: 4px; }

/* ---------- DCIM dashboard / simulator ---------- */
.dash {
  background: linear-gradient(180deg, rgba(13, 22, 45, 0.92), rgba(8, 14, 32, 0.92));
  border: 1px solid rgba(0, 229, 255, 0.28);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 30px 80px -30px rgba(30, 107, 255, 0.6), 0 0 0 1px rgba(30, 107, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--font-mono);
}
.dash-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.dash-title { font-size: 12px; color: var(--text-2); letter-spacing: .06em; display: flex; align-items: center; gap: 10px; }
.dash-title b { color: var(--text); font-weight: 600; white-space: nowrap; }
.seg {
  display: inline-flex; padding: 3px; border-radius: 9px; border: 1px solid var(--line);
  background: rgba(6, 11, 25, 0.7);
}
.seg button {
  appearance: none; border: 0; background: transparent; color: var(--text-2); cursor: pointer;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; padding: 6px 10px; border-radius: 7px;
  transition: background-color .2s, color .2s;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: rgba(30, 107, 255, 0.85); color: #fff; }
.seg button.is-fail[aria-pressed="true"] { background: rgba(239, 68, 68, 0.85); }

.dash-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; }
.panel {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: rgba(6, 11, 25, 0.55);
  min-width: 0;
}
.panel-label { font-size: 10.5px; letter-spacing: .12em; color: var(--text-2); text-transform: uppercase; margin: 0 0 10px; display: flex; justify-content: space-between; gap: 8px; }
.panel-label span:last-child { color: var(--text-3); }

.heatmap { display: grid; gap: 6px; }
.rack-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.aisle {
  font-size: 9.5px; letter-spacing: .3em; text-align: center; color: rgba(0, 229, 255, 0.7);
  padding: 4px 0; border-block: 1px dashed rgba(0, 229, 255, 0.25);
  background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.07), transparent);
}
.rack {
  appearance: none; border: 1px solid rgba(255, 255, 255, 0.08); cursor: pointer;
  border-radius: 6px; padding: 8px 2px 7px; min-height: 58px;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  color: #031022; font-family: var(--font-mono); font-weight: 700;
  background: var(--rack-color, #1E6BFF);
  transition: background-color .6s ease, box-shadow .2s, transform .15s;
  position: relative;
}
.rack:hover { transform: translateY(-2px); }
.rack .r-id { font-size: 10px; opacity: .85; }
.rack .r-t { font-size: 12.5px; }
.rack[aria-pressed="true"] { box-shadow: 0 0 0 2px #fff, 0 0 18px var(--rack-color); }
.rack.is-crit::after {
  content: ""; position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%;
  background: #fff; animation: blink 1s steps(2, start) infinite;
  @media (prefers-reduced-motion: reduce) { animation: none; }
}
@keyframes blink { to { visibility: hidden; } }
.heat-legend { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 10px; color: var(--text-2); }
.heat-legend i { flex: 1; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #1E6BFF, #00E5FF, #10B981, #F59E0B, #EF4444); }
.crac { display: flex; justify-content: space-between; font-size: 9.5px; color: var(--text-3); margin-top: 8px; gap: 6px; }
.crac span { display: inline-flex; align-items: center; gap: 5px; }
.crac i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.crac i.fail { background: var(--crit); box-shadow: 0 0 8px var(--crit); }

.gauges { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gauge { text-align: center; }
.gauge svg { width: 100%; max-width: 128px; margin: 0 auto; }
.gauge .g-track { fill: none; stroke: rgba(148, 163, 184, 0.15); stroke-width: 9; }
.gauge .g-val { fill: none; stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset .8s ease, stroke .6s; }
.gauge text { font-family: var(--font-mono); fill: var(--text); }
.gauge .g-big { font-size: 26px; font-weight: 700; }
.gauge .g-small { font-size: 9.5px; fill: var(--text-2); letter-spacing: .08em; }
.gauge-cap { font-size: 10px; color: var(--text-2); letter-spacing: .08em; margin-top: 2px; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.mini-stats div { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; }
.mini-stats span { display: block; font-size: 9.5px; color: var(--text-2); letter-spacing: .06em; }
.mini-stats b { font-size: 15px; color: var(--text); }

.chart-panel { grid-column: 1 / -1; }
.chart-wrap { position: relative; }
.chart-wrap svg { width: 100%; height: auto; overflow: visible; }
.chart-wrap .axis text { font-size: 10px; fill: var(--text-3); font-family: var(--font-mono); }
.chart-wrap .gridline { stroke: rgba(148, 163, 184, 0.1); stroke-width: 1; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 10px; color: var(--text-2); margin-top: 6px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 16px; height: 3px; border-radius: 2px; display: inline-block; }

.alert-bar {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 12px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid rgba(16, 185, 129, 0.4); background: rgba(16, 185, 129, 0.08); color: #A7F3D0;
  transition: background-color .4s, border-color .4s, color .4s;
}
.alert-bar .tag { font-weight: 700; padding: 2px 8px; border-radius: 5px; background: var(--ok); color: #03140E; font-size: 10.5px; letter-spacing: .08em; }
.alert-bar.is-warn { border-color: rgba(245, 158, 11, 0.55); background: rgba(245, 158, 11, 0.1); color: #FDE68A; }
.alert-bar.is-warn .tag { background: var(--warn); color: #1F1300; }
.alert-bar.is-crit { border-color: rgba(239, 68, 68, 0.6); background: rgba(239, 68, 68, 0.12); color: #FECACA; }
.alert-bar.is-crit .tag { background: var(--crit); color: #fff; }

/* ==========================================================================
   Platform
   ========================================================================== */
.stack-band {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  padding: 18px 22px; border-radius: var(--radius); margin: 30px 0 54px;
  border: 1px dashed rgba(0, 229, 255, 0.3); background: rgba(6, 11, 25, 0.5);
}
.stack-band > span { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); letter-spacing: .1em; margin-right: 6px; }
.module-card ul { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.module-card li { color: var(--text-2); font-size: 14.5px; padding-left: 20px; position: relative; }
.module-card li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 2px; background: var(--accent-cyan); box-shadow: 0 0 8px var(--accent-cyan); transform: rotate(45deg) scale(.75); }
.module-tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; color: var(--accent-cyan); margin-bottom: 8px; display: block; }

/* ==========================================================================
   Economics
   ========================================================================== */
.econ-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 40px; }
.big-figure { font-family: var(--font-mono); font-size: 34px; font-weight: 700; color: var(--accent-cyan); margin: 0 0 12px; line-height: 1.1; }
.big-figure small { font-size: 14px; color: var(--text-2); font-weight: 500; }

.calc {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0;
  border: 1px solid rgba(0, 229, 255, 0.3); border-radius: 18px; overflow: hidden;
  background: var(--bg-card-strong);
  box-shadow: 0 30px 80px -40px rgba(30, 107, 255, 0.7);
}
.calc-in { padding: 34px; border-right: 1px solid var(--line); }
.calc-out { padding: 34px; background: linear-gradient(160deg, rgba(30, 107, 255, 0.14), rgba(0, 229, 255, 0.04)); }
.calc h3 { margin: 0 0 6px; font-size: 22px; }
.calc .muted { color: var(--text-2); font-size: 14px; margin: 0 0 26px; }
.field-label { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.field-label output { font-family: var(--font-mono); color: var(--accent-cyan); font-size: 22px; font-weight: 700; }

input[type="range"].slider {
  --slider-track-size: 0.45rem;
  --slider-thumb-size: 1.35rem;
  --slider-track-color: rgba(148, 163, 184, 0.2);
  --slider-fill-color: var(--accent-cyan);
  --slider-thumb-color: #fff;
  --attr-min: 5; --attr-max: 50; --control-value: 12;
  --slider-progress: calc((var(--control-value) - var(--attr-min)) / (var(--attr-max) - var(--attr-min)) * 100%);
  appearance: none; inline-size: 100%; block-size: 2.5rem; margin: 0; padding: 0; border: 0;
  background: transparent; cursor: pointer;
}
input[type="range"].slider::-webkit-slider-runnable-track {
  block-size: var(--slider-track-size); border: 0; border-radius: 999px;
  background: linear-gradient(to right, var(--slider-fill-color) var(--slider-progress), var(--slider-track-color) var(--slider-progress));
}
input[type="range"].slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  inline-size: var(--slider-thumb-size); block-size: var(--slider-thumb-size);
  margin-block-start: calc((var(--slider-track-size) - var(--slider-thumb-size)) / 2);
  border: 3px solid var(--accent-blue); border-radius: 50%; background: var(--slider-thumb-color);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.8);
}
input[type="range"].slider::-moz-range-track {
  block-size: var(--slider-track-size); border: 0; border-radius: 999px; background: var(--slider-track-color);
}
input[type="range"].slider::-moz-range-progress {
  block-size: var(--slider-track-size); border-radius: 999px; background: var(--slider-fill-color);
}
input[type="range"].slider::-moz-range-thumb {
  inline-size: var(--slider-thumb-size); block-size: var(--slider-thumb-size);
  border: 3px solid var(--accent-blue); border-radius: 50%; background: var(--slider-thumb-color);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.8);
}
input[type="range"].slider:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 4px; }
.range-scale { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); margin-bottom: 26px; }

.loc-group { border: 0; padding: 0; margin: 0 0 24px; }
.loc-group legend { font-weight: 600; font-size: 14px; margin-bottom: 10px; padding: 0; }
.loc-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.loc-options label {
  position: relative; cursor: pointer; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 10px; text-align: center; font-size: 13.5px; font-weight: 600; color: var(--text-2);
  transition: border-color .2s, background-color .2s, color .2s;
}
.loc-options label small { display: block; font-family: var(--font-mono); font-weight: 400; font-size: 10.5px; color: var(--text-3); margin-top: 3px; }
.loc-options input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.loc-options label:has(input:checked) { border-color: var(--accent-cyan); background: rgba(0, 229, 255, 0.08); color: var(--text); box-shadow: 0 0 0 1px var(--accent-cyan) inset; }
.loc-options label:has(input:focus-visible) { outline: 2px solid var(--accent-cyan); outline-offset: 2px; }

.calc-assump { font-size: 12px; color: var(--text-3); margin: 0; font-family: var(--font-mono); line-height: 1.7; }

.saving-figure { font-family: var(--font-mono); font-size: clamp(36px, 4.4vw, 56px); font-weight: 800; line-height: 1.05; color: #fff; text-shadow: 0 0 28px rgba(0, 229, 255, 0.55); margin: 4px 0 6px; }
.saving-pct { display: inline-block; font-family: var(--font-mono); font-weight: 700; color: #03140E; background: var(--ok); border-radius: 6px; padding: 3px 10px; font-size: 15px; }
.cost-bars { margin: 28px 0 22px; display: grid; gap: 16px; }
.cost-bar .cb-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); margin-bottom: 6px; gap: 10px; }
.cost-bar .cb-head b { font-family: var(--font-mono); color: var(--text); }
.cost-bar .cb-track { height: 12px; border-radius: 6px; background: rgba(148, 163, 184, 0.12); overflow: hidden; }
.cost-bar .cb-fill { height: 100%; border-radius: 6px; transform-origin: left; transition: transform .5s ease; }
.cb-fill.local { background: linear-gradient(90deg, #B91C1C, var(--crit)); }
.cb-fill.remote { background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan)); }
.calc-note { font-size: 12px; color: var(--text-3); margin: 18px 0 0; }

.compare-wrap { overflow-x: auto; margin-top: 40px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); }
.compare { width: 100%; border-collapse: collapse; min-width: 680px; font-size: 14.5px; }
.compare caption { text-align: left; padding: 18px 20px 0; font-weight: 700; font-size: 16px; }
.compare th, .compare td { padding: 14px 20px; text-align: left; border-bottom: 1px solid rgba(30, 107, 255, 0.14); vertical-align: top; }
.compare thead th { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; color: var(--text-2); text-transform: uppercase; font-weight: 600; }
.compare tbody th { font-weight: 600; color: var(--text); width: 28%; }
.compare td { color: var(--text-2); }
.compare td.good { color: #A7F3D0; }
.compare td.bad { color: #FCA5A5; }
.compare tr:last-child > * { border-bottom: 0; }

/* ==========================================================================
   Metrics & AI
   ========================================================================== */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.tab {
  appearance: none; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--text-2); background: rgba(13, 22, 45, 0.6); border: 1px solid var(--line);
  padding: 11px 16px; border-radius: 10px; display: inline-flex; align-items: center; gap: 10px;
  transition: color .2s, border-color .2s, background-color .2s;
}
.tab:hover { color: var(--text); border-color: rgba(0, 229, 255, 0.4); }
.tab[aria-selected="true"] { color: #fff; background: linear-gradient(135deg, rgba(30, 107, 255, 0.5), rgba(0, 229, 255, 0.15)); border-color: var(--accent-cyan); }
.tab .count { font-family: var(--font-mono); font-size: 11px; padding: 2px 7px; border-radius: 6px; background: rgba(0, 229, 255, 0.15); color: var(--accent-cyan); }

.metric-panel[hidden] { display: none; }
.metric-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.metric {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: start;
  padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); background: rgba(13, 22, 45, 0.6);
}
.metric .m-codes { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.metric .m-codes code { font-size: 13px; color: var(--accent-cyan); background: rgba(0, 229, 255, 0.07); border: 1px solid rgba(0, 229, 255, 0.2); padding: 2px 8px; border-radius: 6px; }
.metric .unit { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; }
.metric p { grid-column: 1 / -1; margin: 0; color: var(--text-2); font-size: 14.5px; }
.metric .thr { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.pill { font-family: var(--font-mono); font-size: 11px; padding: 2px 8px; border-radius: 999px; }
.pill.ok { background: rgba(16, 185, 129, 0.15); color: #6EE7B7; border: 1px solid rgba(16, 185, 129, 0.35); }
.pill.warn { background: rgba(245, 158, 11, 0.12); color: #FCD34D; border: 1px solid rgba(245, 158, 11, 0.35); }
.pill.crit { background: rgba(239, 68, 68, 0.12); color: #FCA5A5; border: 1px solid rgba(239, 68, 68, 0.35); }

.ai-block { margin-top: 70px; }
.ai-block > h3 { font-size: clamp(22px, 2.6vw, 30px); margin: 0 0 10px; }
.ai-block > p { color: var(--text-2); max-width: 820px; margin: 0 0 30px; }
.horizons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.horizon { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: rgba(6, 11, 25, 0.5); }
.horizon b { font-family: var(--font-mono); font-size: 26px; color: var(--accent-cyan); display: block; }
.horizon span { font-size: 13px; color: var(--text-2); }
.model-card .m-family { font-family: var(--font-mono); font-size: 11px; color: var(--accent-cyan); letter-spacing: .1em; display: block; margin-bottom: 8px; }
.weights { display: grid; gap: 12px; margin-top: 16px; }
.weight .w-head { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--text-2); margin-bottom: 5px; }
.weight .w-head b { font-family: var(--font-mono); color: var(--text); }
.weight .w-bar { height: 8px; border-radius: 4px; background: rgba(148, 163, 184, 0.12); overflow: hidden; }
.weight .w-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan)); border-radius: 4px; }
.thresholds { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.thresholds .pill { font-size: 12px; padding: 5px 12px; }

/* ==========================================================================
   Diagrams (SVG)
   ========================================================================== */
.diagram {
  margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(6, 11, 25, 0.6);
  padding: 18px; overflow-x: auto;
}
.diagram svg { min-width: 680px; width: 100%; height: auto; }
.diagram figcaption { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); margin-top: 12px; letter-spacing: .04em; }
.diagram figcaption b { color: var(--accent-cyan); font-weight: 600; }

.dg-box { fill: rgba(13, 22, 45, 0.95); stroke: rgba(30, 107, 255, 0.55); stroke-width: 1.2; }
.dg-box.hl { stroke: var(--accent-cyan); fill: rgba(0, 229, 255, 0.07); }
.dg-box.hub { fill: rgba(30, 107, 255, 0.16); stroke: var(--accent-cyan); stroke-width: 1.6; }
.dg-box.warn { stroke: var(--warn); fill: rgba(245, 158, 11, 0.07); }
.dg-box.ok { stroke: var(--ok); fill: rgba(16, 185, 129, 0.07); }
.dg-title { font-family: var(--font-mono); font-size: 13px; font-weight: 700; fill: var(--text); }
.dg-text { font-family: var(--font-mono); font-size: 10.5px; fill: var(--text-2); }
.dg-text.cy { fill: var(--accent-cyan); }
.dg-text.red { fill: var(--crit); }
.dg-link { fill: none; stroke: rgba(30, 107, 255, 0.45); stroke-width: 1.5; }
.dg-link.dashed { stroke-dasharray: 4 5; }
.dg-packet {
  fill: none; stroke: var(--accent-cyan); stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 3 100; stroke-dashoffset: 3;
  filter: drop-shadow(0 0 4px var(--accent-cyan));
  animation: packet-flow 2.6s linear infinite;
  @media (prefers-reduced-motion: reduce) { animation: none; stroke-dasharray: none; stroke-width: 1.5; opacity: .6; filter: none; }
}
.dg-packet.slow { animation-duration: 3.6s; }
.dg-packet.d1 { animation-delay: -.6s; }
.dg-packet.d2 { animation-delay: -1.2s; }
.dg-packet.d3 { animation-delay: -1.9s; }
@keyframes packet-flow { from { stroke-dashoffset: 3; } to { stroke-dashoffset: -100; } }
.dg-spin { transform-box: fill-box; transform-origin: center; animation: spin 18s linear infinite; @media (prefers-reduced-motion: reduce) { animation: none; } }
@keyframes spin { to { rotate: 360deg; } }

/* ==========================================================================
   Admin / Terminal
   ========================================================================== */
.admin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 40px; }
.admin-card ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.admin-card li { font-size: 14.5px; color: var(--text-2); padding-left: 22px; position: relative; }
.admin-card li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 12px; height: 12px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300E5FF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.admin-card li strong { color: var(--text); font-weight: 600; }

.diagram-row { display: grid; grid-template-columns: 1fr; gap: 22px; margin-bottom: 40px; }

.terminal {
  border: 1px solid rgba(0, 229, 255, 0.3); border-radius: 14px; overflow: hidden;
  background: #040814; box-shadow: 0 30px 70px -40px rgba(0, 229, 255, 0.5);
}
.term-bar {
  display: flex; align-items: center; gap: 14px; padding: 10px 14px; flex-wrap: wrap;
  background: linear-gradient(180deg, #0D162D, #091124); border-bottom: 1px solid var(--line);
}
.term-dots { display: flex; gap: 6px; }
.term-dots i { width: 11px; height: 11px; border-radius: 50%; background: #334155; }
.term-dots i:nth-child(1) { background: #EF4444; }
.term-dots i:nth-child(2) { background: #F59E0B; }
.term-dots i:nth-child(3) { background: #10B981; }
.term-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.term-tab {
  appearance: none; border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer;
  font-family: var(--font-mono); font-size: 12.5px; padding: 6px 12px; border-radius: 7px;
}
.term-tab:hover { color: var(--text); }
.term-tab[aria-selected="true"] { color: var(--accent-cyan); background: rgba(0, 229, 255, 0.08); border-color: rgba(0, 229, 255, 0.3); }
.term-copy { margin-left: auto; }
.term-panel[hidden] { display: none; }
.term-panel pre {
  margin: 0; padding: 22px 24px; overflow-x: auto; font-size: 13.2px; line-height: 1.7; color: #CBD5E1;
  tab-size: 2; max-height: 560px;
}
.tok-k { color: #7DD3FC; }
.tok-s { color: #86EFAC; }
.tok-n { color: #FCD34D; }
.tok-c { color: #64748B; font-style: italic; }
.tok-h { color: #C4B5FD; }
.tok-m { color: var(--accent-cyan); font-weight: 700; }
.adapters { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.adapters > span { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); letter-spacing: .1em; margin-right: 6px; }

/* ==========================================================================
   Stages timeline
   ========================================================================== */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; position: relative; counter-reset: step; }
.timeline::before {
  content: ""; position: absolute; left: 32px; right: calc((100% - 66px) / 4 - 32px); top: 31px; height: 2px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan), var(--accent-blue));
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.6); z-index: -1;
}
.step { counter-increment: step; }
.step-dot {
  width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 22px;
  background: var(--bg-primary); border: 2px solid var(--accent-cyan); color: var(--accent-cyan);
  font-family: var(--font-mono); font-weight: 800; font-size: 20px;
  box-shadow: 0 0 22px rgba(0, 229, 255, 0.45);
  transform: rotate(45deg);
}
.step-dot span { transform: rotate(-45deg); }
.step .card { height: calc(100% - 86px); }
.step .card h3 { font-size: 17.5px; }
.step .card p { font-size: 14.5px; }
.step-kpis { display: grid; gap: 6px; margin-top: 14px; }
.step-kpis code { font-size: 12px; white-space: normal; }

/* ==========================================================================
   Contacts & form
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.form { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field label .req { color: var(--accent-cyan); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--text);
  background: rgba(6, 11, 25, 0.75); border: 1px solid rgba(30, 107, 255, 0.35); border-radius: 10px;
  padding: 12px 14px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 130px; resize: vertical; field-sizing: content; max-height: 360px; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
.field select option { background: var(--bg-secondary); }
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent-cyan); box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.18); }
.field input:user-invalid, .field select:user-invalid, .field textarea:user-invalid { border-color: var(--crit); }
.field .err { display: none; font-size: 12px; color: #FCA5A5; }
.field:has(:user-invalid) .err { display: block; }
.form.was-validated .field :invalid { border-color: var(--crit); }
.form.was-validated .field:has(:invalid) .err { display: block; }
.form-status { font-size: 14px; margin: 0; min-height: 1.4em; color: #A7F3D0; }
.form-status.is-err { color: #FCA5A5; }
.form-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-foot small { color: var(--text-3); font-size: 12px; }

.contact-list { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 12px; }
.contact-list li { display: flex; align-items: center; gap: 14px; }
.contact-list .ci { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(30, 107, 255, 0.15); border: 1px solid var(--line); color: var(--accent-cyan); flex-shrink: 0; }
.contact-list .ci svg { width: 19px; height: 19px; }
.contact-list span { display: block; font-size: 11.5px; color: var(--text-3); font-family: var(--font-mono); letter-spacing: .08em; }
.contact-list a, .contact-list b { font-family: var(--font-mono); font-size: 15px; color: var(--text); font-weight: 600; }

.legal { font-size: 13.5px; }
.legal dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 16px; }
.legal dt { color: var(--text-3); font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em; padding-top: 2px; text-transform: uppercase; }
.legal dd { margin: 0; color: var(--text-2); }
.legal dd .mono { color: var(--text); font-size: 13px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { border-top: 1px solid var(--line); padding: 54px 0 34px; background: rgba(4, 8, 20, 0.85); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; margin-bottom: 36px; }
.footer-grid h4 { font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; color: var(--text-2); margin: 0 0 14px; font-weight: 600; text-transform: uppercase; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--text-2); font-size: 14px; }
.footer-grid a:hover { color: var(--accent-cyan); }
.footer-about { color: var(--text-3); font-size: 13.5px; margin: 16px 0 0; max-width: 420px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 12px; color: var(--text-3); border-top: 1px solid rgba(30, 107, 255, 0.12); padding-top: 22px; }
.wp-link { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid rgba(0, 229, 255, 0.35); border-radius: 10px; font-family: var(--font-mono); font-size: 12.5px; color: var(--accent-cyan) !important; margin-top: 14px; }
.wp-link svg { width: 16px; height: 16px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; translate: -50% 0; z-index: 300;
  background: var(--bg-secondary); border: 1px solid var(--accent-cyan); color: var(--text);
  font-family: var(--font-mono); font-size: 13px; padding: 10px 16px; border-radius: 10px;
  box-shadow: var(--glow); opacity: 0; pointer-events: none; transition: opacity .25s, translate .25s;
}
.toast.is-on { opacity: 1; translate: -50% -6px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1600px) {
  .node-status .ns-long { display: none; }
  .header-tools .btn-mail { padding: 8px 10px; }
  .header-tools .btn-mail .mail-text {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
}

/* Collapsed (burger) navigation.
   .is-compact is set by main.js when the nav does not fit (depends on language);
   the media query is the no-JS fallback. Keep both blocks in sync. */
.site-header.is-compact .nav-toggle { display: inline-flex; }
.site-header.is-compact .primary-nav {
  position: fixed; inset: var(--header-h) 0 auto 0; margin: 0;
  background: rgba(6, 11, 25, 0.97); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); padding: 14px 20px 22px;
  display: none; max-height: calc(100vh - var(--header-h)); overflow-y: auto;
}
.site-header.is-compact .primary-nav.is-open { display: block; }
.site-header.is-compact .primary-nav ul { flex-direction: column; gap: 4px; }
.site-header.is-compact .primary-nav a { font-size: 16px; padding: 12px 14px; }
.site-header.is-compact .header-tools { margin-left: auto; }
.site-header.is-compact .nav-extras { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.site-header.is-compact .nav-extras .node-status { display: inline-flex; }

@media (max-width: 1240px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; margin: 0;
    background: rgba(6, 11, 25, 0.97); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line); padding: 14px 20px 22px;
    display: none; max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 4px; }
  .primary-nav a { font-size: 16px; padding: 12px 14px; }
  .header-tools { margin-left: auto; }
}
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-4, .horizons { grid-template-columns: repeat(2, 1fr); }
  .econ-grid, .admin-grid, .grid-3 { grid-template-columns: 1fr 1fr; }
  .timeline { grid-template-columns: 1fr 1fr; }
  .timeline::before { display: none; }
  .calc { grid-template-columns: 1fr; }
  .calc-in { border-right: 0; border-bottom: 1px solid var(--line); }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .node-status { display: none; }
  .header-tools .btn-mail { display: none; }
  .section { padding: 80px 0; }
  .econ-grid, .admin-grid, .grid-3, .grid-2, .metric-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-kpis { grid-template-columns: repeat(2, 1fr); }
  .dash-body { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .header-inner { gap: 10px; width: calc(100% - 24px); }
  .header-tools { gap: 8px; }
  .lang-switch .sep { display: none; }
  .brand { gap: 9px; }
  .brand-sub { display: none; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-name { font-size: 15px; }
  .grid-4, .horizons, .timeline { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .loc-options { grid-template-columns: 1fr; }
  .calc-in, .calc-out { padding: 24px; }
  .rack { min-height: 50px; }
  .rack .r-t { font-size: 11px; }
  .legal dl { grid-template-columns: 1fr; gap: 2px; }
  .legal dd { margin-bottom: 10px; }
  .lang-switch button { padding: 5px 8px; }
  .hero-ctas .btn { width: 100%; }
}

/* Mobile nav extras (status + email shown inside panel) */
@media (max-width: 400px) {
  .brand-name { font-size: 13.5px; letter-spacing: .04em; }
  .brand-mark { width: 34px; height: 34px; }
  .lang-switch button { padding: 5px 7px; }
  .nav-toggle { width: 38px; height: 38px; }
}
.nav-extras { display: none; }
@media (max-width: 1240px) {
  .nav-extras { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
  .nav-extras .node-status { display: inline-flex; }
}

/* Print: legal info & whitepaper friendly */
@media print {
  .site-header, .hero-ctas, .dash, .nav-toggle, .form, .toast { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .panel, .diagram, .terminal { background: #fff !important; border-color: #999 !important; box-shadow: none !important; }
}
