:root {
  color-scheme: dark;
  --bg: #020a12;
  --bg-deep: #03131d;
  --surface: rgba(5, 27, 42, .86);
  --surface-strong: #082438;
  --surface-clear: rgba(8, 38, 58, .7);
  --line: rgba(116, 222, 242, .22);
  --line-strong: rgba(119, 237, 255, .6);
  --text: #effcff;
  --muted: #86aeb9;
  --muted-strong: #c3e4ea;
  --cyan: #73eaff;
  --cyan-soft: #c2f8ff;
  --emerald: #63dfc4;
  --emerald-soft: #a8f4e1;
  --blue: #43bdf4;
  --violet: #9aa3ff;
  --pink: #ff7cc5;
  --warning: #ffd27b;
  --danger: #ff8b9d;
  --shadow: 0 26px 90px rgba(0, 0, 0, .46);
  --glow: 0 0 34px rgba(85, 218, 247, .16);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; overflow-x: clip; background: var(--bg); }
body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background:
    radial-gradient(ellipse at 14% -8%, rgba(33, 182, 215, .24), transparent 33rem),
    radial-gradient(ellipse at 88% 20%, rgba(73, 94, 218, .14), transparent 30rem),
    linear-gradient(180deg, #03131d 0%, #020a12 58%, #02070c 100%);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  z-index: -2;
  inset: 0;
  pointer-events: none;
  opacity: .34;
  background-image:
    linear-gradient(30deg, transparent 46%, rgba(103, 224, 244, .16) 47%, transparent 48%),
    linear-gradient(150deg, transparent 46%, rgba(103, 224, 244, .11) 47%, transparent 48%),
    radial-gradient(circle at 20% 10%, rgba(122, 238, 255, .2) 0 1px, transparent 2px);
  background-size: 88px 88px, 88px 88px, 120px 120px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

body::after {
  content: "";
  position: fixed;
  z-index: 8;
  inset: 0;
  pointer-events: none;
  opacity: .055;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .2) 0 1px, transparent 1px 5px);
  mix-blend-mode: screen;
}

button, input, select { font: inherit; }
button, select, input[type="range"] { accent-color: var(--cyan); }
button { cursor: pointer; }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; opacity: .42; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 20; top: -4rem; left: 1rem; padding: .75rem 1rem; color: #021018; background: var(--cyan); font-weight: 850; text-decoration: none; clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px); }
.skip-link:focus { top: 0; }

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem clamp(1rem, 4vw, 4rem);
  border-bottom: 1px solid rgba(119, 237, 255, .22);
  background: rgba(2, 10, 18, .82);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .28), inset 0 -1px rgba(119, 237, 255, .08);
  backdrop-filter: blur(22px) saturate(130%);
}
.topbar::after { content: ""; position: absolute; right: 6%; bottom: -1px; left: 6%; height: 1px; background: linear-gradient(90deg, transparent, var(--cyan), transparent); opacity: .55; }
.brand-lockup, .topbar-actions, .action-row, .status-chip, .switch-field { display: flex; align-items: center; }
.brand-lockup { gap: .8rem; }
.brand-mark { position: relative; width: 2.8rem; height: 2.8rem; display: grid; place-items: center; border: 1px solid var(--line-strong); background: radial-gradient(circle, rgba(115, 234, 255, .2), transparent 60%), linear-gradient(135deg, rgba(34, 113, 154, .5), rgba(5, 28, 40, .85)); clip-path: polygon(22% 0, 78% 0, 100% 22%, 100% 78%, 78% 100%, 22% 100%, 0 78%, 0 22%); box-shadow: 0 0 26px rgba(69, 203, 241, .2), inset 0 0 20px rgba(118, 234, 255, .12); }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; inset: 19%; border: 1px solid rgba(167, 247, 223, .68); clip-path: inherit; }
.brand-mark::after { inset: 34%; border-color: var(--cyan); transform: rotate(45deg); }
.brand-mark span { width: .42rem; height: .42rem; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 14px var(--cyan); }
.brand-name, .brand-subtitle { margin: 0; }
.brand-name { color: var(--text); font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.brand-subtitle { color: var(--muted); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
.topbar-actions { gap: .55rem; flex-wrap: wrap; justify-content: flex-end; }
.language-picker select, .field select { min-height: 2.45rem; color: var(--text); background: rgba(6, 29, 42, .9); border: 1px solid var(--line); border-radius: 0; padding: .52rem .7rem; }
.version-chip, .status-chip, .panel-status { border: 1px solid var(--line); padding: .38rem .62rem; color: var(--muted-strong); font-size: .68rem; letter-spacing: .11em; text-transform: uppercase; white-space: nowrap; clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px); }
.status-chip { gap: .45rem; }
.status-dot { width: .45rem; height: .45rem; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 14px var(--emerald); }
.status-chip[data-state="busy"] .status-dot { background: var(--warning); box-shadow: 0 0 14px var(--warning); }
.status-chip[data-state="error"] .status-dot { background: var(--danger); box-shadow: 0 0 14px var(--danger); }

.shell { width: min(1240px, calc(100% - 2rem)); margin: 0 auto; padding: 2.2rem 0 4rem; }
.hero-panel { position: relative; display: flex; justify-content: space-between; gap: 2rem; align-items: center; min-height: 350px; overflow: hidden; padding: clamp(1.5rem, 5vw, 4.5rem); border: 1px solid rgba(122, 234, 255, .56); background: radial-gradient(circle at 78% 38%, rgba(110, 226, 255, .3), transparent 13rem), radial-gradient(circle at 45% 120%, rgba(31, 160, 181, .34), transparent 24rem), linear-gradient(125deg, rgba(3, 42, 59, .98), rgba(2, 17, 31, .78) 58%, rgba(8, 17, 44, .9)); clip-path: polygon(0 24px, 24px 0, calc(100% - 24px) 0, 100% 24px, 100% calc(100% - 24px), calc(100% - 24px) 100%, 24px 100%, 0 calc(100% - 24px)); box-shadow: var(--shadow), inset 0 0 90px rgba(44, 188, 226, .14); }
.hero-panel::before { content: ""; position: absolute; inset: -22%; opacity: .76; background-image: linear-gradient(30deg, transparent 44%, rgba(122, 234, 255, .42) 46%, transparent 49%), linear-gradient(150deg, transparent 44%, rgba(155, 163, 255, .3) 46%, transparent 49%), radial-gradient(circle, rgba(194, 248, 255, .95) 0 1.5px, transparent 2.5px); background-size: 94px 94px, 94px 94px, 128px 128px; transform: rotate(-5deg); mix-blend-mode: screen; mask-image: radial-gradient(ellipse at center, black 8%, transparent 76%); animation: field-drift 24s linear infinite; }
.hero-panel::after { content: ""; position: absolute; right: 8%; bottom: 18%; left: 8%; height: 1px; background: linear-gradient(90deg, transparent, rgba(119, 237, 255, .65), transparent); box-shadow: 0 0 18px rgba(119, 237, 255, .7); opacity: .7; }
.hero-copy { position: relative; z-index: 1; max-width: 760px; }
.eyebrow { margin: 0 0 .62rem; color: var(--cyan); font-size: .66rem; font-weight: 850; letter-spacing: .2em; text-shadow: 0 0 14px rgba(115, 234, 255, .45); }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 760px; margin-bottom: 1.1rem; color: #f5feff; font-size: clamp(2.9rem, 7vw, 6.4rem); font-weight: 820; line-height: .91; letter-spacing: -.075em; text-shadow: 0 0 38px rgba(109, 227, 255, .18); }
h2 { margin-bottom: .35rem; font-size: clamp(1.45rem, 2.8vw, 2.15rem); font-weight: 780; letter-spacing: -.035em; }
h3 { margin-bottom: .3rem; font-size: 1.02rem; }
.hero-lede { max-width: 620px; margin-bottom: 0; color: var(--muted-strong); font-size: 1.03rem; }
.hero-octagon { width: clamp(140px, 19vw, 235px); aspect-ratio: 1; display: grid; place-items: center; position: relative; z-index: 1; flex: 0 0 auto; border: 1px solid var(--line-strong); clip-path: polygon(25% 0, 75% 0, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0 75%, 0 25%); color: var(--cyan-soft); background: radial-gradient(circle, rgba(115, 234, 255, .25), transparent 44%), radial-gradient(circle, rgba(100, 230, 194, .14), transparent 68%), rgba(3, 20, 31, .76); box-shadow: 0 0 45px rgba(71, 203, 244, .2), inset 0 0 36px rgba(115, 234, 255, .12); }
.hero-octagon::before { content: ""; position: absolute; inset: 12%; border: 1px solid rgba(167, 247, 223, .65); clip-path: inherit; transform: rotate(45deg); }
.hero-octagon::after { content: ""; position: absolute; inset: 4%; border: 1px solid rgba(115, 234, 255, .3); clip-path: inherit; transform: rotate(-45deg); }
.hero-octagon-line { position: absolute; inset: 24%; border: 1px solid var(--cyan); clip-path: inherit; box-shadow: 0 0 18px rgba(115, 234, 255, .5); }
.hero-octagon-core { position: relative; z-index: 1; font-size: 1rem; font-weight: 850; letter-spacing: .28em; margin-left: .28em; text-shadow: 0 0 16px var(--cyan); }

.panel, .panel-inner, .tab-panel { position: relative; margin-top: 1rem; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(6, 29, 41, .88), rgba(3, 15, 24, .88)); box-shadow: 0 16px 54px rgba(0, 0, 0, .2), inset 0 1px rgba(194, 248, 255, .045); clip-path: polygon(0 13px, 13px 0, calc(100% - 13px) 0, 100% 13px, 100% calc(100% - 13px), calc(100% - 13px) 100%, 13px 100%, 0 calc(100% - 13px)); }
.panel::before, .panel-inner::before, .tab-panel::before { content: ""; position: absolute; top: 0; right: 10%; left: 10%; height: 1px; background: linear-gradient(90deg, transparent, rgba(115, 234, 255, .62), transparent); opacity: .8; }
.panel { padding: 1.15rem; }
.panel-inner { padding: 1rem; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.section-heading.compact { align-items: center; }
.section-heading > * { min-width: 0; }
.section-heading h2 { margin-bottom: 0; }
.tab-panel { padding: clamp(1.1rem, 3vw, 2.2rem); }
.tab-nav { display: flex; gap: .45rem; padding: .7rem; overflow-x: auto; scrollbar-width: thin; }
.tab-button { position: relative; flex: 0 0 auto; border: 1px solid transparent; padding: .72rem .92rem; color: var(--muted); background: transparent; font-size: .7rem; font-weight: 780; letter-spacing: .12em; text-transform: uppercase; clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px); }
.tab-button:hover { color: var(--cyan-soft); background: rgba(115, 234, 255, .08); }
.tab-button.is-active { color: #03121a; background: linear-gradient(110deg, #b7f8ff, var(--blue)); font-weight: 850; box-shadow: 0 0 24px rgba(115, 234, 255, .3); }
.panel-status { color: var(--cyan-soft); }

.button { min-height: 2.55rem; border: 1px solid var(--line); padding: .58rem .9rem; color: var(--text); background: linear-gradient(135deg, rgba(13, 54, 69, .9), rgba(5, 25, 36, .9)); font-weight: 760; clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover:not(:disabled) { border-color: var(--line-strong); background: linear-gradient(135deg, rgba(20, 83, 103, .94), rgba(6, 30, 43, .94)); box-shadow: 0 0 22px rgba(73, 205, 242, .16); transform: translateY(-2px); }
.button.primary { color: #03131a; background: linear-gradient(110deg, #b7f8ff, var(--blue)); border-color: var(--cyan); box-shadow: 0 0 22px rgba(115, 234, 255, .24); }
.button.danger { color: #210811; background: linear-gradient(110deg, #ff9cad, var(--pink)); border-color: var(--danger); }
.button.quiet { background: rgba(5, 25, 36, .36); }
.action-row { gap: .55rem; flex-wrap: wrap; }
.device-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; }
.device-card { position: relative; display: flex; justify-content: space-between; gap: .8rem; align-items: center; min-height: 86px; padding: .9rem; border: 1px solid var(--line); background: linear-gradient(120deg, rgba(9, 44, 58, .65), rgba(3, 17, 27, .82)); clip-path: polygon(0 11px, 11px 0, calc(100% - 11px) 0, 100% 11px, 100% calc(100% - 11px), calc(100% - 11px) 100%, 11px 100%, 0 calc(100% - 11px)); }
.device-card[data-active="true"] { border-color: var(--cyan); box-shadow: inset 3px 0 var(--cyan), 0 0 22px rgba(65, 203, 242, .14); }
.device-name, .device-meta { margin: 0; }
.device-name { color: var(--cyan-soft); font-weight: 820; }
.device-meta { color: var(--muted); font-size: .78rem; }
.empty-state { position: relative; padding: 2.4rem 1rem; text-align: center; border: 1px dashed rgba(115, 234, 255, .32); background: radial-gradient(circle, rgba(49, 174, 207, .1), transparent 55%); }
.empty-glyph, .feature-glyph, .callout-icon { color: var(--cyan); font-size: 1.8rem; text-shadow: 0 0 20px rgba(115, 234, 255, .6); }
.empty-title { margin-bottom: .2rem; font-weight: 820; }
.empty-copy, .metric-note, .feature-card p, .settings-card p, .notice, .firmware-current span, .log-preview { color: var(--muted); }
.empty-copy { margin-bottom: 0; font-size: .9rem; }
.notice { display: flex; gap: .65rem; align-items: flex-start; margin: 1rem 0; padding: .85rem .95rem; border: 1px solid var(--line); border-left: 3px solid var(--cyan); background: rgba(57, 185, 218, .08); clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.notice strong { color: var(--text); }
.notice.warning { border-left-color: var(--warning); background: rgba(255, 210, 123, .08); }
.notice.warning strong { color: var(--warning); }

.overview-grid, .settings-grid, .feature-grid, .diagnostic-grid, .backup-grid { display: grid; gap: .85rem; }
.overview-grid { grid-template-columns: repeat(3, 1fr); }
.metric-card, .feature-card, .settings-card, .diagnostic-card { position: relative; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(140deg, rgba(7, 36, 49, .72), rgba(3, 16, 25, .8)); }
.metric-card::after, .feature-card::after, .settings-card::after, .diagnostic-card::after { content: ""; position: absolute; right: -20%; bottom: 10%; width: 70%; height: 1px; background: linear-gradient(90deg, transparent, rgba(115, 234, 255, .3), transparent); transform: rotate(-18deg); }
.metric-card { padding: 1.15rem; min-height: 142px; }
.metric-label { color: var(--muted); font-size: .7rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.metric-value { margin: 1.35rem 0 .2rem; color: var(--cyan-soft); font-size: 1.9rem; font-weight: 860; text-shadow: 0 0 22px rgba(115, 234, 255, .28); }
.metric-note { margin: 0; font-size: .82rem; }
.octagon-card { clip-path: polygon(0 13px, 13px 0, calc(100% - 13px) 0, 100% 13px, 100% calc(100% - 13px), calc(100% - 13px) 100%, 13px 100%, 0 calc(100% - 13px)); }
.callout { display: flex; gap: .8rem; margin-top: .85rem; padding: 1rem; border: 1px solid rgba(100, 230, 194, .5); background: linear-gradient(90deg, rgba(100, 230, 194, .13), rgba(58, 169, 204, .04)); clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.callout h3 { margin-bottom: .2rem; }
.callout p { margin: 0; color: var(--muted-strong); }
.callout.emerald { background: linear-gradient(90deg, rgba(100, 230, 194, .14), rgba(73, 189, 244, .04)); }

.settings-grid { grid-template-columns: repeat(2, 1fr); }
.settings-card { padding: 1.1rem; }
.card-heading { display: flex; gap: .7rem; align-items: flex-start; margin-bottom: 1rem; }
.card-heading p { margin-bottom: 0; font-size: .82rem; }
.card-kicker { color: var(--cyan); font-size: .7rem; font-weight: 850; letter-spacing: .12em; }
.field { display: grid; grid-template-columns: 1fr auto; gap: .4rem .8rem; align-items: center; margin-top: 1rem; }
.field-label { color: var(--muted-strong); font-size: .88rem; }
.field-value { color: var(--cyan-soft); font-variant-numeric: tabular-nums; font-size: .84rem; }
.field input[type="range"] { grid-column: 1 / -1; width: 100%; height: .4rem; accent-color: var(--cyan); }
.field select { width: 100%; }
.switch-field { gap: .7rem; margin-top: 1rem; position: relative; }
.switch-field input { position: absolute; opacity: 0; }
.switch-ui { width: 2.55rem; height: 1.4rem; flex: 0 0 auto; border: 1px solid var(--line-strong); background: #061823; position: relative; clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px); }
.switch-ui::after { content: ""; position: absolute; top: .23rem; left: .23rem; width: .8rem; height: .8rem; border-radius: 50%; background: var(--muted); transition: transform .18s ease, background .18s ease; }
.switch-field input:checked + .switch-ui { background: rgba(100, 230, 194, .25); }
.switch-field input:checked + .switch-ui::after { transform: translateX(1.1rem); background: var(--emerald); box-shadow: 0 0 12px var(--emerald); }
.action-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.action-bar p { margin: 0; color: var(--muted); }

.feature-grid, .backup-grid { grid-template-columns: repeat(3, 1fr); }
.feature-card { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; padding: 1.15rem; min-height: 218px; }
.feature-card h3, .feature-card p { margin-bottom: 0; }
.feature-card p { flex: 1; font-size: .9rem; }
.diagnostic-grid { grid-template-columns: repeat(4, 1fr); }
.diagnostic-card { display: flex; flex-direction: column; gap: 1.5rem; padding: 1.1rem; }
.diagnostic-card span { color: var(--muted); font-size: .8rem; }
.diagnostic-card strong { color: var(--cyan-soft); text-shadow: 0 0 16px rgba(115, 234, 255, .28); }
.log-preview, .log-view { min-height: 90px; padding: .95rem; border: 1px solid var(--line); background: rgba(1, 10, 17, .9); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .82rem; white-space: pre-wrap; }
.firmware-panel { display: grid; grid-template-columns: .8fr 1.2fr; gap: 1rem; align-items: stretch; }
.firmware-current { display: flex; flex-direction: column; justify-content: center; gap: .35rem; padding: 1.1rem; border: 1px solid var(--line); background: radial-gradient(circle at 50% 0, rgba(115, 234, 255, .12), transparent 60%); }
.firmware-current strong { color: var(--cyan-soft); font-size: 2rem; text-shadow: 0 0 20px rgba(115, 234, 255, .3); }
.file-drop { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .5rem; min-height: 170px; padding: 1rem; border: 1px dashed var(--line-strong); background: rgba(20, 88, 108, .08); text-align: center; cursor: pointer; clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px); }
.file-drop:hover { background: rgba(115, 234, 255, .1); box-shadow: inset 0 0 28px rgba(115, 234, 255, .08); }
.file-drop input, .file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-icon { color: var(--cyan); font-size: 2rem; text-shadow: 0 0 20px var(--cyan); }
.verification-result { grid-column: 1 / -1; padding: .9rem; border: 1px solid var(--line); color: var(--muted-strong); }
.file-button { display: inline-flex; align-items: center; position: relative; }
.footer { display: flex; justify-content: center; gap: .5rem; flex-wrap: wrap; padding: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }
.confirm-dialog { width: min(480px, calc(100% - 2rem)); padding: 0; border: 1px solid var(--line-strong); color: var(--text); background: linear-gradient(140deg, #092536, #03111b); box-shadow: var(--shadow), 0 0 40px rgba(115, 234, 255, .14); clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px), 0 14px); }
.confirm-dialog::backdrop { background: rgba(0, 5, 10, .78); backdrop-filter: blur(8px); }
.dialog-card { padding: 1.4rem; }
.dialog-card h2 { margin-bottom: .8rem; }

@keyframes field-drift { from { transform: rotate(-5deg) translate3d(0, 0, 0); } to { transform: rotate(-5deg) translate3d(44px, 20px, 0); } }

@media (max-width: 820px) { .hero-panel { align-items: flex-start; } .hero-octagon { width: 130px; } .overview-grid, .feature-grid, .backup-grid, .diagnostic-grid { grid-template-columns: repeat(2, 1fr); } .firmware-panel { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .topbar { align-items: flex-start; flex-direction: column; } .topbar-actions { width: 100%; justify-content: flex-start; } .hero-panel { min-height: 0; flex-direction: column; } .hero-octagon { align-self: flex-end; } .section-heading, .action-bar { align-items: flex-start; flex-direction: column; } .settings-grid, .overview-grid, .feature-grid, .backup-grid, .diagnostic-grid { grid-template-columns: 1fr; } .tab-button { padding-inline: .68rem; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }

/* Cinematic landing layer: the application stays functional underneath it. */
.hero-panel {
  --hero-copy-x: 0px;
  --hero-copy-y: 0px;
  --hero-image-x: 0px;
  --hero-image-y: 0px;
  --hero-scroll-copy-y: 0px;
  --hero-scroll-image-y: 0px;
  --hero-copy-opacity: 1;
  width: 100vw;
  min-height: max(760px, calc(100svh - 3.5rem));
  margin-left: calc((100% - 100vw) / 2);
  padding: 0;
  display: block;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  clip-path: none;
  background: #031017;
  box-shadow: none;
  isolation: isolate;
}

.hero-panel::before,
.hero-panel::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  content: "";
  pointer-events: none;
}

.hero-panel::before {
  background:
    radial-gradient(500px circle at var(--hero-pointer-x, 50%) var(--hero-pointer-y, 42%), rgba(131, 233, 223, .13), transparent 70%),
    linear-gradient(90deg, rgba(3, 16, 23, .16), transparent 45%, rgba(3, 16, 23, .12));
  mix-blend-mode: screen;
  opacity: .86;
  transition: background 180ms ease-out;
}

.hero-panel::after {
  background:
    linear-gradient(90deg, rgba(3, 16, 23, .98) 0%, rgba(3, 16, 23, .82) 22%, rgba(3, 16, 23, .2) 56%, rgba(3, 16, 23, .34) 100%),
    linear-gradient(180deg, rgba(3, 16, 23, .34), transparent 22%, transparent 72%, rgba(3, 16, 23, .88));
  z-index: 1;
}

.hero-media {
  position: absolute;
  z-index: 0;
  inset: -2%;
  overflow: hidden;
  background: #031017;
}

.hero-media::before {
  position: absolute;
  z-index: 2;
  inset: 0;
  background: radial-gradient(circle at 70% 46%, transparent 0 18%, rgba(3, 16, 23, .08) 42%, rgba(3, 16, 23, .48) 100%);
  content: "";
  pointer-events: none;
}

.hero-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  filter: saturate(.8) contrast(1.14) brightness(.62);
  transform: translate3d(var(--hero-image-x), calc(var(--hero-image-y) + var(--hero-scroll-image-y)), 0) scale(1.08);
  transition: opacity 1500ms cubic-bezier(.16, 1, .3, 1), transform 7000ms cubic-bezier(.16, 1, .3, 1), filter 1500ms ease;
  will-change: opacity, transform, filter;
}

.hero-scene.is-active {
  opacity: 1;
  filter: saturate(1.08) contrast(1.08) brightness(.88);
  transform: translate3d(var(--hero-image-x), calc(var(--hero-image-y) + var(--hero-scroll-image-y)), 0) scale(1.025);
}

.hero-media-grid {
  position: absolute;
  z-index: 3;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 49.94%, rgba(131, 233, 223, .18) 50%, transparent 50.06%),
    repeating-linear-gradient(90deg, transparent 0 140px, rgba(131, 233, 223, .055) 141px, transparent 142px),
    repeating-linear-gradient(0deg, transparent 0 74px, rgba(131, 233, 223, .04) 75px, transparent 76px);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .72), transparent 76%);
  opacity: .32;
  animation: hero-grid-drift 18s linear infinite;
  pointer-events: none;
}

.hero-media-scanline {
  position: absolute;
  z-index: 4;
  top: -20%;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(131, 233, 223, .7), transparent);
  box-shadow: 0 0 18px rgba(131, 233, 223, .72);
  opacity: .58;
  animation: hero-media-sweep 8s linear infinite;
  pointer-events: none;
}

.hero-copy {
  position: absolute;
  z-index: 5;
  top: clamp(170px, 25vh, 250px);
  left: clamp(34px, 12vw, 220px);
  max-width: 670px;
  transform: translate3d(var(--hero-copy-x), calc(var(--hero-copy-y) + var(--hero-scroll-copy-y)), 0);
  opacity: var(--hero-copy-opacity);
  transition: transform 650ms cubic-bezier(.16, 1, .3, 1), opacity 360ms ease-out;
}

.hero-kicker-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.1rem;
}

.hero-kicker-row .eyebrow {
  margin-bottom: 0;
}

.hero-live {
  display: inline-flex;
  align-items: center;
  gap: .48rem;
  color: var(--muted-strong);
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero-live-dot {
  width: .42rem;
  height: .42rem;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 5px rgba(82, 214, 168, .09), 0 0 16px var(--emerald);
  animation: hero-signal-pulse 2.8s ease-in-out infinite;
}

.hero-copy h1 {
  max-width: 680px;
  margin: 2rem 0 1.45rem;
  color: #f2fbf8;
  font-size: clamp(5.2rem, 8.4vw, 9.5rem);
  font-weight: 760;
  line-height: .84;
  letter-spacing: -.1em;
  text-shadow: 0 14px 52px rgba(0, 0, 0, .42), 0 0 34px rgba(131, 233, 223, .12);
}

.hero-lede {
  max-width: 520px;
  margin-bottom: 0;
  color: rgba(226, 244, 239, .8);
  font-size: 1.08rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 2rem;
}

.hero-cta {
  --magnetic-x: 0px;
  --magnetic-y: 0px;
  display: inline-flex;
  min-height: 2.9rem;
  align-items: center;
  justify-content: center;
  gap: .9rem;
  padding: 0 1.05rem;
  border: 1px solid rgba(131, 233, 223, .42);
  border-radius: 9px;
  color: var(--text);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
  transform: translate3d(var(--magnetic-x), var(--magnetic-y), 0);
  transition: transform 360ms cubic-bezier(.16, 1, .3, 1), border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
  will-change: transform;
}

.hero-cta:hover {
  transform: translate3d(var(--magnetic-x), var(--magnetic-y), 0) translateY(-2px);
}

.hero-cta span:last-child {
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 0;
}

.hero-cta-primary {
  border-color: #a6efd8;
  color: #061613;
  background: linear-gradient(110deg, #c1f4df, #68d9c0);
  box-shadow: 0 14px 34px rgba(82, 214, 168, .16);
}

.hero-cta-secondary {
  background: rgba(5, 20, 23, .52);
  color: var(--muted-strong);
}

.hero-cta-secondary:hover {
  border-color: var(--cyan);
  background: rgba(131, 233, 223, .1);
  color: var(--text);
}

.hero-rail {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: clamp(15px, 4vw, 58px);
  display: grid;
  justify-items: center;
  gap: .75rem;
  color: rgba(140, 169, 167, .68);
  font-size: .56rem;
  font-weight: 800;
  letter-spacing: .2em;
  line-height: 1;
  writing-mode: vertical-rl;
  text-transform: uppercase;
  transform: translateY(-50%) rotate(180deg);
}

.hero-rail-line {
  width: 1px;
  height: 76px;
  background: linear-gradient(180deg, transparent, var(--emerald), transparent);
  box-shadow: 0 0 14px rgba(82, 214, 168, .52);
}

.hero-scene-index,
.hero-scroll-cue {
  position: absolute;
  z-index: 5;
  bottom: 42px;
  display: flex;
  align-items: baseline;
  gap: .68rem;
  color: rgba(140, 169, 167, .76);
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .2em;
  line-height: 1;
  text-transform: uppercase;
  pointer-events: none;
}

.hero-scene-index {
  left: clamp(34px, 12vw, 220px);
}

.hero-scene-index strong {
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -.04em;
}

.hero-scroll-cue {
  right: clamp(28px, 7vw, 110px);
  gap: .8rem;
}

.hero-scroll-line {
  position: relative;
  display: block;
  width: 74px;
  height: 1px;
  overflow: hidden;
  background: rgba(131, 233, 223, .3);
}

.hero-scroll-line::after {
  position: absolute;
  top: 0;
  left: -35%;
  width: 35%;
  height: 100%;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(131, 233, 223, .9);
  content: "";
  animation: hero-scroll-line 2.8s ease-in-out infinite;
}

.hero-octagon {
  display: none;
}

.device-strip {
  position: relative;
  z-index: 6;
  margin-top: 1.4rem;
}

[data-magnetic] {
  --magnetic-x: 0px;
  --magnetic-y: 0px;
}

@keyframes hero-media-sweep {
  0% { transform: translateY(-10vh); opacity: 0; }
  12%, 78% { opacity: .7; }
  100% { transform: translateY(120vh); opacity: 0; }
}

@keyframes hero-signal-pulse {
  0%, 100% { opacity: .75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.18); }
}

@keyframes hero-scroll-line {
  0% { left: -35%; }
  58%, 100% { left: 100%; }
}

@media (max-width: 820px) {
  .hero-panel {
    min-height: 700px;
  }

  .hero-copy {
    top: 145px;
    left: 8vw;
    max-width: min(680px, 84vw);
  }

  .hero-copy h1 {
    font-size: clamp(4.4rem, 11vw, 7.6rem);
  }

  .hero-rail {
    display: none;
  }

  .hero-scene-index {
    left: 8vw;
  }
}

@media (max-width: 620px) {
  .hero-panel {
    min-height: 650px;
  }

  .hero-copy {
    top: 122px;
    left: 1.25rem;
    max-width: calc(100% - 2.5rem);
  }

  .hero-copy h1 {
    margin-top: 1.45rem;
    font-size: clamp(3.55rem, 15vw, 5rem);
  }

  .hero-lede {
    font-size: .95rem;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-cta {
    flex: 1;
  }

  .hero-scene-index {
    left: 1.25rem;
    bottom: 28px;
  }

  .hero-scroll-cue {
    right: 1.25rem;
    bottom: 28px;
  }
}

/* 0.24 editorial landing: a long-form system story around the working app. */
:root {
  --ink: #061313;
  --paper: #dfe9e2;
  --paper-soft: #cbd9d0;
  --acid: #b4f5d9;
  --landing-line: rgba(170, 224, 207, .22);
}

html {
  scroll-behavior: smooth;
  background: #030908;
}

body {
  background:
    radial-gradient(circle at 78% 0%, rgba(55, 137, 111, .14), transparent 28rem),
    linear-gradient(180deg, #030b0d 0%, #061014 42%, #030809 100%);
}

.topbar {
  position: absolute;
  z-index: 20;
  top: 28px;
  left: 50%;
  width: min(1100px, calc(100% - 5rem));
  min-height: 72px;
  padding: .72rem .78rem .72rem 1.1rem;
  transform: translateX(-50%);
  border: 1px solid rgba(225, 245, 235, .22);
  border-radius: 18px;
  background: rgba(8, 18, 19, .48);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .24), inset 0 1px rgba(255, 255, 255, .08);
  backdrop-filter: blur(24px) saturate(125%);
  transition: background .35s ease, border-color .35s ease, box-shadow .35s ease;
}

.topbar.is-scrolled {
  position: fixed;
  top: 16px;
  background: rgba(5, 14, 15, .84);
  border-color: rgba(180, 245, 217, .32);
  box-shadow: 0 16px 56px rgba(0, 0, 0, .4), 0 0 34px rgba(83, 214, 168, .06);
}

.brand-lockup {
  flex: 0 0 auto;
  color: inherit;
  text-decoration: none;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 1.45rem;
  margin-inline: auto;
}

.topbar-nav a {
  position: relative;
  color: rgba(226, 244, 239, .72);
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color .2s ease;
}

.topbar-nav a::after {
  position: absolute;
  right: 0;
  bottom: -.55rem;
  left: 0;
  height: 1px;
  content: "";
  background: var(--acid);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .25s ease;
}

.topbar-nav a:hover,
.topbar-nav a.is-active {
  color: var(--text);
}

.topbar-nav a:hover::after,
.topbar-nav a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.topbar-actions {
  flex: 0 0 auto;
}

.language-picker select {
  width: 94px;
  min-width: 94px;
  color: var(--text);
}

.page-progress {
  position: fixed;
  z-index: 30;
  top: 50%;
  right: 20px;
  width: 2px;
  height: 112px;
  overflow: hidden;
  background: rgba(203, 240, 222, .18);
  transform: translateY(-50%);
  pointer-events: none;
}

.page-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--acid);
  box-shadow: 0 0 12px var(--acid);
  transform: scaleY(0);
  transform-origin: top;
}

.shell {
  width: 100%;
  margin: 0;
  padding: 0 0 8rem;
}

.hero-panel {
  width: 100%;
  min-height: max(800px, 100svh);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}

.hero-panel::after {
  background:
    linear-gradient(90deg, rgba(2, 11, 13, .96) 0%, rgba(2, 11, 13, .72) 24%, rgba(2, 11, 13, .04) 62%, rgba(2, 11, 13, .32) 100%),
    linear-gradient(180deg, rgba(2, 11, 13, .22), transparent 28%, transparent 60%, rgba(2, 11, 13, .92) 100%);
}

.hero-media {
  inset: 0;
}

.hero-scene {
  object-position: center 56%;
  filter: saturate(.8) contrast(1.18) brightness(.54);
}

.hero-scene.is-active {
  filter: saturate(1.12) contrast(1.08) brightness(.82);
}

.hero-copy {
  top: clamp(230px, 35vh, 350px);
  left: clamp(7vw, 11vw, 165px);
  max-width: 760px;
}

.hero-copy h1 {
  max-width: 760px;
  margin-top: 1.6rem;
  font-size: clamp(5.5rem, 9.7vw, 10.6rem);
  line-height: .79;
  letter-spacing: -.105em;
}

.hero-lede {
  max-width: 470px;
  font-size: 1rem;
}

.hero-actions {
  margin-top: 2.35rem;
}

.hero-scene-index {
  left: clamp(7vw, 11vw, 165px);
}

.hero-scroll-cue {
  right: clamp(7vw, 11vw, 165px);
}

.section-overline,
.story-card-kicker {
  margin: 0 0 1.1rem;
  color: var(--cyan);
  font-size: .62rem;
  font-weight: 850;
  letter-spacing: .2em;
  line-height: 1.25;
  text-transform: uppercase;
}

[data-reveal] {
  transition: opacity .9s cubic-bezier(.16, 1, .3, 1), transform .9s cubic-bezier(.16, 1, .3, 1);
}

.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(34px);
}

.reveal-ready [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.story-intro {
  position: relative;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) minmax(330px, .78fr);
  gap: clamp(2rem, 6vw, 7rem);
  align-items: center;
  width: min(1180px, calc(100% - 6rem));
  min-height: 770px;
  margin: 0 auto;
  padding: 10rem 0 8rem;
}

.story-intro::before {
  position: absolute;
  inset: 17% -10% 12%;
  content: "";
  background: radial-gradient(ellipse at 70% 50%, rgba(55, 150, 117, .16), transparent 58%);
  pointer-events: none;
}

.story-intro::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--landing-line), transparent);
}

.story-intro-index,
.workspace-intro-index {
  display: grid;
  justify-items: center;
  gap: .85rem;
  color: rgba(154, 190, 177, .58);
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .16em;
  line-height: 1;
  writing-mode: vertical-rl;
}

.story-intro-index span:first-child {
  color: var(--acid);
  font-size: 1.1rem;
}

.story-intro-index-line {
  width: 1px;
  height: 86px;
  background: linear-gradient(180deg, var(--acid), transparent);
}

.story-intro-copy {
  position: relative;
  z-index: 1;
}

.story-intro-copy h2,
.system-story-heading h2,
.workspace-intro h2,
.closing-panel h2 {
  max-width: 760px;
  margin: 0;
  color: #eff9f4;
  font-size: clamp(4.2rem, 7.7vw, 8.4rem);
  font-weight: 540;
  line-height: .86;
  letter-spacing: -.095em;
}

.story-intro-copy h2 em,
.closing-panel h2 em {
  color: var(--acid);
  font-style: normal;
}

.story-intro-lede {
  max-width: 500px;
  margin: 2.2rem 0 2rem;
  color: rgba(213, 235, 225, .68);
  font-size: 1.08rem;
  line-height: 1.72;
}

.text-link,
.capability-row a,
.story-card a {
  color: var(--acid);
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .13em;
  text-decoration: none;
  text-transform: uppercase;
}

.text-link span,
.story-card a span {
  display: inline-block;
  margin-left: .5rem;
  font-size: 1rem;
  font-weight: 400;
  transition: transform .25s ease;
}

.text-link:hover span,
.story-card a:hover span {
  transform: translate(4px, -4px);
}

.story-intro-diagram {
  position: relative;
  justify-self: end;
  width: min(100%, 480px);
  aspect-ratio: 1;
  border: 1px solid rgba(171, 231, 209, .22);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(85, 199, 159, .14), transparent 39%), radial-gradient(circle, transparent 53%, rgba(118, 214, 182, .05) 53.2%, transparent 53.7%);
  box-shadow: inset 0 0 70px rgba(74, 194, 151, .08), 0 0 90px rgba(51, 166, 126, .06);
}

.story-intro-diagram::before,
.story-intro-diagram::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.story-intro-diagram::before {
  inset: 11%;
  border: 1px dashed rgba(174, 233, 211, .24);
  border-radius: 50%;
  animation: orbit-spin 26s linear infinite;
}

.story-intro-diagram::after {
  inset: 27%;
  border: 1px solid rgba(174, 233, 211, .16);
  border-radius: 50%;
}

.diagram-orbit {
  position: absolute;
  inset: 20%;
  border: 1px solid rgba(175, 239, 214, .24);
  border-radius: 50%;
}

.diagram-orbit::before,
.diagram-orbit::after {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  content: "";
  background: var(--acid);
  box-shadow: 0 0 18px var(--acid);
}

.diagram-orbit::before { top: -3px; left: 23%; }
.diagram-orbit::after { right: 12%; bottom: 15%; }
.diagram-orbit-inner { inset: 36%; border-style: dashed; animation: orbit-spin-reverse 18s linear infinite; }

.diagram-core {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 108px;
  height: 108px;
  place-content: center;
  gap: .32rem;
  border: 1px solid rgba(180, 245, 217, .8);
  border-radius: 50%;
  color: var(--acid);
  background: #071614;
  box-shadow: 0 0 42px rgba(116, 234, 191, .24), inset 0 0 22px rgba(180, 245, 217, .1);
  text-align: center;
  transform: translate(-50%, -50%);
}

.diagram-core span { font-size: 1.55rem; font-weight: 800; letter-spacing: .12em; }
.diagram-core small { color: rgba(214, 241, 229, .55); font-size: .52rem; font-weight: 800; letter-spacing: .2em; }

.diagram-node {
  position: absolute;
  display: grid;
  gap: .3rem;
  color: rgba(207, 237, 224, .62);
  font-size: .52rem;
  font-weight: 800;
  letter-spacing: .18em;
  line-height: 1;
  text-transform: uppercase;
}

.diagram-node span { color: var(--acid); font-size: .65rem; }
.diagram-node-bridge { top: 17%; left: 13%; }
.diagram-node-controller { top: 73%; left: 18%; }
.diagram-node-firmware { top: 37%; right: 9%; }

.diagram-crosshair { position: absolute; background: rgba(180, 245, 217, .3); }
.diagram-crosshair-one { top: 50%; right: -12%; left: -12%; height: 1px; }
.diagram-crosshair-two { top: -12%; bottom: -12%; left: 50%; width: 1px; }

.signal-marquee {
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(180, 245, 217, .18);
  border-bottom: 1px solid rgba(180, 245, 217, .18);
  background: #091917;
}

.signal-marquee-track {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 2.5rem;
  min-height: 100px;
  padding: 0 2.5rem;
  color: rgba(204, 239, 223, .72);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .22em;
  white-space: nowrap;
  animation: marquee-drift 32s linear infinite;
}

.signal-marquee-track i { color: var(--acid); font-size: .42rem; font-style: normal; }

.capability-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, .95fr);
  gap: clamp(4rem, 9vw, 10rem);
  align-items: center;
  min-height: 880px;
  padding: 9rem max(3rem, calc((100% - 1180px) / 2));
  color: var(--ink);
  background: var(--paper);
}

.capability-visual {
  position: relative;
  aspect-ratio: 1.08;
  overflow: hidden;
  border: 1px solid rgba(6, 19, 19, .2);
  background: #112423;
  box-shadow: 28px 32px 0 rgba(9, 34, 28, .1);
}

.capability-visual::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  background: linear-gradient(145deg, rgba(217, 245, 228, .12), transparent 35%, rgba(3, 12, 13, .42));
  mix-blend-mode: screen;
  pointer-events: none;
}

.capability-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.72) contrast(1.16) brightness(.8);
  transform: scale(1.04);
  transition: transform 1.2s cubic-bezier(.16, 1, .3, 1), filter 1.2s ease;
}

.capability-visual:hover img { filter: saturate(1) contrast(1.1) brightness(.94); transform: scale(1.1); }

.visual-label {
  position: absolute;
  z-index: 2;
  color: rgba(223, 247, 233, .72);
  font-size: .57rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.visual-label-top { top: 1.4rem; left: 1.5rem; }
.visual-label-bottom { right: 1.5rem; bottom: 1.4rem; }
.visual-label-bottom b { display: inline-block; width: 6px; height: 6px; margin-left: .45rem; border-radius: 50%; background: var(--acid); box-shadow: 0 0 14px var(--acid); }
.visual-corner { position: absolute; z-index: 2; width: 26px; height: 26px; border-color: var(--acid); }
.visual-corner-tl { top: .9rem; left: .9rem; border-top: 1px solid; border-left: 1px solid; }
.visual-corner-br { right: .9rem; bottom: .9rem; border-right: 1px solid; border-bottom: 1px solid; }

.capability-copy { max-width: 550px; }
.capability-copy .section-overline { color: #29745d; }
.capability-copy h2 { margin: 0; color: var(--ink); font-size: clamp(3.7rem, 6.4vw, 7.3rem); font-weight: 540; line-height: .86; letter-spacing: -.09em; }
.capability-copy > p:not(.section-overline) { max-width: 460px; margin: 2rem 0 2.6rem; color: rgba(6, 19, 19, .66); font-size: 1.03rem; line-height: 1.7; }
.capability-list { border-top: 1px solid rgba(6, 19, 19, .22); }
.capability-row { display: grid; grid-template-columns: 42px minmax(100px, .8fr) 1fr 20px; gap: .75rem; align-items: center; min-height: 72px; border-bottom: 1px solid rgba(6, 19, 19, .22); color: var(--ink); text-decoration: none; transition: padding .3s ease, background .3s ease; }
.capability-row:hover { padding-inline: .75rem; background: rgba(255, 255, 255, .34); }
.capability-row > span { color: #29745d; font-size: .65rem; font-weight: 850; letter-spacing: .13em; }
.capability-row strong { font-size: .9rem; letter-spacing: -.02em; }
.capability-row small { color: rgba(6, 19, 19, .54); font-size: .8rem; }
.capability-row b { color: #29745d; font-size: 1.1rem; font-weight: 400; text-align: right; }

.system-story {
  width: min(1180px, calc(100% - 6rem));
  min-height: 1050px;
  margin: 0 auto;
  padding: 10rem 0 9rem;
}

.system-story-heading { display: flex; justify-content: space-between; gap: 3rem; align-items: flex-end; margin-bottom: 5.5rem; }
.system-story-heading .section-overline { max-width: 180px; margin: 0; }
.system-story-heading h2 { max-width: 790px; }

.system-story-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border-top: 1px solid var(--landing-line); border-bottom: 1px solid var(--landing-line); }
.story-card { position: relative; display: flex; min-height: 610px; flex-direction: column; justify-content: space-between; gap: 2rem; padding: 1.8rem 1.6rem 2rem; border-right: 1px solid var(--landing-line); transition: background .4s ease, transform .4s cubic-bezier(.16, 1, .3, 1); }
.story-card:last-child { border-right: 0; }
.story-card:hover { z-index: 1; background: rgba(122, 221, 181, .06); transform: translateY(-10px); }
.story-card-number { color: var(--acid); font-size: .68rem; font-weight: 850; letter-spacing: .16em; }
.story-card-art { position: relative; display: grid; place-items: center; min-height: 230px; overflow: hidden; border: 1px solid rgba(179, 240, 215, .16); background: radial-gradient(circle, rgba(126, 229, 184, .18), transparent 38%), #0b1a1b; }
.story-card-art::before { position: absolute; inset: 13%; border: 1px solid rgba(181, 239, 215, .24); content: ""; transform: rotate(45deg); }
.story-card-art::after { position: absolute; inset: 0; content: ""; background: repeating-linear-gradient(90deg, transparent 0 44px, rgba(180, 245, 217, .06) 45px, transparent 46px); mask-image: linear-gradient(180deg, black, transparent); }
.story-card-art span, .story-card-art i, .story-card-art b { position: absolute; display: block; border: 1px solid var(--acid); box-shadow: 0 0 24px rgba(180, 245, 217, .28); }
.story-card-art span { width: 76px; height: 76px; transform: rotate(45deg); }
.story-card-art i { width: 118px; height: 1px; border: 0; background: var(--acid); box-shadow: 0 0 12px var(--acid); transform: rotate(-22deg); }
.story-card-art b { width: 10px; height: 10px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 18px var(--acid); }
.story-card-art-input { background: radial-gradient(circle at 70% 35%, rgba(72, 169, 220, .22), transparent 42%), #09141d; }
.story-card-art-input span { width: 94px; height: 94px; border-radius: 50%; transform: none; border-style: dashed; animation: orbit-spin 18s linear infinite; }
.story-card-art-input i { width: 150px; transform: rotate(90deg); }
.story-card-art-recovery { background: radial-gradient(circle at 40% 70%, rgba(224, 173, 87, .18), transparent 38%), #171514; }
.story-card-art-recovery span { width: 82px; height: 105px; transform: skew(-12deg); }
.story-card-art-recovery i { width: 110px; transform: rotate(56deg); }
.story-card-art-recovery b { background: #ffd27b; border-color: #ffd27b; box-shadow: 0 0 18px #ffd27b; }
.story-card-kicker { margin-bottom: .7rem; color: rgba(161, 206, 189, .62); }
.story-card h3 { max-width: 240px; margin: 0 0 .8rem; color: #eef8f3; font-size: 1.8rem; font-weight: 540; line-height: .98; letter-spacing: -.06em; }
.story-card p:not(.story-card-kicker) { max-width: 250px; margin: 0 0 1.4rem; color: rgba(203, 229, 218, .62); font-size: .9rem; line-height: 1.65; }
.story-card a { color: var(--acid); }

.workspace-intro { position: relative; display: grid; grid-template-columns: 90px minmax(0, 1fr) minmax(240px, .55fr) 150px; gap: clamp(1.5rem, 4vw, 4rem); align-items: end; width: min(1180px, calc(100% - 6rem)); min-height: 410px; margin: 0 auto; padding: 6rem 0 7rem; border-top: 1px solid var(--landing-line); }
.workspace-intro::after { position: absolute; right: 0; bottom: 0; left: 0; height: 1px; content: ""; background: linear-gradient(90deg, transparent, var(--landing-line), transparent); }
.workspace-intro-index { align-self: center; }
.workspace-intro h2 { max-width: 650px; font-size: clamp(3.4rem, 6vw, 6.5rem); }
.workspace-intro > p { max-width: 270px; margin: 0; color: rgba(206, 232, 220, .62); font-size: .95rem; line-height: 1.7; }
.workspace-intro-link { justify-self: end; color: var(--acid); font-size: .64rem; font-weight: 850; letter-spacing: .13em; text-decoration: none; text-transform: uppercase; }
.workspace-intro-link span { display: block; margin-top: .8rem; font-size: 1.45rem; font-weight: 400; text-align: right; }

.device-strip.panel,
.tab-nav.panel,
.tab-panel { width: min(1180px, calc(100% - 6rem)); margin-right: auto; margin-left: auto; }
.device-strip.panel { margin-top: 0; padding: 1.6rem; border-radius: 20px; background: linear-gradient(145deg, rgba(12, 38, 37, .92), rgba(4, 14, 17, .94)); }
.tab-nav.panel { margin-top: 1.2rem; }
.tab-panel { margin-top: 1.2rem; }

.closing-panel { position: relative; display: grid; grid-template-columns: 90px minmax(0, 1fr) 220px; gap: 3rem; align-items: center; width: min(1180px, calc(100% - 6rem)); min-height: 690px; margin: 10rem auto 0; padding: 5rem 0; border-top: 1px solid var(--landing-line); border-bottom: 1px solid var(--landing-line); }
.closing-panel-mark { display: grid; justify-items: center; gap: .8rem; color: rgba(154, 190, 177, .58); font-size: .6rem; font-weight: 800; letter-spacing: .16em; writing-mode: vertical-rl; }
.closing-panel-mark span:first-child { color: var(--acid); font-size: 1.1rem; }
.closing-panel-mark span:nth-child(2) { width: 1px; height: 86px; background: linear-gradient(180deg, var(--acid), transparent); }
.closing-panel-copy h2 { max-width: 720px; }
.closing-panel-copy > p:not(.section-overline) { max-width: 430px; margin: 2rem 0 2.4rem; color: rgba(206, 232, 220, .64); font-size: 1.05rem; line-height: 1.7; }
.closing-panel-signal { position: relative; display: grid; place-items: center; width: 210px; height: 210px; border: 1px solid rgba(180, 245, 217, .28); border-radius: 50%; color: var(--acid); background: radial-gradient(circle, rgba(84, 198, 153, .18), transparent 62%); }
.closing-panel-signal::before, .closing-panel-signal::after { position: absolute; inset: 17%; border: 1px solid rgba(180, 245, 217, .2); border-radius: 50%; content: ""; }
.closing-panel-signal::after { inset: 35%; border-style: dashed; animation: orbit-spin 14s linear infinite; }
.closing-panel-signal span { position: absolute; width: 36px; height: 1px; background: var(--acid); box-shadow: 0 0 14px var(--acid); }
.closing-panel-signal span:nth-child(2) { transform: rotate(60deg); }
.closing-panel-signal span:nth-child(3) { transform: rotate(-60deg); }
.closing-panel-signal b { position: relative; z-index: 1; font-size: .54rem; font-weight: 850; letter-spacing: .2em; line-height: 1.7; text-align: center; }

.footer { width: min(1180px, calc(100% - 6rem)); margin: 4rem auto 0; padding: 1.25rem 0 0; border-top-color: var(--landing-line); }

@keyframes marquee-drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes orbit-spin { to { transform: rotate(360deg); } }
@keyframes orbit-spin-reverse { to { transform: rotate(-360deg); } }

@media (max-width: 940px) {
  .topbar { width: calc(100% - 2.5rem); }
  .topbar-nav { gap: .75rem; }
  .story-intro, .system-story, .workspace-intro, .closing-panel { width: min(100% - 3rem, 760px); }
  .story-intro { grid-template-columns: 60px minmax(0, 1fr); }
  .story-intro-diagram { grid-column: 2; justify-self: start; width: min(100%, 400px); margin-top: 1rem; }
  .capability-split { grid-template-columns: 1fr; padding: 7rem 3rem; }
  .capability-visual { width: min(100%, 680px); }
  .capability-copy { max-width: 680px; }
  .device-strip.panel, .tab-nav.panel, .tab-panel { width: calc(100% - 3rem); }
  .workspace-intro { grid-template-columns: 60px 1fr 1fr; }
  .workspace-intro-link { grid-column: 2 / -1; justify-self: start; }
  .closing-panel { grid-template-columns: 60px 1fr 170px; }
  .closing-panel-signal { width: 160px; height: 160px; }
}

@media (max-width: 700px) {
  .topbar { position: absolute; top: 12px; width: calc(100% - 1.5rem); min-height: 64px; padding-left: .7rem; }
  .topbar-nav { display: none; }
  .topbar-actions { gap: .3rem; }
  .version-chip, .status-chip { font-size: .58rem; }
  .page-progress { display: none; }
  .hero-panel { min-height: 760px; }
  .hero-copy { top: 190px; left: 1.5rem; max-width: calc(100% - 3rem); }
  .hero-copy h1 { font-size: clamp(4.15rem, 16vw, 6.5rem); }
  .story-intro, .system-story, .workspace-intro, .closing-panel { width: calc(100% - 2.5rem); }
  .story-intro { display: block; min-height: 940px; padding: 7rem 0 6rem; }
  .story-intro-index { display: none; }
  .story-intro-diagram { width: min(100%, 340px); margin: 4rem auto 0; }
  .story-intro-copy h2, .system-story-heading h2, .workspace-intro h2, .closing-panel h2 { font-size: clamp(3.45rem, 15vw, 5.4rem); }
  .capability-split { gap: 3.5rem; padding: 6rem 1.25rem; }
  .capability-copy h2 { font-size: clamp(3.3rem, 14vw, 5rem); }
  .capability-row { grid-template-columns: 34px 1fr 20px; }
  .capability-row small { display: none; }
  .system-story { min-height: 0; padding: 7rem 0; }
  .system-story-heading { display: block; margin-bottom: 3rem; }
  .system-story-heading .section-overline { margin-bottom: 1.5rem; }
  .system-story-grid { grid-template-columns: 1fr; }
  .story-card { min-height: 450px; border-right: 0; border-bottom: 1px solid var(--landing-line); }
  .story-card:last-child { border-bottom: 0; }
  .workspace-intro { display: block; min-height: 500px; padding: 6rem 0; }
  .workspace-intro-index { display: flex; flex-direction: row; margin-bottom: 2rem; writing-mode: horizontal-tb; }
  .workspace-intro > p { margin: 2rem 0; }
  .workspace-intro-link { display: block; }
  .device-strip.panel, .tab-nav.panel, .tab-panel { width: calc(100% - 1.5rem); }
  .closing-panel { display: block; min-height: 650px; padding: 6rem 0; }
  .closing-panel-mark { display: none; }
  .closing-panel-signal { margin-top: 4rem; }
  .footer { width: calc(100% - 1.5rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .signal-marquee-track, .story-intro-diagram::before, .diagram-orbit-inner, .closing-panel-signal::after { animation: none; }
  .reveal-ready [data-reveal] { opacity: 1; transform: none; transition: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-media-grid,
  .hero-media-scanline,
  .hero-live-dot,
  .hero-scroll-line::after {
    animation: none;
  }

  .hero-scene {
    transition: none;
  }
}

/* MiraLink visual direction: quiet geometry, restrained neon, and clear space. */
:root {
  --bg: #050b10;
  --bg-deep: #071319;
  --surface: rgba(10, 25, 29, .84);
  --surface-strong: #0c2629;
  --surface-clear: rgba(16, 43, 45, .66);
  --line: rgba(151, 224, 211, .16);
  --line-strong: rgba(125, 232, 211, .52);
  --text: #f1fbf8;
  --muted: #8ca9a7;
  --muted-strong: #c7ded9;
  --cyan: #83e9df;
  --cyan-soft: #d2f9f0;
  --emerald: #52d6a8;
  --emerald-soft: #a8f2d3;
  --blue: #4ab6d2;
  --violet: #7d9ed1;
  --shadow: 0 26px 90px rgba(0, 0, 0, .34);
  --glow: 0 0 34px rgba(77, 214, 182, .12);
}

body {
  background:
    radial-gradient(circle at 84% 5%, rgba(40, 163, 139, .15), transparent 27rem),
    radial-gradient(circle at 8% 28%, rgba(38, 114, 139, .12), transparent 30rem),
    linear-gradient(180deg, #07151b 0%, var(--bg) 58%, #03070a 100%);
}

body::before {
  opacity: 0;
}

body::after {
  opacity: .018;
}

.topbar {
  padding: .78rem clamp(1rem, 4vw, 4rem);
  border-bottom-color: rgba(151, 224, 211, .13);
  background: rgba(5, 13, 16, .88);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .2);
}

.topbar::after {
  right: 12%;
  left: 12%;
  opacity: .22;
}

.brand-mark {
  width: 2.7rem;
  height: 2.7rem;
  background: radial-gradient(circle, rgba(83, 214, 168, .2), transparent 60%), linear-gradient(135deg, rgba(20, 91, 82, .62), rgba(5, 25, 29, .9));
  box-shadow: 0 0 24px rgba(83, 214, 168, .13), inset 0 0 20px rgba(168, 242, 211, .08);
}

.brand-mark::before {
  border-color: rgba(168, 242, 211, .48);
}

.brand-mark::after {
  border-color: var(--cyan);
}

.brand-mark span {
  background: var(--emerald);
  box-shadow: 0 0 14px var(--emerald);
}

.brand-name {
  letter-spacing: .16em;
}

.brand-subtitle {
  color: #91b4ad;
  letter-spacing: .14em;
}

.language-picker select,
.field select {
  min-height: 2.28rem;
  border-color: var(--line);
  border-radius: 9px;
  background: rgba(8, 25, 29, .88);
}

.version-chip,
.status-chip,
.panel-status {
  border-radius: 999px;
  clip-path: none;
}

.shell {
  width: min(1180px, calc(100% - 2.5rem));
  padding: 3rem 0 5rem;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(250px, .92fr);
  min-height: 500px;
  padding: clamp(2rem, 5vw, 4.5rem);
  border: 1px solid rgba(131, 233, 223, .34);
  border-radius: 28px;
  clip-path: none;
  background:
    radial-gradient(circle at 83% 48%, rgba(52, 197, 165, .21), transparent 17rem),
    radial-gradient(circle at 52% 110%, rgba(28, 104, 122, .2), transparent 25rem),
    linear-gradient(125deg, rgba(8, 31, 34, .98), rgba(5, 17, 22, .95) 58%, rgba(6, 27, 30, .96));
  box-shadow: var(--shadow), inset 0 0 90px rgba(83, 214, 168, .06);
}

.hero-panel::before {
  inset: 0 0 0 auto;
  width: 60%;
  opacity: 1;
  background:
    radial-gradient(circle at 52% 46%, rgba(94, 224, 190, .24), transparent 5rem),
    radial-gradient(circle at 64% 50%, rgba(44, 159, 174, .16), transparent 15rem),
    linear-gradient(135deg, transparent 30%, rgba(115, 214, 201, .07) 30.2%, transparent 30.5%);
  transform: none;
  mix-blend-mode: screen;
  mask-image: linear-gradient(90deg, transparent, black 25%, black 86%, transparent);
  animation: none;
}

.hero-panel::after {
  right: 10%;
  bottom: 16%;
  left: 10%;
  background: linear-gradient(90deg, transparent, rgba(131, 233, 223, .3), transparent);
  box-shadow: 0 0 18px rgba(83, 214, 168, .28);
  opacity: .42;
}

.hero-copy {
  max-width: 660px;
}

.eyebrow {
  color: var(--cyan);
  letter-spacing: .18em;
  text-shadow: 0 0 14px rgba(131, 233, 223, .24);
}

h1 {
  max-width: 680px;
  margin-bottom: 1.35rem;
  font-size: clamp(3.35rem, 6.4vw, 5.9rem);
  line-height: .94;
  letter-spacing: -.085em;
  text-wrap: balance;
  text-shadow: 0 0 38px rgba(131, 233, 223, .1);
}

.hero-lede {
  max-width: 500px;
  color: var(--muted-strong);
  font-size: 1rem;
  line-height: 1.65;
}

.hero-octagon {
  justify-self: end;
  width: clamp(180px, 23vw, 290px);
  border-color: rgba(131, 233, 223, .42);
  background:
    radial-gradient(circle at 50% 45%, rgba(168, 242, 211, .2), transparent 27%),
    radial-gradient(circle at 50% 50%, rgba(45, 146, 157, .18), transparent 67%),
    rgba(4, 21, 25, .68);
  box-shadow: 0 0 48px rgba(83, 214, 168, .14), inset 0 0 36px rgba(131, 233, 223, .08);
}

.hero-octagon::before {
  inset: 12%;
  border-color: rgba(168, 242, 211, .42);
  transform: none;
}

.hero-octagon::after {
  inset: 23%;
  border-color: rgba(131, 233, 223, .52);
  transform: none;
}

.hero-octagon-line {
  inset: 34%;
  border-color: var(--emerald);
  box-shadow: 0 0 18px rgba(83, 214, 168, .4);
}

.hero-octagon-core {
  color: var(--cyan-soft);
  text-shadow: 0 0 16px rgba(131, 233, 223, .68);
}

.panel,
.panel-inner,
.tab-panel {
  margin-top: 1.35rem;
  border-color: var(--line);
  border-radius: 18px;
  clip-path: none;
  background: linear-gradient(145deg, rgba(11, 31, 34, .9), rgba(5, 15, 19, .92));
  box-shadow: 0 18px 55px rgba(0, 0, 0, .22), inset 0 1px rgba(205, 249, 240, .035);
}

.panel::before,
.panel-inner::before,
.tab-panel::before {
  right: 18%;
  left: 18%;
  background: linear-gradient(90deg, transparent, rgba(131, 233, 223, .38), transparent);
  opacity: .45;
}

.panel {
  padding: 1.4rem;
}

.panel-inner {
  padding: 1.2rem;
}

.tab-panel {
  padding: clamp(1.25rem, 3vw, 2.35rem);
}

.tab-nav {
  gap: .35rem;
  padding: .45rem;
  border-radius: 15px;
  background: rgba(7, 20, 23, .9);
}

.tab-button {
  border-radius: 10px;
  clip-path: none;
  padding: .72rem .95rem;
  letter-spacing: .1em;
}

.tab-button:hover {
  color: var(--cyan-soft);
  background: rgba(131, 233, 223, .08);
}

.tab-button.is-active {
  color: #061613;
  background: linear-gradient(110deg, #b3f3de, #62d7c3);
  box-shadow: 0 8px 20px rgba(83, 214, 168, .13);
}

.button {
  min-height: 2.55rem;
  border-radius: 10px;
  clip-path: none;
  background: rgba(12, 37, 39, .8);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.button:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: rgba(19, 60, 59, .9);
  box-shadow: 0 0 22px rgba(83, 214, 168, .12);
}

.button.primary {
  color: #061613;
  background: linear-gradient(110deg, #b7f3df, #62d5c1);
  border-color: #97ebd2;
  box-shadow: 0 0 22px rgba(83, 214, 168, .16);
}

.button.quiet {
  background: rgba(9, 27, 29, .62);
}

.device-card,
.metric-card,
.feature-card,
.settings-card,
.diagnostic-card,
.firmware-current {
  border-radius: 14px;
  clip-path: none;
  background: linear-gradient(145deg, rgba(14, 39, 40, .75), rgba(6, 18, 21, .86));
}

.device-card[data-active="true"] {
  border-color: rgba(131, 233, 223, .62);
  box-shadow: inset 3px 0 var(--emerald), 0 0 22px rgba(83, 214, 168, .1);
}

.empty-state {
  border-radius: 14px;
  background: radial-gradient(circle at 50% 20%, rgba(83, 214, 168, .1), transparent 55%), rgba(4, 14, 17, .46);
}

.notice,
.callout,
.file-drop {
  border-radius: 12px;
  clip-path: none;
}

.notice {
  background: rgba(105, 182, 170, .07);
}

.notice.warning {
  background: rgba(255, 210, 123, .07);
}

.metric-card::after,
.feature-card::after,
.settings-card::after,
.diagnostic-card::after {
  display: none;
}

.metric-card {
  min-height: 150px;
  background: linear-gradient(145deg, rgba(15, 44, 43, .76), rgba(6, 18, 21, .9));
}

.octagon-card {
  clip-path: none;
}

.metric-value,
.diagnostic-card strong,
.firmware-current strong {
  color: var(--cyan-soft);
  text-shadow: 0 0 18px rgba(131, 233, 223, .2);
}

.callout {
  background: linear-gradient(90deg, rgba(83, 214, 168, .12), rgba(74, 182, 210, .035));
}

.callout.emerald {
  background: linear-gradient(90deg, rgba(83, 214, 168, .14), rgba(74, 182, 210, .04));
}

.file-drop {
  background: rgba(83, 214, 168, .05);
}

.file-drop:hover {
  background: rgba(131, 233, 223, .08);
  box-shadow: inset 0 0 28px rgba(83, 214, 168, .06);
}

.footer {
  border-top-color: var(--line);
}

@media (max-width: 820px) {
  .hero-panel {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-octagon {
    justify-self: end;
    width: 188px;
    margin-top: -1rem;
  }
}

@media (max-width: 620px) {
  .topbar {
    padding: .75rem .85rem;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .shell {
    width: min(100% - 1.25rem, 560px);
    padding-top: 1.4rem;
  }

  .hero-panel {
    gap: 1.2rem;
    padding: 2rem 1.35rem 1.35rem;
    border-radius: 21px;
  }

  h1 {
    max-width: 480px;
    font-size: clamp(3.15rem, 14vw, 4.7rem);
  }

  .hero-lede {
    font-size: .95rem;
  }

  .hero-octagon {
    width: 164px;
    margin-top: .2rem;
  }

  .panel,
  .tab-panel {
    border-radius: 15px;
  }

  .panel {
    padding: 1.05rem;
  }

  .section-heading,
  .action-bar {
    gap: .85rem;
  }

  .action-row {
    width: 100%;
  }

  .action-row .button {
    flex: 1;
  }

  .tab-nav {
    border-radius: 13px;
  }
}

/* Final cinematic cascade: keep the legacy application styles below the hero. */
.hero-panel {
  --hero-copy-x: 0px;
  --hero-copy-y: 0px;
  --hero-image-x: 0px;
  --hero-image-y: 0px;
  --hero-scroll-copy-y: 0px;
  --hero-scroll-image-y: 0px;
  --hero-copy-opacity: 1;
  width: 100vw;
  min-height: max(760px, calc(100svh - 3.5rem));
  margin-left: calc((100% - 100vw) / 2);
  padding: 0;
  display: block;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  clip-path: none;
  background: #031017;
  box-shadow: none;
  isolation: isolate;
}

.hero-panel::before,
.hero-panel::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  content: "";
  pointer-events: none;
}

.hero-panel::before {
  background:
    radial-gradient(500px circle at var(--hero-pointer-x, 50%) var(--hero-pointer-y, 42%), rgba(131, 233, 223, .13), transparent 70%),
    linear-gradient(90deg, rgba(3, 16, 23, .16), transparent 45%, rgba(3, 16, 23, .12));
  mix-blend-mode: screen;
  opacity: .86;
  transition: background 180ms ease-out;
}

.hero-panel::after {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(3, 16, 23, .98) 0%, rgba(3, 16, 23, .82) 22%, rgba(3, 16, 23, .2) 56%, rgba(3, 16, 23, .34) 100%),
    linear-gradient(180deg, rgba(3, 16, 23, .34), transparent 22%, transparent 72%, rgba(3, 16, 23, .88));
}

.hero-copy {
  position: absolute;
  z-index: 5;
  top: clamp(170px, 25vh, 250px);
  left: clamp(34px, 12vw, 220px);
  max-width: 670px;
  transform: translate3d(var(--hero-copy-x), calc(var(--hero-copy-y) + var(--hero-scroll-copy-y)), 0);
  opacity: var(--hero-copy-opacity);
  transition: transform 650ms cubic-bezier(.16, 1, .3, 1), opacity 360ms ease-out;
}

.hero-copy h1 {
  max-width: 680px;
  margin: 2rem 0 1.45rem;
  color: #f2fbf8;
  font-size: clamp(5.2rem, 8.4vw, 9.5rem);
  font-weight: 760;
  line-height: .84;
  letter-spacing: -.1em;
  text-shadow: 0 14px 52px rgba(0, 0, 0, .42), 0 0 34px rgba(131, 233, 223, .12);
}

.hero-lede {
  max-width: 520px;
  margin-bottom: 0;
  color: rgba(226, 244, 239, .8);
  font-size: 1.08rem;
  line-height: 1.65;
}

.hero-octagon {
  display: none;
}

@media (max-width: 820px) {
  .hero-panel {
    min-height: 700px;
  }

  .hero-copy {
    top: 145px;
    left: 8vw;
    max-width: min(680px, 84vw);
  }

  .hero-copy h1 {
    font-size: clamp(4.4rem, 11vw, 7.6rem);
  }
}

@media (max-width: 620px) {
  .hero-panel {
    min-height: 650px;
  }

  .hero-copy {
    top: 122px;
    left: 1.25rem;
    max-width: calc(100% - 2.5rem);
  }

  .hero-copy h1 {
    margin-top: 1.45rem;
    font-size: clamp(3.55rem, 15vw, 5rem);
  }
}

/* 0.25 desktop viewport correction: keep the cinematic hero inside the page frame. */
.shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 0 8rem;
}

.hero-panel {
  width: 100%;
  min-height: max(760px, calc(100svh - 3.5rem));
  margin: 0;
}

.hero-copy {
  top: clamp(170px, 25vh, 250px);
  left: clamp(34px, 12vw, 220px);
  max-width: 760px;
}

.hero-copy h1 {
  max-width: 760px;
}

@media (max-width: 820px) {
  .shell {
    width: 100%;
    max-width: none;
  }
}

/* 0.27 focused dashboard: connection first, functional sections after. */
.topbar-nav {
  gap: clamp(.8rem, 1.8vw, 1.6rem);
}

.topbar-nav a {
  font-size: .68rem;
}

.language-chip {
  display: inline-grid;
  min-width: 2.1rem;
  min-height: 2rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cyan-soft);
  font-size: .66rem;
  font-weight: 850;
  letter-spacing: .12em;
}

.connection-hero {
  min-height: max(860px, calc(100svh - 3.5rem));
}

.connection-hero .hero-copy {
  top: clamp(150px, 22vh, 220px);
  left: clamp(7vw, 11vw, 165px);
  max-width: min(560px, 44vw);
}

.connection-hero .hero-copy h1 {
  max-width: 560px;
  margin-top: 1.35rem;
  font-size: clamp(4.4rem, 6.6vw, 7.4rem);
  line-height: .82;
}

.connection-hero .hero-lede {
  max-width: 430px;
  font-size: 1rem;
}

.connection-hero .hero-actions {
  margin-top: 2rem;
}

.connection-surface {
  position: absolute;
  z-index: 6;
  top: clamp(150px, 20vh, 220px);
  right: clamp(4vw, 8vw, 120px);
  width: min(390px, 32vw);
  min-height: 0;
  padding: 1.35rem;
  overflow: hidden;
  border: 1px solid rgba(131, 233, 223, .38);
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(6, 26, 31, .9), rgba(3, 14, 20, .78));
  box-shadow: 0 26px 70px rgba(0, 0, 0, .42), inset 0 0 50px rgba(83, 214, 168, .06), 0 0 40px rgba(83, 214, 168, .06);
  backdrop-filter: blur(16px) saturate(120%);
}

.connection-surface::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: radial-gradient(circle at 78% 20%, rgba(131, 233, 223, .12), transparent 42%), linear-gradient(135deg, transparent 28%, rgba(131, 233, 223, .08) 28.2%, transparent 28.6%);
}

.connection-surface > * {
  position: relative;
  z-index: 1;
}

.connection-surface-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.connection-surface-heading h2 {
  margin-bottom: 0;
  font-size: 1.7rem;
}

.connection-surface-actions {
  display: flex;
  gap: .55rem;
  margin-bottom: 1rem;
}

.connection-surface-actions .button:first-child {
  flex: 1 1 auto;
}

.connection-surface .notice {
  margin: 0 0 1rem;
  font-size: .82rem;
}

.connection-surface .device-list {
  display: block;
}

.connection-surface .empty-state {
  min-height: 205px;
  padding: 1.55rem .8rem 1rem;
  border-color: rgba(131, 233, 223, .34);
  background: radial-gradient(circle at 50% 38%, rgba(83, 214, 168, .13), transparent 46%), rgba(1, 12, 17, .48);
}

.connection-surface .empty-title {
  margin-top: 1rem;
  font-size: 1rem;
}

.connection-surface .empty-copy {
  max-width: 240px;
  margin-inline: auto;
  line-height: 1.5;
}

.connection-surface .empty-glyph {
  position: relative;
  display: grid;
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto;
  place-items: center;
  color: var(--emerald-soft);
  font-size: 0;
  border: 1px solid rgba(131, 233, 223, .72);
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(83, 214, 168, .2), inset 0 0 18px rgba(83, 214, 168, .1);
  animation: connection-core-pulse 2.6s ease-in-out infinite;
}

.connection-surface .empty-glyph::before,
.connection-surface .empty-glyph::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(131, 233, 223, .36);
  border-radius: 50%;
  pointer-events: none;
}

.connection-surface .empty-glyph::before {
  inset: -.7rem;
  animation: connection-radar 2.6s ease-out infinite;
}

.connection-surface .empty-glyph::after {
  inset: 1.55rem;
  border-color: var(--emerald);
  background: var(--emerald);
  box-shadow: 0 0 16px var(--emerald);
}

.hero-scroll-cue {
  right: clamp(4vw, 8vw, 120px);
  bottom: 2.1rem;
}

.tab-nav.panel,
.tab-panel {
  width: min(1120px, calc(100% - 5rem));
  margin-inline: auto;
}

.tab-nav.panel {
  margin-top: 1.5rem;
}

.tab-panel {
  margin-top: 1rem;
}

.firmware-panel {
  grid-template-columns: .75fr 1fr 1fr;
}

.firmware-release-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 170px;
  color: var(--cyan-soft);
  text-decoration: none;
  text-align: center;
}

#tab-controllers,
#tab-backups,
#tab-logs {
  display: none !important;
}

@keyframes connection-core-pulse {
  0%, 100% { transform: scale(.96); box-shadow: 0 0 24px rgba(83, 214, 168, .16), inset 0 0 18px rgba(83, 214, 168, .08); }
  50% { transform: scale(1.03); box-shadow: 0 0 36px rgba(83, 214, 168, .32), inset 0 0 22px rgba(83, 214, 168, .16); }
}

@keyframes connection-radar {
  0% { opacity: .7; transform: scale(.72); }
  80%, 100% { opacity: 0; transform: scale(1.42); }
}

@media (max-width: 940px) {
  .connection-surface {
    right: 4vw;
    width: min(390px, 38vw);
  }

  .connection-hero .hero-copy {
    left: 6vw;
    max-width: 48vw;
  }

  .tab-nav.panel,
  .tab-panel {
    width: calc(100% - 3rem);
  }
}

@media (max-width: 820px) {
  .connection-hero {
    min-height: 980px;
  }

  .connection-hero .hero-copy {
    top: 145px;
    left: 8vw;
    max-width: 84vw;
  }

  .connection-surface {
    top: auto;
    right: 8vw;
    bottom: 4rem;
    left: 8vw;
    width: auto;
  }

  .firmware-panel {
    grid-template-columns: 1fr;
  }
}

/* 0.32: action-first surface with no decorative image layer. */
.topbar-nav,
.language-chip,
.hero-actions,
.hero-scroll-cue,
.hero-media,
.page-progress {
  display: none !important;
}

.topbar {
  display: none !important;
}

.shell {
  padding-top: 0;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
  box-shadow: none;
}

.brand-mark::before,
.brand-mark::after {
  border-color: var(--line-strong);
  box-shadow: none;
}

.brand-mark span {
  display: block;
  width: .3rem;
  height: .3rem;
  background: var(--cyan);
  box-shadow: none;
}

.connection-hero {
  min-height: 650px;
  background: var(--bg-deep);
}

.connection-hero::before,
.connection-hero::after,
.connection-surface::before,
.metric-card::after {
  display: none;
}

.connection-hero .hero-copy {
  top: 150px;
  left: clamp(5vw, 9vw, 130px);
  max-width: 560px;
}

.connection-hero .hero-copy h1 {
  font-size: clamp(4.2rem, 6vw, 7rem);
}

.firmware-panel {
  grid-template-columns: 1fr 1fr;
}

.connection-surface {
  background: var(--surface);
  box-shadow: none;
  backdrop-filter: none;
}

.metric-card,
.firmware-current,
.file-drop,
.footer {
  background-image: none !important;
  box-shadow: none;
}

.file-drop {
  clip-path: none;
}

.drop-icon {
  font-size: 1.5rem;
  text-shadow: none;
}

/* Desktop composition correction: keep the connection surface complete and in flow. */
.connection-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(360px, .82fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 5.5rem);
  min-height: 0;
  height: auto;
  padding: clamp(3rem, 5vh, 4.5rem) clamp(2rem, 7vw, 7rem) clamp(2.5rem, 5vh, 3.5rem);
  overflow: visible;
  background:
    radial-gradient(circle at 78% 18%, rgba(83, 214, 168, .08), transparent 25rem),
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(131, 233, 223, .025) 80px),
    repeating-linear-gradient(0deg, transparent 0 79px, rgba(131, 233, 223, .02) 80px),
    var(--bg-deep);
}

.connection-hero .hero-copy {
  position: static;
  top: auto;
  left: auto;
  max-width: 600px;
  transform: none;
  align-self: start;
  margin-top: .8rem;
}

.connection-hero .hero-copy h1 {
  max-width: 600px;
  margin-top: 1.35rem;
  font-size: clamp(3.8rem, 5.6vw, 6.5rem);
  line-height: .86;
}

.connection-surface {
  position: static;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  width: auto;
  max-width: 430px;
  margin: 0;
  align-self: center;
}

.connection-surface #hid-warning.notice.warning {
  display: block;
  padding: .72rem .9rem;
}

.connection-surface #hid-warning strong {
  display: inline;
  margin-right: .4rem;
  white-space: nowrap;
}

.connection-surface #hid-warning span {
  display: inline;
}

.connection-surface .empty-state {
  min-height: 185px;
  padding: 1.35rem .8rem .9rem;
}

.tab-nav.panel {
  margin-top: .9rem;
}

@media (max-width: 940px) and (min-width: 821px) {
  .connection-hero {
    grid-template-columns: minmax(0, 1fr) minmax(330px, .86fr);
    gap: 2rem;
    padding-inline: 3rem;
  }
}
