/* ---------- Design tokens ---------- */
:root {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --brand: #2f6bff;
  --brand-2: #22d3ee;
  --brand-ink: #ffffff;
  --brand-soft: rgba(47, 107, 255, 0.14);
  --navy: #0b1220;
  --navy-2: #111a2e;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --maxw: 1240px;
  --ease: cubic-bezier(.2,.8,.2,1);
}
:root[data-theme="dark"] {
  --bg: #0b1220;
  --bg-2: #0f172a;
  --surface: #131c31;
  --surface-2: #192340;
  --line: #233052;
  --text: #e8ecf1;
  --text-2: #a4adbb;
  --text-3: #6f7a8a;
  --ok: #3ddc84; --warn: #f5b342; --err: #ff5c6c; --info: #5aa9ff;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f7f9;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --line: #e1e5eb;
  --text: #121620;
  --text-2: #4b5565;
  --text-3: #7c8696;
  --ok: #1f9d5a; --warn: #c7811a; --err: #d8313f; --info: #2a74d1;
  --shadow: 0 10px 30px rgba(20, 30, 50, 0.10);
  --brand: #1d4ed8;
  --brand-2: #0891b2;
  --brand-soft: rgba(29, 78, 216, 0.10);
  --brand-ink: #ffffff;
  --bg: #f7f8fb;
  --surface-2: #eef1f6;
  --line: #dfe4ec;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -0.015em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 .9rem; }
code, .mono { font-family: var(--mono); font-size: .92em; }
img, svg { max-width: 100%; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--text-2); }
.tiny { font-size: .8rem; }
.small { font-size: .9rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 700; color: var(--brand); margin-bottom: .5rem; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 4rem 0; }
.section-tight { padding: 2.5rem 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row-between { justify-content: space-between; }
.stack > * + * { margin-top: .75rem; }

/* ---------- App shell ---------- */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
.topbar { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: var(--maxw); margin: 0 auto; padding: .7rem 1.25rem; display: flex; align-items: center; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 600; font-size: 1.05rem; white-space: nowrap; }
.brand strong { color: var(--brand); }
.brand-mark { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 0 18px var(--brand-soft); }
.main-nav { display: flex; gap: .25rem; flex: 1; }
.main-nav a { padding: .45rem .75rem; border-radius: 999px; font-size: .92rem; color: var(--text-2); }
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.main-nav a.active { color: var(--text); background: var(--surface-2); }
.topbar-actions { display: flex; align-items: center; gap: .6rem; }
.icon-btn { background: transparent; border: 1px solid var(--line); color: var(--text-2); border-radius: 999px; width: 34px; height: 34px; cursor: pointer; }
.icon-btn:hover { color: var(--text); border-color: var(--text-3); }
.region-picker select { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: .35rem .6rem; font-size: .85rem; font-family: var(--font); }
.cart-link { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--line); }
.cart-count { position: absolute; top: -6px; right: -6px; background: var(--brand); color: var(--brand-ink); font-size: .7rem; font-weight: 700; border-radius: 999px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; animation: pop .3s var(--ease); }
@keyframes pop { from { transform: scale(.4); } to { transform: scale(1); } }
.user-menu { position: relative; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 999px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 700; font-size: .8rem; cursor: pointer; }
.user-dropdown { display: none; position: absolute; right: 0; top: 42px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); min-width: 200px; padding: .5rem; box-shadow: var(--shadow); }
.user-menu:hover .user-dropdown, .user-menu:focus-within .user-dropdown { display: block; }
.user-dropdown a { display: block; padding: .5rem .6rem; border-radius: 6px; font-size: .9rem; }
.user-dropdown a:hover { background: var(--surface-2); }
.user-name { padding: .4rem .6rem; font-weight: 600; font-size: .85rem; color: var(--text-2); border-bottom: 1px solid var(--line); margin-bottom: .3rem; }
.footer { border-top: 1px solid var(--line); padding: 2.5rem 0; margin-top: 4rem; background: var(--bg-2); }
.footer-inner { display: grid; gap: 1.5rem; grid-template-columns: 1.2fr 1fr; }
.footer-inner > .tiny { grid-column: 1 / -1; }
.footer-links { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; align-content: start; }
.footer-links a { color: var(--text-2); }

/* ---------- Buttons & badges ---------- */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.2rem; border-radius: 999px; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; transition: transform .15s var(--ease), background .2s, border-color .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 88%, black); color: var(--brand-ink); }
.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-danger { background: transparent; color: var(--err); border-color: var(--err); }
.btn-sm { padding: .4rem .85rem; font-size: .85rem; }
.btn-lg { padding: .9rem 1.6rem; font-size: 1.05rem; }
.btn-block { width: 100%; justify-content: center; }
.badge { display: inline-flex; align-items: center; padding: .15rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; }
.badge-neutral { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.badge-ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.badge-warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.badge-err { background: color-mix(in srgb, var(--err) 15%, transparent); color: var(--err); }
.badge-info { background: color-mix(in srgb, var(--info) 15%, transparent); color: var(--info); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; position: relative; }
.card-hover { transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.card-hover:hover { transform: translateY(-3px); border-color: var(--text-3); box-shadow: var(--shadow); }
.card-accent { border-top: 3px solid var(--accent, var(--brand)); }
.card-selected { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.card h3 { margin-bottom: .3rem; }
.card .price { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.card .price small { font-size: .85rem; font-weight: 500; color: var(--text-2); }
.pill-list { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: .6rem 0 0; list-style: none; }
.pill-list li { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: .2rem .65rem; font-size: .8rem; color: var(--text-2); }
.check-list { list-style: none; padding: 0; margin: .5rem 0; }
.check-list li { padding-left: 1.5rem; position: relative; margin: .35rem 0; color: var(--text-2); }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 700; }
.callout { border-radius: var(--radius); padding: 1.25rem 1.5rem; border: 1px solid var(--line); background: var(--surface); }
.callout-error { border-color: var(--err); }
.callout-info { border-left: 4px solid var(--info); }
.callout-warn { border-left: 4px solid var(--warn); }
.stat { padding: 1rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.stat-value { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; }
.stat-label { color: var(--text-2); font-size: .85rem; }
.stat-hint { color: var(--text-3); font-size: .75rem; margin-top: .2rem; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 6rem 0 4.5rem; background:
  radial-gradient(800px 400px at 15% 10%, var(--brand-soft), transparent 60%),
  radial-gradient(700px 420px at 90% 30%, rgba(46, 134, 222, .18), transparent 60%), var(--bg); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.hero h1 { margin-bottom: 1rem; }
.hero h1 span { background: linear-gradient(90deg, #7aa2ff, var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 1.2rem; color: var(--text-2); max-width: 56ch; }
.hero-ctas { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.75rem; }
.hero-stats { display: flex; gap: 2rem; margin-top: 2.25rem; flex-wrap: wrap; }
.hero-stats div strong { display: block; font-size: 1.4rem; }
.hero-stats div span { color: var(--text-3); font-size: .85rem; }
.device-art { position: relative; aspect-ratio: 1 / .8; }
.device { position: absolute; inset: 10% 15%; border-radius: 22px; background: linear-gradient(145deg, var(--surface-2), var(--bg-2)); border: 1px solid var(--line); box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.05); display: grid; place-items: center; }
.device::before { content: ""; position: absolute; inset: 12px; border-radius: 16px; border: 1px dashed var(--line); }
.device .led { position: absolute; bottom: 20px; left: 24px; width: 8px; height: 8px; border-radius: 999px; background: var(--brand); box-shadow: 0 0 14px var(--brand); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.device .vent { position: absolute; right: 24px; top: 24px; display: grid; gap: 5px; }
.device .vent i { display: block; width: 46px; height: 3px; background: var(--line); border-radius: 2px; }
.device .chip { font-family: var(--mono); font-size: .8rem; color: var(--text-3); text-align: center; }
.device .chip strong { display: block; color: var(--text); font-size: 1.1rem; }
.terminal { position: absolute; right: -4%; bottom: -6%; width: 62%; background: #0a0d12; color: #c9d4e2; border-radius: 12px; border: 1px solid #222a35; padding: .9rem 1rem; font-family: var(--mono); font-size: .76rem; line-height: 1.5; box-shadow: var(--shadow); }
.terminal .prompt { color: var(--brand); }
.terminal .dim { color: #6f7a8a; }
.cursor { display: inline-block; width: 7px; height: 1em; background: var(--brand); vertical-align: -2px; animation: pulse 1s steps(2) infinite; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { color: var(--text-2); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; background: var(--surface-2); }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
.spec-grid-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.spec-grid { width: 100%; border-collapse: collapse; font-size: .92rem; }
.spec-grid th, .spec-grid td { padding: .75rem .9rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.spec-grid thead th { background: var(--surface-2); font-weight: 700; }
.spec-grid tbody th { color: var(--text-2); font-weight: 600; white-space: nowrap; width: 190px; }
.spec-grid tr:last-child td, .spec-grid tr:last-child th { border-bottom: 0; }

/* QuickGrid */
.quickgrid { width: 100%; border-collapse: collapse; font-size: .9rem; }
.quickgrid thead th { background: var(--surface-2); color: var(--text-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; padding: .6rem .8rem; text-align: left; border-bottom: 1px solid var(--line); }
.quickgrid td { padding: .6rem .8rem; border-bottom: 1px solid var(--line); }
.quickgrid .col-title, .quickgrid .col-options { display: inline-flex; gap: .3rem; align-items: center; }
.quickgrid button.col-title { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; text-transform: inherit; letter-spacing: inherit; }
.quickgrid input { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: .3rem .5rem; font: inherit; }
.quickgrid .col-options button { background: transparent; border: 0; cursor: pointer; color: var(--text-3); }
.quickgrid .col-options-container { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .5rem; }
.paginator { display: flex; align-items: center; justify-content: space-between; padding: .6rem .8rem; color: var(--text-2); font-size: .85rem; }
.paginator button { background: var(--surface-2); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: .25rem .5rem; cursor: pointer; }
.paginator button:disabled { opacity: .4; cursor: default; }
.paginator nav { display: flex; gap: .3rem; align-items: center; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .9rem; }
.field label, .field .label { font-size: .85rem; font-weight: 600; color: var(--text-2); }
.field input, .field select, .field textarea, input.input, select.input, textarea.input {
  background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem .75rem; font: inherit; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.field .invalid, input.invalid, select.invalid, textarea.invalid { border-color: var(--err) !important; }
.validation-message { color: var(--err); font-size: .8rem; }
.validation-errors { background: color-mix(in srgb, var(--err) 10%, transparent); border: 1px solid var(--err); border-radius: var(--radius-sm); padding: .6rem 1rem; margin-bottom: 1rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 1rem; }
.check { display: flex; align-items: center; gap: .6rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.switch { position: relative; width: 44px; height: 24px; border-radius: 999px; background: var(--line); border: 0; cursor: pointer; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 999px; background: #fff; transition: transform .2s var(--ease); }
.switch[aria-checked="true"] { background: var(--brand); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.range { width: 100%; accent-color: var(--brand); }

/* ---------- Configurator ---------- */
.configurator { display: grid; grid-template-columns: 240px 1fr 360px; gap: 1.5rem; align-items: start; margin-top: 1.5rem; }
.stepper { position: sticky; top: 84px; display: flex; flex-direction: column; gap: .15rem; }
.step { display: flex; gap: .7rem; align-items: center; padding: .55rem .7rem; border-radius: var(--radius-sm); border: 0; background: transparent; color: var(--text-2); text-align: left; font: inherit; cursor: pointer; }
.step:hover { background: var(--surface-2); }
.step.active { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.step.done .step-num { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.step.error .step-num { border-color: var(--err); color: var(--err); }
.step-num { width: 26px; height: 26px; border-radius: 999px; border: 1px solid var(--line); display: grid; place-items: center; font-size: .75rem; font-weight: 700; flex-shrink: 0; }
.step-title { font-size: .9rem; }
.step-sub { font-size: .75rem; color: var(--text-3); display: block; }
.config-panel { min-width: 0; }
.option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .9rem; }
.option { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; cursor: pointer; font: inherit; color: inherit; transition: border-color .15s, transform .15s var(--ease), box-shadow .15s; position: relative; }
.option:hover { border-color: var(--text-3); transform: translateY(-2px); }
.option.selected { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.option.incompatible { opacity: .45; cursor: not-allowed; }
.option.incompatible:hover { transform: none; border-color: var(--line); }
.option-title { font-weight: 650; display: flex; justify-content: space-between; gap: .5rem; align-items: start; }
.option-price { font-weight: 700; white-space: nowrap; color: var(--brand); }
.option-desc { color: var(--text-2); font-size: .85rem; margin-top: .35rem; }
.option-spec { color: var(--text-3); font-size: .78rem; margin-top: .3rem; font-family: var(--mono); }
.option .tick { position: absolute; top: -8px; right: -8px; background: var(--brand); color: var(--brand-ink); width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.summary { position: sticky; top: 84px; }
.summary .total { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.summary-lines { list-style: none; padding: 0; margin: .75rem 0; font-size: .88rem; }
.summary-lines li { display: flex; justify-content: space-between; gap: .6rem; padding: .3rem 0; border-bottom: 1px dashed var(--line); }
.summary-lines li span:first-child { color: var(--text-2); }
.summary-lines li.sub { font-weight: 600; border-bottom: 1px solid var(--line); }
.issue-list { list-style: none; padding: 0; margin: .75rem 0; display: flex; flex-direction: column; gap: .4rem; }
.issue { display: flex; gap: .5rem; font-size: .85rem; padding: .5rem .7rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); }
.issue-error { border-color: color-mix(in srgb, var(--err) 50%, transparent); }
.issue-warning { border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.gauge { text-align: center; }
.gauge svg { width: 100%; max-width: 160px; }
.gauge-arc { transition: stroke-dasharray .6s var(--ease); }
.gauge-value { font-size: 18px; font-weight: 800; fill: var(--text); }
.gauge-unit { font-size: 10px; fill: var(--text-3); font-weight: 500; }
.gauge-label { font-size: .78rem; color: var(--text-2); margin-top: -.4rem; }
.sparkline { width: 100%; height: 48px; display: block; }
.step-nav { display: flex; justify-content: space-between; margin-top: 1.5rem; gap: .5rem; }

/* ---------- Use-case explorer ---------- */
.tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.tab { background: var(--surface); border: 1px solid var(--line); color: var(--text-2); border-radius: 999px; padding: .5rem .9rem; cursor: pointer; font: inherit; font-size: .9rem; }
.tab.active { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 600; }
.chat { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; display: flex; flex-direction: column; gap: .8rem; min-height: 220px; }
.bubble { max-width: 85%; padding: .7rem 1rem; border-radius: 14px; font-size: .95rem; white-space: pre-wrap; }
.bubble-user { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.bubble-ai { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble-meta { font-size: .72rem; color: var(--text-3); font-family: var(--mono); }
.home-devices { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .6rem; margin-top: 1rem; }
.home-device { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .7rem .8rem; font-size: .85rem; transition: border-color .3s, background .3s; }
.home-device.on { border-color: var(--brand); background: var(--brand-soft); }
.home-device strong { display: block; }

/* ---------- Misc ---------- */
.toast-host { position: fixed; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: .6rem; z-index: 100; max-width: 380px; }
.toast { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--info); border-radius: var(--radius-sm); padding: .8rem 2.2rem .8rem 1rem; box-shadow: var(--shadow); position: relative; animation: slide .3s var(--ease); display: grid; gap: .15rem; font-size: .9rem; }
.toast-success { border-left-color: var(--ok); } .toast-warning { border-left-color: var(--warn); } .toast-error { border-left-color: var(--err); }
.toast-close { position: absolute; right: .4rem; top: .3rem; background: none; border: 0; color: var(--text-3); font-size: 1.1rem; cursor: pointer; }
@keyframes slide { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.page-loading { display: flex; gap: .6rem; align-items: center; padding: 3rem; color: var(--text-2); justify-content: center; }
.spinner { width: 18px; height: 18px; border-radius: 999px; border: 2px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius-sm); min-height: 120px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
details.faq { border-bottom: 1px solid var(--line); padding: .9rem 0; }
details.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
details.faq summary::after { content: "+"; color: var(--brand); font-weight: 700; }
details.faq[open] summary::after { content: "–"; }
details.faq p { color: var(--text-2); margin: .6rem 0 0; }
.admin-shell { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; padding-top: 2rem; padding-bottom: 2rem; align-items: start; }
.admin-nav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: .15rem; }
.admin-nav-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); padding: .5rem .7rem; font-weight: 700; }
.admin-nav a { padding: .5rem .7rem; border-radius: var(--radius-sm); color: var(--text-2); font-size: .9rem; }
.admin-nav a:hover, .admin-nav a.active { background: var(--surface); color: var(--text); }
.admin-content { min-width: 0; }
.modal { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 1.5rem; width: min(680px, 92vw); max-height: 90vh; overflow: auto; }
.modal::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(3px); }
.matrix { border-collapse: collapse; font-size: .82rem; }
.matrix th, .matrix td { border: 1px solid var(--line); padding: .35rem .5rem; text-align: center; }
.matrix th.rowhead { text-align: left; white-space: nowrap; background: var(--surface-2); }
.matrix thead th { background: var(--surface-2); writing-mode: vertical-rl; transform: rotate(180deg); padding: .6rem .35rem; }
.matrix input { accent-color: var(--brand); width: 16px; height: 16px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; font-size: .9rem; }
.kv dt { color: var(--text-2); } .kv dd { margin: 0; }
.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .5s var(--ease); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 110px 1fr; gap: .8rem; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.timeline time { color: var(--text-3); font-family: var(--mono); font-size: .78rem; }
.telemetry { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: pulse 1.5s infinite; margin-right: .4rem; }
.divisions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; counter-reset: div; }
.division { counter-increment: div; }
.division::before { content: counter(div, decimal-leading-zero); font-family: var(--mono); color: var(--text-3); font-size: .8rem; }
.division.featured { border-color: var(--brand); background: linear-gradient(180deg, var(--brand-soft), var(--surface)); }

@media (max-width: 1024px) {
  .configurator { grid-template-columns: 1fr; }
  .stepper { position: static; flex-direction: row; overflow-x: auto; padding-bottom: .5rem; }
  .step { flex-shrink: 0; }
  .summary { position: static; }
  .hero-grid { grid-template-columns: 1fr; }
  .device-art { max-width: 460px; margin: 0 auto; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-nav { position: static; flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .main-nav { display: none; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero { padding: 3.5rem 0 3rem; }
}

/* ---------- Overlay dialogs ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 90; padding: 1rem; animation: fade .2s var(--ease); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.device-card { cursor: pointer; }
.device-card.active { border-color: var(--brand); }

/* Focus management: FocusOnNavigate moves focus to h1; show a ring only for keyboard users. */
h1:focus:not(:focus-visible) { outline: none; }
.main-nav a { white-space: nowrap; }
@media (max-width: 1320px) { .topbar-actions .badge { display: none; } }
.topbar-inner { flex-wrap: nowrap; }
.topbar-actions .badge { white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; display: inline-block; }
@media (max-width: 1480px) { .topbar-actions .badge { display: none; } }
h1:focus-visible { outline: 2px solid var(--brand-soft); outline-offset: 10px; border-radius: 6px; }
.hero-stats { gap: 1.25rem 2rem; }
.hero-stats div { flex: 1 1 150px; min-width: 150px; }
.hero-stats div strong { font-size: 1.2rem; }


/* ---------- Enterprise identity ---------- */
.hero-enterprise { background: radial-gradient(900px 480px at 80% -10%, rgba(34, 211, 238, .18), transparent 60%), radial-gradient(700px 400px at 10% 110%, rgba(47, 107, 255, .25), transparent 60%), linear-gradient(180deg, #0b1220, #0f1a33); color: #e8ecf1; }
.hero-enterprise .lead { color: #b7c2d6; }
.hero-enterprise .eyebrow { color: var(--brand-2); }
.hero-enterprise .btn-secondary { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.18); }
.hero-enterprise .btn-ghost { color: #fff; border-color: rgba(255,255,255,.25); }
.hero-enterprise .hero-stats div strong { color: #fff; } .hero-enterprise .hero-stats div span { color: #8ea0bf; }
.rack-art { position: relative; aspect-ratio: 1/.85; display: grid; place-items: center; }
.rack { width: 62%; aspect-ratio: .42; background: linear-gradient(180deg, #16213b, #0c1427); border: 1px solid #27365c; border-radius: 10px; padding: 10px; display: grid; gap: 6px; grid-auto-rows: 1fr; box-shadow: 0 30px 60px rgba(0,0,0,.45); }
.rack i { display: block; border-radius: 3px; background: linear-gradient(90deg, #1c2a4a, #22335a); border: 1px solid #2d3f68; position: relative; }
.rack i.gpu { background: linear-gradient(90deg, #1b3a6b, #1e4d8a); }
.rack i::after { content: ""; position: absolute; right: 8px; top: 50%; width: 5px; height: 5px; border-radius: 999px; background: var(--brand-2); transform: translateY(-50%); box-shadow: 0 0 8px var(--brand-2); animation: pulse 2.4s infinite; }
.rack i:nth-child(odd)::after { animation-delay: .8s; }
.rack-label { position: absolute; bottom: 4%; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: .72rem; color: #8ea0bf; white-space: nowrap; }
.sectors { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; color: var(--text-3); font-size: .85rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.footer-cols a { display: block; color: var(--text-2); font-size: .9rem; padding: .15rem 0; }
.footer-head { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); font-weight: 700; margin-bottom: .4rem; }
.deploy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.deploy-card { display: flex; flex-direction: column; }
.deploy-card .eyebrow { margin-bottom: .2rem; }
.deploy-card ul { flex: 1; }
.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); border-radius: 999px; padding: .35rem .75rem; font: inherit; font-size: .85rem; cursor: pointer; }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }
.calc { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.2fr); gap: 1.5rem; align-items: start; }
.calc-compact { grid-template-columns: 1fr; }
.calc-inputs { display: grid; gap: .9rem; }
.calc-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .75rem .9rem; }
.calc-label { display: flex; justify-content: space-between; gap: .5rem; font-size: .85rem; font-weight: 600; color: var(--text-2); margin-bottom: .4rem; }
.calc-label span { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.calc-inline { display: inline-flex; align-items: center; gap: .4rem; }
.calc-dashboard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; position: sticky; top: 84px; }
.calc-table th { width: 44%; color: var(--text-2); font-weight: 600; text-align: left; }
.calc-table td, .calc-table th { padding: .45rem .5rem; border-bottom: 1px solid var(--line); font-size: .9rem; }
.warn-text { color: var(--warn); font-weight: 600; }
.coverage { display: grid; grid-template-columns: 1fr auto; gap: .6rem; align-items: center; margin: .6rem 0; }
.assumptions summary { cursor: pointer; font-size: .85rem; color: var(--text-2); font-weight: 600; margin-top: .6rem; }
.assumptions ul { padding-left: 1.1rem; }
.gpu-class { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: .15rem .55rem; }
.gpu-class.ConsumerHighEnd { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.gpu-class.Professional { background: var(--brand-soft); color: var(--brand); }
.gpu-class.DataCentre { background: color-mix(in srgb, var(--brand-2) 18%, transparent); color: var(--brand-2); }
.arch { width: 100%; height: auto; }
.arch text { font-family: var(--font); font-size: 11px; fill: var(--text); }
.arch .zone { fill: var(--surface); stroke: var(--line); }
.arch .zone-secure { fill: var(--brand-soft); stroke: var(--brand); stroke-dasharray: 4 3; }
.arch .box { fill: var(--surface-2); stroke: var(--line); rx: 6; }
.arch .box-gpu { fill: color-mix(in srgb, var(--brand) 22%, var(--surface-2)); stroke: var(--brand); }
.arch .flow { stroke: var(--text-3); stroke-width: 1.5; fill: none; marker-end: url(#arrow); }
.arch .label { fill: var(--text-2); font-size: 10px; }
.phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .9rem; counter-reset: ph; }
.phase { position: relative; padding-top: 1rem; }
.phase::before { content: "Month " counter(ph); counter-increment: ph; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.phase h3 { font-size: 1rem; margin: .3rem 0 .5rem; }
.phase ul { padding-left: 1rem; margin: 0; color: var(--text-2); font-size: .85rem; }
.phase .deliverable { margin-top: .6rem; font-size: .8rem; color: var(--text-3); border-top: 1px solid var(--line); padding-top: .5rem; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; counter-reset: st; }
.steps div { position: relative; padding: 1rem 1rem 1rem 2.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: .9rem; }
.steps div::before { counter-increment: st; content: counter(st); position: absolute; left: .8rem; top: .9rem; width: 24px; height: 24px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700; display: grid; place-items: center; }
.cost-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem; }
.gpu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .6rem; }
.gpu-tile { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem; font-size: .78rem; }
.gpu-tile .bar { height: 6px; background: var(--line); border-radius: 999px; margin: .35rem 0; overflow: hidden; }
.gpu-tile .bar span { display: block; height: 100%; background: var(--brand); }
.gpu-tile .bar.hot span { background: var(--warn); }
.print-only { display: none; }
@media print { .topbar, .footer, .toast-host, .no-print { display: none !important; } .print-only { display: block; } body { background: #fff; color: #000; } .card { break-inside: avoid; } }
@media (max-width: 1024px) { .calc { grid-template-columns: 1fr; } .calc-dashboard { position: static; } .footer-cols { grid-template-columns: 1fr; } }
