/* LiQ Unlock — dark-first design system.
   No external fonts, no trackers, no inline styles (strict CSP friendly). */

:root {
  color-scheme: dark;
  --bg: #050505;
  --bg-2: #0a0a0a;
  --panel: rgba(18, 18, 20, 0.78);
  --panel-solid: #111113;
  --panel-2: rgba(30, 30, 33, 0.78);
  --text: #f5f5f5;
  --text-strong: #ffffff;
  --muted: #b8b8b8;
  --faint: #8c8c8c;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.28);
  --accent: #ef4444;
  --accent-2: #f87171;
  --accent-soft: rgba(239, 68, 68, 0.14);
  --warm: #f87171;
  --danger: #f87171;
  --ok: #e5e5e5;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --wrap: 1180px;
  --header-h: 72px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f7f7;
  --bg-2: #ededed;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-solid: #ffffff;
  --panel-2: rgba(244, 244, 245, 0.95);
  --text: #141414;
  --text-strong: #050505;
  --muted: #4a4a4a;
  --faint: #5c5c5c;
  --line: rgba(0, 0, 0, 0.14);
  --line-strong: rgba(0, 0, 0, 0.28);
  --accent: #b91c1c;
  --accent-2: #991b1b;
  --accent-soft: rgba(185, 28, 28, 0.12);
  --warm: #b91c1c;
  --danger: #b91c1c;
  --ok: #111111;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.14);
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }

body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 78% -10%, rgba(248, 113, 113, 0.10), transparent 60%),
    radial-gradient(700px 500px at 5% 5%, rgba(239, 68, 68, 0.07), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.03em; color: var(--text-strong); margin: 0 0 0.5em; }
h1 { font-size: clamp(2.3rem, 3.7vw, 3.6rem); font-weight: 800; line-height: 1.06; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.7rem); font-weight: 750; }
h3 { font-size: 1.08rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }

.wrap { width: min(var(--wrap), calc(100% - 40px)); margin-inline: auto; }
.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; left: 16px; top: -80px; z-index: 100;
  background: var(--accent); color: #ffffff; padding: 12px 16px;
  border-radius: 10px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 16px; color: #ffffff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.header-inner { min-height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand-text { white-space: nowrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-strong); font-size: 1.1rem; letter-spacing: -0.02em; }
.brand strong { color: var(--accent); font-weight: 750; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(145deg, rgba(239,68,68,.22), rgba(248,113,113,.10)); border: 1px solid var(--line-strong); }
.brand-mark svg { width: 22px; height: 22px; fill: var(--accent); }
.site-nav { display: flex; gap: 26px; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 0.94rem; font-weight: 550; }
.site-nav a:hover { color: var(--text-strong); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-button {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line); border-radius: 11px;
  color: var(--text); cursor: pointer;
}
.icon-button:hover { border-color: var(--line-strong); background: var(--panel-2); }
.icon-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-toggle { display: none; }
.mobile-nav { display: none; padding: 10px 20px 18px; border-top: 1px solid var(--line); }
.mobile-nav a { display: block; padding: 10px 4px; color: var(--text); text-decoration: none; font-weight: 600; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 12px;
  background: linear-gradient(135deg, #b91c1c, #7f1d1d);
  color: #ffffff; font-weight: 750; font-size: 0.95rem; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
  box-shadow: 0 10px 30px rgba(248, 113, 113, 0.18);
}
.button:hover { transform: translateY(-1px); filter: brightness(1.06); color: #ffffff; }
[data-theme="light"] .button, [data-theme="light"] .button:hover { color: #ffffff; }
[data-theme="light"] .combo-submit { color: #ffffff; }
.button:active { transform: translateY(0); }
.button-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); box-shadow: none; }
.button-ghost:hover { background: var(--panel-2); color: var(--text-strong); }
.button-small { min-height: 38px; padding: 0 14px; font-size: 0.86rem; border-radius: 10px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(36px, 5vw, 64px); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px; mask-image: radial-gradient(60% 60% at 50% 30%, #000 0%, transparent 100%);
  opacity: .22;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 18px; color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(229,229,229,.14); }
.gradient-text { background: linear-gradient(100deg, var(--accent), var(--accent-2) 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { max-width: 56ch; color: var(--muted); font-size: clamp(1.02rem, 1.5vw, 1.16rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 22px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px 20px; list-style: none; color: var(--faint); font-size: .84rem; }
.trust-row li { display: flex; align-items: center; gap: 7px; }
.trust-row li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .8; }

/* ---------- Unlock panel ---------- */
.unlock-panel {
  position: relative; padding: 26px; border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel), color-mix(in srgb, var(--panel) 55%, transparent));
  border: 1px solid var(--line-strong); box-shadow: var(--shadow);
}
.unlock-panel::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(140deg, rgba(239,68,68,.35), transparent 35%, transparent 70%, rgba(248,113,113,.22));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; padding: 1px;
}
.panel-kicker { margin: 0 0 4px; color: var(--accent); font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.panel-title { font-size: 1.25rem; margin: 0 0 16px; }
.combo { position: relative; display: flex; gap: 8px; }
.combo input {
  flex: 1; min-width: 0; height: 52px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--text);
  font: inherit; font-size: 1rem;
}
.combo input::placeholder { color: var(--faint); }
.combo input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.combo-submit {
  width: 52px; height: 52px; flex: 0 0 auto; display: grid; place-items: center;
  border: 0; border-radius: 12px; background: linear-gradient(135deg, #b91c1c, #7f1d1d); color: #ffffff; cursor: pointer;
}
.combo-submit svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.combo-list {
  position: absolute; z-index: 30; left: 0; right: 60px; top: calc(100% + 8px);
  max-height: 320px; overflow: auto; list-style: none; padding: 6px;
  background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--shadow);
}
.combo-option { display: flex; align-items: flex-start; gap: 10px; padding: 10px 11px; border-radius: 9px; cursor: pointer; }
.combo-option[aria-selected="true"], .combo-option:hover { background: var(--accent-soft); }
.combo-option .co-label { display: block; color: var(--text-strong); font-weight: 650; font-size: .94rem; }
.combo-option .co-meta { display: block; color: var(--faint); font-size: .78rem; }
.combo-option .co-icon { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; background: var(--panel-2); color: var(--accent); font-size: .72rem; font-weight: 800; }
.hint { margin: 10px 0 0; color: var(--faint); font-size: .8rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: .8rem; cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--text-strong); background: var(--accent-soft); }
.unlock-result { margin-top: 16px; }
.result-card { border: 1px solid var(--line-strong); border-radius: 14px; padding: 16px; background: var(--panel-2); }
.result-card h3 { margin-bottom: 4px; }
.result-card .result-cat { color: var(--accent); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.result-col h4 { margin: 0 0 6px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ok); }
.result-col.cannot h4 { color: var(--danger); }
.result-col ul { list-style: none; display: grid; gap: 6px; }
.result-col li { position: relative; padding-left: 16px; color: var(--muted); font-size: .86rem; }
.result-col li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.result-col.cannot li::before { content: "×"; color: var(--danger); }
.result-note { color: var(--faint); font-size: .78rem; margin: 0 0 12px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.result-link { color: var(--accent); font-weight: 650; text-decoration: none; font-size: .88rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; border-top: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 34px; }
.section-lede { color: var(--muted); font-size: 1.05rem; margin: 0; }

/* ---------- House ---------- */
.house-card { border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); overflow: hidden; }
.house-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.tab { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .86rem; font-weight: 650; padding: 8px 13px; border-radius: 8px; cursor: pointer; }
.tab:hover { color: var(--text-strong); }
.tab.is-active { background: var(--panel-2); color: var(--text-strong); box-shadow: 0 1px 0 var(--line-strong) inset; }
.house-mode { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .82rem; font-weight: 650; }
.mode-switch { width: 54px; height: 30px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg-2); position: relative; cursor: pointer; padding: 0; }
.mode-knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(145deg, #e5e5e5, #71717a); transition: transform .22s ease, background .22s ease; }
.mode-switch[aria-pressed="true"] .mode-knob { transform: translateX(24px); background: linear-gradient(145deg, #ffffff, #ef4444); }
.house-stage { position: relative; aspect-ratio: 800 / 520; background: #050505; }
.house-svg { width: 100%; height: 100%; }
.house-badge { position: absolute; right: 14px; bottom: 14px; padding: 6px 10px; border-radius: 999px; background: rgba(4,10,18,.72); border: 1px solid var(--line-strong); color: var(--muted); font-size: .72rem; font-weight: 650; backdrop-filter: blur(8px); }

/* SVG theming */
.sky-top { stop-color: #0b0b0c; }
.sky-bottom { stop-color: #050505; }
.wall-top { stop-color: #1a1a1c; }
.wall-bottom { stop-color: #111113; }
.roof-top { stop-color: #2a2a2d; }
.roof-bottom { stop-color: #17171a; }
.fov-start { stop-color: #ef4444; stop-opacity: .55; }
.fov-end { stop-color: #ef4444; stop-opacity: 0; }
.stars { fill: #f5f5f5; opacity: .8; }
.moon { fill: #ffffff; opacity: .92; }
.moon-shadow { fill: #0b0b0c; opacity: .85; }
.ground { fill: #0e0e0f; }
.driveway { fill: #111113; }
.path { fill: #18181b; }
.tree circle, .tree rect { fill: #151515; }
.wall { fill: url(#wall); stroke: #3f3f46; stroke-width: 1; }
.roof { fill: url(#roof); stroke: #52525b; stroke-width: 1; }
.roof-edge { fill: #101012; opacity: .7; }
.floor-line { fill: #0e0e0f; opacity: .5; }
.window { fill: #0a0a0a; stroke: #3f3f46; stroke-width: 1; }
[data-mode="day"] .window { fill: #f5f5f5; stroke: #8c8c8c; }
[data-mode="day"] .wall { fill: #9a9a9a; }
[data-mode="day"] .roof { fill: #52525b; }
[data-mode="day"] .sky-top { stop-color: #e5e5e5; }
[data-mode="day"] .sky-bottom { stop-color: #ffffff; }
[data-mode="day"] .stars, [data-mode="day"] .moon, [data-mode="day"] .moon-shadow { opacity: 0; }
[data-mode="day"] .ground { fill: #d4d4d4; }
[data-mode="day"] .driveway { fill: #bdbdbd; }
[data-mode="day"] .tree circle, [data-mode="day"] .tree rect { fill: #8c8c8c; }
[data-mode="day"] .house-badge { background: rgba(255,255,255,.7); color: #1a1a1a; }
[data-mode="day"] .sky-top { stop-color: #e5e5e5; }
.door { fill: #0f0f10; stroke: #3f3f46; }
.garage-door { fill: #111113; stroke: #3f3f46; }
.garage-lines { stroke: #3f3f46; stroke-width: 1; }
.door-handle { fill: #d4d4d8; }
.ground-shadow ellipse { fill: #000; opacity: .35; }

.fov { fill: url(#fov); opacity: .34; transition: opacity .25s ease; }
[data-mode="night"] .fov { opacity: .46; }
[data-mode="night"] .fov-start { stop-color: #fca5a5; }
[data-mode="night"] .fov-end { stop-color: #fca5a5; }
[data-view="devices"] .fov-front, [data-view="devices"] .fov-doorbell { opacity: .5; }
[data-view="infrastructure"] .fov-layer, [data-view="cabling"] .fov-layer { opacity: 0; }
[data-view="cabling"] .fov-layer { opacity: .05; }
.cable { fill: none; stroke: #f87171; stroke-width: 1.6; stroke-dasharray: 5 6; opacity: 0; transition: opacity .25s ease; }
[data-view="cabling"] .cable { opacity: .85; }
.cable-fiber { stroke: #f5f5f5; }
.infra-layer { opacity: 0; transition: opacity .25s ease; }
[data-view="infrastructure"] .infra-layer { opacity: 1; }
.infra-box { fill: #111113; stroke: #f87171; stroke-width: 1.2; }
.infra-slot { fill: #3f3f46; }
.wireless-icon { fill: none; stroke: #ef4444; stroke-width: 2; stroke-linecap: round; }
.fiber-line { fill: none; stroke: #f5f5f5; stroke-width: 1.5; stroke-dasharray: 3 5; opacity: .6; }

/* Hotspots */
.house-hotspots { position: absolute; inset: 0; }
.hotspot {
  position: absolute; transform: translate(-50%, -50%);
  width: 30px; height: 30px; padding: 0; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.55); background: rgba(4,10,18,.55);
  color: #ffffff; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 0 0 6px rgba(239,68,68,.10), 0 0 22px rgba(239,68,68,.25);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
  z-index: 2;
}
.hotspot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.hotspot:hover, .hotspot:focus-visible, .hotspot[aria-current="true"] {
  transform: translate(-50%, -50%) scale(1.15); background: var(--accent); box-shadow: 0 0 0 7px rgba(239,68,68,.2), 0 0 28px rgba(239,68,68,.5); outline: none;
}
.hotspot:hover::before, .hotspot:focus-visible::before, .hotspot[aria-current="true"]::before { background: #ffffff; box-shadow: none; }
.hotspot .hs-label {
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  white-space: nowrap; padding: 5px 8px; border-radius: 7px; background: var(--panel-solid);
  border: 1px solid var(--line-strong); color: var(--text); font-size: .72rem; font-weight: 650;
  opacity: 0; pointer-events: none; transition: opacity .15s ease;
}
.hotspot:hover .hs-label, .hotspot:focus-visible .hs-label { opacity: 1; }
.hotspot[data-id="doorbell"] { left: 39.8%; top: 64%; }
.hotspot[data-id="camera-front"] { left: 23.5%; top: 40%; }
.hotspot[data-id="camera-side"] { left: 65%; top: 40%; }
.hotspot[data-id="camera-garage"] { left: 80%; top: 49%; }
.hotspot[data-id="camera-yard"] { left: 66%; top: 29%; }
.hotspot[data-id="motion"] { left: 46%; top: 55%; }
.hotspot[data-id="glassbreak"] { left: 55%; top: 51%; }
.hotspot[data-id="door-sensor"] { left: 43.5%; top: 66%; }
.hotspot[data-id="window-sensor"] { left: 29%; top: 56%; }
.hotspot[data-id="keypad"] { left: 51.5%; top: 69%; }
.hotspot[data-id="nvr"] { left: 26.5%; top: 80%; }
.hotspot[data-id="poe-switch"] { left: 31%; top: 85%; }
.hotspot[data-id="psu"] { left: 36%; top: 79%; }
.hotspot[data-id="ups"] { left: 41%; top: 85%; }
.hotspot[data-id="media-converter"] { left: 71%; top: 78%; }
.hotspot[data-id="wireless-link"] { left: 90%; top: 33%; }
.hotspot[data-id="router"] { left: 46%; top: 76%; }
.hotspot[data-id="patch-panel"] { left: 22%; top: 74%; }
.hotspot[data-id="fiber-run"] { left: 81%; top: 68%; }
.hotspot[data-id="copper-run"] { left: 58%; top: 72%; }

.house-legend { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.legend-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: .74rem; cursor: pointer; }
.legend-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.legend-pill:hover, .legend-pill.is-active { border-color: var(--accent); color: var(--text-strong); background: var(--accent-soft); }

/* Detail + accessories */
.detail-layout { display: grid; grid-template-columns: .95fr 1.25fr; gap: 18px; margin-top: 18px; align-items: start; }
.device-detail { min-height: 260px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--panel); padding: 20px; }
.detail-empty { color: var(--faint); margin: 0; }
.detail-kicker { color: var(--accent); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 4px; }
.detail-title { margin: 0 0 8px; font-size: 1.2rem; }
.detail-purpose { color: var(--text); }
.detail-facts { display: grid; gap: 10px; margin: 14px 0; }
.detail-facts div { display: grid; grid-template-columns: 92px 1fr; gap: 10px; font-size: .86rem; }
.detail-facts dt { color: var(--faint); }
.detail-facts dd { margin: 0; color: var(--muted); }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.detail-tag { padding: 4px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .7rem; font-weight: 650; }
.feed {
  position: relative; margin-top: 14px; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line-strong); aspect-ratio: 16 / 9; background: #080808;
}
.feed::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 50% 30%, rgba(239,68,68,.16), transparent 70%); }
.feed-scene { position: absolute; inset: 0; }
.feed-scene .ground { fill: #101012; } /* svg-scoped class */
.feed-label { position: absolute; left: 8px; top: 8px; z-index: 2; font: 600 .68rem/1 var(--mono); color: #f5f5f5; background: rgba(0,0,0,.42); padding: 4px 6px; border-radius: 4px; letter-spacing: .04em; }
.feed-time { position: absolute; right: 8px; bottom: 8px; z-index: 2; font: 500 .68rem/1 var(--mono); color: #f5f5f5; background: rgba(0,0,0,.42); padding: 4px 6px; border-radius: 4px; }
.feed-illus { position: absolute; right: 8px; top: 8px; z-index: 2; font: 500 .6rem/1 var(--mono); color: #d4d4d8; }
.accessory-strip { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--panel); padding: 20px; }
.accessory-head h3 { margin-bottom: 4px; }
.accessory-head p { color: var(--faint); font-size: .86rem; margin: 0 0 14px; }
.accessory-track { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.accessory-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--panel-2); }
.accessory-card h4 { margin: 0 0 4px; font-size: .86rem; color: var(--text-strong); }
.accessory-card p { margin: 0; color: var(--faint); font-size: .78rem; }

/* ---------- Services ---------- */
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.service-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 22px; background: var(--panel); transition: transform .18s ease, border-color .18s ease; }
.service-card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.service-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.service-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.service-card h3 { margin-bottom: 6px; }
.service-card p { color: var(--muted); font-size: .9rem; }
.service-card ul { list-style: none; display: grid; gap: 5px; margin-top: 12px; }
.service-card li { color: var(--faint); font-size: .8rem; padding-left: 14px; position: relative; }
.service-card li::before { content: ""; position: absolute; left: 0; top: .55em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* ---------- Unlock section ---------- */
.unlock-section { background: linear-gradient(180deg, transparent, rgba(248,113,113,.035) 40%, transparent); }
.unlock-layout { display: grid; gap: 22px; }
.legal-inline { border: 1px solid var(--line-strong); border-left: 3px solid var(--warm); border-radius: 12px; padding: 14px 16px; color: var(--muted); background: color-mix(in srgb, var(--warm) 6%, transparent); font-size: .9rem; }
.unlock-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.unlock-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 20px; background: var(--panel); }
.unlock-card h3 { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.unlock-card .badge { font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 4px 7px; border-radius: 999px; }
.unlock-card p { color: var(--muted); font-size: .88rem; }
.unlock-card .mini-list { display: grid; gap: 4px; list-style: none; margin-top: 10px; }
.unlock-card .mini-list li { font-size: .8rem; color: var(--faint); padding-left: 14px; position: relative; }
.unlock-card .mini-list li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); }
.unlock-empty { border: 1px dashed var(--line-strong); border-radius: 14px; padding: 20px; background: var(--panel); }

/* ---------- Steps ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: step; }
.steps li { border-top: 1px solid var(--line-strong); padding-top: 16px; }
.step-num { display: block; font: 700 .78rem/1 var(--mono); color: var(--accent); letter-spacing: .1em; margin-bottom: 10px; }
.steps h3 { font-size: 1rem; margin-bottom: 5px; }
.steps p { color: var(--faint); font-size: .84rem; margin: 0; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery-card { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--panel); }
.gallery-art { aspect-ratio: 4 / 3; position: relative; background: #0f0f10; overflow: hidden; }
.gallery-art::before, .gallery-art::after { content: ""; position: absolute; }
.art-camera { background: radial-gradient(circle at 70% 25%, rgba(239,68,68,.35), transparent 55%), linear-gradient(160deg, #141416, #080808); }
.art-camera::before { left: 22%; top: 44%; width: 42%; height: 16%; border-radius: 10px; background: linear-gradient(90deg, #d4d4d8, #52525b); }
.art-camera::after { left: 62%; top: 46%; width: 13%; height: 13%; border-radius: 50%; background: #05080d; border: 3px solid #ef4444; box-shadow: 0 0 22px rgba(239,68,68,.55); }
.art-rack { background: repeating-linear-gradient(0deg, #111113 0 18px, #1a1a1d 18px 20px); }
.art-rack::before { left: 30%; top: 12%; width: 40%; height: 76%; border-radius: 6px; border: 1px solid #f87171; box-shadow: inset 0 0 30px rgba(248,113,113,.18); }
.art-rack::after { left: 35%; top: 22%; width: 30%; height: 6%; background: #52525b; box-shadow: 0 18px 0 #52525b, 0 36px 0 #52525b, 0 54px 0 #52525b; }
.art-wiring { background: repeating-linear-gradient(35deg, #0f0f10 0 14px, #151517 14px 16px); }
.art-wiring::before { left: 12%; top: 30%; width: 76%; height: 2px; background: #f87171; box-shadow: 0 18px 0 #ef4444, 0 36px 0 #f5f5f5; }
.art-doorbell { background: radial-gradient(circle at 50% 45%, rgba(239,68,68,.28), transparent 60%), #0b0b0c; }
.art-doorbell::before { left: 42%; top: 24%; width: 16%; height: 52%; border-radius: 12px; background: #27272a; border: 1px solid #71717a; }
.art-doorbell::after { left: 47.5%; top: 33%; width: 5%; height: 5%; border-radius: 50%; background: #ef4444; box-shadow: 0 0 18px #ef4444; }
.art-wireless { background: radial-gradient(circle at 50% 70%, rgba(251,191,36,.18), transparent 55%), #0b0b0c; }
.art-wireless::before { left: 46%; top: 28%; width: 8%; height: 44%; background: #71717a; border-radius: 4px; }
.art-wireless::after { left: 26%; top: 18%; width: 48%; height: 48%; border: 2px solid #f5f5f5; border-radius: 50%; opacity: .7; }
.art-fiber { background: radial-gradient(circle at 30% 30%, rgba(251,191,36,.22), transparent 50%), #0b0b0c; }
.art-fiber::before { left: 8%; top: 50%; width: 84%; height: 2px; background: linear-gradient(90deg, #f5f5f5, #ef4444); }
.art-fiber::after { left: 48%; top: 42%; width: 8%; height: 18%; border-radius: 4px; background: #27272a; border: 1px solid #f5f5f5; }
.art-sensors { background: radial-gradient(circle at 70% 30%, rgba(239,68,68,.2), transparent 50%), #0b0b0c; }
.art-sensors::before { left: 24%; top: 30%; width: 18%; height: 30%; border-radius: 8px; background: #27272a; border: 1px solid #71717a; }
.art-sensors::after { left: 56%; top: 38%; width: 10%; height: 10%; border-radius: 50%; background: #ef4444; box-shadow: 0 0 20px #ef4444; }
.art-tools { background: repeating-linear-gradient(90deg, #0f0f10 0 10px, #151517 10px 12px); }
.art-tools::before { left: 18%; top: 46%; width: 30%; height: 8%; background: #d4d4d8; border-radius: 3px; transform: rotate(-25deg); }
.art-tools::after { left: 50%; top: 34%; width: 8%; height: 32%; background: #f5f5f5; border-radius: 3px; transform: rotate(25deg); }
.gallery-body { padding: 14px; }
.gallery-body h3 { font-size: .95rem; margin-bottom: 3px; }
.gallery-body p { color: var(--faint); font-size: .8rem; margin: 0; }
.gallery-note { color: var(--faint); font-size: .78rem; margin-top: 14px; }

/* ---------- Legal ---------- */
.legal-section { background: color-mix(in srgb, var(--warm) 4%, transparent); }
.legal-layout { display: grid; gap: 22px; }
.legal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.legal-card { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: var(--panel); }
.legal-card h3 { font-size: .95rem; margin-bottom: 5px; }
.legal-card p { color: var(--muted); font-size: .84rem; margin: 0; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-copy p { color: var(--muted); }
.contact-facts { display: grid; gap: 14px; margin: 26px 0 0; }
.contact-facts div { display: grid; gap: 2px; }
.contact-facts dt { color: var(--faint); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; }
.contact-facts dd { margin: 0; color: var(--text); font-size: .92rem; }
.lead-form { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 24px; background: var(--panel); box-shadow: var(--shadow); display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { color: var(--muted); font-size: .8rem; font-weight: 650; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--bg-2); color: var(--text); font: inherit; padding: 11px 12px;
}
.field textarea { resize: vertical; min-height: 100px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: flex; gap: 10px; align-items: flex-start; color: var(--faint); font-size: .8rem; }
.consent input { margin-top: 3px; }
.form-status { min-height: 1.2em; margin: 0; font-size: .84rem; color: var(--ok); }
.form-status.is-error { color: var(--danger); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 46px 0 24px; background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.footer-grid h3 { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.footer-grid a { display: block; color: var(--muted); text-decoration: none; font-size: .88rem; padding: 3px 0; }
.footer-grid a:hover { color: var(--text-strong); }
.footer-note { color: var(--faint); font-size: .82rem; margin-top: 12px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--faint); font-size: .76rem; }
.footer-bottom p { margin: 0; }

/* ---------- Dialog ---------- */
.detail-dialog {
  width: min(620px, calc(100% - 28px)); border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: 0; background: var(--panel-solid); color: var(--text);
  box-shadow: var(--shadow);
}
.detail-dialog::backdrop { background: rgba(2, 6, 12, .72); backdrop-filter: blur(4px); }
.dialog-head { display: flex; justify-content: space-between; gap: 16px; padding: 20px 20px 0; }
.dialog-kicker { color: var(--accent); font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 4px; }
.dialog-head h2 { margin: 0; font-size: 1.4rem; }
.dialog-body { padding: 14px 20px 22px; }
.noscript { background: var(--warm); color: #1a1204; padding: 12px 16px; text-align: center; font-size: .86rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; }
  .unlock-panel { max-width: 620px; }
  .detail-layout { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .site-nav { display: none; }
  .nav-toggle { display: grid; }
  .mobile-nav.is-open { display: block; }
  .contact-layout { grid-template-columns: 1fr; gap: 26px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .house-toolbar { align-items: flex-start; }
  .combo-list { right: 0; }
  .result-grid { grid-template-columns: 1fr; }
  .hotspot { width: 26px; height: 26px; }
  .hotspot .hs-label { display: none; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 28px); }
  .header-actions .button-small { display: none; }
  .hero { padding-top: 34px; }
  .hero-actions .button { width: 100%; }
  .gallery-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .house-badge { display: none; }
  .tabs { width: 100%; }
  .tab { flex: 1; padding-inline: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- Legal pages ---------- */
.prose-page { padding: clamp(40px, 7vw, 80px) 0; }
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(2rem, 4vw, 3rem); }
.prose h2 { font-size: 1.35rem; margin-top: 1.8em; }
.prose p, .prose li { color: var(--muted); }
.prose ul { list-style: disc; padding-left: 1.2em; display: grid; gap: 6px; }
.prose .updated { color: var(--faint); font-size: .82rem; }
.prose .back { display: inline-flex; margin-top: 30px; font-weight: 650; }

/* Text buttons that intentionally look like links. */
button.result-link {
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

/* ---------- Residential / commercial scenes ---------- */
.scene-commercial { display: none; }
.house-stage[data-building="commercial"] .scene-residential { display: none; }
.house-stage[data-building="commercial"] .scene-commercial { display: inline; }

.building-switch { display: inline-flex; gap: 3px; padding: 4px; border-radius: 11px; border: 1px solid var(--line-strong); background: var(--bg-2); }
.building-tab { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .8rem; font-weight: 650; padding: 7px 11px; border-radius: 7px; cursor: pointer; }
.building-tab:hover { color: var(--text-strong); }
.building-tab.is-active { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

.house-context { margin: 0; padding: 11px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.house-panels { padding: 0 16px 16px; display: grid; gap: 10px; }
.mini-panel { border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); padding: 14px; }
.mini-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.mini-head h3 { margin: 0; font-size: .95rem; }
.mini-head span { color: var(--faint); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat-grid div { border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; background: var(--panel); }
.stat-grid span { display: block; color: var(--faint); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
.stat-grid strong { display: block; margin-top: 3px; font-size: 1rem; color: var(--text-strong); }
.table-wrap { overflow-x: auto; }
.cable-table { width: 100%; border-collapse: collapse; font-size: .76rem; min-width: 620px; }
.cable-table th { text-align: left; color: var(--faint); font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; padding: 7px 8px; border-bottom: 1px solid var(--line-strong); }
.cable-table td { padding: 8px; color: var(--muted); border-bottom: 1px solid var(--line); vertical-align: top; }
.cable-table td:first-child { color: var(--text); font-weight: 600; }
.cable-table tr:last-child td { border-bottom: 0; }

/* Commercial scene colours */
.roof-flat { fill: #27272a; stroke: #52525b; }
.storefront-glass { fill: #101012; stroke: #3f3f46; }
.storefront-mullions { stroke: #3f3f46; }
.door-commercial { fill: #111113; stroke: #3f3f46; }
.warehouse-door { fill: #111113; stroke: #3f3f46; }
.sign { fill: var(--accent); opacity: .55; }
.roof-unit { fill: #27272a; stroke: #52525b; }
.parking-lot { fill: #0e0e0f; }
.parking-lines path { stroke: #52525b; stroke-width: 1; opacity: .55; }
.light-pole rect, .light-pole path { fill: #52525b; stroke: #71717a; }
.car path { fill: #1a1a1d; stroke: #3f3f46; }
.car rect { fill: #111113; stroke: #3f3f46; }
.car circle { fill: #0a0a0a; stroke: #71717a; }
[data-mode="day"] .roof-flat { fill: #71717a; }
[data-mode="day"] .storefront-glass { fill: #e5e5e5; }
[data-mode="day"] .door-commercial, [data-mode="day"] .warehouse-door { fill: #52525b; }
[data-mode="day"] .parking-lot { fill: #98a49b; }
[data-mode="day"] .parking-lines path { stroke: #f5f5f5; opacity: .8; }
[data-mode="day"] .car path, [data-mode="day"] .car rect { fill: #71717a; }
[data-mode="day"] .sign { opacity: .9; }

/* New residential / commercial hotspots */
.hotspot[data-id="ptz-backyard"] { left: 63%; top: 22%; }
.hotspot[data-id="lpr-driveway"] { left: 33%; top: 56%; }
.house-stage[data-building="commercial"] .hotspot[data-id="storefront-camera"] { left: 17%; top: 42%; }
.house-stage[data-building="commercial"] .hotspot[data-id="ptz-parking"] { left: 92%; top: 28%; }
.house-stage[data-building="commercial"] .hotspot[data-id="lpr-entrance"] { left: 63%; top: 57%; }
.house-stage[data-building="commercial"] .hotspot[data-id="warehouse-camera"] { left: 76%; top: 50%; }
.house-stage[data-building="commercial"] .hotspot[data-id="dock-camera"] { left: 65%; top: 68%; }
.house-stage[data-building="commercial"] .hotspot[data-id="fisheye-store"] { left: 32%; top: 42%; }
.house-stage[data-building="commercial"] .hotspot[data-id="motion"] { left: 45%; top: 55%; }
.house-stage[data-building="commercial"] .hotspot[data-id="glassbreak"] { left: 52%; top: 50%; }
.house-stage[data-building="commercial"] .hotspot[data-id="door-sensor"] { left: 42%; top: 66%; }
.house-stage[data-building="commercial"] .hotspot[data-id="window-sensor"] { left: 28%; top: 52%; }
.house-stage[data-building="commercial"] .hotspot[data-id="keypad"] { left: 48%; top: 69%; }
.house-stage[data-building="commercial"] .hotspot[data-id="wireless-link"] { left: 91%; top: 29%; }

/* Equipment art + specs in the detail panel */
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.device-art { width: 92px; height: auto; flex: 0 0 auto; opacity: .96; filter: drop-shadow(0 10px 18px rgba(0,0,0,.35)); }
.detail-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 12px 0; }
.detail-specs div { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; background: var(--panel-2); }
.detail-specs dt { color: var(--faint); font-size: .66rem; text-transform: uppercase; letter-spacing: .07em; }
.detail-specs dd { margin: 2px 0 0; color: var(--text); font-size: .8rem; }

/* Camera feed mode */
.feed[data-feed-mode="night"] .feed-scene { filter: saturate(.55) brightness(.88) contrast(1.12); }
.feed[data-feed-mode="night"]::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(80% 80% at 50% 40%, rgba(239,68,68,.10), transparent 70%);
  mix-blend-mode: screen;
}

@media (max-width: 760px) {
  .building-switch { order: -1; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .detail-specs { grid-template-columns: 1fr; }
  .device-art { width: 72px; }
}

/* Commercial comms cabinet replaces the residential rack position. */
.rack-commercial { display: none; }
.house-stage[data-building="commercial"] .rack-residential { display: none; }
.house-stage[data-building="commercial"] .rack-commercial { display: inline; }
.house-stage[data-building="commercial"] .hotspot[data-id="patch-panel"] { left: 54%; top: 73%; }
.house-stage[data-building="commercial"] .hotspot[data-id="nvr"] { left: 57%; top: 79%; }
.house-stage[data-building="commercial"] .hotspot[data-id="poe-switch"] { left: 60%; top: 85%; }
.house-stage[data-building="commercial"] .hotspot[data-id="psu"] { left: 63%; top: 79%; }
.house-stage[data-building="commercial"] .hotspot[data-id="ups"] { left: 66%; top: 85%; }
.house-stage[data-building="commercial"] .hotspot[data-id="router"] { left: 69%; top: 75%; }
.house-stage[data-building="commercial"] .hotspot[data-id="copper-run"] { left: 49%; top: 74%; }
.sign-text { fill: #ffffff; font-size: 10px; font-weight: 800; letter-spacing: .12em; }

/* Contrast fixes for the light theme and the skip link. */
.skip-link { background: var(--text-strong); color: var(--bg); }
.skip-link:focus { color: var(--bg); }
[data-theme="light"] .building-tab.is-active { color: var(--text-strong); }

/* Light-theme ghost button must not inherit the solid button's white text. */
[data-theme="light"] .button-ghost { color: var(--text); }
[data-theme="light"] .button-ghost:hover { color: var(--text-strong); background: var(--panel-2); }
.section-head { max-width: 900px; }

/* ---------- Facade carousel ---------- */
.scene { display: none; }
.house-stage[data-building="residential"][data-facade="front"] .scene-residential-front,
.house-stage[data-building="residential"][data-facade="right"] .scene-residential-right,
.house-stage[data-building="residential"][data-facade="rear"] .scene-residential-rear,
.house-stage[data-building="residential"][data-facade="left"] .scene-residential-left,
.house-stage[data-building="commercial"][data-facade="front"] .scene-commercial-front,
.house-stage[data-building="commercial"][data-facade="right"] .scene-commercial-right,
.house-stage[data-building="commercial"][data-facade="rear"] .scene-commercial-rear,
.house-stage[data-building="commercial"][data-facade="left"] .scene-commercial-left { display: inline; }

.facade-nav { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--bg-2); }
.facade-arrow { width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--text); font-size: 1.15rem; line-height: 1; cursor: pointer; }
.facade-arrow:hover { background: var(--accent-soft); color: var(--accent); }
.facade-label { min-width: 110px; white-space: nowrap; text-align: center; color: var(--muted); font-size: .76rem; font-weight: 650; }

/* Architectural details for the facade drawings. */
.porch-roof { fill: #1a1a1d; stroke: #3f3f46; }
.porch-post { fill: #3f3f46; }
.fence, .fence path { fill: none; stroke: #52525b; stroke-width: 2; }
.patio { fill: #1a1a1d; }
.sidewalk { fill: #1a1a1d; }
.meter { fill: #1a1a1d; stroke: #71717a; }
.conduit, .downspout { fill: none; stroke: #71717a; stroke-width: 3; stroke-linecap: round; }
.glass-door { fill: #0a0a0a; stroke: #3f3f46; }
.dock { fill: #1a1a1d; stroke: #3f3f46; }
.curb { fill: #3f3f46; }
[data-mode="day"] .porch-roof { fill: #6b6b6b; }
[data-mode="day"] .patio, [data-mode="day"] .sidewalk, [data-mode="day"] .dock { fill: #c7c7c7; }
[data-mode="day"] .curb { fill: #9a9a9a; }
[data-mode="day"] .fence, [data-mode="day"] .fence path { stroke: #71717a; }
[data-mode="day"] .meter { fill: #d4d4d4; stroke: #52525b; }
[data-mode="day"] .glass-door { fill: #d4d4d4; stroke: #71717a; }

/* Cabling clips and rack visibility. */
.clip { fill: var(--accent); opacity: 0; transition: opacity .2s ease; }
[data-view="cabling"] .clip { opacity: .9; }
.rack-human { opacity: 0; transition: opacity .2s ease; }
[data-view="infrastructure"] .rack-human, [data-view="cabling"] .rack-human { opacity: 1; }

/* ---------- Accurate hotspot positions ---------- */
.hotspot[data-id="doorbell"] { left: 39.8%; top: 71%; }
.hotspot[data-id="camera-front"] { left: 40%; top: 63.5%; }
.hotspot[data-id="camera-garage"] { left: 78%; top: 67%; }
.hotspot[data-id="ptz-front"] { left: 41.2%; top: 19%; }
.hotspot[data-id="lpr-driveway"] { left: 70.6%; top: 63.5%; }
.hotspot[data-id="camera-side"] { left: 70%; top: 63.5%; }
.hotspot[data-id="camera-yard"] { left: 50%; top: 59%; }
.hotspot[data-id="camera-front"], .hotspot[data-id="camera-side"], .hotspot[data-id="camera-yard"] { border-color: #ffffff; }
.hotspot[data-id="door-sensor"] { left: 43%; top: 70%; }
.hotspot[data-id="window-sensor"] { left: 29%; top: 55%; }
.hotspot[data-id="keypad"] { left: 51%; top: 74%; }
.hotspot[data-id="media-converter"] { left: 62.5%; top: 67%; }
.hotspot[data-id="wireless-link"] { left: 76%; top: 30%; }
.hotspot[data-id="fiber-run"] { left: 37.5%; top: 79%; }
.hotspot[data-id="copper-run"] { left: 50%; top: 80%; }
.hotspot[data-id="patch-panel"] { left: 76%; top: 70%; }
.hotspot[data-id="nvr"] { left: 78.5%; top: 76%; }
.hotspot[data-id="poe-switch"] { left: 80.5%; top: 82%; }
.hotspot[data-id="psu"] { left: 82.5%; top: 70%; }
.hotspot[data-id="ups"] { left: 84.5%; top: 78%; }
.hotspot[data-id="router"] { left: 86.5%; top: 84%; }
.house-stage[data-building="residential"] .hotspot[data-id="motion"] { left: 62.5%; top: 48%; }
.house-stage[data-building="residential"] .hotspot[data-id="glassbreak"] { left: 35%; top: 48%; }

/* Commercial positions */
.house-stage[data-building="commercial"] .hotspot[data-id="storefront-camera"] { left: 22.5%; top: 57.5%; }
.house-stage[data-building="commercial"] .hotspot[data-id="lpr-entrance"] { left: 70%; top: 63.5%; }
.house-stage[data-building="commercial"][data-facade="interior"] .hotspot[data-id="fisheye-store"] { left: 50%; top: 55%; }
.house-stage[data-building="commercial"] .hotspot[data-id="ptz-parking"] { left: 41.2%; top: 36.5%; }
.house-stage[data-building="commercial"] .hotspot[data-id="warehouse-camera"] { left: 75%; top: 57.5%; }
.house-stage[data-building="commercial"] .hotspot[data-id="dock-camera"] { left: 52.5%; top: 61.5%; }
.house-stage[data-building="commercial"] .hotspot[data-id="motion"] { left: 46%; top: 54%; }
.house-stage[data-building="commercial"] .hotspot[data-id="glassbreak"] { left: 60%; top: 54%; }
.house-stage[data-building="commercial"] .hotspot[data-id="door-sensor"] { left: 55%; top: 70%; }
.house-stage[data-building="commercial"] .hotspot[data-id="window-sensor"] { left: 30%; top: 55%; }
.house-stage[data-building="commercial"] .hotspot[data-id="keypad"] { left: 52%; top: 74%; }
.house-stage[data-building="commercial"] .hotspot[data-id="media-converter"] { left: 68%; top: 67%; }
.house-stage[data-building="commercial"] .hotspot[data-id="fiber-run"] { left: 41%; top: 79%; }
.house-stage[data-building="commercial"] .hotspot[data-id="wireless-link"] { left: 36%; top: 27%; }
.house-stage[data-building="commercial"] .hotspot[data-id="copper-run"] { left: 60%; top: 80%; }
.house-stage[data-building="commercial"] .hotspot[data-id="patch-panel"] { left: 82%; top: 70%; }
.house-stage[data-building="commercial"] .hotspot[data-id="nvr"] { left: 84%; top: 76%; }
.house-stage[data-building="commercial"] .hotspot[data-id="poe-switch"] { left: 86%; top: 82%; }
.house-stage[data-building="commercial"] .hotspot[data-id="psu"] { left: 88%; top: 70%; }
.house-stage[data-building="commercial"] .hotspot[data-id="ups"] { left: 90%; top: 78%; }
.house-stage[data-building="commercial"] .hotspot[data-id="router"] { left: 92%; top: 84%; }

/* Mounting schedule */
.mount-table { min-width: 460px; }
@media (max-width: 760px) {
  .facade-label { min-width: 60px; }
  .facade-nav { order: -1; }
}

/* Interior floor plans */
.house-stage[data-building="residential"][data-facade="interior"] .scene-residential-interior,
.house-stage[data-building="commercial"][data-facade="interior"] .scene-commercial-interior { display: inline; }
.floorplan { fill: #0f0f10; stroke: #52525b; stroke-width: 2; }
.room-line, .room-line path { fill: none; stroke: #3f3f46; stroke-width: 2; }
.room-label { fill: #8c8c8c; font-family: ui-monospace, monospace; font-size: 9px; letter-spacing: .12em; }
[data-mode="day"] .floorplan { fill: #ededed; stroke: #71717a; }
[data-mode="day"] .room-line, [data-mode="day"] .room-line path { stroke: #a1a1aa; }
[data-mode="day"] .room-label { fill: #52525b; }

/* Interior sensor positions */
.house-stage[data-building="residential"][data-facade="interior"] .hotspot[data-id="keypad"] { left: 29%; top: 79%; }
.house-stage[data-building="residential"][data-facade="interior"] .hotspot[data-id="door-sensor"] { left: 31%; top: 81%; }
.house-stage[data-building="residential"][data-facade="interior"] .hotspot[data-id="window-sensor"] { left: 37.5%; top: 60%; }
.house-stage[data-building="residential"][data-facade="interior"] .hotspot[data-id="motion"] { left: 45%; top: 73%; }
.house-stage[data-building="residential"][data-facade="interior"] .hotspot[data-id="glassbreak"] { left: 55%; top: 60%; }
.house-stage[data-building="commercial"][data-facade="interior"] .hotspot[data-id="keypad"] { left: 32.5%; top: 79%; }
.house-stage[data-building="commercial"][data-facade="interior"] .hotspot[data-id="door-sensor"] { left: 31%; top: 82%; }
.house-stage[data-building="commercial"][data-facade="interior"] .hotspot[data-id="window-sensor"] { left: 31%; top: 48%; }
.house-stage[data-building="commercial"][data-facade="interior"] .hotspot[data-id="motion"] { left: 37.5%; top: 73%; }
.house-stage[data-building="commercial"][data-facade="interior"] .hotspot[data-id="glassbreak"] { left: 47%; top: 44%; }

/* Interior rack positions */
.house-stage[data-building="residential"][data-facade="interior"] .hotspot[data-id="patch-panel"],
.house-stage[data-building="commercial"][data-facade="interior"] .hotspot[data-id="patch-panel"] { left: 72.5%; top: 73%; }
.house-stage[data-building="residential"][data-facade="interior"] .hotspot[data-id="nvr"],
.house-stage[data-building="commercial"][data-facade="interior"] .hotspot[data-id="nvr"] { left: 74%; top: 79%; }
.house-stage[data-building="residential"][data-facade="interior"] .hotspot[data-id="poe-switch"],
.house-stage[data-building="commercial"][data-facade="interior"] .hotspot[data-id="poe-switch"] { left: 76%; top: 85%; }
.house-stage[data-building="residential"][data-facade="interior"] .hotspot[data-id="psu"],
.house-stage[data-building="commercial"][data-facade="interior"] .hotspot[data-id="psu"] { left: 78%; top: 73%; }
.house-stage[data-building="residential"][data-facade="interior"] .hotspot[data-id="ups"],
.house-stage[data-building="commercial"][data-facade="interior"] .hotspot[data-id="ups"] { left: 80%; top: 79%; }
.house-stage[data-building="residential"][data-facade="interior"] .hotspot[data-id="router"],
.house-stage[data-building="commercial"][data-facade="interior"] .hotspot[data-id="router"] { left: 82%; top: 85%; }
.conduit-entry { fill: #1a1a1d; stroke: var(--accent); stroke-width: 1.5; }
.conduit-label { fill: var(--muted); font-family: ui-monospace, monospace; font-size: 8px; letter-spacing: .08em; opacity: 0; }
[data-view="cabling"] .conduit-label { opacity: 1; }

.cable-key { display: flex; gap: 14px; margin: -2px 0 10px; color: var(--faint); font-size: .7rem; }
.cable-key .key { display: inline-flex; align-items: center; gap: 6px; }
.cable-key .key::before { content: ""; width: 26px; height: 0; border-top: 2px dashed var(--accent); }
.cable-key .key-fiber::before { border-top-color: #f5f5f5; }

/* ---------- Local placement editor ---------- */
body.is-editing { padding-bottom: 88px; }
.editor-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px;
  padding: 10px 16px; border-top: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--panel-solid) 94%, transparent);
  backdrop-filter: blur(14px); box-shadow: 0 -12px 40px rgba(0,0,0,.35);
}
.editor-bar strong { font-size: .84rem; color: var(--accent); letter-spacing: .02em; }
.editor-hint { color: var(--faint); font-size: .76rem; }
.editor-coords { color: var(--text); font: 600 .76rem var(--mono); }
.editor-status { color: var(--muted); font-size: .76rem; margin-left: auto; }
.is-editing .hotspot { cursor: grab; outline: 1px dashed rgba(255,255,255,.55); outline-offset: 2px; }
.is-editing .hotspot:active { cursor: grabbing; }
.is-editing .house-stage { touch-action: none; }

/* ---------- Typography scale ----------
   Base 17px root, 18px body. Headings use a ~1.25 ratio. Secondary text
   never drops below 14px; body/cards/buttons stay at 16px or more. */
html { font-size: 17px; }
body { font-size: 1.06rem; line-height: 1.65; }

h1 { font-size: clamp(2.3rem, 3.9vw, 3.35rem); line-height: 1.06; }
h2 { font-size: clamp(1.85rem, 3.15vw, 2.7rem); line-height: 1.14; }
h3 { font-size: 1.18rem; line-height: 1.3; }

.lede { font-size: clamp(1.08rem, 1.55vw, 1.22rem); line-height: 1.65; }
.section-lede { font-size: 1.08rem; line-height: 1.65; }
.site-nav a, .mobile-nav a { font-size: 1rem; }
.button { font-size: 1rem; }
.building-tab, .tab { font-size: .92rem; }
.chip { font-size: .88rem; }
.facade-label { font-size: .84rem; }
.eyebrow { font-size: .82rem; }
.panel-title { font-size: 1.32rem; }
.hint { font-size: .86rem; }
.service-card p, .unlock-card p { font-size: .98rem; }
.service-card li { font-size: .9rem; }
.legal-card p { font-size: .94rem; }
.accessory-card p, .gallery-body p, .gallery-note { font-size: .87rem; }
.footer-grid a { font-size: .94rem; }
.footer-note, .footer-bottom { font-size: .86rem; }
.detail-facts div { font-size: .93rem; }
.detail-specs dd { font-size: .88rem; }
.detail-specs dt { font-size: .7rem; }
.legend-pill { font-size: .8rem; }
.result-col li { font-size: .92rem; }
.result-note { font-size: .86rem; }
.cable-table { font-size: .83rem; }
.cable-table th { font-size: .72rem; }
.stat-grid span { font-size: .72rem; }
.stat-grid strong { font-size: 1.06rem; }
.field label { font-size: .86rem; }
.consent { font-size: .86rem; }
.editor-hint, .editor-status, .editor-coords { font-size: .82rem; }

@media (max-width: 560px) {
  html { font-size: 16px; }
  body { font-size: 1.0625rem; }
  h1 { font-size: clamp(2.2rem, 8.5vw, 2.9rem); }
  h2 { font-size: clamp(1.7rem, 7vw, 2.1rem); }
}

@media (max-width: 560px) {
  .service-card p, .unlock-card p, .legal-card p, .result-col li, .detail-facts div { font-size: 1rem; }
}

/* Editable cable routes */
.routes-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.routes-overlay .cable { stroke-linecap: round; }
.routes-overlay .clip { pointer-events: none; }
#routes-handles circle {
  pointer-events: auto; cursor: grab; fill: var(--accent); stroke: #ffffff;
  stroke-width: 1.5; opacity: 0; transition: opacity .15s ease;
}
.is-editing #routes-handles circle { opacity: 1; }
#routes-handles circle.is-selected { fill: #ffffff; stroke: var(--accent); stroke-width: 3; }
.editor-routes { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.editor-routes select {
  background: var(--bg-2); color: var(--text); border: 1px solid var(--line-strong);
  border-radius: 8px; padding: 7px 8px; font: inherit; font-size: .8rem;
}
.editor-routes button { min-height: 32px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: inherit; font-size: .78rem; cursor: pointer; }
.editor-routes button:hover { border-color: var(--accent); color: var(--accent); }
/* Let clicks pass through the hotspot layer except on actual hotspots, so
   route waypoints underneath remain draggable. */
.house-hotspots { pointer-events: none; }
.hotspot { pointer-events: auto; }

/* The HTML hidden attribute must beat component display rules. */
[hidden] { display: none !important; }
