/* =========================================================
   v9 "Welcome home"
   The page is a house you can use. Lights off = night (default),
   lights on = a lit room. One cobalt accent, warm light for "on".
   ========================================================= */
html.is-v7 {
  --page: #04060a;
  --panel: #0b1017;
  --panel-2: #0f1620;
  --line: #1b2431;
  --line-2: #263142;
  --ink: #ebf0f7;
  --muted: #8a95a8;
  --faint: #73809a;
  --blue: #3d7bff;
  --btn: #2f66f0;                  /* button background: white text on it is 4.9:1 */
  --btn-hover: #2a5fe6;
  --blue-2: #9bbcff;
  --warm: #ffc46b;
  --ok: #3ddc97;
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, .8);
  --lux: 70;                       /* brightness of the lights, 10..100 */
  --hue: 38;                       /* colour of the lights, 0..360 (38 = warm white) */

  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1220px;
  --radius: 22px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}

/* lights on: a lit room. Brightness nudges the walls lighter or dimmer,
   and the colour (--hue) tints the walls, the lamp glow and the switch. */
html.is-v7[data-lights="on"] {
  --page: hsl(var(--hue) 32% calc(84% + var(--lux) * .12%));
  --panel: hsl(0 0% 100% / .82);
  --panel-2: hsl(var(--hue) 40% 97%);
  --line: hsl(var(--hue) 22% 84%);
  --line-2: hsl(var(--hue) 18% 76%);
  --ink: #0b1220;
  --muted: #4f5b70;
  --faint: #7c8799;
  --blue: #2f66f0;
  --blue-2: #1d4fd8;
  --shadow: 0 30px 60px -34px rgba(20, 35, 70, .35);
  color-scheme: light;
}

html.is-v7 *, html.is-v7 *::before, html.is-v7 *::after { box-sizing: border-box; }
html.is-v7 { scroll-behavior: smooth; }
html.is-v7 body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
html.is-v7 img { display: block; max-width: 100%; height: auto; }
html.is-v7 a { color: inherit; }
html.is-v7 svg { display: block; }
html.is-v7 ::selection { background: var(--blue); color: #fff; }
html.is-v7 :focus-visible { outline: 2px solid var(--blue-2); outline-offset: 3px; border-radius: 8px; }
html.is-v7 .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html.is-v7 .skip { position: absolute; left: var(--gutter); top: -60px; z-index: 100; padding: 8px 14px; background: var(--ink); color: var(--page); border-radius: 8px; }
html.is-v7 .skip:focus { top: 12px; }

/* the warm "lamp" light behind the hero. Brighter with the dimmer, only when lights are on */
html.is-v7 .lamp {
  position: fixed; z-index: -1; pointer-events: none;
  width: 70vmax; height: 70vmax; left: -20vmax; top: -30vmax; border-radius: 50%;
  background: radial-gradient(circle, rgba(61, 123, 255, .22), transparent 62%);
  transition: background .6s var(--ease), opacity .6s var(--ease);
}
html.is-v7[data-lights="on"] .lamp {
  background: radial-gradient(circle, hsl(var(--hue) 100% 62% / calc(var(--lux) * .007)), transparent 62%);
}

/* view transition used by the light switch: the new room spreads out from the switch */
html.is-v7::view-transition-old(root), html.is-v7::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Buttons ---------- */
html.is-v7 .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 20px;
  font: 600 15px/1 var(--font); color: var(--ink); text-decoration: none;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 999px;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, transform .15s var(--ease), box-shadow .2s;
}
html.is-v7 .btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
html.is-v7 .btn:active { transform: scale(.97); }
html.is-v7 .btn-primary { color: #fff; background: var(--btn); border-color: transparent; box-shadow: 0 10px 30px -12px rgba(61, 123, 255, .8); }
html.is-v7 .btn-primary:hover { background: var(--btn-hover); }
html.is-v7 .btn-primary:disabled { background: var(--line-2); color: var(--muted); box-shadow: none; cursor: not-allowed; }
html.is-v7 .btn-ghost:hover { border-color: var(--blue); }
html.is-v7 .btn-lg { min-height: 56px; padding: 0 26px; font-size: 17px; }
html.is-v7 .link { font-weight: 600; text-underline-offset: 6px; text-decoration-thickness: 2px; text-decoration-color: var(--blue); }

/* ---------- Top bar ---------- */
html.is-v7 .bar {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 12px var(--gutter);
  background: color-mix(in srgb, var(--page) 78%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  transition: background-color .5s var(--ease), border-color .5s;
}
html.is-v7 .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -.01em; }
html.is-v7 .brand img { border-radius: 50%; }
html.is-v7 .bar-status { margin: 0; display: flex; gap: 18px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
html.is-v7 .bar-status time, html.is-v7 .bar-status .js-sun-short { color: var(--ink); }
html.is-v7 .bar-actions { justify-self: end; display: flex; align-items: center; gap: 14px; }
html.is-v7 .btn-bell { min-height: 40px; padding: 0 16px; font-size: 14px; }
@media (max-width: 900px) { html.is-v7 .bar-status { display: none; } html.is-v7 .bar { grid-template-columns: 1fr auto; } }
@media (max-width: 560px) {
  html.is-v7 .brand span { display: none; }
  html.is-v7 .btn-bell { width: 40px; padding: 0; }
  html.is-v7 .btn-bell span { display: none; }
}

/* small switch (TV) */
html.is-v7 .mini-switch { display: inline-flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; color: var(--muted); font: 500 14px/1 var(--font); cursor: pointer; }
html.is-v7 .mini-switch-track { position: relative; width: 40px; height: 24px; border-radius: 999px; background: var(--line-2); transition: background-color .3s var(--ease); }
html.is-v7 .mini-switch-knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); transition: transform .3s var(--ease); }
html.is-v7 .mini-switch[aria-checked="true"] .mini-switch-track { background: var(--blue); }
html.is-v7 .mini-switch[aria-checked="true"] .mini-switch-knob { transform: translateX(16px); }
html.is-v7 .mini-switch[aria-checked="true"] { color: var(--ink); }

/* ---------- Hero ---------- */
html.is-v7 .hero {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center;
  min-height: calc(100vh - 66px); min-height: calc(100svh - 66px);
  padding: clamp(40px, 6vw, 80px) var(--gutter);
}
html.is-v7 .hello { margin: 0 0 14px; font-size: 18px; color: var(--muted); }
html.is-v7 .hero h1 {
  margin: 0;
  font-size: clamp(52px, 8.4vw, 120px); font-weight: 800; line-height: .9; letter-spacing: -.055em;
}
html.is-v7 .lede { margin: 28px 0 0; max-width: 34ch; font-size: clamp(19px, 1.9vw, 23px); line-height: 1.45; }
html.is-v7 .lede-small { margin-top: 14px; font-size: 17px; color: var(--muted); max-width: 42ch; }
html.is-v7 .cta-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 36px; }

/* the control panel */
html.is-v7 .panel {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
html.is-v7 .tile {
  position: relative;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .04);
  transition: background-color .5s var(--ease), border-color .5s;
}
html.is-v7 .tile-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
html.is-v7 .tile-head h2 { margin: 0; font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
html.is-v7 .tile-note { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
html.is-v7 .led { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--faint) 18%, transparent); transition: background-color .3s, box-shadow .3s; }
html.is-v7 .led.is-on { background: hsl(var(--hue) 100% 68%); box-shadow: 0 0 0 3px hsl(var(--hue) 100% 68% / .2), 0 0 14px hsl(var(--hue) 100% 68% / .8); }
html.is-v7 .led-ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(61, 220, 151, .18), 0 0 12px rgba(61, 220, 151, .7); }
html.is-v7 .led-sun.is-on { background: #ffd56b; box-shadow: 0 0 0 3px rgba(255, 213, 107, .2), 0 0 14px rgba(255, 213, 107, .8); }

html.is-v7 .tile-lights { grid-row: span 2; display: flex; flex-direction: column; }
/* everything under the title sits in the middle of the tall tile */
html.is-v7 .lights-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 22px; }
html.is-v7 .lights-controls { display: grid; gap: 16px; }
html.is-v7 .lights-body .tile-note { margin: 0; text-align: center; }
html.is-v7 .tile-sun { grid-column: 2; }
html.is-v7 .tile-door { grid-column: 2; display: flex; flex-direction: column; align-items: flex-start; }

/* rocker switch */
html.is-v7 .rocker {
  align-self: center;
  width: 118px; height: 168px; padding: 10px;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 20px;
  cursor: pointer;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .35);
}
html.is-v7 .rocker-face {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; align-items: center;
  width: 100%; height: 100%; padding: 16px 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #1a2230 0%, #0e141d 100%);
  box-shadow: 0 10px 16px -6px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06);
  font: 600 12px/1 var(--mono); color: var(--faint);
  transform: perspective(300px) rotateX(-9deg);
  transition: transform .35s var(--ease), background .35s var(--ease), box-shadow .35s var(--ease), color .35s;
}
html.is-v7 .rocker[aria-checked="true"] .rocker-face {
  transform: perspective(300px) rotateX(9deg);
  background: linear-gradient(0deg, hsl(var(--hue) 100% 94%) 0%, #ffffff 100%);
  box-shadow: 0 -10px 16px -6px rgba(20, 35, 70, .25), 0 0 44px hsl(var(--hue) 100% 65% / .45);
}
html.is-v7 .rocker[aria-checked="true"] .rocker-on { color: hsl(var(--hue) 75% 36%); }
html.is-v7 .rocker[aria-checked="false"] .rocker-off { color: var(--muted); }

html.is-v7 .dimmer { display: block; }
html.is-v7 .dimmer-label { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
html.is-v7 .dimmer-label output { font-family: var(--mono); color: var(--ink); }
html.is-v7 .dimmer input { width: 100%; margin: 0; accent-color: hsl(var(--hue) 90% 58%); }
html.is-v7 .dimmer input:disabled { opacity: .45; }
/* colour slider: a rainbow track with a round knob in the chosen colour */
html.is-v7 .dimmer-hue input {
  -webkit-appearance: none; appearance: none;
  height: 10px; border-radius: 999px; cursor: pointer;
  background: linear-gradient(90deg, hsl(0 90% 62%), hsl(60 90% 58%), hsl(120 75% 52%), hsl(180 80% 52%), hsl(240 90% 66%), hsl(300 85% 62%), hsl(360 90% 62%));
}
html.is-v7 .dimmer-hue input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: hsl(var(--hue) 95% 62%); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .45);
}
html.is-v7 .dimmer-hue input::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: hsl(var(--hue) 95% 62%); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .45);
}
html.is-v7 .dimmer-hue input:disabled { cursor: not-allowed; filter: grayscale(.8); }
html.is-v7 .swatches { display: flex; justify-content: center; gap: 10px; }
html.is-v7 .swatch {
  width: 30px; height: 30px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--line-2);
  transition: transform .15s var(--ease), box-shadow .2s;
}
html.is-v7 .swatch[data-hue="38"]  { background: hsl(38 100% 78%); }
html.is-v7 .swatch[data-hue="210"] { background: hsl(210 95% 66%); }
html.is-v7 .swatch[data-hue="160"] { background: hsl(160 70% 55%); }
html.is-v7 .swatch[data-hue="300"] { background: hsl(300 75% 66%); }
html.is-v7 .swatch[data-hue="350"] { background: hsl(350 90% 68%); }
html.is-v7 .swatch:hover:not(:disabled) { transform: scale(1.1); }
html.is-v7 .swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
html.is-v7 .swatch:disabled { opacity: .35; cursor: not-allowed; }

/* sun */
html.is-v7 .sky { width: 100%; height: auto; overflow: visible; }
html.is-v7 .sky-arc { fill: none; stroke: var(--line-2); stroke-width: 1.5; stroke-dasharray: 2 6; }
html.is-v7 .sky-horizon { stroke: var(--line-2); stroke-width: 1.5; }
html.is-v7 .sky-sun { fill: #ffd56b; filter: drop-shadow(0 0 8px rgba(255, 213, 107, .9)); transition: opacity .4s; }
html.is-v7 .sky-sun.is-night { fill: var(--faint); filter: none; opacity: .5; }
html.is-v7 .sun-big { margin: 10px 0 12px; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
html.is-v7 .sun-facts { display: flex; gap: 18px; margin: 0; }
html.is-v7 .sun-facts div { min-width: 0; }
html.is-v7 .sun-facts dt { font-size: 12px; color: var(--muted); }
html.is-v7 .sun-facts dd { margin: 2px 0 0; font-family: var(--mono); font-size: 14px; }

/* doorbell */
html.is-v7 .doorbell {
  position: relative; align-self: center;
  width: 92px; height: 92px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, #1d2738, #0c121b);
  border: 1px solid var(--line-2);
  color: var(--blue-2); cursor: pointer;
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--blue) 10%, transparent), 0 14px 30px -12px rgba(0, 0, 0, .8);
  transition: transform .15s var(--ease), box-shadow .3s;
}
html.is-v7 .doorbell svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
html.is-v7 .doorbell:hover { box-shadow: 0 0 0 10px color-mix(in srgb, var(--blue) 18%, transparent), 0 14px 30px -12px rgba(0, 0, 0, .8); }
html.is-v7 .doorbell:active { transform: scale(.94); }
html.is-v7 .doorbell-ring { position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--blue); opacity: 0; }
html.is-v7 .doorbell.is-ringing .doorbell-ring { animation: ring-v7 1s var(--ease) 2; }
html.is-v7 .doorbell.is-ringing svg, html.is-v7 .btn.is-ringing svg, html.is-v7 .fab.is-ringing svg { animation: wiggle-v7 .5s ease-in-out 2; transform-origin: 50% 15%; }
@keyframes ring-v7 { from { opacity: .9; transform: scale(.9); } to { opacity: 0; transform: scale(1.5); } }
@keyframes wiggle-v7 { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-16deg); } 75% { transform: rotate(16deg); } }
html.is-v7[data-lights="on"] .doorbell { background: radial-gradient(circle at 50% 35%, #ffffff, #e9eef6); }
html.is-v7[data-lights="on"] .rocker-face:not(:is([aria-checked="true"] *)) { background: linear-gradient(180deg, #e8edf4, #d7dee8); }

@media (max-width: 980px) {
  html.is-v7 .hero { grid-template-columns: 1fr; min-height: 0; }
}
@media (max-width: 560px) {
  html.is-v7 .panel { grid-template-columns: 1fr; }
  html.is-v7 .tile-lights, html.is-v7 .tile-sun, html.is-v7 .tile-door { grid-row: auto; grid-column: auto; }
  html.is-v7 .rocker { width: 100px; height: 140px; }
}

/* ---------- Sections ---------- */
html.is-v7 .section { max-width: var(--max); margin: 0 auto; padding: clamp(72px, 10vw, 128px) var(--gutter) 0; }
html.is-v7 .section h2 { margin: 0 0 16px; font-size: clamp(32px, 4.4vw, 56px); font-weight: 800; line-height: 1; letter-spacing: -.04em; }
html.is-v7 .section-copy p { max-width: 46ch; color: var(--muted); margin: 0 0 16px; }

/* someone's at the door (demo) */
html.is-v7 .automation { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }

html.is-v7 .demo { display: grid; gap: 18px; }
html.is-v7 .tv { width: 100%; }
html.is-v7 .tv-screen {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 14px; background: #020305;
  border: 10px solid #121821; box-shadow: var(--shadow), 0 0 0 1px var(--line-2);
}
html.is-v7 .tv-show { position: absolute; inset: 0; opacity: 0; transition: opacity .6s var(--ease); filter: blur(28px) saturate(140%); }
html.is-v7 .tv-show span { position: absolute; width: 60%; height: 80%; border-radius: 50%; animation: show-v7 9s ease-in-out infinite alternate; }
html.is-v7 .tv-show span:nth-child(1) { background: #2b6bff; left: -10%; top: -10%; }
html.is-v7 .tv-show span:nth-child(2) { background: #00c2a8; right: -15%; top: 10%; animation-delay: -3s; }
html.is-v7 .tv-show span:nth-child(3) { background: #ff8a4c; left: 20%; bottom: -30%; animation-delay: -6s; }
@keyframes show-v7 { to { transform: translate(15%, 10%) scale(1.15); } }
html.is-v7 .tv.is-on .tv-show { opacity: .95; }
html.is-v7 .tv-screen::after { /* glass reflection */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(130deg, rgba(255,255,255,.07) 0%, transparent 40%);
}
html.is-v7 .tv-stand { width: 26%; height: 10px; margin: 0 auto; background: #121821; border-radius: 0 0 8px 8px; }
html.is-v7 .tv-pip {
  position: absolute; right: 4%; bottom: 6%; width: 38%;
  border-radius: 10px; overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .9);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .6);
  transform: translateY(16px) scale(.92); opacity: 0;
  transition: transform .5s var(--ease), opacity .4s var(--ease);
}
html.is-v7 .tv-pip.is-shown { transform: none; opacity: 1; }
html.is-v7 .tv-pip svg { width: 100%; height: auto; }
html.is-v7 .pip-wall { fill: #2a3346; }
html.is-v7 .pip-door { fill: #6b4a33; stroke: #3a281b; stroke-width: 2; }
html.is-v7 .pip-knob { fill: #e8c25a; }
html.is-v7 .pip-lamp { fill: #f3e2b0; }
html.is-v7 .pip-lamp-glow { fill: rgba(255, 210, 120, .35); }
html.is-v7 .pip-step { fill: #4a5163; }
html.is-v7 .pip-parcel rect { fill: #c79a62; stroke: #8a6438; stroke-width: 1.5; }
html.is-v7 .pip-parcel path { fill: none; stroke: #8a6438; stroke-width: 1.5; }
html.is-v7 .pip-parcel { transform: translateY(-30px); opacity: 0; transition: transform .5s cubic-bezier(.3, 1.4, .5, 1) .25s, opacity .2s .25s; }
html.is-v7 .tv-pip.is-shown .pip-parcel { transform: none; opacity: 1; }
html.is-v7 .pip-label { position: absolute; left: 8px; top: 6px; padding: 2px 8px; border-radius: 6px; background: rgba(0,0,0,.55); color: #fff; font: 500 11px/1.4 var(--mono); }

html.is-v7 .demo-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
html.is-v7 .demo-caption { margin: 0; min-height: 1.6em; font-size: 17px; color: var(--muted); }
@media (max-width: 900px) { html.is-v7 .automation { grid-template-columns: 1fr; } }

/* movie night (media) */
html.is-v7 .media { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
html.is-v7 .media-app {
  padding: clamp(20px, 3vw, 28px);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
html.is-v7 .media-ask { margin: 0 0 16px; font-weight: 600; font-size: 18px; letter-spacing: -.01em; }
html.is-v7 .posters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
html.is-v7 .poster {
  --p1: #3d7bff; --p2: #14204a;
  position: relative; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
  aspect-ratio: 3 / 4; padding: 14px; border: 0; border-radius: 14px; cursor: pointer; overflow: hidden;
  background: radial-gradient(120% 90% at 20% 10%, var(--p1), var(--p2));
  color: #fff; font: 700 15px/1.15 var(--font); text-align: left;
  box-shadow: 0 14px 28px -16px rgba(0, 0, 0, .8);
  transition: transform .25s var(--ease), box-shadow .25s, opacity .3s;
}
html.is-v7 .poster-cook { --p1: #ff8a4c; --p2: #4a1f0e; }
html.is-v7 .poster-toon { --p1: #3ddc97; --p2: #0d3a2a; }
html.is-v7 .poster svg { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
html.is-v7 .poster:hover:not(:disabled) { transform: translateY(-4px); box-shadow: 0 20px 34px -16px rgba(0, 0, 0, .8); }
html.is-v7 .poster.is-picked { box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px var(--blue); }
html.is-v7 .poster:disabled { cursor: default; }
html.is-v7 .posters.is-busy .poster:not(.is-picked) { opacity: .4; }

html.is-v7 .media-steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
html.is-v7 .media-steps li { display: flex; align-items: center; gap: 12px; color: var(--faint); font-weight: 500; transition: color .3s; }
html.is-v7 .step-dot { position: relative; width: 20px; height: 20px; flex: none; border-radius: 50%; border: 2px solid var(--line-2); transition: background-color .3s, border-color .3s; }
html.is-v7 .media-steps li.is-done { color: var(--ink); }
html.is-v7 .media-steps li.is-done .step-dot { background: var(--blue); border-color: var(--blue); }
html.is-v7 .media-steps li.is-done .step-dot::after { content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
html.is-v7 .media-steps li.is-now .step-dot { border-color: var(--blue); animation: pulse-v7 1s ease-in-out infinite; }
@keyframes pulse-v7 { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--blue) 25%, transparent); } }

html.is-v7 .shelf { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
html.is-v7 .shelf-label { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
html.is-v7 .shelf-row { --p1: #3d7bff; --p2: #14204a; list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; min-height: 36px; }
html.is-v7 .shelf-row:empty::before { content: "Nothing yet. Pick something above."; font-size: 14px; color: var(--faint); align-self: center; }
html.is-v7 .shelf-row li {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px 8px 8px;
  border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line-2); font-size: 14px; font-weight: 500;
  animation: shelfIn-v7 .5s cubic-bezier(.3, 1.4, .5, 1) both;
}
html.is-v7 .shelf-row li i { width: 18px; height: 24px; border-radius: 4px; background: radial-gradient(120% 90% at 20% 10%, var(--p1), var(--p2)); }
@keyframes shelfIn-v7 { from { opacity: 0; transform: translateY(-14px) scale(.9); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) { html.is-v7 .media { grid-template-columns: 1fr; } html.is-v7 .media .section-copy { order: -1; } }
@media (max-width: 420px) { html.is-v7 .poster { font-size: 13px; padding: 10px; } }

/* the rack (homelab cabinet) */
html.is-v7 .rack-sec { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
html.is-v7 .rack-info { min-height: 3.2em; color: var(--ink); font-weight: 500; }
html.is-v7 .rack {
  --rk-bg: #0b0f15; --rk-unit: #161c26; --rk-line: #273142; --rk-text: #8490a6;
  position: relative; justify-self: center; width: min(100%, 470px);
  display: grid; gap: 8px; padding: 16px 30px;
  background: linear-gradient(180deg, #121722, var(--rk-bg));
  border: 1px solid var(--rk-line); border-radius: 18px;
  box-shadow: 0 40px 70px -36px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .04);
}
/* rails with mounting holes */
html.is-v7 .rack::before, html.is-v7 .rack::after {
  content: ""; position: absolute; top: 14px; bottom: 14px; width: 8px;
  background: repeating-linear-gradient(180deg, transparent 0 6px, #05070a 6px 10px, transparent 10px 16px);
  border-left: 1px solid var(--rk-line); border-right: 1px solid var(--rk-line);
}
html.is-v7 .rack::before { left: 10px; } html.is-v7 .rack::after { right: 10px; }
html.is-v7 .unit {
  display: grid; grid-template-columns: auto 92px 1fr; align-items: center; gap: 12px;
  height: 56px; padding: 0 14px; margin: 0;
  background: linear-gradient(180deg, #1b2230, var(--rk-unit));
  border: 1px solid var(--rk-line); border-radius: 8px;
  color: var(--rk-text); font: 500 12px/1 var(--mono); letter-spacing: .02em; text-align: left; cursor: pointer;
  transition: border-color .3s, color .4s, box-shadow .3s, transform .2s var(--ease);
}
html.is-v7 .unit:hover { transform: translateX(-3px); }
html.is-v7 .unit[aria-pressed="true"] { border-color: var(--data); box-shadow: 0 0 0 1px var(--data), 0 0 24px -6px var(--data); }
html.is-v7 .unit.is-on { color: #c9d3e3; }
html.is-v7 .unit:focus-visible { outline: 2px solid var(--data); outline-offset: 2px; }
html.is-v7 .leds { display: grid; gap: 5px; }
html.is-v7 .leds i { display: block; width: 6px; height: 6px; border-radius: 50%; background: #2a3445; transition: background-color .2s, box-shadow .2s; }
html.is-v7 .unit.is-on .leds i:first-child { background: #3ddc97; box-shadow: 0 0 8px #3ddc97; }
html.is-v7 .unit.is-on .leds i:last-child { background: #36c5ff; box-shadow: 0 0 8px #36c5ff; animation: blink-v7 1.7s steps(2) infinite; }
html.is-v7 .unit:nth-child(2).is-on .leds i:last-child { animation-duration: .7s; }
html.is-v7 .unit:nth-child(4).is-on .leds i:last-child { animation-duration: 1.1s; }
@keyframes blink-v7 { 50% { opacity: .2; } }
html.is-v7 .unit-art { display: flex; align-items: center; justify-content: flex-end; gap: 5px; min-width: 0; overflow: hidden; }
html.is-v7 .port { position: relative; flex: none; width: 13px; height: 10px; border-radius: 2px; background: #06080c; border: 1px solid var(--rk-line); }
html.is-v7 .port-wan { margin-right: 8px; border-color: #3a4558; }
html.is-v7 .unit.is-on .port::after {
  content: ""; position: absolute; left: 3px; top: -5px; width: 5px; height: 2px; border-radius: 1px;
  background: #3ddc97; animation: blink-v7 1s steps(2) infinite;
}
html.is-v7 .unit.is-on .port:nth-child(3n)::after { animation-duration: .45s; background: #f5b84a; }
html.is-v7 .unit.is-on .port:nth-child(3n+1)::after { animation-duration: .8s; }
html.is-v7 .unit.is-on .port:nth-child(4n+2)::after { animation-duration: 1.4s; }
html.is-v7 .vents { flex: 1; height: 26px; max-width: 150px; border-radius: 3px; background: repeating-linear-gradient(90deg, #06080c 0 3px, transparent 3px 7px); opacity: .8; }
html.is-v7 .fan { flex: none; width: 30px; height: 30px; fill: none; stroke: #4a5568; stroke-width: 1.4; stroke-linecap: round; }
html.is-v7 .unit.is-on .fan { stroke: #8a95a8; animation: spin-v7 1.1s linear infinite; }
html.is-v7 .bay {
  position: relative; flex: none; width: 24px; height: 34px; border-radius: 3px; border: 1px solid var(--rk-line);
  background: repeating-linear-gradient(0deg, #0b0f15 0 3px, #1b2230 3px 5px);
}
html.is-v7 .unit.is-on .bay::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: #36c5ff; animation: blink-v7 .9s steps(2) infinite; }
html.is-v7 .unit.is-on .bay:nth-child(2)::after { animation-duration: 1.6s; }
html.is-v7 .unit.is-on .bay:nth-child(3)::after { animation-duration: .6s; }
html.is-v7 .unit.is-on .bay:nth-child(4)::after { animation-duration: 2.1s; }
html.is-v7 .unit.is-booting { animation: unitBoot-v7 .5s steps(3) both; }
/* UPS: readout + load bar */
html.is-v7 .unit-ups { border-style: dashed; }
html.is-v7 .unit-ups.is-on { border-style: solid; border-color: color-mix(in srgb, var(--flow) 45%, var(--rk-line)); }
html.is-v7 .unit-ups.is-on .leds i:first-child { background: var(--flow); box-shadow: 0 0 8px var(--flow); }
html.is-v7 .ups-read { white-space: nowrap; font-size: 11px; color: var(--rk-text); transition: color .3s; }
html.is-v7 .unit-ups.is-on .ups-read { color: #c9d3e3; }
html.is-v7 .ups-bar { flex: none; width: 64px; height: 10px; padding: 2px; border: 1px solid var(--rk-line); border-radius: 3px; }
html.is-v7 .ups-bar i { display: block; height: 100%; width: 100%; border-radius: 1px; background: var(--flow); transform-origin: left; transform: scaleX(0); transition: transform 1s var(--ease); }
html.is-v7 .unit-ups.is-on .ups-bar i { transform: scaleX(.42); animation: upsLoad-v7 3s ease-in-out infinite alternate; }
@keyframes upsLoad-v7 { from { transform: scaleX(.42); } to { transform: scaleX(.58); } }
@keyframes unitBoot-v7 { 0% { box-shadow: inset 0 0 0 100px rgba(54, 197, 255, .18); } 100% { box-shadow: none; } }
@media (max-width: 900px) { html.is-v7 .rack-sec { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  html.is-v7 .rack { padding: 12px 24px; }
  html.is-v7 .rack::before { left: 7px; } html.is-v7 .rack::after { right: 7px; }
  html.is-v7 .unit { grid-template-columns: auto 78px 1fr; gap: 10px; padding: 0 10px; font-size: 11px; }
  html.is-v7 .unit-switch .port:nth-child(n+9) { display: none; }
  html.is-v7 .bay { width: 18px; }
  html.is-v7 .vents { display: none; }
  html.is-v7 .ups-bar { width: 40px; }
}

/* work */
html.is-v7 .work-list { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
html.is-v7 .work-list li { padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
html.is-v7 .work-list svg { width: 26px; height: 26px; fill: none; stroke: var(--blue-2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 32px; }
html.is-v7 .work-list h3 { margin: 0 0 8px; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
html.is-v7 .work-list p { margin: 0; color: var(--muted); font-size: 15px; }
html.is-v7 .tools { margin: 28px 0 0; max-width: 72ch; color: var(--muted); }
html.is-v7 .tools span { color: var(--ink); font-weight: 600; }
@media (min-width: 981px) { html.is-v7 .work-list { margin-top: 60px; } html.is-v7 .tools { margin-top: 52px; } }   /* room for the cable runs above and below the cards */
@media (max-width: 980px) { html.is-v7 .work-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { html.is-v7 .work-list { grid-template-columns: 1fr; } }

/* motto + closing */
html.is-v7 .motto-line { margin: 0; font-size: clamp(48px, 10vw, 160px); font-weight: 900; line-height: .88; letter-spacing: -.06em; }
html.is-v7 .motto-sub { margin: 22px 0 0; max-width: 40ch; color: var(--muted); font-size: clamp(18px, 1.8vw, 22px); }
html.is-v7 .closing { text-align: center; padding-bottom: clamp(96px, 12vw, 150px); }
html.is-v7 .closing h2 { font-size: clamp(40px, 6vw, 84px); }
html.is-v7 .closing p { color: var(--muted); margin: 0 auto 32px; max-width: 40ch; }

html.is-v7 .foot { max-width: var(--max); margin: 0 auto; display: flex; justify-content: space-between; gap: 16px; padding: 26px var(--gutter) 90px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
html.is-v7 .foot p { margin: 0; }

/* ---------- Floating doorbell ---------- */
html.is-v7 .fab {
  position: fixed; right: clamp(16px, 3vw, 28px); bottom: clamp(16px, 3vw, 28px); z-index: 40;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 20px 0 16px;
  font: 600 15px/1 var(--font); color: #fff;
  background: var(--btn); border: 0; border-radius: 999px; cursor: pointer;
  box-shadow: 0 14px 34px -10px rgba(61, 123, 255, .9);
  transform: translateY(140%); opacity: 0;
  transition: transform .45s var(--ease), opacity .3s, background-color .2s;
}
html.is-v7 .fab svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
html.is-v7 .fab.is-visible { transform: none; opacity: 1; }
html.is-v7 .fab:hover { background: var(--btn-hover); }

/* ---------- The door (contact dialog) ---------- */
html.is-v7 .door {
  width: min(680px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  padding: 0; border: 0; border-radius: 26px; overflow: hidden;
  background: transparent; color: var(--ink);
}
html.is-v7 .door::backdrop { background: rgba(2, 4, 8, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
html.is-v7 .door[open]::backdrop { animation: fade-v7 .4s ease both; }
html.is-v7 .door-inside {
  position: relative; padding: clamp(24px, 4vw, 38px);
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 26px;
  max-height: calc(100dvh - 24px); overflow: auto;
}
html.is-v7[data-lights="off"] .door-inside { background: radial-gradient(120% 100% at 0% 0%, rgba(61, 123, 255, .16), transparent 55%), #0d131c; }
/* two door leaves that swing open to reveal the note */
html.is-v7 .door-leaf {
  position: absolute; top: 0; bottom: 0; width: 50%; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, #1a2433, #111823);
  border: 1px solid var(--line-2);
}
html.is-v7 .door-leaf::after { content: ""; position: absolute; top: 50%; width: 8px; height: 40px; margin-top: -20px; border-radius: 4px; background: var(--warm); opacity: .8; }
html.is-v7 .door-left { left: 0; border-radius: 26px 0 0 26px; transform-origin: left center; }
html.is-v7 .door-right { right: 0; border-radius: 0 26px 26px 0; transform-origin: right center; }
html.is-v7 .door-left::after { right: 14px; }
html.is-v7 .door-right::after { left: 14px; }
html.is-v7 .door[open] .door-left { animation: leafL-v7 1.05s cubic-bezier(.6, 0, .2, 1) .15s both; }
html.is-v7 .door[open] .door-right { animation: leafR-v7 1.05s cubic-bezier(.6, 0, .2, 1) .15s both; }
html.is-v7 .door[open] .door-inside { animation: inside-v7 .9s var(--ease) .35s both; }
@keyframes leafL-v7 { 0% { transform: perspective(1200px) rotateY(0); } 75% { opacity: 1; } 100% { transform: perspective(1200px) rotateY(88deg); opacity: 0; visibility: hidden; } }
@keyframes leafR-v7 { 0% { transform: perspective(1200px) rotateY(0); } 75% { opacity: 1; } 100% { transform: perspective(1200px) rotateY(-88deg); opacity: 0; visibility: hidden; } }
@keyframes inside-v7 { from { transform: scale(.96); filter: brightness(.6); } to { transform: none; filter: none; } }
@keyframes fade-v7 { from { opacity: 0; } to { opacity: 1; } }

html.is-v7 .door-close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; color: var(--muted); cursor: pointer; }
html.is-v7 .door-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
html.is-v7 .door-close:hover { color: var(--ink); border-color: var(--blue); }
html.is-v7 .door-hello { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; padding-right: 44px; }
html.is-v7 .door-hello img { border-radius: 50%; box-shadow: 0 0 0 3px var(--blue); }
html.is-v7 .door-hello h2 { margin: 0; font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
html.is-v7 .door-hello p { margin: 4px 0 0; color: var(--muted); }

html.is-v7 .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
html.is-v7 .chip { padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--ink); font: 500 14px/1 var(--font); cursor: pointer; transition: background-color .2s, border-color .2s, color .2s; }
html.is-v7 .chip:hover { border-color: var(--blue); }
html.is-v7 .chip[aria-pressed="true"] { background: var(--btn); border-color: var(--btn); color: #fff; }

html.is-v7 .note-line { margin: 0 0 8px; font-size: clamp(18px, 2vw, 21px); line-height: 1.95; color: var(--muted); font-weight: 500; }
html.is-v7 .note-line input {
  display: inline-block; vertical-align: baseline; width: 15ch; max-width: 100%;
  margin: 0 .15em; padding: 0 .1em 2px;
  font: inherit; color: var(--ink); background: transparent;
  border: 0; border-bottom: 2px dashed var(--line-2); border-radius: 0;
}
html.is-v7 .note-line input[type="email"] { width: 18ch; }
@supports (field-sizing: content) { html.is-v7 .note-line input, html.is-v7 .note-line input[type="email"] { width: auto; field-sizing: content; min-width: 10ch; } }
html.is-v7 .note-line input::placeholder, html.is-v7 .note-msg textarea::placeholder { color: var(--faint); }
html.is-v7 .note-line input:focus { outline: none; border-bottom: 2px solid var(--blue); }
html.is-v7 .note-line input:user-invalid { border-bottom-color: #ff8a8a; }
html.is-v7 .note-opt { white-space: nowrap; }
html.is-v7 .note-msg textarea {
  display: block; width: 100%; min-height: 120px; margin-top: 10px; padding: 14px 16px;
  font: 400 17px/1.55 var(--font); color: var(--ink);
  background: color-mix(in srgb, var(--page) 60%, transparent);
  border: 1px solid var(--line-2); border-radius: 14px; resize: vertical;
}
html.is-v7 .note-msg textarea:focus { outline: none; border-color: var(--blue); }
html.is-v7 .note-msg textarea:user-invalid { border-color: #ff8a8a; }
html.is-v7 .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
html.is-v7 .note-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
html.is-v7 .human { display: inline-flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 18px 0 14px; font: 500 15px/1 var(--font); color: var(--ink); background: transparent; border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer; }
html.is-v7 .human .box { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--muted); display: grid; place-items: center; }
html.is-v7 .human.working .box { border-color: transparent; background: conic-gradient(var(--blue) calc(var(--p, .05) * 360deg), var(--line-2) 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); animation: spin-v7 1s linear infinite; }
@keyframes spin-v7 { to { transform: rotate(360deg); } }
html.is-v7 .human.done { border-color: var(--blue); cursor: default; }
html.is-v7 .human.done .box { border-color: var(--blue); background: var(--blue); }
html.is-v7 .human.done .box::after { content: ""; width: 5px; height: 10px; margin-top: -2px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
html.is-v7 .cf-status { margin: 14px 0 0; min-height: 1.5em; font-size: 15px; color: var(--muted); }
html.is-v7 .cf-status[data-kind="ok"] { color: var(--ok); }
html.is-v7 .cf-status[data-kind="err"] { color: #ff8a8a; }
html.is-v7 .note.sent .note-line, html.is-v7 .note.sent .note-msg { opacity: .55; }
@media (max-width: 560px) {
  html.is-v7 .note-opt { white-space: normal; }
  html.is-v7 .note-line input, html.is-v7 .note-line input[type="email"] { display: block; width: 100%; margin: 4px 0; }
  html.is-v7 .punct { display: none; }
  html.is-v7 .human, html.is-v7 #cf-send { width: 100%; }
}

/* ---------- Page load: the house powers on (one moment, once, pure CSS) ---------- */
html.is-v7 .hero-copy > *, html.is-v7 .panel .tile { animation: rise-v7 .8s var(--ease) both; }
html.is-v7 .hero-copy > :nth-child(2) { animation-delay: .06s; }
html.is-v7 .hero-copy > :nth-child(3) { animation-delay: .12s; }
html.is-v7 .hero-copy > :nth-child(4) { animation-delay: .18s; }
html.is-v7 .hero-copy > :nth-child(5) { animation-delay: .24s; }
html.is-v7 .panel .tile:nth-child(1) { animation-delay: .4s; }
html.is-v7 .panel .tile:nth-child(2) { animation-delay: .55s; }
html.is-v7 .panel .tile:nth-child(3) { animation-delay: .7s; }
html.is-v7 .panel .tile-head .led { animation: ledBoot-v7 .25s steps(2) 1s 3 both; }
@keyframes rise-v7 { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes ledBoot-v7 { 50% { opacity: .15; } }

/* ---------- power line: sun -> Energy battery by day, battery -> Lights at night ----------
   html[data-power] is set by js: "charge" (sun up), "low" (sun near the horizon), "drain" (night). */
html.is-v7 { --flow: #ffc46b; }
html.is-v7[data-lights="on"] { --flow: #e39a1f; }
html.is-v7[data-power="drain"] { --flow: var(--blue); }
html.is-v7[data-power="drain"][data-lights="on"] { --flow: hsl(var(--hue) 85% 50%); }

html.is-v7 #main { position: relative; }

/* the battery on the Energy card */
html.is-v7 .battery-row { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
html.is-v7 .battery {
  position: relative; flex: none; width: 46px; height: 22px; padding: 2px;
  border: 2px solid var(--line-2); border-radius: 6px;
}
html.is-v7 .battery::after { content: ""; position: absolute; right: -6px; top: 5px; width: 3px; height: 8px; border-radius: 0 2px 2px 0; background: var(--line-2); }
html.is-v7 .battery-fill {
  display: block; height: 100%; width: 0; border-radius: 3px;
  background: var(--flow); transition: width 1.6s var(--ease), background-color .4s;
}
html.is-v7 .work-energy.is-charged .battery-fill { width: calc(var(--level, 0) * 1%); }
html.is-v7[data-power="charge"] .work-energy.is-charged .battery-fill,
html.is-v7[data-power="low"] .work-energy.is-charged .battery-fill {
  background-image: linear-gradient(90deg, transparent 0 30%, rgba(255, 255, 255, .55) 50%, transparent 70% 100%);
  background-size: 200% 100%; animation: batteryShine-v7 1.8s linear infinite;
}
@keyframes batteryShine-v7 { from { background-position: 150% 0; } to { background-position: -50% 0; } }
html.is-v7 .battery-read { font-family: var(--mono); font-size: 13px; color: var(--muted); }
html.is-v7 .work-energy { transition: border-color .5s, box-shadow .5s; }
html.is-v7 .work-energy.is-charged { border-color: color-mix(in srgb, var(--flow) 55%, var(--line)); }
html.is-v7 .work-energy.is-charged svg { stroke: var(--flow); filter: drop-shadow(0 0 6px var(--flow)); transition: stroke .4s; }
html.is-v7 .work-energy.is-arrive { animation: energyArrive-v7 1.2s var(--ease); }
@keyframes energyArrive-v7 {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--flow) 60%, transparent); }
  100% { box-shadow: 0 0 0 22px transparent; }
}

html.is-v7 { --data: #36c5ff; }
html.is-v7[data-lights="on"] { --data: #1479d6; }

/* Self-hosting card: goes "Online" when the data arrives */
html.is-v7 .net-row { display: flex; align-items: center; gap: 10px; margin-top: 18px; font: 13px var(--mono); color: var(--muted); }
html.is-v7 .net-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); transition: background-color .3s, box-shadow .3s; }
html.is-v7 .net-bars { display: inline-flex; align-items: flex-end; gap: 3px; height: 14px; margin-left: auto; }
html.is-v7 .net-bars i { width: 3px; height: 14px; border-radius: 1px; background: var(--line-2); transform-origin: bottom; transform: scaleY(.28); }
html.is-v7 .work-selfhost, html.is-v7 .work-home { transition: border-color .5s; }
html.is-v7 .work-home.is-online { border-color: color-mix(in srgb, var(--data) 55%, var(--line)); }
html.is-v7 .work-home.is-online > svg { stroke: var(--data); filter: drop-shadow(0 0 6px var(--data)); }
html.is-v7 .work-home.is-online .net-read { color: var(--ink); }
html.is-v7 .work-home.is-online .net-bars i { background: var(--data); animation: netBar-v7 .9s ease-in-out infinite alternate; }
html.is-v7 .work-home.is-online .net-bars i:nth-child(2) { animation-delay: -.3s; }
html.is-v7 .work-home.is-online .net-bars i:nth-child(3) { animation-delay: -.6s; }
html.is-v7 .work-home.is-online .net-bars i:nth-child(4) { animation-delay: -.15s; }
html.is-v7 .work-home.is-arrive { animation: selfArrive-v7 1.2s var(--ease); }
html.is-v7 .bulb { flex: none; width: 18px !important; height: 18px !important; margin: 0 !important; fill: none; stroke: var(--faint) !important; stroke-width: 1.7; filter: none !important; transition: stroke .3s, fill .3s; }
html.is-v7 .work-home.is-online .bulb { stroke: var(--muted) !important; }
html.is-v7 .work-home.is-motion .bulb { fill: #ffd27a; stroke: #f5b84a !important; filter: drop-shadow(0 0 8px #ffc46b) !important; }
html.is-v7 .work-home.is-motion { border-color: color-mix(in srgb, #ffc46b 60%, var(--line)); }
html.is-v7 .work-selfhost.is-online { border-color: color-mix(in srgb, var(--data) 55%, var(--line)); }
html.is-v7 .work-selfhost.is-online svg { stroke: var(--data); filter: drop-shadow(0 0 6px var(--data)); }
html.is-v7 .work-selfhost.is-online .net-dot { background: #3ddc97; box-shadow: 0 0 8px #3ddc97; animation: blink-v7 2s steps(2) infinite; }
html.is-v7 .work-selfhost.is-online .net-read { color: var(--ink); }
html.is-v7 .work-selfhost.is-online .net-bars i { background: var(--data); animation: netBar-v7 .9s ease-in-out infinite alternate; }
html.is-v7 .work-selfhost.is-online .net-bars i:nth-child(2) { animation-delay: -.3s; }
html.is-v7 .work-selfhost.is-online .net-bars i:nth-child(3) { animation-delay: -.6s; }
html.is-v7 .work-selfhost.is-online .net-bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes netBar-v7 { from { transform: scaleY(.2); } to { transform: scaleY(1); } }
html.is-v7 .work-selfhost.is-arrive { animation: selfArrive-v7 1.2s var(--ease); }
@keyframes selfArrive-v7 { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--data) 60%, transparent); } 100% { box-shadow: 0 0 0 22px transparent; } }

/* ---------- wiring (drawn by js): right-angled runs in the page margins and between sections ----------
   .wire-power = gold (sun) or blue (battery at night), round pulses one way.
   .wire-data  = cyan, square packets both ways.
   .is-live    = pulses are running;  .is-idle = wholly off screen, so its animation is paused. */
html.is-v7 .wires { position: absolute; left: 0; top: 0; z-index: -1; overflow: visible; pointer-events: none; }
html.is-v7 .wire { transition: opacity .4s; }
html.is-v7 .wire.is-off { opacity: 0; }
html.is-v7 .wire-data { color: var(--data); }
html.is-v7 .wire-power { color: var(--flow); }
html.is-v7 .wire path { fill: none; stroke: currentColor; stroke-linejoin: round; }
html.is-v7 .wire .w-plug { fill: currentColor; opacity: .55; }
html.is-v7 .wire .w-base { stroke-width: 2; stroke-opacity: .14; stroke-linecap: round; }
html.is-v7 .wire .w-fill { stroke-width: 2; stroke-opacity: .5; stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
html.is-v7 .wire.is-drawing .w-fill { transition: stroke-dashoffset 1.3s var(--ease); }
html.is-v7 .wire .w-a, html.is-v7 .wire .w-b { opacity: 0; transition: opacity .5s; }
html.is-v7 .wire.is-live .w-a, html.is-v7 .wire.is-live .w-b { opacity: 1; }
html.is-v7 .wire-power .w-a { stroke-width: 3.5; stroke-linecap: round; stroke-opacity: .8; stroke-dasharray: 2 26; animation: powerFlow-v7 1.3s steps(39) infinite; }
html.is-v7[data-power="low"] .wire-power .w-a { stroke-dasharray: 2 58; animation: powerFlowLow-v7 3.2s steps(96) infinite; stroke-opacity: .55; }
html.is-v7 .wire-data .w-a { stroke-width: 4.5; stroke-linecap: butt; stroke-opacity: .8; stroke-dasharray: 4.5 31.5; animation: dataDown-v7 1.2s steps(36) infinite; }
html.is-v7 .wire-data .w-b { stroke-width: 4.5; stroke-linecap: butt; stroke-opacity: .4; stroke-dasharray: 4.5 47.5; animation: dataUp-v7 2s steps(60) infinite; }
html.is-v7 .wire.is-burst .w-a, html.is-v7 .wire.is-burst .w-b { stroke-opacity: 1; animation-duration: .35s; animation-timing-function: linear; filter: drop-shadow(0 0 5px currentColor); }
html.is-v7 .wire-power.is-burst .w-a { stroke-width: 5; animation-duration: .45s; }
html.is-v7 .wire.is-idle .w-a, html.is-v7 .wire.is-idle .w-b { animation-play-state: paused; }
@keyframes powerFlow-v7 { to { stroke-dashoffset: -28; } }
@keyframes powerFlowLow-v7 { to { stroke-dashoffset: -60; } }
@keyframes dataDown-v7 { to { stroke-dashoffset: -36; } }
@keyframes dataUp-v7 { to { stroke-dashoffset: 52; } }

/* looping animations stop while their section is off screen (js adds .is-away) */
html.is-v7 .is-away, html.is-v7 .is-away *, html.is-v7 .is-away *::before, html.is-v7 .is-away *::after { animation-play-state: paused !important; }

/* ---------- power cut: html[data-outage] while the power is out ----------
   Lights and TV lose power. The rack is on its UPS, so it and every data line keep running. */
html.is-v7 .btn-cut { margin-top: 6px; min-height: 44px; }
html.is-v7 .btn-cut svg { stroke: var(--warm); }
html.is-v7 .btn-cut:hover:not(:disabled) { border-color: var(--warm); }
html.is-v7 .btn-cut:disabled { color: var(--muted); cursor: default; }
html.is-v7[data-outage] body::before {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; background: #000; opacity: 0;
  animation: cutFlicker-v7 .8s steps(1) both;
}
@keyframes cutFlicker-v7 { 0% { opacity: .75; } 10% { opacity: 0; } 18% { opacity: .55; } 30% { opacity: 0; } 44% { opacity: .3; } 56%, 100% { opacity: 0; } }
html.is-v7[data-outage] .lamp { opacity: 0; }
html.is-v7[data-outage] .tv .tv-show { opacity: 0; transition-duration: .15s; }
html.is-v7[data-outage] .tv-pip { opacity: 0; }
html.is-v7[data-outage] .rocker, html.is-v7[data-outage] .dimmer, html.is-v7[data-outage] .swatches { opacity: .5; }
html.is-v7[data-outage] .wire-power { color: var(--faint); }
html.is-v7[data-outage] .wire-power .w-a { opacity: 0; }
html.is-v7[data-outage] .unit-ups.is-on { border-color: var(--warm); animation: upsAlarm-v7 1s steps(2) infinite; }
html.is-v7[data-outage] .unit-ups.is-on .leds i:first-child { background: var(--warm); box-shadow: 0 0 8px var(--warm); }
html.is-v7[data-outage] .unit-ups.is-on .ups-read { color: var(--warm); }
html.is-v7[data-outage] .unit-ups.is-on .ups-bar i { background: var(--warm); animation: upsDrain-v7 6.5s linear both; }
@keyframes upsAlarm-v7 { 50% { box-shadow: 0 0 0 1px var(--warm), 0 0 26px -4px var(--warm); } }
@keyframes upsDrain-v7 { from { transform: scaleX(1); } to { transform: scaleX(.86); } }

/* ---------- wall camera (decorative) ---------- */
html.is-v7 .cctv {
  position: fixed; right: 0; top: 40vh; z-index: 30; width: 120px; height: 80px;
  transform: translateX(105%); transition: transform .7s var(--ease);
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .45));
  cursor: help;
}
html.is-v7 .cctv.is-out { transform: none; }
html.is-v7 .cctv svg { width: 100%; height: 100%; overflow: visible; }
html.is-v7 .cctv-plate { fill: #c9d1dc; stroke: #9aa5b5; }
html.is-v7 .cctv-arm { stroke: #aab4c3; stroke-width: 7; stroke-linecap: round; }
html.is-v7 .cctv-head { transform-box: view-box; transform-origin: 90px 40px; transform: rotate(var(--pan, 0deg)); transition: transform .25s ease-out; }
html.is-v7 .cctv-body { fill: #eef2f7; stroke: #b9c2cf; }
html.is-v7 .cctv-hood { fill: #dfe5ed; stroke: #b9c2cf; }
html.is-v7 .cctv-lens { fill: #1a2130; stroke: #4a5568; stroke-width: 2; }
html.is-v7 .cctv-glass { fill: #2f66f0; opacity: .75; }
html.is-v7 .cctv-rec { fill: #ff4d4f; animation: blink-v7 1.6s steps(2) infinite; }
html.is-v7 .cctv-cone { fill: transparent; transition: fill .3s; }
html.is-v7 .cctv.is-spotting .cctv-cone { fill: rgba(255, 77, 79, .14); animation: coneScan-v7 .5s ease-in-out 3 alternate; }
html.is-v7 .cctv.is-spotting .cctv-rec { animation-duration: .3s; }
@keyframes coneScan-v7 { to { opacity: .35; } }
@media (max-width: 700px) { html.is-v7 .cctv { width: 66px; height: 44px; top: 34vh; } html.is-v7 .cctv.is-out { transform: translateX(28%); } }

@media (prefers-reduced-motion: reduce) {
  html.is-v7 { scroll-behavior: auto; }
  html.is-v7 *, html.is-v7 *::before, html.is-v7 *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
