/* xPID — shared styles for the marketing site and the demo dashboard. */

/* ---------- Tokens ---------- */
:root {
  --bg: #050706;
  --bg-2: #0a0e0c;
  --panel: #0e1411;
  --panel-2: #131b17;
  --panel-3: #19231e;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f7f5;
  --muted: #aab4ae;
  --dim: #78837d;
  --accent: #84f01a;
  --accent-strong: #9bff2e;
  --accent-text: #9bff2e;
  --accent-ink: #0a1600;
  --accent-soft: rgba(132, 240, 26, 0.12);
  --accent-line: rgba(132, 240, 26, 0.38);
  --glow: 0 0 24px rgba(132, 240, 26, 0.28);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  --warn: #fab219;
  --info: #5598e7;
  --crit: #e66767;
  --good: #84f01a;
  --grid: #24302a;
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --series-5: #d55181;
  --series-6: #0ca30c;
  --series-7: #9085e9;
  --series-8: #e66767;
  --font-head: "Avenir Next", "Montserrat", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --wrap: 1280px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f4f6f5;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --panel-2: #f1f4f2;
  --panel-3: #e7ece9;
  --line: rgba(10, 20, 14, 0.1);
  --line-strong: rgba(10, 20, 14, 0.2);
  --text: #0c120f;
  --muted: #47534d;
  --dim: #6b7570;
  --accent: #7be60f;
  --accent-strong: #6fd600;
  --accent-text: #2f7400;
  --accent-ink: #0a1600;
  --accent-soft: rgba(111, 214, 0, 0.13);
  --accent-line: rgba(74, 160, 0, 0.45);
  --glow: 0 0 0 rgba(0, 0, 0, 0);
  --shadow: 0 18px 44px rgba(16, 32, 22, 0.13);
  --warn: #a86a00;
  --info: #256abf;
  --crit: #c22f2f;
  --good: #2f7400;
  --grid: #e1e6e3;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-7: #6250d6;
  --series-8: #e34948;
  color-scheme: light;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.12; margin: 0; letter-spacing: -0.015em; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img, svg, canvas { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 3px; border-radius: 6px; }
:root[data-theme="light"] :focus-visible { outline-color: #2f7400; }

.wrap { width: min(100% - 48px, var(--wrap)); margin-inline: auto; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.accent { color: var(--accent-text); }

.eyebrow {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-text);
}

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; color: var(--text); }
.logo svg { height: 44px; width: auto; }
.logo .logo-symbol { filter: drop-shadow(0 0 5px rgba(132, 240, 26, 0.55)); }
:root[data-theme="light"] .logo .logo-symbol { filter: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 22px;
  border-radius: 999px; border: 1.5px solid transparent;
  font-family: var(--font-head); font-weight: 600; font-size: 0.97rem; white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--glow); }
.btn-primary:hover { background: var(--accent-strong); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.btn-outline { border-color: var(--accent-line); color: var(--text); background: transparent; }
.btn-outline:hover { background: var(--accent-soft); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 0.88rem; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.nav-menu { display: flex; align-items: center; gap: 4px; margin-right: auto; }
.nav-menu a { white-space: nowrap; padding: 9px 11px; border-radius: 8px; font-size: 0.92rem; color: var(--muted); font-weight: 500; }
.nav-menu a:hover { color: var(--text); background: var(--accent-soft); }
.nav-tools { display: flex; align-items: center; gap: 14px; }

.theme-toggle {
  display: inline-flex; padding: 3px; gap: 2px;
  border-radius: 999px; border: 1.5px solid var(--line-strong); background: transparent;
}
.theme-toggle span { display: grid; place-items: center; width: 34px; height: 28px; border-radius: 999px; color: var(--muted); }
.theme-toggle svg { width: 16px; height: 16px; }
:root:not([data-theme="light"]) .theme-toggle .icon-moon,
:root[data-theme="light"] .theme-toggle .icon-sun { background: var(--accent); color: var(--accent-ink); }

.nav-burger { display: none; width: 44px; height: 44px; border-radius: 10px; border: 1.5px solid var(--line-strong); background: transparent; place-items: center; }
.nav-burger svg { width: 22px; height: 22px; }

/* ---------- Image slots with CSS fallback ---------- */
.media { position: relative; overflow: hidden; background: var(--bg-2); }
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media .fallback { position: absolute; inset: 0; display: none; }
.media.is-missing img { display: none; }
.media.is-missing .fallback { display: block; }
.fallback svg { width: 100%; height: 100%; }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; padding: 56px 0 36px; }
.hero-media { position: absolute; inset: 0 0 0 30%; z-index: -2; background: transparent; }
.hero-media img { object-position: 60% 50%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, var(--bg) 30%, color-mix(in srgb, var(--bg) 78%, transparent) 47%, transparent 68%),
    linear-gradient(0deg, var(--bg) 0%, transparent 26%);
}
:root[data-theme="light"] .hero::before {
  background:
    linear-gradient(90deg, var(--bg) 32%, color-mix(in srgb, var(--bg) 86%, transparent) 50%, color-mix(in srgb, var(--bg) 20%, transparent) 75%),
    linear-gradient(0deg, var(--bg) 0%, transparent 26%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.62fr); gap: 40px; align-items: start; }
.hero-copy { padding-top: 10px; min-width: 0; }
.hero-copy h1 { max-width: 600px; }
.hero h1 { font-size: clamp(2.2rem, 4.3vw, 3.5rem); font-weight: 700; margin: 14px 0 20px; }
.hero-lead { font-size: 1.08rem; color: var(--muted); max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(132, 240, 26, 0.6); animation: pulse 2s infinite; flex: none; }
.btn-primary .live-dot { background: var(--accent-ink); box-shadow: none; animation: none; outline: 2px solid var(--accent-ink); outline-offset: 2px; width: 6px; height: 6px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(132, 240, 26, 0.55); } 70% { box-shadow: 0 0 0 9px rgba(132, 240, 26, 0); } 100% { box-shadow: 0 0 0 0 rgba(132, 240, 26, 0); } }

.chips { display: grid; grid-template-columns: repeat(2, auto); gap: 16px 34px; margin-top: 40px; justify-content: start; }
.chip { display: flex; align-items: center; gap: 10px; }
.chip svg { width: 30px; height: 30px; color: var(--accent-text); flex: none; }
.chip b, .chip small { white-space: nowrap; }
.chip b { display: block; font-family: var(--font-head); font-size: 0.9rem; font-weight: 600; line-height: 1.2; }
.chip small { display: block; font-size: 0.76rem; color: var(--muted); line-height: 1.3; }

.live-card {
  background: color-mix(in srgb, var(--panel) 86%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--accent-line); border-radius: 18px;
  padding: 22px 24px; box-shadow: var(--shadow), var(--glow);
}
.live-head { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 600; font-size: 0.98rem; }
.live-head em { font-style: normal; color: var(--accent-text); font-weight: 700; letter-spacing: 0.04em; }
.live-title { display: flex; align-items: baseline; gap: 12px; margin: 10px 0 12px; font-family: var(--font-head); }
.live-title strong { font-size: 2.6rem; font-weight: 700; line-height: 1; }
.live-title span { font-size: 1.5rem; font-weight: 600; }
.live-state { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 0.93rem; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 14px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-family: var(--font-head); font-size: 0.82rem; font-weight: 700; }
.pill svg { width: 15px; height: 15px; }
.live-rows li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 0.93rem; }
.live-rows svg { width: 20px; height: 20px; color: var(--accent-text); flex: none; }
.live-rows span { color: var(--muted); }
.live-rows b { margin-left: auto; font-family: var(--font-head); font-weight: 700; font-size: 1rem; }
.live-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 0.85rem; color: var(--muted); }
.live-foot b { display: inline-flex; align-items: center; gap: 7px; color: var(--accent-text); }
.live-foot b i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.live-bars { display: flex; align-items: flex-end; gap: 2px; height: 34px; margin-top: 10px; }
.live-bars i { flex: 1; min-width: 2px; background: var(--accent); border-radius: 1.5px 1.5px 0 0; opacity: 0.85; transition: height 0.5s ease; }

/* ---------- Dashboard preview on the home page ---------- */
.preview-section { padding: 8px 0 64px; }
.preview {
  display: grid; grid-template-columns: 178px minmax(0, 1fr); gap: 0;
  background: var(--panel); border: 1px solid var(--accent-line); border-radius: 20px;
  box-shadow: var(--shadow), var(--glow); overflow: hidden;
}
.preview-side { padding: 18px 12px; border-right: 1px solid var(--line); background: var(--bg-2); }
.preview-side .logo svg { height: 30px; }
.preview-side ul { margin-top: 18px; display: grid; gap: 3px; }
.preview-tab { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; border-radius: 8px; background: transparent; font-size: 0.84rem; color: var(--muted); text-align: left; transition: background-color 0.2s ease, color 0.2s ease; }
.preview-tab svg { width: 16px; height: 16px; flex: none; }
.preview-tab:hover { color: var(--text, inherit); background: rgba(132, 240, 26, 0.1); }
.preview-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.preview-tab.is-active, .preview-tab.is-active:hover { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.preview-side li .badge { margin-left: auto; min-width: 18px; height: 18px; border-radius: 999px; background: var(--crit); color: #fff; font-size: 0.7rem; font-weight: 700; display: grid; place-items: center; }
:root:not([data-theme="light"]) .preview-side li .badge { color: #1a0505; }
.preview-main { padding: 18px 20px 20px; min-width: 0; }
.preview-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.preview-head h2 { font-size: 1.2rem; font-weight: 600; }
.tag-live { display: inline-flex; align-items: center; gap: 7px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; color: var(--accent-text); }
.preview-head .btn { margin-left: auto; }
.preview-body { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.kpi { border: 1px solid var(--line); border-radius: 10px; padding: 10px 6px; text-align: center; background: var(--panel-2); min-width: 0; }
.kpi b { display: block; font-family: var(--font-head); font-size: 0.9rem; letter-spacing: -0.02em; font-weight: 700; white-space: nowrap; }
.kpi.is-accent b { color: var(--accent-text); }
.kpi span { display: block; font-size: 0.72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-mid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; align-items: stretch; }
.mini-racks { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; align-items: end; padding: 10px 6px 4px; border-radius: 10px; position: relative; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); }
.mini-racks:not(.is-missing) { padding: 0 1.6% 6px; gap: 0; min-height: 150px; color: #f4f7f5; }
.mini-racks:not(.is-missing) .rack-body { visibility: hidden; }
.mini-racks img { object-position: 50% 30%; }
.mini-rack { text-align: center; font-size: 0.72rem; font-weight: 700; font-family: var(--font-head); position: relative; }
.mini-rack .rack-body { height: 92px; }
.mini-rack i { display: grid; place-items: center; width: 15px; height: 15px; margin: 3px auto 0; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.mini-rack i svg { width: 10px; height: 10px; }
.spark-rows { display: grid; gap: 8px; }
.spark-row { display: grid; grid-template-columns: minmax(0, 1.2fr) auto minmax(60px, 1fr); align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; background: var(--panel-2); }
.spark-row span { font-size: 0.74rem; color: var(--muted); font-weight: 600; }
.spark-row b { font-family: var(--font-head); font-size: 0.98rem; font-weight: 700; }
.spark-row svg { width: 100%; height: 26px; }
.heat-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--panel-2); display: flex; flex-direction: column; min-width: 0; }
.heat-card h3 { font-size: 0.92rem; font-weight: 600; margin-bottom: 10px; }
.heat-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; flex: 1; min-height: 150px; position: relative; }
.heat-view { position: relative; border-radius: 8px; background: #05070a; overflow: hidden; min-height: 140px; }
.heat-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.heat-scale { display: grid; grid-template-columns: 10px auto; gap: 8px; font-size: 0.72rem; color: var(--muted); }
.heat-scale i { border-radius: 3px; background: linear-gradient(0deg, #1b1340, #5a1f7c, #a3276d, #dc4a3d, #f58b2b, #fbd044, #fdf3b4); }
.heat-scale div { display: flex; flex-direction: column; justify-content: space-between; }

/* Rack drawing shared by the preview and the dashboard twin */
.rack-body {
  position: relative; border-radius: 4px; border: 1px solid #2c3a33;
  background:
    repeating-linear-gradient(180deg, rgba(132, 240, 26, 0.0) 0 5px, rgba(132, 240, 26, 0.55) 5px 6px, rgba(0, 0, 0, 0) 6px 9px),
    linear-gradient(90deg, #060908 0 12%, #111a15 12% 88%, #060908 88%);
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.8), 0 0 12px rgba(132, 240, 26, 0.18);
  overflow: hidden;
}
.rack-body::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, 0.75) 0 16%, transparent 16% 84%, rgba(0, 0, 0, 0.75) 84%); }
.rack-body::after { content: ""; position: absolute; left: 16%; right: 16%; top: 0; height: 30%; background: linear-gradient(180deg, rgba(132, 240, 26, 0.5), transparent); opacity: 0.7; animation: scan 4.5s linear infinite; }
@keyframes scan { 0% { transform: translateY(-100%); } 100% { transform: translateY(340%); } }

/* ---------- Generic sections ---------- */
.section { padding: 84px 0; position: relative; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 700; margin: 12px 0 14px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.section-head p.eyebrow, .split p.eyebrow { color: var(--accent-text); font-size: 0.78rem; }

/* How it works */
.how { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 2.1fr); gap: 48px; align-items: center; }
.how-intro h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 700; margin-bottom: 14px; }
.how-intro p { color: var(--muted); margin-bottom: 22px; }
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; counter-reset: step; }
.step { text-align: center; position: relative; padding: 0 6px; }
.step + .step::before { content: ""; position: absolute; left: -9px; top: 44px; width: 10px; height: 10px; border-top: 2px solid var(--dim); border-right: 2px solid var(--dim); transform: rotate(45deg); }
.step-icon { width: 96px; height: 96px; margin: 0 auto 14px; color: var(--accent-text); }
.step-icon svg { width: 100%; height: 100%; filter: drop-shadow(0 6px 14px rgba(132, 240, 26, 0.22)); }
.step h3 { font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.step p { font-size: 0.86rem; color: var(--muted); line-height: 1.4; }

/* Domain coverage */
.domains { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.domain { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 22px 16px; text-align: center; transition: border-color 0.2s ease, transform 0.2s ease; }
.domain:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.domain svg { width: 44px; height: 44px; margin: 0 auto 14px; color: var(--accent-text); }
.domain h3 { font-size: 1.02rem; font-weight: 600; margin-bottom: 6px; }
.domain p { font-size: 0.84rem; color: var(--muted); line-height: 1.4; }

/* Split sections (twin) */
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.split-media { aspect-ratio: 16 / 10; border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.split h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 700; margin: 12px 0 16px; }
.split p { color: var(--muted); font-size: 1.04rem; }
.ticks { margin: 22px 0 28px; display: grid; gap: 12px; }
.ticks li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; color: var(--muted); }
.ticks li b { color: var(--text); font-weight: 600; }
.ticks svg { width: 22px; height: 22px; color: var(--accent-text); margin-top: 2px; }

/* Prediction */
.predict { overflow: hidden; }
.predict-bg { position: absolute; inset: 0; z-index: 0; opacity: 0.45; background: transparent; }
:root[data-theme="light"] .predict-bg { opacity: 0.12; }
.predict .wrap { position: relative; z-index: 1; }
.cards-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--panel) 90%, transparent); padding: 24px 22px; }
.card svg.card-icon { width: 34px; height: 34px; color: var(--accent-text); margin-bottom: 16px; }
.card h3 { font-size: 1.06rem; font-weight: 600; margin-bottom: 8px; }
.card p { font-size: 0.92rem; color: var(--muted); }
.horizons { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 26px; color: var(--muted); font-size: 0.95rem; }
.horizons b { padding: 6px 16px; border-radius: 999px; border: 1px solid var(--accent-line); color: var(--text); font-family: var(--font-head); font-weight: 600; background: var(--accent-soft); }

/* Decision engine */
.layers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.layer { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 18px 16px; }
.layer small { display: block; font-family: var(--font-head); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; color: var(--dim); margin-bottom: 8px; }
.layer h3 { font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.layer p { font-size: 0.85rem; color: var(--muted); line-height: 1.42; }
.layer.is-core { border-color: var(--accent-line); background: linear-gradient(180deg, var(--accent-soft), transparent 70%), var(--panel); box-shadow: var(--glow); }
.layer.is-core small { color: var(--accent-text); }
.layer em { display: inline-block; margin-top: 10px; font-style: normal; font-size: 0.74rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }
.layer em.is-muted { background: var(--panel-3); color: var(--text); }
.callout { border-left: 3px solid var(--accent); padding: 14px 20px; background: var(--accent-soft); border-radius: 0 12px 12px 0; margin-bottom: 44px; font-size: 1.04rem; }
.callout b { font-family: var(--font-head); }
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 44px; }
.duo .card h3 { display: flex; align-items: center; gap: 10px; }
.duo .card h3 svg { width: 22px; height: 22px; color: var(--accent-text); }
.sub-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 18px; }
.risks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 44px; }
.risk { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 22px; display: flex; flex-direction: column; align-items: flex-start; }
.risk > footer { margin-top: auto; align-self: stretch; }
.risk > p { margin-bottom: 14px; }
.risk-tag { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; border: 1.5px solid var(--accent-line); color: var(--accent-text); margin-bottom: 14px; }
.risk.is-r2 .risk-tag { border-color: var(--warn); color: var(--warn); }
.risk.is-r3 .risk-tag { border-color: var(--crit); color: var(--crit); }
.risk h3 { font-size: 1.04rem; font-weight: 600; margin-bottom: 8px; }
.risk p { font-size: 0.92rem; color: var(--muted); }
.risk footer { padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.84rem; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.risk footer svg { width: 17px; height: 17px; flex: none; }
.phases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; position: relative; }
.phase { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 24px 22px; position: relative; }
.phase small { font-family: var(--font-head); font-weight: 700; letter-spacing: 0.16em; font-size: 0.74rem; color: var(--accent-text); }
.phase h3 { font-size: 1.12rem; font-weight: 600; margin: 8px 0 4px; }
.phase .mode { font-size: 0.86rem; color: var(--dim); margin-bottom: 12px; }
.phase li { position: relative; padding-left: 18px; font-size: 0.92rem; color: var(--muted); margin-top: 7px; }
.phase li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.phase.is-start { border-color: var(--accent-line); }
.phase.is-start::after { content: "Punto de partida recomendado"; position: absolute; top: -12px; right: 18px; padding: 3px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 0.72rem; font-weight: 700; font-family: var(--font-head); }

/* Figures */
.figures { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.figure { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 22px 20px; }
.figure b { display: block; font-family: var(--font-head); font-size: 2.1rem; font-weight: 700; color: var(--accent-text); line-height: 1.1; white-space: nowrap; }
.figure span { display: block; margin-top: 6px; font-size: 0.88rem; color: var(--muted); line-height: 1.35; }
.footnote { margin-top: 18px; font-size: 0.84rem; color: var(--dim); }

/* Closing call to action */
.cta { position: relative; isolation: isolate; overflow: hidden; padding: 96px 0; border-top: 1px solid var(--line); }
.cta-media { position: absolute; inset: 0; z-index: -2; }
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--bg) 22%, color-mix(in srgb, var(--bg) 55%, transparent) 60%, transparent); }
.cta h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); font-weight: 700; max-width: 640px; }
.cta p { color: var(--muted); max-width: 560px; margin: 16px 0 28px; font-size: 1.05rem; }

/* Footer */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 48px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer p { color: var(--muted); font-size: 0.9rem; margin-top: 12px; max-width: 300px; }
.footer h4 { font-size: 0.86rem; font-weight: 700; letter-spacing: 0.06em; margin-bottom: 12px; }
.footer li a { display: inline-block; padding: 4px 0; color: var(--muted); font-size: 0.9rem; }
.footer li a:hover { color: var(--accent-text); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--dim); font-size: 0.82rem; }
.tagline { font-family: var(--font-head); letter-spacing: 0.2em; font-size: 0.7rem; font-weight: 700; color: var(--muted); margin-top: 12px; }

/* Demo data badge */
.demo-badge {
  position: fixed; left: 16px; bottom: 16px; z-index: 60;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 92%, transparent); border: 1px solid var(--warn);
  color: var(--text); font-size: 0.8rem; font-weight: 600; box-shadow: var(--shadow);
}
.demo-badge svg { width: 15px; height: 15px; color: var(--warn); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 20px; background: rgba(0, 0, 0, 0.68); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal.is-open { display: grid; }
.modal-box { position: relative; width: min(100%, 520px); max-height: calc(100vh - 40px); overflow: auto; background: var(--panel); border: 1px solid var(--accent-line); border-radius: 20px; padding: 32px; box-shadow: var(--shadow), var(--glow); }
.modal-box h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.modal-box > div > p { color: var(--muted); font-size: 0.95rem; margin-bottom: 20px; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; display: grid; place-items: center; }
.modal-close svg { width: 18px; height: 18px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 0.86rem; font-weight: 600; }
.field input, .field textarea { width: 100%; padding: 11px 14px; border-radius: 10px; border: 1.5px solid var(--line-strong); background: var(--bg-2); color: var(--text); font: inherit; }
.field input:focus-visible, .field textarea:focus-visible { outline-offset: 0; border-color: var(--accent-strong); }
.form-note { font-size: 0.8rem; color: var(--dim); margin-top: 12px; }
.thanks { text-align: center; padding: 16px 0 4px; }
.thanks svg { width: 62px; height: 62px; color: var(--accent-text); margin: 0 auto 16px; }
[hidden] { display: none !important; }

/* =====================================================================
   Dashboard page
   ===================================================================== */
.dash-body { background: radial-gradient(1200px 500px at 50% -10%, rgba(132, 240, 26, 0.06), transparent 60%), var(--bg); min-height: 100vh; }
.dash-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 22px; padding: 10px 20px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.dash-brand { display: flex; align-items: center; gap: 18px; min-width: 0; }
.dash-brand .logo svg { height: 40px; }
.dash-title h1 { font-size: 1.22rem; font-weight: 600; white-space: nowrap; }
.dash-title p { font-size: 0.84rem; color: var(--muted); white-space: nowrap; }
.dash-tabs { display: flex; gap: 2px; margin-inline: auto; overflow-x: auto; scrollbar-width: none; }
.dash-tabs::-webkit-scrollbar { display: none; }
.dash-tab { flex: none; display: grid; justify-items: center; gap: 3px; min-width: 76px; padding: 7px 10px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 0.76rem; font-weight: 500; white-space: nowrap; }
.dash-tab svg { width: 20px; height: 20px; }
.dash-tab:hover { color: var(--text); background: var(--accent-soft); }
.dash-tab[aria-selected="true"] { color: var(--text); border-color: var(--accent-line); background: var(--accent-soft); box-shadow: inset 0 -2px 0 var(--accent); }
.dash-tab[aria-selected="true"] svg { color: var(--accent-text); }
.dash-meta { display: flex; align-items: center; gap: 16px; }
.dash-clock { text-align: right; font-size: 0.82rem; color: var(--muted); line-height: 1.3; white-space: nowrap; }
.dash-clock b { display: block; color: var(--text); font-family: var(--font-head); font-weight: 600; font-size: 0.92rem; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; border: 1.5px solid var(--accent-line); background: var(--accent-soft); font-family: var(--font-head); font-weight: 700; font-size: 0.86rem; letter-spacing: 0.04em; white-space: nowrap; }
.status-pill svg { width: 18px; height: 18px; color: var(--accent-text); }

.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; padding: 14px 20px 70px; max-width: 1760px; margin-inline: auto; }
.panel { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; min-width: 0; transition: border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease; }
.panel > header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel h2 { font-size: 1.04rem; font-weight: 600; margin-right: auto; }
.panel h2 small { font-weight: 500; color: var(--muted); font-size: 0.86rem; }
.dash-grid.has-focus .panel:not(.is-focus) { opacity: 0.42; }
.panel.is-focus { border-color: var(--accent-line); box-shadow: var(--glow); }
.col-3 { grid-column: span 3; } .col-4 { grid-column: span 4; } .col-5 { grid-column: span 5; } .col-6 { grid-column: span 6; } .col-12 { grid-column: span 12; }
.stack { display: grid; gap: 12px; grid-column: span 3; align-content: start; }
.stack .panel { height: 100%; }

.state-hero { display: flex; align-items: center; gap: 16px; padding: 10px 4px 16px; border-bottom: 1px solid var(--line); }
.state-hero svg { width: 56px; height: 56px; color: var(--accent-text); flex: none; }
.state-hero b { display: block; font-family: var(--font-head); font-size: 1.35rem; font-weight: 600; color: var(--accent-text); }
.state-hero span { color: var(--muted); font-size: 0.92rem; }
.rows li { display: flex; align-items: center; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 0.88rem; }
.rows li:last-child { border-bottom: 0; }
.rows svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.rows span { color: var(--muted); }
.rows b { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 9px; overflow: hidden; }
.seg button { padding: 5px 14px; border: 0; background: transparent; font-size: 0.78rem; color: var(--muted); border-right: 1px solid var(--line); min-height: 30px; }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--text); font-weight: 700; box-shadow: inset 0 0 0 1px var(--accent-line); border-radius: 8px; }

/* Alerts */
.alerts li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: start; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 0.86rem; }
.alerts li:last-child { border-bottom: 0; }
.alerts svg { width: 20px; height: 20px; }
.alerts .is-warn svg { color: var(--warn); }
.alerts .is-info svg { color: var(--info); }
.alerts small { display: block; color: var(--dim); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.05em; }
.alerts time { color: var(--muted); font-size: 0.78rem; white-space: nowrap; }
.link-more { font-size: 0.8rem; color: var(--muted); }

.env { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; text-align: center; }
.env svg { width: 28px; height: 28px; margin: 0 auto 6px; color: var(--info); }
.env b { display: block; font-size: 0.88rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.env span { font-size: 0.72rem; color: var(--muted); }
.env-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 0.84rem; color: var(--muted); }
.env-foot svg { width: 18px; height: 18px; color: var(--accent-text); flex: none; }
.env-foot b { color: var(--text); }

/* Gauges */
.gauges { grid-column: span 12; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.gauges .panel { padding-inline: 14px; }
.gauge-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; align-items: center; }
.gauge { position: relative; width: 120px; }
.gauge svg { width: 120px; height: 96px; }
.gauge .track { stroke: var(--grid); }
.gauge .value { transition: stroke-dashoffset 0.9s ease; }
.gauge div { position: absolute; left: 0; right: 0; top: 31px; text-align: center; line-height: 1.15; }
.gauge b { display: block; font-family: var(--font-head); font-size: 1.35rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gauge em { font-style: normal; font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.gauge-label { display: block; text-align: center; font-size: 0.74rem; color: var(--muted); margin-top: -6px; }
.mini-rows li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 0.78rem; }
.mini-rows li:last-child { border-bottom: 0; }
.mini-rows span { color: var(--muted); white-space: nowrap; }
.mini-rows b { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Trend chart */
.trend { display: grid; grid-template-columns: minmax(0, 1fr) 122px; gap: 12px; }
.trend-plot { position: relative; min-height: 230px; }
.trend-plot svg { width: 100%; height: 230px; overflow: visible; }
.trend-plot text { fill: var(--muted); font-size: 11px; font-family: var(--font-body); }
.trend-plot .gridline { stroke: var(--grid); stroke-width: 1; }
.trend-plot .series { fill: none; stroke-width: 1.6; stroke-linejoin: round; }
.trend-plot .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.legend li { display: grid; grid-template-columns: 12px auto 1fr; gap: 8px; align-items: center; padding: 3.5px 0; font-size: 0.78rem; }
.legend i { width: 10px; height: 10px; border-radius: 50%; }
.legend span { color: var(--muted); }
.legend b { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tooltip { position: absolute; z-index: 5; pointer-events: none; min-width: 130px; padding: 8px 10px; border-radius: 9px; background: var(--panel-3); border: 1px solid var(--line-strong); box-shadow: var(--shadow); font-size: 0.76rem; display: none; }
.tooltip b { display: block; margin-bottom: 4px; }
.tooltip div { display: grid; grid-template-columns: 10px auto 1fr; gap: 6px; align-items: center; }
.tooltip div i { width: 8px; height: 8px; border-radius: 50%; }
.tooltip div em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; }

/* Correlation and decisions */
.ok-line { display: flex; align-items: center; gap: 12px; font-family: var(--font-head); font-size: 1.06rem; font-weight: 600; color: var(--accent-text); }
.ok-line svg { width: 28px; height: 28px; flex: none; }
.panel p.small { font-size: 0.86rem; color: var(--muted); margin-top: 8px; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.next { display: grid; grid-template-columns: 26px 1fr; gap: 10px; font-size: 0.88rem; }
.next svg { width: 24px; height: 24px; color: var(--muted); }
.next b { font-family: var(--font-head); font-weight: 600; display: block; margin-bottom: 4px; }
.next span { color: var(--muted); }
.next span strong { color: var(--text); }
.ai-chip { padding: 2px 10px; border-radius: 7px; border: 1px solid var(--info); color: var(--info); font-size: 0.74rem; font-weight: 700; }

.decisions { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: 18px; }
.decision-list { display: grid; gap: 8px; }
.decision-list li.risk { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 14px; }
.decision-list .risk-tag { width: 40px; height: 40px; margin: 0; font-size: 0.92rem; border-radius: 10px; }
.decision-list b { display: block; font-size: 0.92rem; font-weight: 600; }
.decision-list span { font-size: 0.8rem; color: var(--muted); }
.decision-state { display: inline-flex; align-items: center; gap: 8px; font-size: 0.78rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.decision-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-content: start; }
.stat { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--panel); }
.stat span { display: block; font-size: 0.74rem; color: var(--muted); }
.stat b { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.meter { height: 5px; border-radius: 3px; background: var(--grid); margin-top: 7px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.9s ease; }

/* ---------- Responsive ---------- */
@media (max-width: 1560px) {
  .gauges { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .gauges .panel { grid-column: span 2; }
  .gauges .panel:nth-child(n+4) { grid-column: span 3; }
}
@media (max-width: 1500px) {
  .dash-title p { display: none; }
  .dash-tab { min-width: 0; padding-inline: 9px; }
}
@media (max-width: 1280px) {
  .dash-top { flex-wrap: wrap; }
  .dash-tabs { order: 3; width: 100%; margin: 0; }
  .dash-meta { margin-left: auto; }
  .col-3, .stack { grid-column: span 6; }
  .col-6 { grid-column: span 12; }
  .col-4, .col-5 { grid-column: span 6; }
  .col-4.wide-md { grid-column: span 12; }
}
@media (max-width: 1100px) {
  .nav-menu { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; padding: 12px 24px 20px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav-menu.is-open { display: flex; }
  .nav-menu a { padding: 12px 8px; font-size: 1.02rem; }
  .nav-burger { display: grid; }
  .nav-inner { gap: 14px; }
  .nav-tools { margin-left: auto; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { inset: 0; opacity: 0.4; }
  .live-card { max-width: 460px; }
  .how { grid-template-columns: 1fr; gap: 32px; }
  .domains { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .layers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .preview-body { grid-template-columns: 1fr; }
  .chips { grid-template-columns: repeat(2, auto); }
}
@media (max-width: 820px) {
  .wrap { width: min(100% - 32px, var(--wrap)); }
  .section { padding: 60px 0; }
  .preview { grid-template-columns: 1fr; }
  .preview-side { display: none; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .preview-mid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 10px; }
  .step + .step::before { display: none; }
  .risks, .phases, .duo { grid-template-columns: 1fr; }
  .phase.is-start { margin-top: 8px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dash-grid { padding-inline: 12px; gap: 10px; }
  .col-3, .col-4, .col-5, .col-6, .stack { grid-column: span 12; }
  .gauges { grid-template-columns: 1fr; }
  .gauges .panel, .gauges .panel:nth-child(n+4) { grid-column: auto; }
  .decisions { grid-template-columns: 1fr; }
  .twin-racks { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .twin-names span { font-size: 0.62rem; padding: 0 4px; }
  .dash-top { padding: 8px 12px; gap: 10px; }
  .dash-title h1 { font-size: 1rem; white-space: normal; }
  .dash-clock { display: none; }
}
@media (max-width: 560px) {
  .logo svg { height: 38px; }
  .hero { padding-top: 36px; }
  .chips { grid-template-columns: 1fr 1fr; gap: 14px 12px; }
  .chip b, .chip small { white-space: normal; }
  .hero-actions .btn { flex: 1 1 100%; }
  .domains { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layers, .cards-4 { grid-template-columns: 1fr; }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figure b { font-size: 1.7rem; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preview-main { padding: 14px; }
  .preview-head .btn { margin-left: 0; }
  .mini-rack .rack-body { height: 64px; }
  .mini-racks { gap: 3px; padding-inline: 4px; }
  .mini-rack { font-size: 0.6rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .trend { grid-template-columns: 1fr; }
  .legend { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .env { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; }
  .decision-list li { grid-template-columns: 40px minmax(0, 1fr); }
  .decision-state, .decision-list .btn { grid-column: 2; justify-self: start; }
  .dash-brand .logo svg { height: 32px; }
  .status-pill { padding: 6px 10px; font-size: 0.74rem; }
  .modal-box { padding: 26px 20px; }
  .seg button { padding-inline: 9px; }
  .demo-badge { left: 10px; bottom: 10px; }
}

/* =====================================================================
   Revision: decision-engine dashboard fed by the data replay
   ===================================================================== */
.media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media video { object-position: 60% 50%; }
.media.is-missing video { display: none; }
.media-label { position: absolute; left: 10px; bottom: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.7); border: 1px solid rgba(255, 255, 255, 0.2); color: #f4f7f5; font-size: 0.72rem; font-weight: 600; }
.media-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #84f01a; }
.media-inset { position: absolute; right: 14px; bottom: 14px; width: 40%; aspect-ratio: 16 / 9; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.35); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); z-index: 3; }
.media-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.media-tiles .media { aspect-ratio: 16 / 6; border-radius: 10px; border: 1px solid var(--line); }

.col-7 { grid-column: span 7; }
.risk-tag[data-risk="R2"], [data-risk="R2"] > .risk-tag { border-color: var(--warn); color: var(--warn); }
.risk-tag[data-risk="R3"], [data-risk="R3"] > .risk-tag { border-color: var(--crit); color: var(--crit); }
[data-risk="gap"] > .risk-tag { border-color: var(--warn); color: var(--warn); }
[data-risk="none"] > .risk-tag { font-size: 0.82rem; }

.phase-chip { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.decision-main { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--accent-line); background: var(--accent-soft); min-height: 96px; }
.decision-main[data-risk="R2"], .decision-main[data-risk="gap"] { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.decision-main[data-risk="R3"] { border-color: var(--crit); background: color-mix(in srgb, var(--crit) 11%, transparent); }
.decision-main .risk-tag { width: 56px; height: 56px; margin: 0; font-size: 1.2rem; background: var(--panel); }
.decision-main b { display: block; font-family: var(--font-head); font-size: 1.22rem; font-weight: 600; line-height: 1.25; }
.decision-main div span { display: block; margin-top: 5px; font-size: 0.86rem; color: var(--muted); }
.decision-mode { margin: 10px 2px 14px; font-size: 0.88rem; color: var(--muted); }
.decision-panel .decision-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat em { font-style: normal; color: var(--dim); }
.stat small { display: block; margin-top: 4px; font-size: 0.7rem; color: var(--dim); }
.decision-others { display: grid; gap: 6px; margin-top: 12px; }
.decision-others li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: center; font-size: 0.82rem; color: var(--muted); }
.decision-others .risk-tag { width: 34px; height: 30px; margin: 0; font-size: 0.78rem; border-radius: 8px; }
.decision-others b { display: block; color: var(--text); font-weight: 600; }
.panel-note { margin-top: 12px; font-size: 0.76rem; color: var(--dim); }

.badge-state { display: inline-flex; align-items: center; gap: 5px; font-size: 0.74rem; font-weight: 700; white-space: nowrap; color: var(--good); }
.badge-state svg { width: 13px; height: 13px; flex: none; }
.badge-state[data-level="warn"] { color: var(--warn); }
.badge-state[data-level="crit"] { color: var(--crit); }

.constraints { display: grid; gap: 13px; }
.constraint-head { display: grid; grid-template-columns: minmax(0, 1fr) auto 128px; gap: 10px; align-items: baseline; font-size: 0.88rem; }
.constraint-head > span:first-child { color: var(--muted); }
.constraint-head b { font-variant-numeric: tabular-nums; font-weight: 700; }
.constraint-head .badge-state { justify-self: end; }
.constraint-bar { position: relative; height: 8px; border-radius: 4px; background: var(--grid); margin: 6px 0 4px; }
.constraint-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--accent); transition: width 0.9s ease; }
.constraint-bar i[data-level="warn"] { background: var(--warn); }
.constraint-bar i[data-level="crit"] { background: var(--crit); }
.constraint-bar u { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--warn); }
.constraint-bar u.mark-crit { background: var(--crit); }
.constraints small { font-size: 0.7rem; color: var(--dim); }

.gauges.gauges-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.equip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; }
.equip-grid.equip-single { grid-template-columns: 1fr; }
.equip { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 10px 12px 6px; min-width: 0; }
.equip[data-level="warn"] { border-color: color-mix(in srgb, var(--warn) 60%, transparent); }
.equip[data-level="crit"] { border-color: color-mix(in srgb, var(--crit) 70%, transparent); }
.equip header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.equip h3 { font-size: 0.92rem; font-weight: 600; }
.equip h3 small { font-weight: 500; font-size: 0.7rem; color: var(--dim); letter-spacing: 0.02em; }
.equip .mini-rows li { padding: 5px 0; }
.compute-banner { aspect-ratio: 16 / 5; border-radius: 10px; margin-bottom: 10px; border: 1px solid var(--line); }
.compute-banner img, .compute-banner video { object-position: 50% 45%; }
.seg-wrap { display: flex; flex-wrap: wrap; border: 0; gap: 6px; margin-bottom: 10px; overflow: visible; }
.seg-wrap button { border: 1px solid var(--line-strong); border-radius: 8px; }
.seg-wrap button:last-child { border-right: 1px solid var(--line-strong); }
.trend-plot svg { height: 240px; }
.trend-plot .series { stroke-width: 2; }
.trend-plot .limit { stroke: var(--warn); stroke-width: 1; stroke-dasharray: 5 4; }
.trend-plot .limit-label { fill: var(--warn); font-size: 10.5px; }
.trend-plot .now { stroke: var(--text); stroke-width: 1; opacity: 0.55; }
.trend-plot .now-dot { stroke: var(--panel); stroke-width: 2; }
.status-pill[data-level="warn"] { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.status-pill[data-level="warn"] svg { color: var(--warn); }
.status-pill[data-level="crit"] { border-color: var(--crit); background: color-mix(in srgb, var(--crit) 12%, transparent); }
.status-pill[data-level="crit"] svg { color: var(--crit); }

/* Home page pieces of the revision */
.pill[data-risk]:not([data-risk="none"]) svg { display: none; }
.live-decision { margin: 10px 0 2px; font-size: 0.9rem; font-weight: 600; min-height: 2.8em; line-height: 1.4; }
.pill[data-risk="R2"], .pill[data-risk="gap"] { background: var(--warn); color: #1a1000; }
:root[data-theme="light"] .pill[data-risk="R2"], :root[data-theme="light"] .pill[data-risk="gap"] { color: #fff; }
.pill[data-risk="R3"] { background: var(--crit); color: #fff; }
:root:not([data-theme="light"]) .pill[data-risk="R3"] { color: #1a0505; }
.preview-photo { border-radius: 10px; border: 1px solid var(--line); min-height: 150px; }
.preview-photo img, .preview-photo video { object-position: 50% 40%; }
/* Monitoring view: the clip fades over its poster, then drifts (slow zoom plus sideways pan) on its last frame. */
#monitor-view video { opacity: 0; transform-origin: 50% 50%; transition: opacity 0.45s ease; will-change: transform, opacity; }
#monitor-view video.is-visible { opacity: 1; }
#monitor-view video.is-drifting { transform: scale(1.22) translateX(-5%); transition: opacity 0.45s ease, transform 6s cubic-bezier(0.33, 0, 0.3, 1); }
.decision-card { gap: 2px; }
.decision-mini { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 66px; }
.decision-mini .risk-tag { width: 44px; height: 44px; margin: 0; }
.decision-mini b { font-family: var(--font-head); font-size: 0.98rem; font-weight: 600; line-height: 1.3; }
.decision-why { font-size: 0.8rem; color: var(--muted); margin: 8px 0 6px; min-height: 2.4em; }
.decision-card[data-risk="R2"] { border-color: var(--warn); }
.decision-card[data-risk="R3"] { border-color: var(--crit); }
.domains.domains-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.domains-4 .domain { text-align: left; padding: 24px 22px; }
.domains-4 .domain svg { margin: 0 0 14px; }
.domains-4 .domain p { color: var(--text); font-size: 0.92rem; font-weight: 600; }
.domains-4 .domain small { display: block; margin-top: 10px; font-size: 0.82rem; color: var(--muted); line-height: 1.5; }
.layers.layers-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sub-gap { margin-top: 44px; }
.cards-4.cards-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cards-5 .card { padding: 20px 18px; }
.card.is-wip { border-style: dashed; }
.figures.figures-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.figures-7 .figure { padding: 18px 14px; }
.figures-7 .figure b { font-size: 1.8rem; }

@media (max-width: 1280px) {
  .col-7, .col-5 { grid-column: span 12; }
  .gauges.gauges-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gauges.gauges-4 .panel, .gauges.gauges-4 .panel:nth-child(n+4) { grid-column: auto; }
}
@media (min-width: 1281px) and (max-width: 1560px) {
  .gauges.gauges-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gauges.gauges-4 .panel, .gauges.gauges-4 .panel:nth-child(n+4) { grid-column: auto; }
  .gauges.gauges-4 .gauge-row { grid-template-columns: 1fr; justify-items: center; }
  .gauges.gauges-4 .mini-rows { width: 100%; }
}
@media (max-width: 1100px) {
  .domains.domains-4, .layers.layers-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards-4.cards-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figures.figures-7 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .decision-panel .decision-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .gauges.gauges-4 { grid-template-columns: 1fr; }
  .decision-main { grid-template-columns: 48px minmax(0, 1fr); }
  .decision-main .risk-tag { width: 48px; height: 48px; }
  .decision-main .btn { grid-column: 2; justify-self: start; }
  .decision-main b { font-size: 1.05rem; }
}
@media (max-width: 560px) {
  .domains.domains-4, .layers.layers-4, .cards-4.cards-5 { grid-template-columns: 1fr; }
  .figures.figures-7 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .constraint-head { grid-template-columns: minmax(0, 1fr) auto; }
  .constraint-head .badge-state { grid-column: 1 / -1; justify-self: start; }
  .equip-grid, .media-tiles { grid-template-columns: 1fr; }
  .media-inset .media-label { display: none; }
}

/* =====================================================================
   Hero slideshow, twin player and wide-gamut colour
   ===================================================================== */
.hero-slides { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.8s ease-in-out; overflow: hidden; }
.slide.is-active { opacity: 1; }
.slide img, .slide video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.slide[data-kind="still"].is-moving img { animation: ken-burns 11s linear both; }
.slide[data-kind="still"]:nth-of-type(4n).is-moving img { animation-name: ken-burns-alt; }
@keyframes ken-burns { from { transform: scale(1) translate3d(0, 0, 0); } to { transform: scale(1.07) translate3d(-1.2%, -0.8%, 0); } }
@keyframes ken-burns-alt { from { transform: scale(1.07) translate3d(1.2%, 0.6%, 0); } to { transform: scale(1) translate3d(0, 0, 0); } }
/* Veil that keeps the hero copy and the live card readable over every frame. */
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5, 7, 6, 0.55), rgba(5, 7, 6, 0.18) 45%, rgba(5, 7, 6, 0.42)); pointer-events: none; }
:root[data-theme="light"] .hero-media::after { background: linear-gradient(90deg, rgba(244, 246, 245, 0.5), rgba(244, 246, 245, 0.05) 55%, rgba(5, 7, 6, 0.1)); }

.twin-player { aspect-ratio: 16 / 9; border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); background: #050706; }
.twin-view { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease-in-out; }
.twin-view.is-active { opacity: 1; }
.twin-chips { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 3; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.twin-chip { min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.28); background: rgba(5, 7, 6, 0.72); color: #f4f7f5; font-family: var(--font-head); font-size: 0.82rem; font-weight: 600; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.twin-chip:hover { border-color: var(--accent); }
.twin-chip[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.split-wide { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }

:root[data-hdr="on"] video, :root[data-hdr="on"] img { dynamic-range-limit: no-limit; }
:root[data-hdr="off"] video, :root[data-hdr="off"] img { dynamic-range-limit: standard; }
/* Brand green in wide gamut (HDR is always on); the sRGB values above remain the fallback and the ?hdr=0 test state. */
@supports (color: color(display-p3 1 1 1)) {
  :root[data-hdr="on"] {
    --accent: color(display-p3 0.58 1 0.1);
    --accent-strong: color(display-p3 0.66 1 0.2);
    --accent-text: color(display-p3 0.66 1 0.2);
    --good: color(display-p3 0.58 1 0.1);
  }
  :root[data-hdr="on"][data-theme="light"] {
    --accent: color(display-p3 0.52 0.94 0.04);
    --accent-strong: color(display-p3 0.47 0.87 0);
    --accent-text: #2f7400;
    --good: #2f7400;
  }
}
@media (max-width: 1100px) { .split-wide { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .twin-chip { padding: 0 10px; font-size: 0.74rem; min-height: 32px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}


/* ---------- Top bar: transparent, shrinks on scroll ---------- */
.nav {
  background: color-mix(in srgb, var(--bg) 38%, transparent);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: color-mix(in srgb, var(--line) 55%, transparent);
  transition: background-color .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.nav-inner { transition: min-height .35s ease; }
.nav .logo svg { transition: height .35s ease; }
.nav.is-scrolled { background: color-mix(in srgb, var(--bg) 58%, transparent); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28); }
.nav.is-scrolled .nav-inner { min-height: 54px; }
.nav.is-scrolled .logo svg { height: 32px; }
.nav.is-scrolled .nav-menu a { padding-top: 6px; padding-bottom: 6px; }
.nav.is-scrolled .btn { min-height: 36px; }

/* ---------- Text appears as you scroll ---------- */
.fx-reveal { will-change: opacity, transform; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .fx-reveal {
      animation: fx-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 85%;
    }
  }
}
@supports not (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .fx-reveal { opacity: 0; transform: translateY(36px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); transition-delay: var(--fx-delay, 0s); }
    .fx-reveal.is-in { opacity: 1; transform: none; }
  }
}
@keyframes fx-rise {
  from { opacity: 0; transform: translateY(42px); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: none; }
}

/* Hero without the live card and buttons: copy takes the full width. */
.hero-grid { grid-template-columns: minmax(0, 1fr); }
.hero-copy h1 { max-width: 760px; }

/* ---------- Language switch (ES | EN) and sign-in button ---------- */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; border: 1.5px solid var(--line-strong); }
.lang-switch > span { color: var(--dim); font-size: 0.8rem; padding: 0 1px; }
.lang-switch button { min-width: 34px; height: 28px; padding: 0 8px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-family: var(--font-head); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em; cursor: pointer; }
.lang-switch button:hover { color: var(--text); }
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.btn-signin { gap: 8px; white-space: nowrap; }
.btn-signin svg { width: 17px; height: 17px; }
.signin-badge { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 14px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.modal-box > div > p.signin-badge { margin-bottom: 14px; font-size: 0.78rem; }
.signin-badge svg { width: 15px; height: 15px; color: var(--warn); }
.signin-forgot { margin: -4px 0 16px; font-size: 0.86rem; }
.signin-forgot a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
:root[lang="en"] .phase.is-start::after { content: "Recommended starting point"; }
@media (max-width: 560px) {
  .nav-tools { gap: 8px; }
  /* Phones: the sign-in button keeps its icon; its label stays available to screen readers. */
  .btn-signin { width: 40px; min-height: 38px; padding: 0; justify-content: center; }
  .btn-signin span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lang-switch button { min-width: 28px; padding: 0 5px; }
  .theme-toggle span { width: 28px; }
  .dash-meta { gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
}
/* Dashboard bar with the language switch and sign-in: the tabs move to their own row before they would be clipped. */
.dash-brand .logo { flex: none; }
@media (max-width: 1720px) {
  .dash-top { flex-wrap: wrap; row-gap: 6px; }
  .dash-tabs { order: 3; width: 100%; margin: 0; justify-content: center; }
  .dash-meta { margin-left: auto; }
}
@media (max-width: 1280px) {
  .dash-tabs { justify-content: flex-start; }
}
/* The quick tabs only show after scrolling. While wrapped they hang below the bar instead of holding an empty row inside it. */
@media (min-width: 1101px) and (max-width: 1720px) {
  .dash-quick { position: absolute; top: 100%; left: 0; right: 0; width: auto; padding: 4px 20px 6px; background: var(--bg); border-bottom: 1px solid var(--line); }
}

/* Sign-in button: icon only at every width. */
.btn-signin { width: 40px; min-height: 38px; padding: 0; justify-content: center; gap: 0; }
.nav.is-scrolled .btn-signin { width: 36px; min-height: 36px; }
.btn-signin svg { width: 19px; height: 19px; }

/* ---------- Round: bar transparency, slower reveal, animated step icons ---------- */
/* Top bar: 20 points more transparent; on scroll it turns more transparent first, then shrinks. */
.nav { background: color-mix(in srgb, var(--bg) 18%, transparent); }
.nav.is-scrolled { background: color-mix(in srgb, var(--bg) 38%, transparent); box-shadow: none; }
.nav { transition: background-color .3s ease, border-color .3s ease; }
.nav-inner, .nav .logo svg, .nav .btn-signin { transition: min-height .45s ease .3s, height .45s ease .3s, width .45s ease .3s; }

/* Section text rises from below into place, slowly, with no blur. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .fx-reveal {
      animation: fx-rise-slow cubic-bezier(.22,.61,.36,1) both;
      animation-timeline: view();
      animation-range: entry 0% cover 42%;
    }
  }
}
@supports not (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .fx-reveal { transform: translateY(70px); transition: opacity 1.6s ease, transform 1.6s cubic-bezier(.22,.61,.36,1); }
  }
}
@keyframes fx-rise-slow {
  from { opacity: 0; transform: translateY(70px); }
  to { opacity: 1; transform: none; }
}

/* How-it-works icons: a slow wave of float and glow, one step after another. */
@media (prefers-reduced-motion: no-preference) {
  .steps .step-icon svg { animation: step-float 5s ease-in-out infinite; transform-origin: 50% 60%; }
  .steps .step:nth-child(2) .step-icon svg { animation-delay: .6s; }
  .steps .step:nth-child(3) .step-icon svg { animation-delay: 1.2s; }
  .steps .step:nth-child(4) .step-icon svg { animation-delay: 1.8s; }
  .steps .step:nth-child(5) .step-icon svg { animation-delay: 2.4s; }
}
@keyframes step-float {
  0%, 100% { transform: translateY(0); filter: drop-shadow(0 0 0 rgba(132,240,26,0)); }
  50% { transform: translateY(-7px); filter: drop-shadow(0 0 10px rgba(132,240,26,.55)); }
}
.preview-intro { margin-bottom: 28px; }

/* ---------- Domain cards: 3D flip with lit bevel, green aura and a light sweep (after the AVL cards) ---------- */
.domain-flips { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.domain-flip { position: relative; perspective: 1600px; border-radius: 18px; outline: none; cursor: pointer; }
.domain-flip:focus-visible { box-shadow: 0 0 0 3px var(--accent); }
.domain-inner { display: grid; height: 100%; transform-style: preserve-3d; transition: transform 1.1s cubic-bezier(.2,.75,.25,1); }
.domain-flip.is-flipped .domain-inner { transform: rotateY(180deg); }
.domain-face {
  grid-area: 1 / 1; position: relative; display: flex; flex-direction: column; min-height: 300px; overflow: hidden;
  padding: 30px 26px 26px; border-radius: 18px; text-align: left;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(132,240,26,.10), transparent 55%),
    linear-gradient(155deg, #131a16, #0c110e 60%, #070a08);
  box-shadow:
    inset 1px 1px 0 rgba(214,255,170,.28),
    inset -1px -1px 0 rgba(0,0,0,.45),
    0 0 0 1px rgba(132,240,26,.16),
    0 0 28px rgba(132,240,26,.22),
    0 18px 40px rgba(0,0,0,.45);
  animation: domain-aura 4.5s ease-in-out infinite;
}
.domain-flip:nth-child(2) .domain-face { animation-delay: .8s; }
.domain-flip:nth-child(3) .domain-face { animation-delay: 1.6s; }
.domain-flip:nth-child(4) .domain-face { animation-delay: 2.4s; }
@supports (color: color(display-p3 1 1 1)) {
  .domain-face {
    box-shadow:
      inset 1px 1px 0 color(display-p3 0.85 1 0.7 / .3),
      inset -1px -1px 0 rgba(0,0,0,.45),
      0 0 0 1px color(display-p3 0.58 1 0.1 / .22),
      0 0 30px color(display-p3 0.58 1 0.1 / .32),
      0 18px 40px rgba(0,0,0,.45);
  }
}
/* lit edge: a 1px green gradient border, brightest top-left */
.domain-face::before {
  content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, rgba(190,255,120,.95), rgba(132,240,26,.35) 32%, transparent 55%, rgba(132,240,26,.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
/* light sweep that crosses the face while it turns */
.domain-face::after {
  content: ""; position: absolute; inset: -40% -60%; pointer-events: none; opacity: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(230,255,200,.22) 50%, transparent 60%);
  transform: translateX(-38%); transition: transform 1.2s ease, opacity .5s ease;
}
.domain-flip.is-flipped .domain-face::after, .domain-flip.is-sweeping .domain-face::after { opacity: 1; transform: translateX(38%); }
/* glare that follows the pointer */
.domain-face .glare { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s ease;
  background: radial-gradient(260px circle at var(--gx, 50%) var(--gy, 0%), rgba(220,255,190,.16), transparent 60%); }
.domain-flip:hover .glare { opacity: 1; }
.domain-back { transform: rotateY(180deg);
  background: radial-gradient(110% 80% at 100% 0%, rgba(132,240,26,.16), transparent 60%), linear-gradient(155deg, #101812, #0a0f0c 70%); }
.domain-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; margin-bottom: 22px;
  background: rgba(132,240,26,.08); box-shadow: inset 0 0 0 1px rgba(132,240,26,.3), 0 0 22px rgba(132,240,26,.25); }
.domain-icon svg { width: 30px; height: 30px; color: var(--accent-text); filter: drop-shadow(0 0 6px rgba(132,240,26,.6)); }
.domain-face h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 10px; }
.domain-front p { font-size: .98rem; color: var(--text); line-height: 1.45; }
.domain-back p { font-size: .95rem; color: var(--muted); line-height: 1.6; }
.back-label { display: block; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 14px; font-weight: 700; }
.flip-hint { margin-top: auto; padding-top: 20px; display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--accent-text); font-weight: 600; }
.flip-hint svg { width: 16px; height: 16px; }
:root[data-theme="light"] .domain-face { background: linear-gradient(155deg, #ffffff, #f2f6f3); }
:root[data-theme="light"] .domain-front p { color: var(--text); }
@keyframes domain-aura {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.12) saturate(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  .domain-inner { transition: none; }
  .domain-face { animation: none; }
}
@media (max-width: 980px) { .domain-flips { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .domain-flips { grid-template-columns: 1fr; } }

/* Domain cards: no aura, only the lit bevel, with a brighter wide-gamut edge. */
.domain-face { animation: none !important; filter: none !important;
  box-shadow: inset 1px 1px 0 rgba(214,255,170,.32), inset -1px -1px 0 rgba(0,0,0,.5), 0 14px 30px rgba(0,0,0,.4) !important; }
@supports (color: color(display-p3 1 1 1)) {
  .domain-face { box-shadow: inset 1px 1px 0 color(display-p3 0.85 1 0.65 / .45), inset -1px -1px 0 rgba(0,0,0,.5), 0 14px 30px rgba(0,0,0,.4) !important; }
  .domain-face::before { background: linear-gradient(135deg, color(display-p3 0.8 1 0.45), color(display-p3 0.58 1 0.1 / .45) 30%, transparent 55%, color(display-p3 0.58 1 0.1 / .6)); }
}
.domain-icon { box-shadow: inset 0 0 0 1px rgba(132,240,26,.3) !important; }

/* Hero intro film: copy and veil wait until the intro ends, then fade in. */
.hero .hero-copy { transition: opacity 1.6s ease, transform 1.6s cubic-bezier(.22,.61,.36,1); }
.hero.is-intro .hero-copy { opacity: 0; transform: translateY(30px); pointer-events: none; }
.hero::before, .hero::after { transition: opacity 1.6s ease; }
.hero.is-intro::before, .hero.is-intro::after { opacity: 0; }

/* Taller hero so the intro film and the slides read full-screen. */
.hero { min-height: calc(100vh - 72px); display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 760px) { .hero { min-height: 70vh; } }

/* Hero: the GB300 rack render, anchored to the right edge, over the slideshow. */
.hero-rack { position: absolute; right: 0; bottom: 0; top: 0; width: min(44vw, 640px); z-index: 1; pointer-events: none;
  display: flex; align-items: flex-end; justify-content: flex-end; padding: 0 3vw 0 0;
  transition: opacity 1.6s ease, transform 1.6s cubic-bezier(.22,.61,.36,1); }
.hero-rack img { height: 88%; width: auto; max-width: 100%; object-fit: contain; object-position: right bottom;
  filter: drop-shadow(0 0 28px rgba(132,240,26,.28)) drop-shadow(0 30px 40px rgba(0,0,0,.7)); }
.hero-rack::after { content: ""; position: absolute; right: 3vw; bottom: 0; width: 70%; height: 40px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(132,240,26,.25), transparent 70%); filter: blur(10px); }
.hero.is-intro .hero-rack { opacity: 0; transform: translateX(40px); }
.hero-grid { position: relative; z-index: 2; }
@media (max-width: 900px) { .hero-rack { display: none; } }

/* Hero intro film on the right: black becomes transparent (screen blend); the headline stays visible. */
.hero-rack { display: none !important; }
.hero.is-intro .hero-copy { opacity: 1 !important; transform: none !important; pointer-events: auto !important; }
.hero-intro { position: absolute; top: 0; right: 0; bottom: 0; width: min(60vw, 1100px); z-index: 1; pointer-events: none;
  display: flex; align-items: center; justify-content: flex-end; opacity: 0; transition: opacity 1.2s ease; }
.hero-intro.is-playing { opacity: 1; }
.hero-intro::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(0,0,0,.72) 30%, rgba(0,0,0,.85)); }
.hero-intro video { position: relative; width: 100%; height: auto; mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%); mask-image: linear-gradient(90deg, transparent 0, #000 22%); }
@media (max-width: 900px) { .hero-intro { display: none; } }
@media (prefers-reduced-motion: reduce) { .hero-intro { display: none; } }

/* Softer intro film: no box edges, a radial dark pool behind it and a radial mask on the film. */
.hero-intro::before { inset: -10% -5% -10% 0; background: radial-gradient(60% 55% at 62% 50%, rgba(0,0,0,.82), rgba(0,0,0,.55) 55%, transparent 80%); }
.hero-intro video { -webkit-mask-image: radial-gradient(70% 70% at 58% 50%, #000 55%, transparent 100%); mask-image: radial-gradient(70% 70% at 58% 50%, #000 55%, transparent 100%); }

/* While the intro film plays, the background is pure black: the slideshow fades out and waits. */
.hero-slides { transition: opacity 1s ease; }
.hero.is-film .hero-slides { opacity: 0; }
.hero.is-film::before, .hero.is-film::after { opacity: 0; }
.hero.is-film { background: #000; }
.hero-intro::before { display: none; }

/* Crush the film black so it matches the page black exactly. */
.hero-intro video { filter: brightness(1.02) contrast(1.12); }
.hero.is-film .hero-slides { opacity: 0 !important; visibility: hidden; transition: opacity .6s ease, visibility 0s linear .6s; }

/* ---------- Dashboard preview boards: decisions, alarms, reports ---------- */
.preview-body[hidden], .preview-board[hidden] { display: none; }
.preview-board { --tone-ok: #2fbf71; --tone-blue: #3987e5; display: grid; gap: 14px; animation: board-in 0.5s ease both; }
:root[data-theme="light"] .preview-board { --tone-ok: #14864a; --tone-blue: #2a78d6; }
@keyframes board-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.board-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.board-tiles.is-six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.board-tile { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; padding: 11px 8px 10px; text-align: center; background: linear-gradient(180deg, var(--panel-3), var(--panel-2)); min-width: 0; }
.board-tile::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--line-strong); }
.board-tile b { display: block; font-family: var(--font-head); font-size: 1.22rem; font-weight: 700; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-tile span { display: block; margin-top: 3px; font-size: 0.72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-tile.is-accent::before { background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.board-tile.is-accent b { color: var(--accent-text); }
.board-tile.is-ok::before { background: var(--tone-ok); box-shadow: 0 0 14px var(--tone-ok); }
.board-tile.is-warn::before { background: var(--warn); box-shadow: 0 0 14px var(--warn); }
.board-tile.is-warn b { color: var(--warn); }
.board-tile.is-crit::before { background: var(--crit); box-shadow: 0 0 14px var(--crit); }
.board-tile.is-crit b { color: var(--crit); }
.board-grid { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); grid-template-rows: auto auto; gap: 14px; }
.board-panel { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--panel-2); min-width: 0; }
.board-panel h3 { font-size: 0.92rem; font-weight: 600; }
.board-wide { grid-row: 1 / span 2; display: flex; flex-direction: column; background: radial-gradient(120% 90% at 0% 0%, rgba(132, 240, 26, 0.07), transparent 60%), var(--panel-2); }
.board-sub { margin: 3px 0 12px; font-size: 0.74rem; color: var(--muted); }
.board-sub i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin: 0 5px 3px 0; vertical-align: middle; }
.board-sub i + i, .board-sub .key-tokens { margin-left: 12px; }
.key-power { background: var(--accent); }
.key-tokens { background: var(--series-7); }
.board-lanes { --lane-height: 21px; display: grid; grid-template-columns: minmax(64px, max-content) minmax(0, 1fr); grid-template-rows: 1fr auto; column-gap: 10px; flex: 1; align-items: stretch; }
.board-lanes .board-hours { grid-column: 2; }
.lane-labels { display: grid; grid-template-rows: repeat(var(--lanes), minmax(var(--lane-height), 1fr)); font-size: 0.7rem; color: var(--muted); }
.lane-labels span { display: flex; align-items: center; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.lane-plot { position: relative; min-height: calc(var(--lanes, 6) * var(--lane-height, 21px)); border-radius: 6px; overflow: hidden; }
.lane-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; animation: board-sweep 1.3s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes board-sweep { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.lane-track { fill: rgba(255, 255, 255, 0.045); }
:root[data-theme="light"] .lane-track { fill: rgba(10, 20, 14, 0.06); }
.risk-1 { fill: var(--accent); }
.risk-2, .level-1 { fill: var(--warn); }
.risk-3, .level-2 { fill: var(--crit); }
.risk-4 { fill: var(--muted); }
.board-future { position: absolute; top: 0; bottom: 0; right: 0; left: 100%; background: var(--panel-2); opacity: 0.72; pointer-events: none; transition: left 1.2s linear; }
.board-playhead { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 10px 2px var(--accent), 0 0 22px 4px rgba(132, 240, 26, 0.5); pointer-events: none; transition: left 1.2s linear; animation: board-pulse 1.8s ease-in-out infinite; }
:root[data-theme="light"] .board-playhead { background: #0c120f; }
@keyframes board-pulse { 50% { opacity: 0.55; } }
.board-hours { display: flex; justify-content: space-between; margin-top: 6px; font-size: 0.66rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.board-hours b { font-weight: 500; }
.board-chart { flex: 1; display: flex; }
.board-chart .lane-plot { flex: 1; min-height: 190px; }
.chart-grid line { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-power { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; filter: drop-shadow(0 0 5px rgba(132, 240, 26, 0.7)); }
.chart-tokens { fill: none; stroke: var(--series-7); stroke-width: 1.3; vector-effect: non-scaling-stroke; stroke-linejoin: round; opacity: 0.9; }
.board-donut { position: relative; width: min(132px, 60%); margin: 10px auto 8px; }
.board-donut svg { display: block; width: 100%; transform: rotate(0deg); filter: drop-shadow(0 0 8px rgba(132, 240, 26, 0.22)); }
.donut-track { fill: none; stroke: var(--line); stroke-width: 4.4; }
.donut-part { fill: none; stroke-width: 4.4; transition: stroke-dasharray 0.9s ease, stroke-dashoffset 0.9s ease; }
.donut-part.tone-ok { stroke: var(--tone-ok); }
.donut-part.tone-accent { stroke: var(--accent); }
.donut-part.tone-warn { stroke: var(--warn); }
.donut-part.tone-crit { stroke: var(--crit); }
.donut-part.tone-blue { stroke: var(--tone-blue); }
.donut-part.tone-muted { stroke: var(--muted); }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut-center b { font-family: var(--font-head); font-size: 1.25rem; font-weight: 700; line-height: 1; }
.donut-center span { margin-top: 3px; font-size: 0.62rem; color: var(--muted); }
.board-legend { display: grid; gap: 3px; font-size: 0.72rem; }
.board-legend li { display: flex; align-items: center; gap: 7px; }
.board-legend span { color: var(--muted); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-legend b { font-variant-numeric: tabular-nums; }
.board-legend i, .board-list i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
i.tone-ok { background: var(--tone-ok); }
i.tone-accent { background: var(--accent); }
i.tone-warn { background: var(--warn); }
i.tone-crit { background: var(--crit); }
i.tone-blue { background: var(--tone-blue); }
i.tone-muted { background: var(--muted); }
i.is-pulse { box-shadow: 0 0 0 0 currentColor; animation: board-dot 1.6s ease-out infinite; }
i.tone-warn.is-pulse { color: var(--warn); }
i.tone-crit.is-pulse { color: var(--crit); }
@keyframes board-dot { 0% { box-shadow: 0 0 0 0 currentColor; } 100% { box-shadow: 0 0 0 7px transparent; } }
.board-now .decision-mini { margin-top: 10px; }
.board-now .decision-mini b { font-size: 0.86rem; line-height: 1.3; }
.board-why { margin-top: 8px; font-size: 0.76rem; color: var(--muted); }
.board-count { margin-top: 8px; font-size: 0.74rem; color: var(--muted); }
.board-count b { color: var(--text); font-size: 0.9rem; }
.board-list { display: grid; gap: 6px; margin-top: 10px; font-size: 0.74rem; }
.board-list li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.board-list span { flex: 1; min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-list span b { color: var(--text); font-weight: 600; }
.board-list em { font-style: normal; font-weight: 700; }
.tone-text-warn { color: var(--warn); }
.tone-text-crit { color: var(--crit); }
.board-now .mini-rows { margin-top: 8px; }
@media (max-width: 980px) {
  .board-grid { grid-template-columns: 1fr; }
  .board-wide { grid-row: auto; }
  .board-tiles, .board-tiles.is-six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) { .board-tiles, .board-tiles.is-six { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Boards: living topology (alarms) and day orbit with star glyphs (reports) ---------- */
.board-key { display: grid; gap: 7px; margin-top: 10px; font-size: 0.73rem; color: var(--muted); }
.board-key li { display: flex; align-items: center; gap: 9px; }
.board-key i { flex: none; width: 18px; height: 10px; border-radius: 6px; }
.key-color { background: linear-gradient(90deg, var(--tone-ok) 0 33%, var(--warn) 33% 66%, var(--crit) 66%); }
.key-arc { height: 12px !important; width: 12px !important; margin: 0 3px; border-radius: 50% !important; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-right-color: var(--accent); }
.key-pulse { height: 12px !important; width: 12px !important; margin: 0 3px; border-radius: 50% !important; background: var(--warn); box-shadow: 0 0 0 3px rgba(250, 178, 25, 0.3); }
.key-warp { height: 12px !important; width: 13px !important; margin: 0 3px; background: var(--crit); border-radius: 58% 42% 63% 37% / 41% 62% 38% 59% !important; }
.key-flow { height: 0 !important; border-top: 2px dotted var(--accent); border-radius: 0 !important; }
.key-dashed { height: 0 !important; border-top: 1.5px dashed var(--muted); border-radius: 0 !important; }
.key-ring-risk { background: linear-gradient(90deg, var(--warn) 50%, var(--crit) 50%); height: 5px !important; }
.key-ring-level { background: linear-gradient(90deg, var(--warn) 50%, var(--crit) 50%); height: 5px !important; opacity: 0.7; }
.key-ring-work { background: linear-gradient(90deg, var(--accent) 0 25%, var(--tone-ok) 25% 50%, var(--tone-blue) 50% 75%, var(--muted) 75%); height: 5px !important; }
.key-area { background: linear-gradient(180deg, rgba(132, 240, 26, 0.6), rgba(132, 240, 26, 0.1)); }
.key-line { height: 0 !important; border-top: 2px solid var(--series-7); border-radius: 0 !important; }
.key-star { height: 13px !important; width: 13px !important; margin: 0 2.5px; background: var(--accent); clip-path: polygon(50% 0, 100% 38%, 81% 100%, 19% 100%, 0 38%); border-radius: 0 !important; }

.board-topology { flex: 1; display: grid; place-items: center; min-height: 0; background: radial-gradient(60% 70% at 52% 52%, rgba(132, 240, 26, 0.09), transparent 70%); border-radius: 8px; }
.board-topology svg { width: 100%; height: auto; max-height: 440px; display: block; overflow: visible; }
.topo-node { --tone: var(--tone-ok); }
.topo-node[data-level="1"] { --tone: var(--warn); }
.topo-node[data-level="2"] { --tone: var(--crit); }
.node-fill { fill: var(--tone); transition: fill 0.6s ease; }
.node-body { filter: drop-shadow(0 0 7px var(--tone)); }
.topo-node[data-level="2"] .node-body { filter: url(#node-warp) drop-shadow(0 0 10px var(--tone)); }
.node-track { fill: none; stroke: var(--line-strong); stroke-width: 2.2; }
.node-arc { fill: none; stroke: var(--tone); stroke-width: 2.6; stroke-linecap: round; transition: stroke-dasharray 0.9s ease, stroke 0.6s ease; }
.node-pulse { fill: none; stroke: var(--tone); stroke-width: 1.6; opacity: 0; transform-box: fill-box; transform-origin: center; }
.topo-node[data-level="1"] .node-pulse, .topo-node[data-level="2"] .node-pulse { animation: node-pulse 2.2s ease-out infinite; }
.topo-node[data-level="2"] .node-pulse { animation-duration: 1.2s; stroke-width: 2.2; }
.node-pulse.is-late { animation-delay: 0.6s !important; }
@keyframes node-pulse { 0% { opacity: 0.85; transform: scale(1); } 100% { opacity: 0; transform: scale(2.3); } }
.node-name { fill: var(--text); opacity: 0.82; font-size: 12.5px; text-anchor: middle; font-family: inherit; }
.node-value { fill: var(--text); font-size: 13.5px; font-weight: 700; text-anchor: middle; font-family: var(--font-head); font-variant-numeric: tabular-nums; }
.topo-node.is-core .node-value { fill: #06100a; font-size: 19px; }
.topo-node.is-core .node-name { fill: var(--text); font-size: 12.5px; font-weight: 600; }
.node-halo { fill: none; stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 2 5; }
.node-orbit circle { fill: var(--accent-text); filter: drop-shadow(0 0 3px var(--accent)); }
.topo-link { --tone: var(--tone-ok); }
.topo-link[data-level="1"] { --tone: var(--warn); }
.topo-link[data-level="2"] { --tone: var(--crit); }
.link-line { fill: none; stroke: var(--tone); stroke-width: 1.4; opacity: 0.32; transition: stroke 0.6s ease; }
.link-flow { fill: none; stroke: var(--tone); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 0.1 17; animation: link-flow 1.5s linear infinite; filter: drop-shadow(0 0 3px var(--tone)); }
.topo-link[data-level="2"] .link-flow { animation-duration: 0.7s; }
.topo-link.is-inferred .link-line { stroke-dasharray: 4 5; }
.topo-link.is-inferred .link-flow { display: none; }
@keyframes link-flow { to { stroke-dashoffset: -17.1; } }

.board-orbit { flex: 1; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 12px; align-items: center; min-height: 0; }
.orbit-day { width: 100%; max-height: 430px; display: block; overflow: visible; }
.orbit-grid circle, .orbit-grid line { fill: none; stroke: var(--line); stroke-width: 1; }
.ring-track { fill: none; stroke: rgba(255, 255, 255, 0.05); stroke-width: 7; }
:root[data-theme="light"] .ring-track { stroke: rgba(10, 20, 14, 0.07); }
.orbit-rings path { fill: none; stroke-width: 7; }
.orbit-rings .risk-1 { stroke: var(--accent); fill: none; }
.orbit-rings .risk-2, .orbit-rings .level-1 { stroke: var(--warn); fill: none; }
.orbit-rings .risk-3, .orbit-rings .level-2 { stroke: var(--crit); fill: none; }
.orbit-rings .level-1, .orbit-rings .level-2 { opacity: 0.75; }
.orbit-rings .work-1 { stroke: var(--accent); }
.orbit-rings .work-2 { stroke: var(--tone-ok); }
.orbit-rings .work-3 { stroke: var(--tone-blue); }
.orbit-rings .work-4 { stroke: var(--muted); opacity: 0.6; }
.orbit-rings { animation: orbit-in 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; transform-origin: 200px 200px; }
@keyframes orbit-in { from { opacity: 0; transform: rotate(-70deg) scale(0.86); } to { opacity: 1; transform: none; } }
.orbit-power { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; filter: drop-shadow(0 0 5px rgba(132, 240, 26, 0.75)); }
.orbit-tokens { fill: none; stroke: var(--series-7); stroke-width: 1.1; stroke-linejoin: round; opacity: 0.85; }
.orbit-future { fill: var(--panel-2); opacity: 0.72; }
.orbit-hand { transition: transform 1.2s linear; }
.orbit-hand line { stroke: #fff; stroke-width: 1.6; filter: drop-shadow(0 0 5px var(--accent)); }
.orbit-hand circle { fill: #fff; filter: drop-shadow(0 0 7px var(--accent)); }
:root[data-theme="light"] .orbit-hand line { stroke: #0c120f; }
:root[data-theme="light"] .orbit-hand circle { fill: #0c120f; }
.orbit-core { fill: var(--panel-2); stroke: var(--accent-line); stroke-width: 1.2; }
.orbit-clock { fill: var(--text); font-family: var(--font-head); font-size: 21px; font-weight: 700; text-anchor: middle; font-variant-numeric: tabular-nums; }
.orbit-note { fill: var(--muted); font-size: 9.5px; text-anchor: middle; }
.orbit-hour { fill: var(--muted); font-size: 11px; text-anchor: middle; font-variant-numeric: tabular-nums; }
.board-stars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 4px; }
.board-star { --tone: var(--tone-ok); margin: 0; text-align: center; }
.board-star[data-level="1"] { --tone: var(--warn); }
.board-star[data-level="2"] { --tone: var(--crit); }
.board-star svg { width: 100%; max-width: 132px; display: block; margin: 0 auto; overflow: visible; }
.board-star figcaption { margin-top: 2px; font-size: 0.72rem; color: var(--muted); }
.star-web { fill: none; stroke: var(--line-strong); stroke-width: 0.8; }
.star-axis { stroke: var(--line); stroke-width: 0.8; }
.star-shape { fill: var(--tone); fill-opacity: 0.28; stroke: var(--tone); stroke-width: 1.6; stroke-linejoin: round; filter: drop-shadow(0 0 5px var(--tone)); transition: fill 0.6s ease, stroke 0.6s ease; }
.star-tips circle { fill: var(--tone); }
@media (max-width: 980px) { .board-orbit { grid-template-columns: 1fr; } .board-stars { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Dashboard preview: one fixed size for every view (the size of the reports board) ---------- */
@media (min-width: 1101px) {
  .preview-body, .preview-board { height: 560px; }
  .preview-body > div:first-child { display: flex; flex-direction: column; min-height: 0; }
  .preview-body .preview-mid { flex: 1; min-height: 0; }
  .preview-body .spark-rows { grid-auto-rows: 1fr; }
  .preview-body .decision-card { min-height: 0; }
  .preview-body .decision-card .mini-rows { margin-top: auto; }
  .preview-board { grid-template-rows: auto minmax(0, 1fr); }
  .board-grid { grid-template-rows: auto minmax(0, 1fr); min-height: 0; }
  .board-panel { min-height: 0; overflow: hidden; }
  .board-wide { min-height: 0; }
  .board-lanes { min-height: 0; }
  .lane-labels { grid-template-rows: repeat(var(--lanes), minmax(0, 1fr)); }
  .lane-plot { min-height: 0; }
  .board-topology { position: relative; }
  .board-topology svg { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; }
  .board-orbit { align-items: stretch; }
  .board-orbit .orbit-day { height: 100%; max-height: none; min-height: 0; }
  .board-stars { align-content: center; }
}

/* ---------- Dashboard preview: the monitoring clip always keeps 16:9 ---------- */
#monitor-view { aspect-ratio: 16 / 9; min-height: 0; height: auto; align-self: start; }
@media (min-width: 1101px) {
  .preview-body .preview-mid { display: flex; flex-direction: column; gap: 12px; }
  .preview-body #monitor-view { width: 100%; flex: none; align-self: auto; }
  .preview-body .spark-rows { flex: 1; min-height: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: auto; grid-template-rows: minmax(0, 1fr); }
  .preview-body .spark-row { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); align-content: center; gap: 2px 8px; padding: 6px 10px; min-height: 0; }
  .preview-body .spark-row span { grid-column: 1 / -1; white-space: normal; font-size: 0.74rem; line-height: 1.25; }
  .preview-body .spark-row svg { width: 100%; height: 100%; max-height: 34px; min-height: 16px; align-self: center; }
}

/* ---------- Decision card: one of the three boards, small, picked at random ---------- */
.decision-visual { --tone-ok: #2fbf71; --tone-blue: #3987e5; display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 200px; width: 100%; margin: 10px 0 8px; padding: 10px 10px 8px; border: 1px solid var(--line); border-radius: 10px; background: radial-gradient(90% 80% at 50% 45%, rgba(132, 240, 26, 0.08), transparent 70%), var(--panel); color: inherit; text-align: left; cursor: pointer; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
:root[data-theme="light"] .decision-visual { --tone-ok: #14864a; --tone-blue: #2a78d6; }
.decision-visual:hover, .decision-visual:focus-visible { border-color: var(--accent-line); box-shadow: 0 0 18px rgba(132, 240, 26, 0.16); outline: none; }
.decision-visual-name { display: flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.decision-visual-name::after { content: "→"; margin-left: auto; color: var(--accent-text); font-size: 0.9rem; }
.decision-visual-stage { position: relative; flex: 1; min-height: 0; display: block; animation: board-in 0.5s ease both; }
.decision-visual-stage[data-mini="alarms"] > svg, .decision-visual-stage[data-mini="reports"] > svg { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; overflow: visible; }
.decision-visual-stage[data-mini="alarms"] .node-name, .decision-visual-stage[data-mini="alarms"] .topo-node:not(.is-core) .node-value { display: none; }
.decision-visual-stage[data-mini="alarms"] .node-arc, .decision-visual-stage[data-mini="alarms"] .node-track { stroke-width: 3.6; }
.decision-visual-stage[data-mini="alarms"] .link-line { stroke-width: 2.4; opacity: 0.45; }
.decision-visual-stage[data-mini="alarms"] .link-flow { stroke-width: 5; }
.decision-visual-stage[data-mini="decisions"] { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 12px; }
.decision-visual-stage[data-mini="decisions"] .board-donut { width: min(100%, 150px); margin: 0 auto; }
.decision-visual-stage[data-mini="decisions"] .board-legend { font-size: 0.74rem; gap: 6px; }
@media (min-width: 1101px) { .preview-body .decision-card .decision-visual { min-height: 0; } .preview-body .decision-card .mini-rows { margin-top: 0; } }

/* ---------- Full dashboard: shared panel on top, family blocks below ---------- */
.dash-panel { width: min(100% - 40px, var(--wrap)); margin: 14px auto 0; }
.dash-body .dash-grid { width: min(100% - 40px, var(--wrap)); max-width: none; padding-inline: 0; }
.dash-grid [hidden] { display: none !important; }
.dash-quick { opacity: 0; pointer-events: none; transform: translateY(-6px); transition: opacity 0.25s ease, transform 0.25s ease; }
.dash-quick.is-shown { opacity: 1; pointer-events: auto; transform: none; }
.dash-quick .dash-tab { min-width: 0; padding: 5px 9px; font-size: 0.72rem; }
.dash-quick .dash-tab svg { width: 17px; height: 17px; }
.family { --tone-ok: #2fbf71; --tone-blue: #3987e5; --state: var(--line); grid-column: span 12; display: grid; grid-template-columns: minmax(250px, 300px) minmax(0, 1fr); gap: 12px; align-items: stretch; }
:root[data-theme="light"] .family { --tone-ok: #14864a; --tone-blue: #2a78d6; }
.family[data-level="ok"] { --state: var(--tone-ok); }
.family[data-level="warn"] { --state: var(--warn); }
.family[data-level="crit"] { --state: var(--crit); }
.family-head { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; border-color: color-mix(in srgb, var(--state) 55%, var(--line)); background: radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--state) 14%, transparent), transparent 70%), linear-gradient(180deg, var(--panel-2), var(--panel)); transition: border-color 0.6s ease; }
.family-head::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--state); box-shadow: 0 0 16px var(--state); transition: background 0.6s ease; }
.family-head > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.family-head > header h2 { font-size: 1.35rem; font-weight: 700; }
.family-head .gauge-row { grid-template-columns: 1fr; justify-items: center; gap: 4px; }
.family-head .gauge { zoom: 1.45; }
.family-head .mini-rows { width: 100%; }
.family-star { margin-top: auto; }
.family-star .board-star svg { max-width: 150px; }
.family-star figcaption { display: none; }
.family-body .equip-grid { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
.family-body .media-tiles .media, .family-body .compute-banner { max-height: 150px; }
#dash-grid[data-view="alarms"] .equip-grid { display: flex; flex-wrap: wrap; }
#dash-grid[data-view="alarms"] .equip { flex: 1 1 215px; order: 2; opacity: 0.45; }
#dash-grid[data-view="alarms"] .equip[data-level="warn"] { order: 1; opacity: 1; border-color: var(--warn); }
#dash-grid[data-view="alarms"] .equip[data-level="crit"] { order: 0; opacity: 1; border-color: var(--crit); }
#dash-grid[data-view="alarms"] .family-body .media-tiles, #dash-grid[data-view="alarms"] .family-body .compute-banner { display: none; }
.equip.is-flash { animation: equip-flash 1.8s ease-out; }
@keyframes equip-flash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent), 0 0 28px rgba(132, 240, 26, 0.55); } 100% { box-shadow: 0 0 0 0 transparent; } }
.dash-body #preview-board .topo-node { cursor: pointer; }
#dash-grid[data-view="energy"] .trend-panel, #dash-grid[data-view="cooling"] .trend-panel, #dash-grid[data-view="water"] .trend-panel, #dash-grid[data-view="compute"] .trend-panel { grid-column: span 7; }
#dash-grid[data-view="energy"] .constraints li:not([data-domain="energy"]), #dash-grid[data-view="cooling"] .constraints li:not([data-domain="cooling"]),
#dash-grid[data-view="water"] .constraints li:not([data-domain="water"]), #dash-grid[data-view="compute"] .constraints li:not([data-domain="compute"]) { display: none; }
@media (max-width: 1100px) {
  .family { grid-template-columns: 1fr; }
  .dash-quick { display: none; }
  #dash-grid[data-view] .trend-panel { grid-column: span 12; }
}

/* ---------- Independent verification (board and detail) ---------- */
.verify-flow { display: flex; align-items: stretch; gap: 22px; margin: 2px 0 12px; padding: 0; list-style: none; }
.verify-flow li { position: relative; flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.verify-flow li + li::before { content: "→"; position: absolute; left: -18px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 0.95rem; }
.verify-flow small { display: block; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.verify-flow b { display: block; margin-top: 2px; font-size: 0.76rem; font-weight: 600; line-height: 1.25; }
.verify-flow .is-control { border-color: var(--accent-line); background: var(--accent-soft, rgba(132, 240, 26, 0.08)); flex: 1.5; }
.verify-flow .is-control small { color: var(--accent-text); }
.verify-flow .is-control[data-state="bad"] { border-color: var(--crit); box-shadow: 0 0 14px rgba(230, 103, 103, 0.28); }
.verify-flow .is-control[data-state="bad"] small { color: var(--crit); }
.verify-flow .is-control[data-state="ok"] { box-shadow: 0 0 14px rgba(132, 240, 26, 0.2); }
.verify-head { margin-bottom: 7px; font-size: 0.8rem; font-weight: 600; }
.verify-rules { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 5px 12px; margin: 0; padding: 0; list-style: none; }
.verify-rules li { display: grid; grid-template-columns: auto minmax(0, auto) minmax(0, 1fr); align-items: center; gap: 8px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-size: 0.72rem; min-height: 0; }
.verify-rules i, .verify-row span i { width: 9px; height: 9px; border-radius: 50%; background: var(--tone-ok, #2fbf71); box-shadow: 0 0 7px var(--tone-ok, #2fbf71); flex: none; }
.verify-rules span { font-weight: 600; white-space: nowrap; }
.verify-rules em { font-style: normal; color: var(--muted); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.verify-rules .is-bad { border-color: var(--crit); background: rgba(230, 103, 103, 0.09); }
.verify-rules .is-bad i, .verify-row[data-state="bad"] span i { background: var(--crit); box-shadow: 0 0 8px var(--crit); border-radius: 2px; transform: rotate(45deg); }
.verify-rules .is-bad em { color: var(--crit); }
.verify-decision { display: flex; align-items: center; gap: 9px; margin-top: 8px; font-size: 0.76rem; font-weight: 600; line-height: 1.3; }
.verify-decision .risk-tag { width: 34px; height: 34px; margin: 0; font-size: 0.8rem; border-radius: 9px; flex: none; }
.verify-curve-box svg { display: block; width: 100%; height: auto; margin-top: 6px; }
.verify-axis { stroke: var(--line-strong); stroke-width: 1; }
.verify-curve { fill: none; stroke: var(--text); stroke-width: 2.2; stroke-linejoin: round; }
.verify-drop { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 3 4; }
.mark-crit { fill: var(--crit); }
.mark-warn { fill: var(--warn); }
.mark-best { fill: var(--accent); filter: drop-shadow(0 0 6px var(--accent)); }
.verify-tick { fill: var(--muted); font-size: 9.5px; text-anchor: middle; }
.mark-best-text { fill: var(--accent-text); font-weight: 700; font-size: 11px; }
.verify-best { color: var(--accent-text); }
.verify-pending { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line-strong); font-size: 0.68rem; line-height: 1.35; color: var(--muted); }
.verify-seal { margin-top: 8px; font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 0.68rem; line-height: 1.45; word-break: break-all; color: var(--accent-text); }
.verify-panel { --tone-ok: #2fbf71; }
.verify-table { display: grid; gap: 4px; margin-top: 10px; }
.verify-row { display: grid; grid-template-columns: minmax(150px, 1.1fr) minmax(0, 2.2fr) 110px 100px minmax(160px, 2fr); align-items: center; gap: 14px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); font-size: 0.8rem; }
.verify-row.is-head { border: 0; background: transparent; padding-block: 2px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.verify-row > span:first-child { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.verify-row > span:nth-child(2) { color: var(--muted); }
.verify-row b { text-align: right; font-variant-numeric: tabular-nums; }
.verify-row.is-head span:nth-child(3), .verify-row.is-head span:nth-child(4) { text-align: right; }
.verify-row[data-state="bad"] { border-color: color-mix(in srgb, var(--crit) 55%, var(--line)); }
.verify-row[data-state="bad"] [data-cell="bad"] { color: var(--crit); }
.verify-strip { position: relative; height: 14px; border-radius: 4px; overflow: hidden; }
.verify-strip svg { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (max-width: 980px) { .verify-flow { flex-wrap: wrap; } .verify-rules { grid-template-columns: 1fr; } .verify-row { grid-template-columns: 1fr 1fr; } .verify-row.is-head { display: none; } }
/* Water and compute have few cards: side by side in the views that show every family. */
@media (min-width: 1101px) {
  #dash-grid[data-view="general"] .family[data-family="water"], #dash-grid[data-view="general"] .family[data-family="compute"],
  #dash-grid[data-view="alarms"] .family[data-family="water"], #dash-grid[data-view="alarms"] .family[data-family="compute"] { grid-column: span 6; grid-template-columns: minmax(210px, 250px) minmax(0, 1fr); }
}
.verify-seal + .board-why { margin-top: 4px; font-size: 0.69rem; line-height: 1.3; }
.verify-curve-box svg { max-height: 118px; }

/* ---------- Digital twin: rendered frame sequences that turn by themselves and by dragging ---------- */
.twin-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.twin-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.5s ease; cursor: grab; touch-action: pan-y; }
.twin-player.is-ready .twin-canvas { opacity: 1; }
.twin-player.is-dragging .twin-canvas { cursor: grabbing; }
.twin-hint { position: absolute; left: 14px; top: 14px; z-index: 3; display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; background: rgba(5, 7, 6, 0.72); border: 1px solid rgba(255, 255, 255, 0.24); color: #f4f7f5; font-size: 0.76rem; font-weight: 600; pointer-events: none; transition: opacity 0.5s ease; backdrop-filter: blur(8px); }
.twin-hint::before { content: "↔"; color: #9bff2e; font-size: 0.95rem; }
.twin-player.is-touched .twin-hint { opacity: 0; }

/* ---------- Dock effect on the tile rows of the dashboard panel ---------- */
.preview .kpis .kpi, .preview .board-tiles .board-tile { position: relative; transition: transform 0.16s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.16s ease; will-change: transform; }
.preview .is-docking > * { box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35); }
.preview .kpis .kpi, .preview .board-tiles .board-tile { transition: transform 0.16s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease; }
.preview .is-docking > .is-dock-peak { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 0 18px rgba(132, 240, 26, 0.55), 0 8px 22px rgba(0, 0, 0, 0.35); }

/* ---------- KPI belt: more tiles than fit drift sideways and can be dragged; the dock effect stays ---------- */
.kpi-belt { overflow-x: clip; overflow-y: visible; min-width: 0; }
.kpi-belt.is-moving { cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%); -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%); padding-block: 12px; margin-block: -12px; }
.kpi-belt.is-dragging { cursor: grabbing; }
.kpis.is-belt { display: flex; width: max-content; will-change: transform; }
.kpis.is-belt .kpi { flex: none; width: var(--kpi-width, 150px); }
/* The headline KPI of the belt is a little larger. */
.kpis.is-belt .kpi.is-hero { width: calc(var(--kpi-width, 150px) * 1.45); border-color: var(--accent-line); background: linear-gradient(180deg, rgba(132, 240, 26, 0.12), var(--panel-2)); }
.kpis.is-belt .kpi.is-hero b { font-size: 1.2rem; line-height: 1.1; }
.kpis.is-belt .kpi.is-hero span { font-size: 0.76rem; }
.kpis.is-belt { align-items: stretch; }
.kpis.is-belt .kpi { display: flex; flex-direction: column; justify-content: center; }
/* The belt is wider than its box by design: it must never stretch the panel. */
.preview-body > * { min-width: 0; }
@media (max-width: 1100px) { .preview-body { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Animated network background (two sections). The clip starts and ends in black, and with
   the screen blend black is transparent, so the loop never shows a seam. ---------- */
.has-net { overflow: hidden; isolation: isolate; }
.net-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.6; mix-blend-mode: screen; }
.net-bg video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.has-net > .wrap { position: relative; z-index: 1; }
:root[data-theme="light"] .net-bg { display: none; }
@media (prefers-reduced-motion: reduce) { .net-bg { display: none; } }

/* ---------- Verification board: four controls side by side (data, adjustment, result and the additional forecast) ---------- */
.verify-board { display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 0; }
.verify-board .verify-flow { gap: 20px; margin: 0; }
.verify-board .verify-flow li { padding: 6px 10px; }
.verify-board .verify-flow li + li::before { left: -16px; }
.verify-board .verify-flow b { font-size: 0.72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.verify-flow .is-extra { border-style: dashed; }
.verify-flow .is-control[data-state="warn"] { border-color: var(--warn); box-shadow: 0 0 14px rgba(240, 180, 40, 0.22); }
.verify-flow .is-control[data-state="warn"] small { color: var(--warn); }
.verify-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.42fr) repeat(3, minmax(0, 1fr)); gap: 10px; }
.verify-cols .board-panel { display: flex; flex-direction: column; padding: 10px 12px; }
.verify-cols .board-panel h3 { font-size: 0.84rem; }
.verify-cols .verify-extra { border-style: dashed; border-color: var(--accent-line); }
.verify-when { margin: 2px 0 7px; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--accent-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.verify-cols .verify-rules { grid-template-columns: minmax(0, 1fr); gap: 3px; }
.verify-cols .verify-rules li { padding: 1px 8px; font-size: 0.69rem; }
.verify-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.verify-body .verify-pending { margin-top: auto; font-size: 0.63rem; line-height: 1.3; }
.verify-body .board-why { margin-top: 5px; font-size: 0.69rem; line-height: 1.32; }
.verify-body .verify-decision { margin-top: 0; font-size: 0.7rem; }
.verify-body .verify-decision .risk-tag { width: 28px; height: 28px; font-size: 0.7rem; }
.verify-body .verify-curve-box svg { max-height: 84px; margin-top: 2px; }
.verify-line { font-size: 0.7rem; font-weight: 600; line-height: 1.3; }
.verify-spark { display: block; width: 100%; height: 66px; margin-top: 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.verify-trace { fill: none; stroke: var(--muted); stroke-width: 1.3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.verify-applied { stroke: var(--warn); stroke-width: 1.6; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.verify-bestline { stroke: var(--accent); stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.verify-limit { stroke: var(--crit); stroke-width: 1; stroke-dasharray: 2 4; vector-effect: non-scaling-stroke; }
.verify-band { fill: var(--accent); opacity: 0.16; }
.verify-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 7px 0 0; }
.verify-pair div { min-width: 0; padding-left: 8px; border-left: 3px solid var(--warn); }
.verify-pair .is-best { border-left-color: var(--accent); }
.verify-pair dt { font-size: 0.6rem; line-height: 1.2; color: var(--muted); }
.verify-pair dd { margin: 1px 0 0; font-size: 1.02rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.verify-extra .verify-pair .is-applied { border-left-color: var(--muted); }
.verify-verdict { margin-top: 7px; padding: 4px 8px; border-radius: 7px; font-size: 0.7rem; font-weight: 700; background: rgba(240, 180, 40, 0.13); color: var(--warn); }
.verify-verdict[data-tone="right"] { background: var(--accent-soft, rgba(132, 240, 26, 0.1)); color: var(--accent-text); }
.verify-verdict[data-tone="short"] { background: rgba(230, 103, 103, 0.12); color: var(--crit); }
.verify-small { margin-top: 5px; font-size: 0.66rem; line-height: 1.3; color: var(--muted); }
.verify-sealline { display: flex; align-items: baseline; gap: 10px; min-width: 0; font-size: 0.66rem; color: var(--muted); }
.verify-sealline b { flex: none; font-weight: 600; }
.verify-sealline .verify-seal { margin: 0; min-width: 0; font-size: 0.66rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: normal; }
.verify-day { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.verify-daycard { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.verify-daycard h3 { font-size: 0.95rem; font-weight: 600; }
.verify-daynums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 10px 0 4px; }
.verify-daynums b { display: block; font-size: 1.5rem; font-weight: 700; }
.verify-daynums span { font-size: 0.72rem; color: var(--muted); }
@media (max-width: 1100px) { .verify-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } .verify-sealline { flex-wrap: wrap; } .verify-sealline .verify-seal { white-space: normal; word-break: break-all; } }
@media (max-width: 700px) { .verify-cols, .verify-day { grid-template-columns: minmax(0, 1fr); } .verify-daynums { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- V2: concept / reference notices ---------- */
.concept-note { display: flex; gap: 12px; align-items: flex-start; max-width: 860px; margin: 18px auto 0; padding: 14px 18px; text-align: left; border: 1px solid var(--warn); border-left-width: 4px; border-radius: 12px; background: color-mix(in srgb, var(--warn) 9%, var(--panel)); color: var(--text); font-size: 0.95rem; line-height: 1.5; }
.concept-note svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--warn); }
.concept-note b { display: block; font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; color: var(--warn); margin-bottom: 2px; }
.concept-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; padding: 9px 20px; background: color-mix(in srgb, var(--warn) 14%, var(--bg)); border-bottom: 1px solid var(--warn); color: var(--text); font-size: 0.88rem; text-align: center; }
.concept-bar svg { width: 16px; height: 16px; color: var(--warn); flex: none; }
.concept-bar b { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; color: var(--warn); }

/* ---------- V2: contact funnel ---------- */
.funnel-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: start; }
.funnel-side h2 { margin: 12px 0 14px; font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 700; }
.funnel-side p.eyebrow { color: var(--accent-text); font-size: 0.78rem; }
.funnel-side > p:not(.eyebrow) { font-size: 1.05rem; }
.funnel-side > p:not(.eyebrow) { color: var(--muted); max-width: 46ch; }
.funnel-viz { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 8px; justify-items: center; max-width: 420px; }
.funnel-viz li { display: flex; align-items: center; justify-content: center; gap: 10px; height: 58px; color: var(--muted); font-weight: 600; background: var(--panel); border: 1px solid var(--line); clip-path: polygon(0 0, 100% 0, 92% 100%, 8% 100%); }
.funnel-viz li:nth-child(1) { width: 100%; }
.funnel-viz li:nth-child(2) { width: 82%; }
.funnel-viz li:nth-child(3) { width: 64%; }
.funnel-viz li b { font-family: var(--font-head); }
.funnel-viz li.is-on { background: var(--accent-soft); color: var(--text); }
.funnel-viz li.is-now { background: var(--accent); color: var(--accent-ink); }
.funnel-card { background: var(--panel); border: 1px solid var(--accent-line); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); }
.funnel-count { margin: 0 0 8px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-text); }
.funnel-bar { height: 4px; border-radius: 4px; background: var(--line); margin-bottom: 22px; overflow: hidden; }
.funnel-bar i { display: block; height: 100%; width: 33%; background: var(--accent); transition: width .3s; }
.fn-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.fn-step legend { font-family: var(--font-head); font-size: 1.15rem; font-weight: 700; margin: 0 0 14px; padding: 0; float: left; width: 100%; }
.fn-step legend.fn-legend2 { margin-top: 22px; }
.fn-opts { clear: both; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fn-opt { position: relative; cursor: pointer; }
.fn-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.fn-opt span { display: block; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--line-strong); font-weight: 600; transition: border-color .2s, background .2s; }
.fn-opt:hover span { border-color: var(--accent-line); }
.fn-opt input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.fn-opt input:focus-visible + span { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.fn-step .field { clear: both; }
.fn-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 22px; }
.fn-error { color: var(--crit); }
.funnel-done h3 { margin: 0 0 8px; font-size: 1.3rem; }
.funnel-done p { color: var(--muted); margin: 0 0 20px; }
@media (max-width: 860px) { .funnel-grid { grid-template-columns: 1fr; gap: 28px; } .fn-opts { grid-template-columns: 1fr; } }

/* ---------- V2: light theme, forecast section ---------- */
:root[data-theme="light"] .predict { background: var(--bg); }
:root[data-theme="light"] .predict-bg { opacity: 1; }
:root[data-theme="light"] .predict-bg video { display: none; }
:root[data-theme="light"] .predict-bg img { opacity: 0.16; filter: invert(1) hue-rotate(180deg); }
:root[data-theme="light"] .predict-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.7) 55%, rgba(255,255,255,0.88) 100%); }
:root[data-theme="light"] .predict .card { background: #ffffff; border-color: var(--line-strong); box-shadow: 0 10px 30px rgba(16, 32, 8, 0.10); }
:root[data-theme="light"] .predict .card p { color: #3d463f; }
/* ---------- V2: closing section, still world image with slow zoom ---------- */
.cta-zoom { overflow: hidden; }
.cta-zoom img { object-position: 100% 45%; transform-origin: 72% 45%; animation: cta-zoom 48s ease-in-out infinite alternate; will-change: transform; }
@keyframes cta-zoom { from { transform: scale(1); } to { transform: scale(1.22); } }
@media (prefers-reduced-motion: reduce) { .cta-zoom img { animation: none; } }
:root[data-theme="light"] .cta::before { background: linear-gradient(90deg, var(--bg) 30%, color-mix(in srgb, var(--bg) 82%, transparent) 55%, color-mix(in srgb, var(--bg) 35%, transparent) 78%, transparent); }
/* ---------- V2: funnel at the end of the dashboard ---------- */
.funnel-dash { border-top: 1px solid var(--line); margin-top: 28px; padding-bottom: 110px; }
.fn-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; clear: both; }
.fn-phone { display: grid; grid-template-columns: minmax(0, 13.5rem) minmax(0, 1fr); gap: 8px; }
.fn-phone select { width: 100%; padding: 11px 10px; border-radius: 10px; border: 1.5px solid var(--line-strong); background: var(--bg-2); color: var(--text); font: inherit; }
.fn-phone select:focus-visible { outline-offset: 0; border-color: var(--accent-strong); }
@media (max-width: 560px) { .fn-phone { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .fn-two { grid-template-columns: 1fr; } }
/* ---------- V2: light theme keeps the header dark ---------- */
:root[data-theme="light"] .nav,
:root[data-theme="light"] .dash-top {
  --bg: #050706; --bg-2: #0a0e0c; --panel: #0e1411; --panel-2: #131b17; --panel-3: #19231e;
  --line: rgba(255, 255, 255, 0.09); --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f7f5; --muted: #aab4ae; --dim: #78837d;
  --accent: #84f01a; --accent-strong: #9bff2e; --accent-text: #9bff2e; --accent-ink: #0a1600;
  --accent-soft: rgba(132, 240, 26, 0.12); --accent-line: rgba(132, 240, 26, 0.38);
  color: var(--text); color-scheme: dark;
}
:root[data-theme="light"] .nav { background: #050706; }
:root[data-theme="light"] .nav.is-scrolled { background: rgba(5, 7, 6, 0.94); }
:root[data-theme="light"] .dash-top { background: color-mix(in srgb, #050706 92%, transparent); }
:root[data-theme="light"] .nav .logo .logo-symbol,
:root[data-theme="light"] .dash-top .logo .logo-symbol { filter: drop-shadow(0 0 5px rgba(132, 240, 26, 0.55)); }
/* ---------- V2: light theme keeps the hero exactly as in dark mode (no white veil) ---------- */
:root[data-theme="light"] .hero {
  --bg: #050706; --bg-2: #0a0e0c; --panel: #0e1411; --panel-2: #131b17; --panel-3: #19231e;
  --line: rgba(255, 255, 255, 0.09); --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f7f5; --muted: #aab4ae; --dim: #78837d;
  --accent: #84f01a; --accent-strong: #9bff2e; --accent-text: #9bff2e; --accent-ink: #0a1600;
  --accent-soft: rgba(132, 240, 26, 0.12); --accent-line: rgba(132, 240, 26, 0.38);
  background: #050706; color: var(--text); color-scheme: dark;
}
:root[data-theme="light"] .hero::before {
  background:
    linear-gradient(90deg, var(--bg) 30%, color-mix(in srgb, var(--bg) 78%, transparent) 47%, transparent 68%),
    linear-gradient(0deg, var(--bg) 0%, transparent 26%);
}
:root[data-theme="light"] .hero-media::after { background: linear-gradient(90deg, rgba(5, 7, 6, 0.55), rgba(5, 7, 6, 0.18) 45%, rgba(5, 7, 6, 0.42)); }
