/* einie.app — the app's design system on the web (app/src/theme.ts):
   cream ground, white-cream cards, plum ink and one plum hero panel per
   section, energy colours for data only, Bricolage Grotesque for headlines
   and big numbers, Figtree for the rest. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("/fonts/figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #F6F0E6;
  --card: #FFFDF9;
  --well: #F1E9DD;
  --border: rgba(43, 29, 51, 0.07);
  --ink: #2B1D33;
  --ink2: #5E4E66;
  --muted: #6F6076;
  --rule: #EDE4D6;
  --accent: #2B1D33;
  --on-accent: #F6F0E6;
  --solar: #EDA100;
  --battery: #1E9E76;
  --grid: #3D73C9;
  --gen: #EB6834;
  --solar-tint: #FCEBC2;   --solar-ink: #6B4A00;
  --battery-tint: #D3EEE3; --battery-ink: #11684D;
  --grid-tint: #DCE6F6;    --grid-ink: #234A8A;
  --gen-tint: #FBDCCD;     --gen-ink: #8A3410;
  --plum-tint: #E9E1EC;    --plum-ink: #2B1D33;
  /* The hero palette: the plum card, the same in light and dark. */
  --hero: #2B1D33;
  --hero-well: #3A2A44;
  --hero-text: #F5EFE6;
  --hero-text2: #D9CDDC;
  --shadow: 0 1px 2px rgba(43, 29, 51, 0.05), 0 10px 30px rgba(43, 29, 51, 0.06);
  --shadow-lift: 0 2px 4px rgba(43, 29, 51, 0.06), 0 24px 60px rgba(43, 29, 51, 0.12);
  --display: "Bricolage Grotesque", ui-rounded, system-ui, sans-serif;
  --text: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --radius-card: 26px;
  --radius-hero: 28px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #160F1B;
    --card: #231A2B;
    --well: #2E2337;
    --border: rgba(245, 239, 230, 0.07);
    --ink: #F5EFE6;
    --ink2: #C9BCCD;
    --muted: #A898AE;
    --rule: #33283C;
    --accent: #7A5A8C;
    --on-accent: #F5EFE6;
    --solar: #FDB022;
    --battery: #3CCB98;
    --grid: #6E9BE8;
    --gen: #FF6A45;
    --solar-tint: rgba(253, 176, 34, 0.18);   --solar-ink: #FDB022;
    --battery-tint: rgba(60, 203, 152, 0.18); --battery-ink: #3CCB98;
    --grid-tint: rgba(110, 155, 232, 0.18);   --grid-ink: #6E9BE8;
    --gen-tint: rgba(255, 106, 69, 0.18);     --gen-ink: #FF6A45;
    --plum-tint: rgba(245, 239, 230, 0.1);    --plum-ink: #F5EFE6;
    --hero: #251A2D;
    --hero-well: #33263C;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    --shadow-lift: 0 24px 60px rgba(0, 0, 0, 0.45);
  }
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); margin: 0; font-optical-sizing: auto; }
h1 { font-weight: 800; font-size: clamp(56px, 9.4vw, 112px); line-height: 0.94; letter-spacing: -0.04em; }
h2 { font-weight: 800; font-size: clamp(36px, 5vw, 58px); line-height: 1.02; letter-spacing: -0.032em; text-wrap: balance; }
h3 { font-weight: 700; font-size: 21px; line-height: 1.2; letter-spacing: -0.015em; }
p { margin: 0; }
em { font-style: normal; font-weight: 650; color: var(--ink); }
:focus-visible { outline: 2.5px solid var(--solar); outline-offset: 3px; border-radius: 8px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon .fill, .icon use { fill: inherit; }
symbol .fill { fill: currentColor; stroke: none; }

/* Tones: an energy colour per section, for its dot, ticks and tiles. */
.tone-solar   { --tone: var(--solar);   --tint: var(--solar-tint);   --tink: var(--solar-ink); }
.tone-battery { --tone: var(--battery); --tint: var(--battery-tint); --tink: var(--battery-ink); }
.tone-grid    { --tone: var(--grid);    --tint: var(--grid-tint);    --tink: var(--grid-ink); }
.tone-gen     { --tone: var(--gen);     --tint: var(--gen-tint);     --tink: var(--gen-ink); }
.tone-plum    { --tone: var(--ink);     --tint: var(--plum-tint);    --tink: var(--plum-ink); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 26px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font: 650 16.5px/1 var(--text); text-decoration: none; letter-spacing: -0.005em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  box-shadow: 0 1px 2px rgba(43, 29, 51, 0.12), 0 8px 24px rgba(43, 29, 51, 0.16);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(43, 29, 51, 0.14), 0 14px 32px rgba(43, 29, 51, 0.2); }
.btn:active { transform: translateY(0); }
.btn .icon { width: 19px; height: 19px; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); box-shadow: none; }
.btn-ghost:hover { background: var(--card); box-shadow: var(--shadow); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 15px; box-shadow: none; white-space: nowrap; }
.btn-light { background: var(--hero-text); color: #2B1D33; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); }

/* ---------- nav ---------- */

/* A full bar with a background colour of its own once the page moves: the page never shows
   above it, and Safari colours the status bar from it. */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 20;
  padding: env(safe-area-inset-top) max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
  background-color: transparent; border-bottom: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.nav.scrolled, .nav.open { background-color: var(--bg); border-bottom-color: var(--rule); }
.nav-pill { max-width: 1180px; margin: 0 auto; height: 64px; display: flex; align-items: center; gap: 16px; }
.nav-brand { display: flex; align-items: center; padding: 6px 0; }
.nav-brand .wordmark { width: 74px; }
.nav-links { list-style: none; margin: 0 auto; padding: 0; display: flex; gap: 4px; }
.nav-links a { display: block; white-space: nowrap; padding: 9px 14px; border-radius: 999px; font: 550 15px/1 var(--text); color: var(--ink2); text-decoration: none; transition: color 0.15s, background 0.15s; }
.nav-links a:hover { color: var(--ink); background: var(--well); }
.nav .btn-sm { margin-left: auto; }
.nav-menu { display: none; }
/* Below the full bar, the links fold into a menu. */
@media (max-width: 1180px) {
  .nav-pill { position: relative; }
  .nav-menu {
    display: inline-flex; align-items: center; gap: 5px; height: 42px; margin-left: auto; padding: 0 12px 0 15px; flex: none;
    border: 0; border-radius: 999px; background: transparent; color: var(--ink2); cursor: pointer;
    font: 550 15px/1 var(--text); transition: color 0.15s, background 0.15s;
  }
  .nav-menu:hover, .nav.open .nav-menu { color: var(--ink); background: var(--well); }
  .nav-menu .icon { width: 16px; height: 16px; stroke-width: 2.2; transition: transform 0.2s ease; }
  .nav.open .nav-menu .icon { transform: rotate(180deg); }
  .nav .btn-sm { margin-left: 0; }
  .nav-links {
    display: none; position: absolute; top: calc(100% + 8px); right: 0; width: min(340px, 100%); margin: 0;
    flex-direction: column; gap: 2px; padding: 8px; border-radius: 24px;
    background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-lift);
  }
  .nav.open .nav-links { display: flex; }
  .nav-links a { padding: 14px 16px; border-radius: 16px; font-size: 17px; }
}
@media (max-width: 340px) { .nav .btn-sm span { display: none; } .nav .btn-sm { width: 42px; padding: 0; } }

.wordmark .ink { stroke: var(--ink); }
.wordmark .sun { fill: var(--solar); }
.wordmark .bought { fill: var(--gen); }

/* ---------- hero ---------- */

/* The glows reach past the edges; clipped sideways only, so the page never scrolls sideways. */
.hero { position: relative; padding: clamp(104px, 11vw, 128px) 0 clamp(48px, 6vw, 80px); isolation: isolate; overflow-x: clip; }
.glow { position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; z-index: -1; }
.hero .glow-sun { width: 560px; height: 560px; left: -160px; top: -200px; background: radial-gradient(circle, color-mix(in srgb, var(--solar) 34%, transparent), transparent 70%); }
.hero .glow-bought { width: 460px; height: 460px; right: -140px; bottom: -120px; background: radial-gradient(circle, color-mix(in srgb, var(--gen) 16%, transparent), transparent 70%); }
/* The question on the left, the app live on the right. */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.hero-text { display: grid; gap: 22px; justify-items: start; }
.hero h1 { font-size: clamp(44px, 5.3vw, 76px); text-wrap: balance; }
.hero h1 .dot { color: var(--solar); }
/* Key words marked in their tints, as the app's tone tiles are. */
.hl { background: linear-gradient(transparent 52%, var(--hl) 52%, var(--hl) 79%, transparent 79%); padding: 0 0.05em; margin: 0 -0.05em; border-radius: 4px; }
.hl-grid { --hl: var(--grid-tint); }
.hl-gen { --hl: var(--gen-tint); }
.hl-live { --hl: var(--battery-tint); }
.hl-sun { --hl: var(--solar-tint); }
.lede { font-size: clamp(18px, 1.5vw, 20px); line-height: 1.55; color: var(--ink2); max-width: 40ch; }
.lede b { color: var(--ink); font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.fine { font-size: 14px; color: var(--muted); }

.live-pill {
  display: inline-flex; align-items: center; gap: 9px; height: 34px; padding: 0 15px 0 12px;
  border-radius: 999px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow);
  font: 650 13.5px/1 var(--text); color: var(--ink);
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--battery); box-shadow: 0 0 0 0 color-mix(in srgb, var(--battery) 50%, transparent); animation: live 2.4s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--battery) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }

@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; } .lede { max-width: 46ch; } }


.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-pill { text-decoration: none; background: var(--hero); border-color: transparent; color: var(--hero-text); transition: transform 0.15s; }
.ai-pill .icon { width: 15px; height: 15px; color: #FFD27A; fill: currentColor; stroke: none; }
.ai-pill:hover { transform: translateY(-1px); }

/* ---------- the live phone (live.js) ---------- */

/* The app's palettes inside the phone: the screen in the page's theme, the
   plum live-flow card the same in both (app/src/theme.ts). */
@property --amb { syntax: "<color>"; inherits: true; initial-value: #EDA100; }
.scene {
  --s-bg: #F6F0E6; --s-card: #FFFDF9; --s-well: #F1E9DD; --s-border: rgba(43, 29, 51, 0.06);
  --s-text: #2B1D33; --s-text2: #5E4E66; --s-muted: #6F6076; --s-idle: #DCD1C1; --s-good: #1E9E76; --s-accent: #2B1D33;
  --s-solar: #EDA100; --s-battery: #1E9E76; --s-grid: #3D73C9; --s-gen: #EB6834;
  --s-rule: #EDE4D6; --s-critical: #D03B3B; --s-tab-on: #2B1D33;
  --s-shadow: 0 1px 2px rgba(43, 29, 51, 0.05), 0 10px 30px rgba(43, 29, 51, 0.06); --s-glow: 12%;
  --s-tabs: rgba(255, 253, 249, 0.96); --s-tabs-ink: rgba(43, 29, 51, 0.85); --s-tabs-on: rgba(43, 29, 51, 0.07); --s-reserve: rgba(14, 21, 37, 0.45);
  --h-bg: #2B1D33; --h-well: #3A2A44; --h-idle: #4A3954; --h-text: #F5EFE6; --h-text2: #D9CDDC; --h-muted: #A898AE;
  --h-solar: #FDB022; --h-battery: #3CCB98; --h-grid: #6E9BE8; --h-gen: #FF6A45;
  --amb: var(--s-solar); --wt: var(--solar-ink);
  transition: --amb 1.4s ease;
}
/* min-height: the phone's height (.lp-fit) plus padding, held before live.js draws it, so the page doesn't jump. */
.stage { position: relative; display: flex; justify-content: flex-end; align-items: center; padding: 8px 5% 8px 0; min-width: 0; min-height: calc(clamp(250px, 23.5vw, 318px) * 904 / 432 + 16px); }
@media (prefers-color-scheme: dark) {
  .scene {
    --s-bg: #160F1B; --s-card: #231A2B; --s-well: #2E2337; --s-border: rgba(245, 239, 230, 0.07);
    --s-text: #F5EFE6; --s-text2: #C9BCCD; --s-muted: #A898AE; --s-idle: #3E3147; --s-good: #3CCB98; --s-accent: #7A5A8C;
    --s-rule: #33283C; --s-critical: #FF5A5A; --s-tab-on: #F5EFE6;
    --s-solar: #FDB022; --s-battery: #3CCB98; --s-grid: #6E9BE8; --s-gen: #FF6A45;
    --s-shadow: 0 12px 32px rgba(0, 0, 0, 0.3); --s-glow: 20%;
    --s-tabs: rgba(35, 26, 43, 0.96); --s-tabs-ink: rgba(245, 239, 230, 0.85); --s-tabs-on: rgba(245, 239, 230, 0.1); --s-reserve: rgba(255, 255, 255, 0.55);
    --h-bg: #251A2D; --h-well: #33263C;
  }
}
.scene[data-tone="solar"]   { --amb: var(--s-solar);   --wt: var(--solar-ink); }
.scene[data-tone="battery"] { --amb: var(--s-battery); --wt: var(--battery-ink); }
.scene[data-tone="grid"]    { --amb: var(--s-grid);    --wt: var(--grid-ink); }
.scene[data-tone="gen"]     { --amb: var(--s-gen);     --wt: var(--gen-ink); }
.scene[data-tone="idle"]    { --amb: var(--s-muted);   --wt: var(--muted); }

/* The light the phone casts on the page, in the colour of what powers the home. */
.lp-glow { position: absolute; inset: 4% -6% 0 26%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--amb) 30%, transparent), transparent); filter: blur(34px); z-index: -1; pointer-events: none; }

/* An iPhone 17 Pro, drawn at its size in points and scaled to fit. */
/* Drawn at the app's size in points and scaled to fit the box (fitAll in live.js). */
.fit { position: relative; flex: none; }
.fit-in { position: absolute; left: 0; top: 0; transform: scale(var(--ps, 0.7)); transform-origin: 0 0; }
.lp-fit { width: clamp(250px, 23.5vw, 318px); aspect-ratio: 432 / 904; }
.lp-phone {
  position: absolute; left: 0; top: 0; width: 432px; height: 904px; padding: 4px; border-radius: 77px;
  transform: scale(var(--ps, 0.68)); transform-origin: 0 0;
  background: linear-gradient(150deg, #5A5060 0%, #2B2331 34%, #40374A 62%, #241D29 100%);
  box-shadow: 0 60px 90px -36px rgba(43, 29, 51, 0.5), 0 26px 44px -26px rgba(43, 29, 51, 0.42), inset 0 0 0 1.5px rgba(255, 255, 255, 0.1);
}
.lp-phone .key { position: absolute; width: 5px; border-radius: 3px; background: #3A3140; }
.lp-phone .k1 { left: -4px; top: 168px; height: 34px; }
.lp-phone .k2 { left: -4px; top: 230px; height: 62px; }
.lp-phone .k3 { left: -4px; top: 306px; height: 62px; }
.lp-phone .k4 { right: -4px; top: 252px; height: 100px; }
.lp-bezel { width: 100%; height: 100%; padding: 11px; border-radius: 73px; background: #050306; }
.lp-screen {
  position: relative; width: 402px; height: 874px; border-radius: 62px; overflow: hidden; isolation: isolate;
  background: var(--s-bg); color: var(--s-text); font: 400 15px/1.3 var(--text); letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}
:where(.lp-screen) p { margin: 0; }
.lp-amb { position: absolute; left: 0; right: 0; top: 0; height: 560px; background: radial-gradient(80% 100% at 50% 0%, color-mix(in srgb, var(--amb) var(--s-glow), transparent) 0%, color-mix(in srgb, var(--amb) 3%, transparent) 55%, transparent 100%); }
.lp-content { position: relative; padding: 68px 16px 0; }
.lp-head { display: flex; align-items: center; justify-content: space-between; min-height: 40px; margin-bottom: 16px; }
.lp-wordmark { width: 62px; height: 26px; color: var(--s-text); }
.lp-wordmark .sun { fill: var(--s-solar); }
.lp-wordmark .bought { fill: var(--s-gen); }
.lp-home { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--s-card); border: 0.5px solid var(--s-border); font-size: 15px; font-weight: 600; }
.lp-home svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lp-live { display: inline-flex; align-items: center; gap: 8px; margin: 0 4px; padding: 6px 12px 6px 10px; border-radius: 999px; background: color-mix(in srgb, var(--s-good) 10%, transparent); font-size: 12px; line-height: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lp-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--s-good); }
.lp-dot::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--s-good); animation: lp-sonar 2.2s cubic-bezier(0.5, 1, 0.89, 1) infinite; }
@keyframes lp-sonar { from { opacity: 0.55; transform: scale(1); } to { opacity: 0; transform: scale(2.6); } }
/* The big status: the old one lifts away, then the new one rises into its place. */
.lp-status { position: relative; height: 62px; margin: 10px 4px 16px; }
.lp-status .line { position: absolute; inset: 0 0 auto; transition: opacity 0.45s ease 0.2s, transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s; }
.lp-status .line.enter { opacity: 0; transform: translateY(12px); }
.lp-status .line.leave { opacity: 0; transform: translateY(-8px); transition: opacity 0.22s ease-in, transform 0.22s ease-in; }
.lp-status .t { font: 800 34px/38px var(--display); letter-spacing: -0.8px; white-space: nowrap; }
.lp-status .d { margin-top: 4px; font-size: 16px; line-height: 20px; color: var(--s-text2); white-space: nowrap; }

/* The plum card and the live flow on it. */
.lp-hero { margin-bottom: 14px; padding: 14px 10px; border-radius: 28px; background: var(--h-bg); box-shadow: var(--s-shadow); }
.lp-tap { margin-top: 2px; font-size: 12px; line-height: 15px; text-align: center; color: var(--h-muted); }
.lp-flow { position: relative; }
.lp-flow [data-tone="solar"]   { --c: var(--h-solar); }
.lp-flow [data-tone="battery"] { --c: var(--h-battery); }
.lp-flow [data-tone="grid"]    { --c: var(--h-grid); }
.lp-flow [data-tone="gen"]     { --c: var(--h-gen); }
.lp-flow [data-tone="idle"]    { --c: var(--h-muted); }
.lp-flow-svg { position: absolute; left: 0; top: 0; overflow: visible; }
.lp-route path { fill: none; stroke-linecap: round; transition: opacity 0.4s ease, stroke 0.4s ease; }
.lp-route .idle { stroke: var(--h-idle); stroke-width: 2; stroke-dasharray: 1 7; }
.lp-route .wire { stroke: var(--c); stroke-opacity: 0.5; stroke-width: 2.5; opacity: 0; }
.lp-route .glow { stroke: var(--c); stroke-opacity: 0.1; stroke-width: 10; opacity: 0; }
.lp-route.on .idle { opacity: 0; }
.lp-route.on .wire, .lp-route.on .glow { opacity: 1; }
.lp-hub { fill: var(--h-well); stroke: var(--c); stroke-opacity: 0.6; stroke-width: 1.5; transition: stroke 0.4s ease; }
.lp-node circle { transition: opacity 0.4s ease, stroke 0.4s ease; }
.lp-node .idle { fill: var(--h-well); stroke: var(--h-idle); stroke-width: 1.5; }
.lp-node .lit { stroke: var(--c); stroke-width: 2; opacity: 0; }
.lp-node.on .idle { stroke: transparent; }
.lp-node.on .lit { opacity: 1; }
.lp-grad .a { stop-color: var(--c); stop-opacity: 0.32; }
.lp-grad .b { stop-color: var(--c); stop-opacity: 0.02; }
.lp-ring-track { fill: none; stroke: var(--h-well); stroke-width: 4; }
.lp-ring { fill: none; stroke: var(--h-battery); stroke-width: 4; stroke-linecap: round; }
.lp-nc { position: absolute; width: 76px; height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--h-muted); transition: color 0.4s ease; }
.lp-nc.on { color: var(--c); }
.lp-nc[data-k="home"].on { color: var(--h-text); }
.lp-nc[data-k="battery"] { color: var(--h-text2); }
.lp-nc[data-k="battery"].on { color: var(--h-battery); }
.lp-nc .v { margin-top: 3px; font-size: 14px; font-weight: 700; line-height: 17px; letter-spacing: -0.2px; font-variant-numeric: tabular-nums; color: var(--h-text); }
.lp-nc[data-k="grid"]:not(.on) .v, .lp-nc[data-k="gen"]:not(.on) .v { color: var(--h-muted); }
.lp-label { position: absolute; width: 140px; text-align: center; font-size: 12px; line-height: 15px; font-weight: 600; white-space: nowrap; color: var(--h-text2); }
.lp-bw { font-weight: 700; color: var(--h-battery); font-variant-numeric: tabular-nums; }
.lp-hub-c { position: absolute; width: 54px; height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--c); transition: color 0.4s ease; }
.lp-hub-c .lv { width: 16px; height: 16px; }
.lp-hub-c .v { margin-top: 2px; font-size: 10.5px; font-weight: 700; line-height: 13px; letter-spacing: -0.2px; color: var(--h-text2); font-variant-numeric: tabular-nums; }
.lp-dots i { position: absolute; left: 0; top: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px 3px color-mix(in srgb, var(--c) 75%, transparent); opacity: 0; will-change: transform, opacity; }

/* The live icons (LiveIcons.tsx): a still drawing, moving while its part works. */
.lv { width: 21px; height: 21px; flex: none; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lv-sun { width: 22px; height: 22px; }
.lv-sun .disc { transition: fill 0.4s ease; }
.lp-nc.on .lv-sun .disc { fill: color-mix(in srgb, currentColor 30%, transparent); }
.lv-sun .rays, .lv-sun .breathe { transform-origin: 12px 12px; }
.lp-nc.on .lv-sun .rays { animation: lp-spin 9s linear infinite; }
.lp-nc.on .lv-sun .breathe { animation: lp-breathe 2.8s ease-in-out infinite; }
@keyframes lp-spin { to { transform: rotate(45deg); } }
@keyframes lp-breathe { 0%, 100% { transform: scale(0.9); } 50% { transform: scale(1.08); } }
.lv-moon { display: none; width: 20px; height: 20px; }
.night .lp-nc[data-k="solar"]:not(.on) .lv-sun { display: none; }
.night .lp-nc[data-k="solar"]:not(.on) .lv-moon { display: block; }
.lv-tower .spark { fill: currentColor; stroke: none; opacity: 0; }
.lp-nc.on .lv-tower .s1 { animation: lp-spark1 1.5s linear infinite; }
.lp-nc.on .lv-tower .s2 { animation: lp-spark2 1.5s linear -0.75s infinite; }
@keyframes lp-spark1 { 0% { transform: translateX(0); opacity: 0; } 15%, 85% { opacity: 1; } 100% { transform: translateX(14px); opacity: 0; } }
@keyframes lp-spark2 { 0% { transform: translateX(0); opacity: 0; } 15%, 85% { opacity: 1; } 100% { transform: translateX(6.8px); opacity: 0; } }
.lv-gen .smoke { fill: var(--h-muted); stroke: none; opacity: 0; transform-box: fill-box; transform-origin: center; }
.lp-nc.on .lv-gen .p1 { animation: lp-puff 1.9s ease-out infinite; }
.lp-nc.on .lv-gen .p2 { animation: lp-puff 1.9s ease-out -0.95s infinite; }
@keyframes lp-puff { 0% { transform: translate(0, 0) scale(0.6); opacity: 0; } 20% { opacity: 0.75; } 100% { transform: translate(-2.5px, -7px) scale(1.9); opacity: 0; } }
.lp-nc.on .lv-gen .engine { animation: lp-rumble 0.16s linear infinite; }
@keyframes lp-rumble { 25% { transform: translateX(0.5px); } 75% { transform: translateX(-0.5px); } }
.lv-batt .fill { fill: currentColor; stroke: none; }
.lp-nc[data-mode="in"] .lv-batt .fill { animation: lp-fill 2s ease-in-out infinite; }
.lp-nc[data-mode="out"] .lv-batt .fill { animation: lp-drain 2s ease-in-out infinite; }
@keyframes lp-fill { 0% { transform: translateY(14px); opacity: 1; } 75% { transform: translateY(0); opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(0); opacity: 0; } }
@keyframes lp-drain { 0% { transform: translateY(0); opacity: 0; } 10% { transform: translateY(0); opacity: 1; } 90%, 100% { transform: translateY(14px); opacity: 1; } }
.lv-house .lamp { opacity: 0; }
.lv-house .room { fill: color-mix(in srgb, var(--c) 32%, transparent); stroke: none; }
.lv-house .door { fill: var(--c); stroke: none; }
.lp-nc.on .lv-house .lamp { animation: lp-lamp 3.2s ease-in-out infinite; }
@keyframes lp-lamp { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

/* The Battery card: the liquid eases to each reading, two waves slide over it. */
.lp-card { margin-bottom: 14px; padding: 18px; border-radius: 26px; background: var(--s-card); border: 0.5px solid var(--s-border); box-shadow: var(--s-shadow); }
.lp-card-title { display: flex; align-items: center; min-height: 26px; margin-bottom: 14px; font: 700 20px/24px var(--display); letter-spacing: -0.3px; }
.lp-batt-row { display: flex; align-items: center; }
.lp-shell { display: flex; flex-direction: column; align-items: center; }
.lp-shell .cap { width: 26px; height: 7px; margin-bottom: -1px; border-radius: 4px 4px 0 0; background: var(--s-idle); }
.lp-shell .case { position: relative; width: 74px; height: 124px; padding: 4px; border: 2.5px solid var(--s-idle); border-radius: 20px; }
.lp-shell .liq { position: relative; width: 61px; height: 111px; border-radius: 14px; overflow: hidden; background: var(--s-well); }
.lp-shell .level { position: absolute; left: 0; top: 0; width: 61px; height: 121px; transition: transform 1.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.lp-shell .w { position: absolute; left: 0; top: 0; max-width: none; } /* twice the liquid's width, so it can slide */
.lp-shell .w.front path { fill: var(--s-battery); }
.lp-shell .w.back path { fill: color-mix(in srgb, var(--s-battery) 45%, transparent); }
.lp-shell .w.front { animation: lp-wave 6s linear infinite; }
.lp-shell .w.back { animation: lp-wave-back 9s linear infinite; }
.moving .lp-shell .w.front { animation-duration: 2.6s; }
.moving .lp-shell .w.back { animation-duration: 3.9s; }
@keyframes lp-wave { from { transform: translateX(0); } to { transform: translateX(-61px); } }
@keyframes lp-wave-back { from { transform: translateX(-61px); } to { transform: translateX(0); } }
.lp-shell .fillb { position: absolute; left: 0; top: 10px; width: 61px; height: 111px; background: var(--s-battery); }
.lp-shell .reserve { position: absolute; left: 0; top: 0; }
.lp-shell .reserve line { stroke: var(--s-reserve); stroke-width: 1.5; stroke-dasharray: 3 4; stroke-linecap: round; }
.lp-shell .bolt { position: absolute; inset: 0; width: 26px; height: 26px; margin: auto; fill: #fff; opacity: 0; }
.charging .lp-shell .bolt { animation: lp-bolt 1.6s ease-in-out infinite; }
@keyframes lp-bolt { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.lp-batt-text { flex: 1; margin-left: 22px; }
.lp-soc { font: 800 46px/52px var(--display); letter-spacing: -1.5px; font-variant-numeric: tabular-nums; }
.lp-state { margin-top: 2px; font-size: 15px; font-weight: 600; }
.lp-full { margin-top: 4px; font-size: 14px; color: var(--s-text2); }
.lp-full:empty { display: none; }
.lp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.lp-chips span { padding: 4px 8px; border-radius: 8px; background: var(--s-well); color: var(--s-text2); font-size: 11.5px; font-weight: 600; }

/* What iOS draws over the app. */
.lp-statusbar { position: absolute; z-index: 2; left: 0; right: 0; top: 0; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 4px 34px 0 52px; }
.lp-time { font-size: 17px; font-weight: 700; letter-spacing: -0.2px; font-variant-numeric: tabular-nums; }
.lp-statusbar svg { width: 78px; height: 14px; }
.lp-statusbar .ink { fill: var(--s-text); }
.lp-statusbar .frame { fill: none; stroke: var(--s-text); stroke-opacity: 0.4; }
.lp-island { position: absolute; z-index: 2; top: 11px; left: 139px; width: 124px; height: 36px; border-radius: 18px; background: #000; }
.lp-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 104px; background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--s-bg) 70%, transparent) 50%, var(--s-bg)); }
.lp-tabs { position: absolute; left: 22px; right: 22px; bottom: 24px; height: 62px; display: flex; align-items: center; padding: 0 4px; border-radius: 31px; background: var(--s-tabs); border: 0.5px solid var(--s-border); box-shadow: 0 8px 30px rgba(43, 29, 51, 0.14); }
.lp-tabs span { flex: 1; height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border-radius: 27px; font-size: 10px; font-weight: 600; color: var(--s-tabs-ink); }
.lp-tabs span.on { background: var(--s-tabs-on); color: var(--s-tab-on); }
.lp-tabs svg { width: 26px; height: 26px; fill: currentColor; }
.lp-tabs svg.line { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lp-homebar { position: absolute; z-index: 2; left: 50%; bottom: 8px; width: 140px; height: 5px; margin-left: -70px; border-radius: 3px; background: var(--s-text); opacity: 0.85; }

/* Beside the phone: the notification each moment sends, and the small widget. */
.stage .lp-notifs { position: absolute; left: -3%; top: 0; width: min(316px, 60%); z-index: 2; }
.lp-notifs { position: absolute; z-index: 2; }
.lp-notif {
  position: absolute; left: 0; top: 0; width: 100%;
  display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 13px 16px 14px 13px; border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--border); box-shadow: 0 2px 6px rgba(43, 29, 51, 0.06), 0 22px 48px rgba(43, 29, 51, 0.16);
  transition: opacity 0.5s ease, transform 0.7s cubic-bezier(0.2, 0.9, 0.25, 1.15);
}
.lp-notif.enter { opacity: 0; transform: translateY(-16px) scale(0.94); }
.lp-notif.leave { opacity: 0; transform: translateY(-6px) scale(0.98); transition: opacity 0.4s ease, transform 0.4s ease; }
.lp-app-icon { width: 38px; height: 38px; border-radius: 9px; }
.lp-notif .h { display: flex; justify-content: space-between; font-size: 13px; line-height: 1.3; color: var(--muted); }
.lp-notif .t { margin-top: 1px; font-size: 15.5px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.lp-notif .d { font-size: 15px; line-height: 1.38; color: var(--ink2); }
.stage .lp-widget { position: absolute; left: 4%; bottom: 7%; z-index: 2; }
.lp-widget {
  width: 158px; height: 158px; padding: 14px;
  display: grid; grid-template-rows: auto 1fr auto; border-radius: 26px;
  background: #2B1D33; color: #F5EFE6; box-shadow: 0 2px 6px rgba(43, 29, 51, 0.08), 0 22px 48px rgba(43, 29, 51, 0.22);
}
@media (prefers-color-scheme: dark) { .lp-widget { background: #241A2C; box-shadow: 0 0 0 1px rgba(245, 239, 230, 0.06), 0 22px 48px rgba(0, 0, 0, 0.4); } }
.scene[data-tone="solar"]   { --wd: #FDB022; --wt: #FFC65C; }
.scene[data-tone="battery"] { --wd: #3CCB98; --wt: #6FE0B5; }
.scene[data-tone="grid"]    { --wd: #6E9BE8; --wt: #9DBCF2; }
.scene[data-tone="gen"]     { --wd: #FF6A45; --wt: #FF9A7E; }
.scene[data-tone="idle"]    { --wd: #A898AE; --wt: #D9CDDC; }
.lp-w-top { display: flex; align-items: baseline; gap: 6px; margin: 0; }
.lp-w-dot { flex: none; align-self: center; width: 7px; height: 7px; border-radius: 50%; background: var(--wd); transition: background 0.6s ease; }
.lp-w-title { flex: 1; font: 700 14px/1.15 var(--display); color: var(--wt); transition: color 0.6s ease; }
.lp-w-time { font-size: 11px; color: #A898AE; font-variant-numeric: tabular-nums; }
.lp-w-ring { position: relative; width: 82px; height: 82px; place-self: center; }
.lp-w-ring svg { width: 100%; height: 100%; }
.lp-w-ring .track { fill: none; stroke: #46344F; stroke-width: 7; }
.lp-w-ring .arc { fill: none; stroke: #3CCB98; stroke-width: 7; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(60, 203, 152, 0.45)); }
.lp-w-ring p { position: absolute; inset: 0; display: flex; align-items: baseline; justify-content: center; padding-top: 27px; margin: 0; }
.lp-w-ring b { font: 800 24px/1 var(--display); color: #F5EFE6; font-variant-numeric: tabular-nums; }
.lp-w-ring small { font: 700 13px/1 var(--display); color: #D9CDDC; }
.lp-w-short { margin: 0; font-size: 12px; text-align: center; color: #D9CDDC; }
.scene.still *, .scene.still *::before { animation: none !important; transition: none !important; }

@media (max-width: 980px) {
  .stage { justify-content: center; padding: 40px 0 8px; min-height: calc(min(72vw, 300px) * 904 / 432 + 48px); }
  .lp-fit { width: min(72vw, 300px); }
  .lp-glow { inset: 6% 8% 0; }
  .stage .lp-notifs { left: 50%; top: 0; width: min(340px, 100%); transform: translateX(-50%); }
  .stage .lp-widget { left: auto; right: max(0px, calc(50% - 330px)); bottom: 12%; }
}
@media (max-width: 640px) { .stage .lp-widget { display: none; } }

/* ---------- the section scenes (live.js, scenes.js) ---------- */

.sc-box { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; min-height: clamp(440px, 44vw, 600px); min-width: 0; }
.sc-glow { position: absolute; inset: 10% 4%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--amb) 26%, transparent), transparent); filter: blur(36px); pointer-events: none; }
.sc-box .lp-notifs { left: 0; top: 2%; z-index: 3; width: min(316px, 74%); }
/* A piece of the app's screen on its own, as a card. */
.lp-screen-like { width: 402px; overflow: hidden; border-radius: 40px; background: var(--s-bg); color: var(--s-text); font: 400 15px/1.3 var(--text); border: 1px solid var(--s-border); box-shadow: 0 2px 6px rgba(43, 29, 51, 0.06), 0 40px 80px -30px rgba(43, 29, 51, 0.35); -webkit-font-smoothing: antialiased; }
:where(.lp-screen-like) p { margin: 0; }
.lp-screen-like .lp-content { padding: 22px 16px 2px; }

/* Seconds, not minutes. */
.sec-fit { width: min(86%, 380px); aspect-ratio: 402 / 560; margin: 40px 0 0 auto; }
.sec-other {
  position: absolute; left: -2%; bottom: -3%; z-index: 3; width: 214px; padding: 16px 18px 15px;
  border-radius: 18px; background: #EDEDED; color: #6A6A6A; font: 400 14px/1.35 system-ui, -apple-system, sans-serif;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 18px 40px rgba(0, 0, 0, 0.14);
}
:where(.sec-other) p { margin: 0; }
.sec-other-h { font-weight: 600; color: #4A4A4A; margin-bottom: 8px; }
.sec-other-row { display: flex; justify-content: space-between; padding: 3px 0; }
.sec-other-row b { color: #3A3A3A; font-weight: 600; }
.sec-other-age { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #DADADA; font-size: 13px; color: #8A8A8A; }
.sec-other-age svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
@media (prefers-color-scheme: dark) {
  .sec-other { background: #2A2A2C; color: #A0A0A0; }
  .sec-other-h, .sec-other-row b { color: #D0D0D0; }
  .sec-other-age { border-color: #3A3A3C; }
}
@media (max-width: 560px) {
  .sec-fit { width: 100%; margin-top: 64px; }
  .sec-other { width: 180px; bottom: -4%; padding: 13px 14px; font-size: 13px; }
}


/* Pieces of the app used across the scenes. */
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic .solid { fill: currentColor; stroke: none; }
.ic.thick { stroke-width: 2.2; }
.ios-switch { position: relative; flex: none; width: 51px; height: 31px; border-radius: 16px; background: var(--s-idle); transition: background 0.25s ease; }
.ios-switch i { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.16); transition: transform 0.3s cubic-bezier(0.3, 1.3, 0.5, 1); }
.ios-switch.on { background: var(--s-good); }
.ios-switch.on i { transform: translateX(20px); }
.back-pill { display: inline-flex; align-items: center; gap: 2px; margin-bottom: 18px; padding: 7px 14px 7px 8px; border-radius: 999px; border: 0.5px solid var(--s-border); background: color-mix(in srgb, var(--s-card) 75%, transparent); font-size: 14px; font-weight: 600; line-height: 1; }
.back-pill .ic { width: 16px; height: 16px; }
.rt-h1 { padding: 0 4px; font: 800 30px/1.1 var(--display); letter-spacing: -0.7px; }
.rt-sub { margin-top: 8px; padding: 0 4px; font-size: 15px; line-height: 21px; color: var(--s-text2); }
.sec-label { margin: 22px 0 10px; padding: 0 4px; font: 700 12px/1 var(--text); letter-spacing: 0.9px; text-transform: uppercase; color: var(--s-muted); }
.spin { flex: none; width: 15px; height: 15px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--s-accent) 25%, transparent); border-top-color: var(--s-accent); animation: lp-spinner 0.8s linear infinite; }
@keyframes lp-spinner { to { transform: rotate(360deg); } }
.sc-box .lp-fit { width: clamp(232px, 20.5vw, 284px); justify-self: end; margin-right: 4%; }
.sc-box > .fit:not(.lp-fit) { z-index: 2; }
.card-like { font: 400 15px/1.3 var(--text); color: var(--s-text); -webkit-font-smoothing: antialiased; }
:where(.card-like) p { margin: 0; }

/* Widgets: the lock screen and the medium widget. */
.lp-screen.lock { --s-text: #fff; }
.lk-wall { position: absolute; inset: 0; background: radial-gradient(120% 60% at 50% 104%, rgba(239, 140, 82, 0.95) 0%, rgba(239, 140, 82, 0) 62%), linear-gradient(180deg, #24182B 0%, #3D2740 52%, #7A3F38 100%); }
.lk-date { position: absolute; top: 92px; left: 0; right: 0; text-align: center; font: 600 21px/1 system-ui, -apple-system, sans-serif; color: rgba(255, 255, 255, 0.9); }
.lk-clock { position: absolute; top: 112px; left: 0; right: 0; text-align: center; font: 700 106px/1 ui-rounded, system-ui, -apple-system, sans-serif; letter-spacing: -3px; color: rgba(255, 255, 255, 0.96); font-variant-numeric: tabular-nums; }
.lk-widgets { position: absolute; top: 250px; left: 0; right: 0; display: flex; justify-content: center; align-items: center; gap: 14px; color: #fff; font-family: system-ui, -apple-system, sans-serif; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.2); }
.lk-circ { position: relative; width: 70px; height: 70px; }
.lk-circ svg { position: absolute; inset: 3px; width: 64px; height: 64px; }
.lk-circ .track { fill: none; stroke: rgba(255, 255, 255, 0.45); stroke-width: 6; stroke-linecap: round; }
.lk-circ .mk { transform-origin: 32px 32px; transform: rotate(135deg); transition: transform 1s ease; }
.lk-circ .mk circle { fill: #fff; stroke: #2E1F34; stroke-width: 2.4; paint-order: stroke; }
.lk-circ b { position: absolute; left: 0; right: 0; top: 23px; text-align: center; font-size: 22px; line-height: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lk-circ .bat { position: absolute; inset: auto auto 5px 50%; width: 17px; height: 9.5px; margin-left: -8px; fill: none; stroke: #fff; stroke-width: 1.4; stroke-linecap: round; }
.lk-circ .bat .lvl { fill: #fff; stroke: none; }
.lk-rect { width: 180px; }
.lk-rect p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk-rect .l1 { font-size: 17px; font-weight: 600; line-height: 21px; }
.lk-rect .l2 { font-size: 15px; line-height: 19px; }
.lk-rect .l3 { font-size: 15px; line-height: 19px; opacity: 0.68; }
.lk-btn { position: absolute; bottom: 52px; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: rgba(20, 12, 24, 0.5); }
.lk-btn.l { left: 46px; }
.lk-btn.r { right: 46px; }
.lk-btn svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linejoin: round; }
.wm-fit { position: absolute; left: 0; bottom: 9%; width: min(320px, 64%); aspect-ratio: 338 / 158; }
.wm {
  width: 338px; height: 158px; padding: 14px; display: flex; gap: 10px; border-radius: 22px;
  background: #2B1D33; color: #F5EFE6; font: 400 12px/1.25 system-ui, -apple-system, sans-serif;
  box-shadow: 0 2px 6px rgba(43, 29, 51, 0.08), 0 26px 50px rgba(43, 29, 51, 0.26);
}
@media (prefers-color-scheme: dark) { .wm { background: #241A2C; box-shadow: 0 0 0 1px rgba(245, 239, 230, 0.06), 0 26px 50px rgba(0, 0, 0, 0.4); } }
:where(.wm) p { margin: 0; }
.wm[data-tone="solar"] { --wt: #FFC65C; }
.wm[data-tone="grid"] { --wt: #9DBCF2; }
.wm[data-tone="gen"] { --wt: #FF9A7E; }
.wm[data-tone="battery"] { --wt: #6FE0B5; }
.wm-left { width: 78px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.wg-ring { position: relative; width: 78px; height: 78px; }
.wg-ring svg { width: 100%; height: 100%; }
.wg-ring .track { fill: none; stroke: #46344F; stroke-width: 7; }
.wg-ring .arc { fill: none; stroke: #3CCB98; stroke-width: 7; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(60, 203, 152, 0.45)); transition: stroke-dasharray 1s ease; }
.wg-ring .mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding-bottom: 4px; }
.wg-ring .mid .ic { width: 14px; height: 14px; color: #3CCB98; }
.wg-ring .mid p { display: flex; align-items: baseline; }
.wg-ring b { font: 800 24px/1 var(--display); color: #F5EFE6; font-variant-numeric: tabular-nums; }
.wg-ring small { font: 700 13px/1 var(--display); color: #D9CDDC; }
.wm-lbl { font-size: 11px; color: #D9CDDC; }
.wm-right { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wm-top { display: flex; align-items: baseline; gap: 6px; }
.wm-title { flex: 1; min-width: 0; font: 700 17px/1.2 var(--display); color: var(--wt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.6s ease; }
.wm-age { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: #A898AE; white-space: nowrap; }
.wm-age svg { width: 9px; height: 9px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.wm-detail { padding: 2px 0 10px; color: #D9CDDC; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wm-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: auto; }
.wt { --c: #F5EFE6; display: flex; align-items: center; gap: 4px; height: 29px; padding: 0 7px; border-radius: 10px; background: #3A2A44; transition: background 0.5s ease; }
.wt[data-k="grid"] { --c: #6E9BE8; }
.wt[data-k="gen"] { --c: #FF6A45; }
.wt[data-k="pv"] { --c: #FDB022; }
.wt .ic { width: 14px; height: 14px; stroke-width: 2; color: var(--c); }
.wt i { font-style: normal; color: #D9CDDC; }
.wt b { margin-left: auto; font-weight: 600; color: #F5EFE6; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wt.total b { margin-left: 0; }
.wt.off b { color: #A898AE; }
.wt.lit { background: color-mix(in srgb, var(--c) 22%, transparent); }

/* Grid and generator: History's card for the day. */
.hr-fit { width: min(100%, 392px); aspect-ratio: 402 / 372; margin-top: 56px; }
.hr-screen { padding-bottom: 4px; }
.hr-day { margin: 2px 0 8px 4px; font-size: 13px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--s-muted); }
.hr-card { margin: 0; }
.hr { padding: 12px 0; }
.hr + .hr { border-top: 0.5px solid var(--s-rule); }
.hr[data-k="grid"] { --c: var(--s-grid); }
.hr[data-k="gen"] { --c: var(--s-gen); }
.hr-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.hr-badge { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.hr-badge .ic { width: 18px; height: 18px; }
.hr-mid { flex: 1; }
.hr-name { font-size: 15px; font-weight: 700; }
.hr-sub { margin-top: 2px; font-size: 13px; color: var(--s-text2); }
.hr-total { font: 800 17px/1 var(--display); font-variant-numeric: tabular-nums; }
.hr-total.none { color: var(--s-muted); }
.lane { position: relative; height: 12px; border-radius: 6px; background: var(--s-well); overflow: hidden; }
.lane i { position: absolute; top: 0; bottom: 0; border-radius: 6px; background: var(--c); }
.lane .now { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--s-text); opacity: 0.25; }
.hr-periods { list-style: none; margin: 10px 0 0; padding: 0; }
.hr-periods li { display: none; align-items: center; padding: 5px 0; }
.hr-periods li.shown { display: flex; animation: lp-rise 0.4s ease; }
.hr-periods .dot { width: 8px; height: 8px; margin-right: 10px; border-radius: 50%; background: var(--c); }
.hr-periods .span { flex: 1; font-size: 14px; color: var(--s-text2); font-variant-numeric: tabular-nums; }
.hr-periods b { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
@keyframes lp-rise { from { opacity: 0; transform: translateY(4px); } }

/* Home automation: the Routines screen, and the switch. */
.rt-note { display: none; margin-top: 10px; padding: 0 4px; font-size: 14px; line-height: 20px; color: var(--s-critical); }
.rt.offline .rt-note { display: block; animation: lp-rise 0.4s ease; }
.rt-card { margin-bottom: 12px; padding: 16px; border-radius: 24px; background: var(--s-card); border: 0.5px solid var(--s-border); box-shadow: var(--s-shadow); }
.rt-top { display: flex; align-items: flex-start; gap: 12px; }
.rt-badge { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--tone) 13%, transparent); color: var(--tone); }
.rt-badge .ic { width: 23px; height: 23px; }
.rt-mid { flex: 1; min-width: 0; }
.rt-title { font-size: 16.5px; font-weight: 700; }
.rt-text { margin-top: 3px; font-size: 13.5px; line-height: 19px; color: var(--s-text2); }
.rt-status { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 9px 12px; border-radius: 12px; background: color-mix(in srgb, var(--s-text2) 6%, transparent); font-size: 13.5px; line-height: 19px; font-weight: 600; transition: background 0.4s ease, color 0.4s ease; }
.rt-status .dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--s-muted); transition: background 0.4s ease; }
.rt-status[data-state="wait"] .dot { background: var(--s-solar); }
.rt-status[data-state="on"] { background: color-mix(in srgb, var(--s-good) 7%, transparent); }
.rt-status[data-state="on"] .dot { background: var(--s-good); }
.rt-status[data-state="problem"] { background: color-mix(in srgb, var(--s-critical) 6%, transparent); color: var(--s-critical); }
.rt-status[data-state="problem"] .dot { background: var(--s-critical); }
.rt-tile { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 22px; background: var(--s-card); border: 0.5px solid var(--s-border); box-shadow: var(--s-shadow); }
.rt-tile .rt-badge { width: 48px; height: 48px; border-radius: 15px; }
.rt-tile > .ic { width: 15px; height: 15px; color: var(--s-muted); }
.sw-fit { position: absolute; left: 0; bottom: 18%; width: min(270px, 58%); aspect-ratio: 320 / 72; }
.sw-card { width: 320px; height: 72px; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 14px; border-radius: 24px; background: var(--s-card); border: 0.5px solid var(--s-border); box-shadow: 0 2px 6px rgba(43, 29, 51, 0.06), 0 22px 48px rgba(43, 29, 51, 0.16); font: 400 15px/1.3 var(--text); color: var(--s-text); }
:where(.sw-card) p { margin: 0; }
.sw-badge { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--s-accent) 12%, transparent); color: var(--s-accent); }
@media (prefers-color-scheme: dark) { .sw-badge { color: #C7A9D8; background: rgba(122, 90, 140, 0.25); } }
.sw-mid { flex: 1; }
.sw-title { font-size: 16px; font-weight: 700; }
.sw-sub { margin-top: 1px; font-size: 13px; color: var(--s-muted); }
.sw-sub.bad { color: var(--s-critical); }

/* Notifications: Describe it. */
.ask-tile { width: 52px; height: 52px; margin: 0 4px 14px; display: grid; place-items: center; border-radius: 18px; background: var(--s-accent); color: #fff; }
.ask-tile .ic { width: 26px; height: 26px; }
.ask-convo { margin-top: 20px; }
.ask-composer { display: flex; align-items: flex-end; gap: 8px; margin-top: 4px; padding: 8px 8px 8px 16px; border-radius: 22px; border: 0.5px solid var(--s-border); background: var(--s-card); box-shadow: var(--s-shadow); }
.ask.sent .ask-composer { display: none; }
.ask-input { flex: 1; min-height: 62px; padding: 9px 0; font-size: 16.5px; line-height: 22px; }
.ask-input .ph { color: var(--s-muted); }
.ask.typing .ask-input .ph { display: none; }
.ask-input .caret { display: inline-block; width: 2px; height: 20px; margin: 0 1px; vertical-align: -4px; background: var(--s-accent); animation: lp-blink 1s steps(1) infinite; }
@keyframes lp-blink { 50% { opacity: 0; } }
.ask-send { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--s-accent); color: #fff; opacity: 0.35; transition: opacity 0.2s; }
.ask.typing .ask-send { opacity: 1; }
.ask-send .ic { width: 18px; height: 18px; }
.bubble { transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
.bubble.in, .ask-draft.in { opacity: 0; transform: translateY(10px); }
.bubble.me { width: fit-content; max-width: 85%; margin: 0 0 10px auto; padding: 10px 14px; border-radius: 20px 20px 6px 20px; background: var(--s-accent); color: #fff; font-size: 15.5px; line-height: 21px; }
.bubble.einie { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 12px; }
.bubble .av { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--s-accent); color: #fff; }
.bubble .av .ic { width: 14px; height: 14px; }
.bubble.einie p { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 20px 20px 20px 6px; background: var(--s-card); border: 0.5px solid var(--s-border); font-size: 15.5px; line-height: 21px; color: var(--s-text2); }
.ask-draft { margin-top: 4px; padding: 18px; border-radius: 26px; background: var(--s-card); border: 0.5px solid var(--s-border); box-shadow: var(--s-shadow); transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.ad-head { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--s-text2); }
.ad-head .ic { width: 16px; height: 16px; color: var(--s-accent); }
@media (prefers-color-scheme: dark) { .ad-head .ic { color: #C7A9D8; } }
.ad-title { margin-top: 8px; font: 800 22px/1.2 var(--display); letter-spacing: -0.4px; }
.ad-words { margin-top: 10px; font-size: 14.5px; line-height: 20px; }
.ad-safe { display: grid; gap: 10px; margin: 14px 0 4px; padding: 14px; border-radius: 16px; background: var(--s-well); }
.ad-safe p { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; line-height: 19px; }
.ad-safe .ic { width: 18px; height: 18px; padding: 3.5px; border-radius: 50%; background: var(--s-good); color: #fff; stroke-width: 2.8; }
.ad-src { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.ad-src > div { flex: 1; min-width: 0; }
.ad-src-ic { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 11px; background: color-mix(in srgb, var(--s-grid) 18%, transparent); color: var(--s-grid); }
.ad-src-ic .ic { width: 19px; height: 19px; }
.ad-src-t { font: 800 16px/1.2 var(--display); letter-spacing: -0.2px; }
.ad-src-s { margin-top: 2px; font-size: 12.5px; line-height: 16px; color: var(--s-text2); }
.ad-src-s .amps { font-weight: 700; color: var(--s-text); }
.ad-rows { margin-top: 10px; border-top: 0.5px solid var(--s-rule); }
.ad-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 0.5px solid var(--s-rule); font-size: 13.5px; line-height: 17px; }
.ad-hint { font-size: 12px; color: var(--s-muted); }
.ad-step { display: inline-flex; align-items: center; flex: none; border-radius: 12px; background: var(--s-well); font-variant-numeric: tabular-nums; }
.ad-step b { min-width: 46px; text-align: center; font-size: 14.5px; }
.ad-step i { width: 30px; height: 32px; display: grid; place-items: center; font-style: normal; font-size: 18px; font-weight: 600; color: var(--s-text2); border-radius: 12px; }
.ad-step i.tap { animation: ad-tap 0.32s ease-out; }
@keyframes ad-tap { 0% { background: color-mix(in srgb, var(--s-accent) 28%, transparent); transform: scale(0.88); } 100% { background: transparent; transform: none; } }
.ask-draft.ctl .ad-btn { transition: transform 0.2s ease; }
.ask-draft.ctl .ad-btn.ready { animation: ad-ready 0.5s ease-out; }
@keyframes ad-ready { 50% { transform: scale(1.03); } }
.ad-btn { display: block; margin-top: 14px; padding: 15px; border-radius: 14px; background: var(--s-accent); color: #fff; text-align: center; font-size: 16px; font-weight: 700; }

/* Generator control: the shortcut's sheet over Home, and the Shortcuts card. */
/* The sheet is a modal in the app: it covers the tab bar; the status bar and home bar stay on top. */
.sh-back { position: absolute; inset: 0; z-index: 1; background: rgba(5, 8, 15, 0.55); transition: opacity 0.45s ease; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; height: 720px; display: flex; flex-direction: column; border-radius: 28px 28px 0 0; background: var(--s-card); box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25); transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
[data-sheet="closed"] .sheet { transform: translateY(105%); }
[data-sheet="closed"] .sh-back { opacity: 0; }
.grip { display: block; width: 40px; height: 5px; margin: 10px auto 8px; border-radius: 3px; background: var(--s-idle); }
.sh-body { flex: 1; padding: 0 20px; }
.sh-tile { width: 56px; height: 56px; margin-top: 4px; display: grid; place-items: center; border-radius: 18px; background: var(--gen-tint); color: var(--gen-ink); }
.sh-tile .ic { width: 28px; height: 28px; }
.sh-title { margin-top: 14px; font: 800 26px/31px var(--display); letter-spacing: -0.5px; }
.sh-detail { margin-top: 6px; font-size: 16px; line-height: 22px; }
.sh-note { margin-top: 10px; font-size: 14.5px; line-height: 20px; color: var(--s-text2); }
.sh-what { display: flex; align-items: center; gap: 6px; margin-top: 18px; font-size: 14px; font-weight: 600; color: var(--s-text2); }
.sh-what .ic { width: 14px; height: 14px; }
.sh-foot { padding: 2px 20px 46px; border-top: 0.5px solid var(--s-rule); }
.sh-label { margin: 12px 0 8px; font-size: 13px; font-weight: 600; color: var(--s-text2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { padding: 8px 13px; border-radius: 999px; border: 1.5px solid transparent; background: var(--s-well); color: var(--s-text2); font-size: 13.5px; font-weight: 600; }
.chips .sel { border-color: var(--s-accent); background: color-mix(in srgb, var(--s-accent) 16%, transparent); color: var(--s-text); }
.sh-fnote { margin: 12px 0; font-size: 13.5px; line-height: 19px; color: var(--s-text2); }
.sh-btn { position: relative; display: block; overflow: hidden; padding: 15px; border-radius: 14px; background: var(--s-accent); color: #fff; text-align: center; font-size: 16px; font-weight: 700; }
.sh-btn.well { margin-top: 14px; background: var(--s-well); color: var(--s-text); }
.sh-btn .tap { position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px; border-radius: 50%; background: rgba(255, 255, 255, 0.4); opacity: 0; }
[data-sheet="tap"] .sh-btn .tap { animation: lp-tap 0.55s ease-out; }
@keyframes lp-tap { from { opacity: 0.7; transform: scale(0.2); } to { opacity: 0; transform: scale(3.2); } }
.sh-busy, .sh-done { display: none; }
[data-sheet="busy"] .sh-idle, [data-sheet="done"] .sh-idle, [data-sheet="closed"] .sh-idle { display: none; }
[data-sheet="busy"] .sh-busy { display: block; }
[data-sheet="done"] .sh-done, [data-sheet="closed"] .sh-done { display: block; }
.sh-box { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--s-accent) 10%, transparent); font-size: 15px; font-weight: 600; }
.sh-box .timer { margin-left: auto; font-size: 14px; font-weight: 700; color: var(--s-text2); font-variant-numeric: tabular-nums; }
.sh-box.ok { background: color-mix(in srgb, var(--s-good) 12%, transparent); animation: lp-rise 0.4s ease; }
.sh-box .tick { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--s-good); color: #fff; font-size: 15px; font-weight: 900; }
.sh-close { display: block; padding: 14px; text-align: center; font-size: 15px; font-weight: 600; color: var(--s-text2); }
.sh-foot-note { text-align: center; font-size: 12px; color: var(--s-muted); }
.sc-fit { position: absolute; right: 0; top: 36%; width: min(238px, 46%); aspect-ratio: 402 / 362; }
.sc-box[data-scene="disconnect"] .lp-fit { justify-self: start; margin: 0 0 0 4%; }
.sc-card { width: 402px; margin: 0; font: 400 15px/1.3 var(--text); color: var(--s-text); box-shadow: 0 2px 6px rgba(43, 29, 51, 0.06), 0 26px 50px rgba(43, 29, 51, 0.2); }
:where(.sc-card) p { margin: 0; }
.sc-card .lp-card-title { justify-content: space-between; }
.sc-card .edit { font: 700 15px/1 var(--text); color: var(--s-accent); }
@media (prefers-color-scheme: dark) { .sc-card .edit { color: #C7A9D8; } }
.st-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.st { display: flex; flex-direction: column; min-height: 136px; padding: 14px; border-radius: 22px; background: var(--s-well); transition: background 0.45s ease; }
.st-top { display: flex; align-items: center; justify-content: space-between; }
.st-disc { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--s-card); color: var(--s-muted); transition: background 0.45s ease, color 0.45s ease; }
.st-badge { display: none; padding: 3px 8px; border-radius: 999px; background: var(--tink); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 0.6px; }
@media (prefers-color-scheme: dark) { .st-badge { color: #160F1B; } }
.st-title { flex: 1; margin-top: 12px; font-size: 15.5px; line-height: 20px; font-weight: 700; }
.st-state { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--s-text2); font-variant-numeric: tabular-nums; }
.st.on { background: var(--tint); }
.st.on .st-disc { background: var(--tone); color: #fff; }
.st.on .st-badge { display: inline-block; }
.st.on .st-state { color: var(--tink); font-weight: 800; }

/* Bills: Home's card, and the generator's bill. */
.bl-fit { position: absolute; right: 0; top: 2%; width: min(390px, 84%); aspect-ratio: 402 / 300; }
.bl-fit2 { position: absolute; left: 0; bottom: 2%; width: min(350px, 74%); aspect-ratio: 402 / 300; }
.bl-stack { width: 402px; font: 400 15px/1.3 var(--text); color: var(--s-text); -webkit-font-smoothing: antialiased; }
:where(.bl-stack) p { margin: 0; }
.bl-stack .lp-card { margin: 0; box-shadow: 0 2px 6px rgba(43, 29, 51, 0.06), 0 26px 50px rgba(43, 29, 51, 0.18); }
.bl-card .lp-card-title { justify-content: space-between; }
.bl-card .lp-card-title .ic { width: 18px; height: 18px; color: var(--s-muted); }
.bl-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.bl-head span { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; }
.bl-head .ic { width: 16px; height: 16px; color: var(--s-grid); }
.bl-head b { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bl-bar { height: 10px; overflow: hidden; border-radius: 5px; background: var(--s-well); }
.bl-bar i { display: block; height: 100%; border-radius: 5px; background: var(--s-grid); transform-origin: left; transform: scaleX(0); }
.bl-sub { margin-top: 8px; font-size: 12.5px; color: var(--s-muted); }
.bl-stats { display: flex; margin-top: 18px; padding-top: 14px; border-top: 0.5px solid var(--s-rule); }
.bl-stats > div { flex: 1; padding: 0 4px; text-align: center; }
.bl-stats > div + div { border-left: 0.5px solid var(--s-rule); }
.bl-stats .v { display: block; font: 800 17px/1.2 var(--display); letter-spacing: -0.3px; font-variant-numeric: tabular-nums; }
.bl-stats .h { display: flex; align-items: center; justify-content: center; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--s-text2); }
.bl-stats .dot { width: 7px; height: 7px; margin-right: 5px; border-radius: 4px; }
.bl-stats .dot.grid { background: var(--s-grid); }
.bl-stats .dot.gen { background: var(--s-gen); }
.bl-stats .dot.solar { background: var(--s-solar); }
.bl-stats .s { margin-top: 2px; font-size: 11.5px; color: var(--s-muted); font-variant-numeric: tabular-nums; }
.bl-foot { margin-top: 14px; text-align: center; font-size: 12px; color: var(--s-muted); }
.bl-big { margin-bottom: 4px; }
.bl-big b { font: 800 30px/1 var(--display); letter-spacing: -0.8px; font-variant-numeric: tabular-nums; }
.bl-big small { font-size: 15px; font-weight: 600; color: var(--s-muted); }
.bl-lines { margin-top: 16px; padding-top: 6px; border-top: 0.5px solid var(--s-rule); }
.bl-lines p { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.bl-lines span { flex: 1; font-size: 14.5px; font-weight: 500; color: var(--s-text2); }
.bl-lines small { display: block; margin-top: 2px; font-size: 12px; color: var(--s-muted); }
.bl-lines i { font-style: normal; font-size: 13px; color: var(--s-muted); font-variant-numeric: tabular-nums; }
.bl-lines b { min-width: 64px; text-align: right; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bl-lines .strong span { color: var(--s-text); font-weight: 700; }
.bl-lines .strong b { font-weight: 800; }

@media (max-width: 860px) {
  .sc-box .lp-fit, .sc-box[data-scene="disconnect"] .lp-fit { justify-self: center; margin: 0; width: min(64vw, 276px); }
}

/* ---------- what einie does, at a glance ---------- */

.overview { padding: clamp(28px, 4vw, 48px) 0 clamp(24px, 4vw, 48px); }
.overview-grid { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.overview-grid li { display: grid; }
.ov {
  display: grid; gap: 10px; align-content: start; padding: 22px 22px 24px; color: inherit; text-decoration: none;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.ov:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--tone) 45%, var(--border)); }
.ov:focus-visible { outline: 2px solid var(--tone); outline-offset: 3px; }
.ov-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ov-go { color: var(--muted); transition: transform 0.2s ease, color 0.2s ease; }
.ov:hover .ov-go { color: var(--tink); transform: translateX(3px); }
.ov h3 { font: 800 clamp(21px, 1.9vw, 25px)/1.1 var(--display); letter-spacing: -0.02em; color: var(--ink); }
.ov p { color: var(--ink2); font-size: 15.5px; line-height: 1.45; }
.tile { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 13px; background: var(--tint); color: var(--tink); }
.tile .icon { width: 21px; height: 21px; }
@media (max-width: 980px) { .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 400px) { .ov { padding: 18px; } .ov p { font-size: 14.5px; } }
@media (prefers-reduced-motion: reduce) { .ov, .ov-go { transition: none; } .ov:hover, .ov:hover .ov-go { transform: none; } }

/* ---------- shortcuts and Get it done by ---------- */

.tools { padding: clamp(48px, 6vw, 88px) 0; }
.tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.tool-card {
  display: grid; grid-template-rows: auto auto auto 1fr; gap: 16px; align-content: start;
  padding: clamp(24px, 3.4vw, 40px); border-radius: 32px;
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.tool-card h2 { font-size: clamp(30px, 3.2vw, 42px); line-height: 1.04; letter-spacing: -0.03em; text-wrap: balance; }
.tool-card .body { font-size: 17px; }
.tool-board { align-self: stretch; display: flex; flex-direction: column; margin-top: 6px; padding: 14px; border-radius: 24px; background: var(--well); }
/* Whichever card is shorter, its board takes up the rest: the explanation panel, or the Today list. */
.tool-board .tt-panel { flex: 1; align-content: space-between; }
.prio-card .prio-if { margin-top: auto; }

/* The shortcut tiles, as on einie's Home: grey when off, in their colour when on. */
.tt-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tool-tile {
  width: 100%; height: 100%; display: grid; gap: 8px; align-content: start; text-align: left; cursor: pointer;
  padding: 14px; border-radius: 20px; border: 1.5px solid transparent; background: var(--card); color: var(--ink);
  font: inherit; transition: background 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
}
.tool-tile:hover { transform: translateY(-2px); }
.tool-tile:focus-visible { outline: 2px solid var(--tone); outline-offset: 2px; }
.tool-tile .tile { width: 38px; height: 38px; border-radius: 12px; background: var(--well); color: var(--muted); transition: background 0.25s, color 0.25s; }
.tt-top { display: flex; align-items: center; justify-content: space-between; }
.tt-badge { padding: 4px 8px; border-radius: 999px; background: var(--tink); color: #fff; font: 800 11px/1 var(--text); letter-spacing: 0.06em; opacity: 0; transform: scale(0.8); transition: opacity 0.2s, transform 0.2s; }
.tt-title { font: 700 15.5px/1.25 var(--display); letter-spacing: -0.01em; }
.tt-state { font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.tool-tile[aria-pressed="true"] { background: var(--tint); border-color: color-mix(in srgb, var(--tone) 50%, transparent); }
.tool-tile[aria-pressed="true"] .tile { background: var(--card); color: var(--tink); }
.tool-tile[aria-pressed="true"] .tt-badge { opacity: 1; transform: none; }
.tool-tile[aria-pressed="true"] .tt-state { color: var(--tink); font-weight: 700; }
.tt-panel { display: grid; gap: 12px; margin-top: 12px; padding: 14px 16px; border-radius: 18px; background: var(--card); }
.tt-detail { display: grid; font-size: 15px; line-height: 1.45; color: var(--ink); }
/* Every shortcut's words share one cell: the panel keeps the height of the longest, so nothing moves. */
.tt-detail > span { grid-area: 1 / 1; visibility: hidden; }
.tt-detail > span.on { visibility: visible; }
.tt-detail > .tt-hint { color: var(--muted); }
.tt-for, .prio-if { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tt-for span, .prio-if span { width: 100%; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.tt-for i, .prio-if i { padding: 7px 11px; border-radius: 999px; background: var(--well); color: var(--ink2); font: 600 13px/1 var(--text); font-style: normal; }
.tt-for i.on, .prio-if i.on { background: var(--ink); color: var(--bg); }

/* The app's Describe it card, under the shortcuts: one sentence instead of a tile. */
.ask-mini { display: grid; gap: 10px; margin-top: 12px; padding: 14px 14px 14px 16px; border-radius: 18px; background: var(--card); color: inherit; text-decoration: none; transition: transform 0.15s ease; }
.ask-mini:hover { transform: translateY(-2px); }
.am-title { display: flex; align-items: center; gap: 9px; font: 700 15.5px/1.2 var(--display); letter-spacing: -0.01em; color: var(--ink); }
.am-ic { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: #2B1D33; color: #fff; }
.am-ic .icon { width: 13px; height: 13px; fill: currentColor; stroke: none; }
.am-input { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 16px; background: var(--well); }
.am-text { flex: 1; min-width: 0; font-size: 14.5px; line-height: 1.35; color: var(--muted); }
.am-send { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #2B1D33; color: #fff; }
.am-send .icon { width: 17px; height: 17px; stroke-width: 2.4; }
@media (prefers-reduced-motion: reduce) { .ask-mini, .ask-mini:hover { transition: none; transform: none; } }

/* Get it done by: the app's Solar forecast strip, with when each job is planned under it. */
.fc { padding: 14px 16px 12px; border-radius: 18px; background: var(--card); }
.fc-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 2px 8px; font-size: 15.5px; color: var(--ink); }
.fc-head b { white-space: nowrap; }
.fc-head span { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; color: var(--ink2); }
.fc-head .icon { width: 16px; height: 16px; color: var(--solar); }
.fc-label { margin-top: 4px; font-size: 13px; color: var(--ink2); }
.fc-bars { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 46px; margin-top: 10px; }
.fc-bars i { flex: 1; height: var(--h); border-radius: 2px 2px 0 0; background: var(--solar); }
.fc-bars i.past { background: color-mix(in srgb, var(--solar) 38%, transparent); }
.fc-now { position: absolute; top: -4px; bottom: 0; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink2); }
.fc-plan { position: relative; height: 6px; margin-top: 5px; border-radius: 3px; background: var(--well); }
.fc-band { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--tone); }
.fc-ticks { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fc-ticks span:nth-child(2) { color: var(--ink2); }

/* Get it done by: the app's Today card. */
.prio-card { gap: 12px; }
.prio-title { padding: 2px 4px 0; font: 800 18px/1 var(--display); letter-spacing: -0.01em; color: var(--ink); }
.prio-list { list-style: none; margin: 0; padding: 4px 14px; border-radius: 18px; background: var(--card); }
.prio { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; padding: 11px 0; }
.prio + .prio { border-top: 1px solid var(--rule); }
.prio .tile { width: 40px; height: 40px; border-radius: 12px; }
.prio-head { display: flex; justify-content: space-between; gap: 8px; font-size: 15.5px; color: var(--ink); }
.prio-head span { color: var(--ink2); font-size: 14px; white-space: nowrap; }
.prio-line { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 14px; color: var(--ink2); }
.prio-line .icon { width: 15px; height: 15px; color: var(--tink); stroke-width: 2.2; }
.prio.done .prio-line { color: var(--tink); font-weight: 600; }
.prio.wait .tile { background: var(--well); color: var(--muted); }
.prio.wait .prio-line .icon { color: var(--muted); }
.prio-bar { margin-top: 9px; height: 6px; border-radius: 3px; background: var(--well); overflow: hidden; }
.prio-bar span { display: block; height: 100%; width: calc(var(--share) * 100%); border-radius: 3px; background: var(--tone); transform-origin: left; animation: prio-grow 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes prio-grow { from { transform: scaleX(0); } }
.prio-min { margin-top: 5px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.prio-if { padding: 0 4px 2px; }

@media (max-width: 980px) { .tools-grid { grid-template-columns: 1fr; } }
@media (max-width: 400px) { .tool-board { padding: 10px; } .tool-tile { padding: 12px; } .tt-title { font-size: 14.5px; } }
@media (prefers-reduced-motion: reduce) { .prio-bar span { animation: none; } .tool-tile, .tool-tile:hover { transition: none; transform: none; } }

/* ---------- a day with einie ---------- */

.day { padding: clamp(48px, 6vw, 88px) 0; }
.day-head { margin-bottom: clamp(24px, 3vw, 36px); }
.day-row { list-style: none; margin: 0; padding: 0; position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: auto 1fr auto; column-gap: 14px; }
/* The day's rail, from each time to the next. */
.moment:not(:last-child)::before { content: ""; position: absolute; z-index: -1; left: 0; right: -14px; top: 15px; height: 2px; background: var(--rule); }
.day-row { isolation: isolate; }
/* Each moment spans the row's three lines (time, card, caption), so every card is as tall as the tallest. */
.moment { position: relative; display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 12px; }
.moment .shortcut { align-items: start; }
.moment-time { justify-self: start; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 13px 0 11px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); font: 800 15px/1 var(--display); letter-spacing: -0.01em; color: var(--ink); font-variant-numeric: tabular-nums; }
.moment-time::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--tone); }
.moment-caption { color: var(--ink2); font-size: 15px; line-height: 1.45; padding-left: 4px; }
.moment-caption b { color: var(--ink); font-weight: 700; }
.moment .notif-title { font-size: 15px; }
.moment .notif-text { font-size: 14px; }
.moment .shortcut-title { font-size: 15px; }
@media (max-width: 980px) {
  /* A swipe through the day. */
  .day-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(250px, 72%); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter, 16px)); padding: 0 var(--gutter, 16px) 6px; scroll-padding: 0 var(--gutter, 16px); }
  .day-row::-webkit-scrollbar { display: none; }
  .moment { scroll-snap-align: start; }
}
/* A notification as the phone shows it. */
.notif {
  display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 13px 16px 14px 13px; border-radius: 22px;
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.app-icon { width: 38px; height: 38px; border-radius: 9px; }
.notif-head { display: flex; justify-content: space-between; font-size: 13px; line-height: 1.3; color: var(--muted); }
.notif-title { font-weight: 700; font-size: 15.5px; line-height: 1.3; color: var(--ink); margin-top: 1px; }
.notif-text { font-size: 15px; line-height: 1.38; color: var(--ink2); }
/* A shortcut tile, as on the app's Home. */
.shortcut {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center;
  padding: 14px 16px 14px 14px; border-radius: 22px;
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.shortcut-title { font: 700 16px/1.25 var(--display); letter-spacing: -0.01em; color: var(--ink); }
.shortcut-ok { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 7px; font-size: 13.5px; }
.shortcut-ok .ok { display: inline-flex; align-items: center; gap: 5px; color: var(--battery-ink); }
.shortcut-ok .icon { width: 15px; height: 15px; stroke-width: 2.6; }
.state { padding: 6px 11px; border-radius: 999px; background: var(--tint); color: var(--tink); font: 700 13px/1 var(--text); white-space: nowrap; }

/* ---------- feature sections ---------- */

.feature { padding: clamp(56px, 8vw, 112px) 0; }
.feature-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.feature.flip .feature-text { order: 2; }
.feature-text { display: grid; gap: 20px; justify-items: start; max-width: 520px; }
.feature.flip .feature-text { justify-self: end; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; font: 700 12.5px/1 var(--text); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.eyebrow-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--tone, var(--solar)); }
.body { font-size: 18.5px; line-height: 1.6; color: var(--ink2); }
.body b { color: var(--ink); font-weight: 700; }
.note { font-size: 14.5px; line-height: 1.5; color: var(--muted); padding-left: 14px; border-left: 2px solid var(--rule); }
.facts { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 12px; }
.facts li { display: flex; gap: 12px; align-items: flex-start; font-size: 16.5px; line-height: 1.45; color: var(--ink); }
.facts .icon { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--tint); color: var(--tink); stroke-width: 2.4; margin-top: -1px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 10px 15px; border-radius: 16px 16px 16px 4px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: 15px; line-height: 1.35; color: var(--ink); }
@media (max-width: 860px) {
  .feature-grid { grid-template-columns: 1fr; }
  .feature.flip .feature-text { order: 0; justify-self: start; }
  .feature-text { max-width: none; }
}
/* The generator section's shortcuts, as tiles. */
.shortcuts { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; }
.sc { display: grid; gap: 8px; align-content: start; padding: 16px 16px 18px; background: var(--card); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); }
.sc .tile { width: 38px; height: 38px; border-radius: 12px; margin-bottom: 2px; }
.sc h3 { font-size: 16.5px; }
.sc p { color: var(--ink2); font-size: 14.5px; line-height: 1.45; }
@media (max-width: 420px) { .shortcuts { grid-template-columns: 1fr; } }

/* ---------- next to the inverter's app ---------- */

.compare { padding: clamp(56px, 8vw, 112px) 0; }
.compare-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-hero); box-shadow: var(--shadow); overflow: hidden; }
.compare table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.compare col.feat { width: 52%; }
.compare th, .compare td { padding: 18px clamp(14px, 2.4vw, 28px); text-align: left; vertical-align: middle; border-bottom: 1px solid var(--rule); }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare thead th { font: 700 13px/1.2 var(--text); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.compare thead .wordmark { width: 64px; }
.compare tbody th { font: 400 15px/1.45 var(--text); color: var(--ink2); }
.compare tbody th b { display: block; margin-bottom: 2px; font: 700 17px/1.3 var(--display); letter-spacing: -0.01em; color: var(--ink); }
.compare td { font-size: 15.5px; line-height: 1.4; color: var(--ink2); }
.compare .us { background: color-mix(in srgb, var(--solar-tint) 45%, transparent); }
.compare td.us b { color: var(--ink); font-weight: 700; }
.compare .icon.yes { width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: var(--battery-tint); color: var(--battery-ink); stroke-width: 2.6; }
.compare .icon.no { width: 28px; height: 28px; padding: 5px; color: var(--muted); opacity: 0.7; }
@media (max-width: 600px) {
  .compare th, .compare td { padding: 14px 10px; }
  .compare th:first-child, .compare td:first-child { padding-left: 16px; }
  .compare tbody th { font-size: 14px; }
  .compare tbody th b { font-size: 16px; }
  .compare td { font-size: 14px; }
  .compare thead th { font-size: 11px; letter-spacing: 0.05em; }
  .compare thead .wordmark { width: 48px; }
}

/* ---------- the box, and setting it up ---------- */

.setup { padding: clamp(56px, 8vw, 112px) 0; }
.section-head { display: grid; gap: 18px; justify-items: start; max-width: 640px; margin-bottom: clamp(32px, 4vw, 52px); }
.setup-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.setup-text { display: grid; gap: 20px; justify-items: start; }
.steps { list-style: none; width: 100%; margin: 6px 0 0; padding: 0; display: grid; gap: 12px; }
.step { display: flex; gap: 18px; align-items: flex-start; padding: 20px 22px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.step-n { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--solar-tint); color: var(--solar-ink); font: 800 21px/1 var(--display); }
.step h3 { margin-bottom: 6px; }
.step p { color: var(--ink2); font-size: 16px; line-height: 1.5; }
/* The box from above, drawn to the printed case's measurements (enclosure/einie-box.scad). */
.device { position: relative; isolation: isolate; margin: 0; display: grid; gap: 14px; justify-items: center; }
.device-glow { position: absolute; inset: 12% 4% 14%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--battery) 16%, transparent), color-mix(in srgb, var(--battery) 5%, transparent) 60%, transparent); filter: blur(40px); }
.device-main { width: min(100%, 380px); height: auto; }
.device figcaption { font-size: 14.5px; color: var(--muted); text-align: center; }
@media (max-width: 860px) { .setup-grid { grid-template-columns: 1fr; } .device { order: -1; } .device-main { width: min(62vw, 300px); } }

/* ---------- Matter, under home automation ---------- */

.matter { margin-top: clamp(40px, 6vw, 72px); padding: clamp(22px, 3vw, 32px); border-radius: 32px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); }
.matter-head { display: flex; align-items: center; gap: 22px; margin-bottom: 22px; }
/* Where the Matter logo goes once its use is cleared. */
.matter-mark { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 11px 17px 11px 14px; border-radius: 999px; background: var(--ink); color: var(--bg); font: 800 18px/1 var(--display); letter-spacing: -0.01em; }
.matter-mark .icon { width: 19px; height: 19px; stroke-width: 2.2; }
.matter-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; font: 650 15.5px/1.2 var(--text); color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--rule); }
.matter-link:hover { text-decoration-color: var(--ink); }
.matter-link .icon { width: 16px; height: 16px; }
.matter-head h3 { font-size: clamp(20px, 2vw, 23px); }
.matter-head p { max-width: 62ch; margin-top: 6px; font-size: 16px; line-height: 1.5; color: var(--ink2); }
.matter-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.matter-grid li { display: grid; gap: 8px; align-content: start; padding: 18px; border-radius: 22px; background: var(--well); }
.matter-grid h4 { margin: 6px 0 0; font: 700 17px/1.2 var(--display); letter-spacing: -0.01em; color: var(--ink); }
.matter-grid p { font-size: 15px; line-height: 1.4; color: var(--ink2); }
.matter-grid p a { color: var(--tink); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.matter-grid p a:hover { text-decoration-thickness: 2px; }
@media (max-width: 900px) { .matter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .matter-head { flex-direction: column; align-items: flex-start; gap: 14px; } }
@media (max-width: 380px) { .matter-grid li { padding: 14px; } }

/* ---------- and more ---------- */

.more { padding: clamp(56px, 8vw, 112px) 0; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { display: grid; gap: 12px; align-content: start; padding: 26px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.card .tile { margin-bottom: 6px; }
.card p { color: var(--ink2); font-size: 16px; line-height: 1.5; }
@media (max-width: 980px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }

/* ---------- compatible switches ---------- */

.switches { padding: clamp(56px, 8vw, 112px) 0; }
.switches-page { padding-top: clamp(112px, 14vw, 168px); }
.switches-page h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1; letter-spacing: -0.035em; text-wrap: balance; }
.nav-links a[aria-current="page"] { color: var(--ink); background: var(--well); }
.swc-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.swc { display: grid; gap: 14px; align-content: start; padding: 24px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.swc-photo { margin: -8px -8px 0; border-radius: 18px; overflow: hidden; background: #fff; aspect-ratio: 4 / 3; }
.swc-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 32%; }
.swc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.swc-amps { font: 600 20px/1 var(--display); color: var(--tink); }
.swc-amps b { font-weight: 800; font-size: 40px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.swc-amps small { font-size: 15px; font-weight: 700; margin-left: 4px; }
.swc h3 { overflow-wrap: anywhere; }
.swc-model { margin-top: 3px; font-size: 14.5px; color: var(--muted); }
.swc-use { color: var(--ink); font-size: 16.5px; line-height: 1.5; }
.swc-specs { margin: 0; padding-top: 14px; border-top: 1px solid var(--rule); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; font-size: 14.5px; line-height: 1.4; }
.swc-specs dt { color: var(--muted); }
.swc-specs dd { margin: 0; color: var(--ink); font-weight: 600; }
.swc-group { margin: 40px 0 18px; display: grid; gap: 6px; }
.section-head + .swc-group { margin-top: 8px; }
.swc-group h2 { font-size: 28px; }
.swc-group p { color: var(--muted); font-size: 16.5px; line-height: 1.5; max-width: 60ch; }
.swc-note { background: var(--well); box-shadow: none; justify-items: start; align-content: center; }
.swc-note .btn { justify-self: start; }
@media (max-width: 980px) { .swc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .swc-grid { grid-template-columns: 1fr; } .swc { padding: 20px; } .swc-note .btn { width: 100%; } }

/* ---------- compatibility ---------- */

.compat { padding: clamp(40px, 6vw, 80px) 0; }
.compat-card {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center;
  padding-block: clamp(32px, 5vw, 56px);
  background: var(--well); border-radius: 32px;
  max-width: calc(1180px - 2 * var(--gutter)); width: calc(100% - 2 * var(--gutter));
  padding-inline: clamp(24px, 5vw, 56px);
}
.compat-text { display: grid; gap: 18px; justify-items: start; }
.compat-art { width: 100%; max-width: 320px; justify-self: center; }
.art-body { fill: var(--card); stroke: var(--ink); stroke-width: 3; }
.art-screen { fill: var(--well); stroke: var(--ink); stroke-width: 2.5; }
.art-line { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; opacity: 0.55; }
.art-sun { fill: var(--solar); }
.art-stick { fill: var(--gen-tint); stroke: var(--gen); stroke-width: 3; }
.art-callout { fill: none; stroke: var(--gen); stroke-width: 2.5; stroke-dasharray: 4 6; stroke-linecap: round; }
.art-callout-dot { fill: var(--gen); }
.art-label { font: 700 17px var(--text); fill: var(--ink); }
@media (max-width: 760px) { .compat-card { grid-template-columns: 1fr; } .compat-art { max-width: 240px; order: -1; } }

/* ---------- FAQ ---------- */

.faq { padding: clamp(56px, 8vw, 112px) 0; }
.faq-wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(24px, 6vw, 96px); align-items: start; }
.faq-list { display: grid; gap: 10px; }
details { background: var(--card); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); }
summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 22px; font: 700 17.5px/1.3 var(--display); letter-spacing: -0.01em;
}
summary::-webkit-details-marker { display: none; }
summary .icon { width: 30px; height: 30px; padding: 7px; border-radius: 50%; background: var(--well); color: var(--ink); transition: transform 0.25s ease; }
details[open] summary .icon { transform: rotate(45deg); }
details p { padding: 0 22px 22px; color: var(--ink2); font-size: 16.5px; line-height: 1.6; max-width: 62ch; }
@media (max-width: 860px) { .faq-wrap { grid-template-columns: 1fr; } .faq .section-head { margin-bottom: 8px; } }

/* ---------- last call ---------- */

.cta { padding: clamp(40px, 6vw, 80px) 0 clamp(56px, 8vw, 104px); }
.cta-card {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; justify-items: center; text-align: center; gap: 18px;
  padding: clamp(48px, 8vw, 96px) clamp(24px, 5vw, 64px);
  border-radius: 36px; background: var(--hero); box-shadow: var(--shadow-lift);
}
.cta-card h2 { color: var(--hero-text); }
.cta-card p { color: var(--hero-text2); font-size: 18.5px; max-width: 40ch; }
.cta-card .btn { margin-top: 10px; }
.cta-card .cta-fine { font-size: 14.5px; color: var(--hero-text2); opacity: 0.8; margin-top: 4px; }
.cta-card .glow-sun { width: 520px; height: 520px; left: 50%; top: -340px; transform: translateX(-50%); background: radial-gradient(circle, rgba(253, 176, 34, 0.42), transparent 70%); filter: blur(40px); }

/* ---------- einie AI: the plum card, the same in light and dark ---------- */

.ai { padding: clamp(40px, 6vw, 80px) 0; }
.ai-card {
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(36px, 6vw, 72px) clamp(22px, 5vw, 72px);
  border-radius: 36px; background: var(--hero); box-shadow: var(--shadow-lift);
}
.ai-card .glow-sun { width: 520px; height: 520px; left: -180px; top: -260px; background: radial-gradient(circle, rgba(253, 176, 34, 0.32), transparent 70%); filter: blur(40px); }
.ai-card .glow-bought { width: 460px; height: 460px; right: -160px; bottom: -220px; background: radial-gradient(circle, rgba(255, 106, 69, 0.22), transparent 70%); filter: blur(40px); }
.ai-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.ai-text { display: grid; gap: 20px; justify-items: start; }
.ai-badge {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 11px; border-radius: 999px;
  background: linear-gradient(90deg, rgba(253, 176, 34, 0.22), rgba(255, 106, 69, 0.22)); color: #FFD27A;
  font: 750 13px/1 var(--text); letter-spacing: 0.08em; text-transform: uppercase;
}
.ai-badge .icon { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.ai h2 { color: var(--hero-text); font-size: clamp(36px, 4.4vw, 58px); line-height: 1; letter-spacing: -0.035em; text-wrap: balance; }
.ai-body { font-size: 18.5px; line-height: 1.6; color: var(--hero-text2); }
.ai-asks { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; width: 100%; }
.ai-asks li {
  display: grid; gap: 6px; justify-items: start; padding: 13px 16px; border-radius: 18px 18px 18px 6px;
  background: var(--hero-well); border: 1px solid rgba(245, 239, 230, 0.08); color: var(--hero-text); font-size: 16px; line-height: 1.4;
}
.ai-kind { padding: 4px 9px; border-radius: 999px; background: color-mix(in srgb, var(--tone) 22%, transparent); color: color-mix(in srgb, var(--tone) 55%, #fff); font: 700 11.5px/1 var(--text); letter-spacing: 0.04em; text-transform: uppercase; }
.ai-kind.tone-plum { --tone: #C7A9D8; }
.ai-asks small { display: block; margin-top: 2px; font-size: 13.5px; color: var(--hero-text2); }
.ai-safe { display: flex; align-items: center; gap: 10px; color: var(--hero-text2); font-size: 15.5px; }
.ai-safe .icon { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: #3CCB98; color: #fff; stroke-width: 2.6; }
.ai .sc-box { min-height: clamp(440px, 40vw, 560px); }
.ai .sc-box .lp-fit { justify-self: center; margin: 0; }
@media (max-width: 860px) { .ai-grid { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */

.footer { padding: 0 0 max(32px, env(safe-area-inset-bottom)); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; padding-top: 28px; border-top: 1px solid var(--rule); }
.footer .wordmark { width: 64px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer-links a { color: var(--ink2); text-decoration: none; font-size: 15px; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-fine { margin-left: auto; color: var(--muted); font-size: 14px; }
@media (max-width: 640px) { .footer-fine { margin-left: 0; width: 100%; } }

/* ---------- arrival ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .live-dot { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* Blog: the index and a post. Same cream ground and cards as the rest. */
.blog-page { padding-top: clamp(112px, 14vw, 168px); padding-bottom: clamp(48px, 7vw, 96px); }
.blog-page h1 { font-size: clamp(36px, 5.4vw, 60px); line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance; }
.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; max-width: 720px; }
.post-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s; }
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.post-card a { display: grid; gap: 10px; padding: clamp(20px, 3vw, 30px); color: inherit; text-decoration: none; }
.post-card h2 { font: 700 clamp(22px, 3vw, 28px)/1.15 var(--display); letter-spacing: -0.02em; margin: 0; }
.post-card p { margin: 0; color: var(--ink2); }
.post-card .post-meta { color: var(--muted); }
.post-more { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--tink, var(--ink)); }
.post-more .icon { width: 18px; height: 18px; }
.post-meta { font: 600 14px/1.4 var(--text); color: var(--muted); margin: 0; }
.post-wrap { max-width: 720px; display: grid; gap: 18px; }
.crumb { margin: 0; font-weight: 600; }
.crumb a { color: var(--ink2); }
.post-head { display: grid; gap: 14px; justify-items: start; }
.post-lede { font-size: clamp(18px, 2vw, 21px); line-height: 1.55; color: var(--ink2); margin: 0; }
.post-wrap h2 { font: 700 clamp(22px, 3vw, 28px)/1.15 var(--display); letter-spacing: -0.02em; margin: 18px 0 0; }
.post-wrap p, .post-wrap li { font-size: 17px; line-height: 1.6; color: var(--ink2); margin: 0; }
.post-wrap ul:not(.steps) { margin: 0; padding-left: 22px; list-style: disc; display: grid; gap: 6px; }
.post-wrap b { color: var(--ink); }
/* A post's numbered steps (the home page has its own .steps). */
.post-wrap .steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 24px; }
.post-wrap .steps li { counter-increment: step; position: relative; padding-left: 44px; }
.post-wrap .steps li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font: 700 15px/1 var(--display); }
.shot { margin: 14px 0 0; display: grid; gap: 8px; justify-items: start; }
.shot img { width: min(100%, 340px); height: auto; border-radius: 18px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.shot figcaption { font-size: 14px; color: var(--muted); }
.post-cta { margin-top: 26px; padding: clamp(20px, 3vw, 28px); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); display: grid; gap: 14px; justify-items: start; }
.post-cta p { color: var(--ink); font-weight: 600; }
@media (max-width: 600px) { .post-cta .btn { width: 100%; } }

/* ---------- Preorder (preorder.html, preorder.js) ---------- */
.preorder { padding: clamp(112px, 13vw, 160px) 0 clamp(48px, 7vw, 96px); }
.po-grid { display: grid; gap: clamp(28px, 5vw, 72px); align-items: start; }
.po-intro { display: grid; gap: 18px; justify-items: start; }
.po-intro h1 { font-size: clamp(44px, 6.4vw, 72px); line-height: 0.98; letter-spacing: -0.035em; }
.po-intro .body { max-width: 34ch; }
@media (min-width: 900px) {
  .po-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .po-intro { position: sticky; top: 120px; }
}
/* The price: one big number, then what it covers. */
.po-price { display: grid; gap: 12px; width: 100%; max-width: 460px; padding: 20px 22px; border-radius: 22px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); }
.po-price[hidden], .po-abroad[hidden], .po-intro [data-no-price][hidden] { display: none; }
.po-price-main { font: 500 17px/1.35 var(--text); color: var(--ink2); }
.po-price-main b { margin-right: 6px; font: 800 46px/1 var(--display); letter-spacing: -0.035em; color: var(--ink); }
.po-price-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 16px; line-height: 1.45; color: var(--ink); }
/* Under a Preorder button: the launch offer in a line (main.js fills it). */
.offer-line { font-weight: 600; color: var(--ink2); }
.cta-card .offer-line { color: var(--hero-text); opacity: 1; }
.po-works { display: inline-flex; align-items: center; gap: 10px; padding: 11px 16px 11px 12px; border-radius: 18px; background: var(--battery-tint); color: var(--battery-ink); font: 550 15.5px/1.35 var(--text); }
.po-works[hidden], .po-form[hidden], .po-done[hidden], .po-error[hidden], .po-field[hidden] { display: none; }
.po-works b { font-weight: 750; }
.po-form, .po-done { display: grid; gap: 18px; padding: clamp(20px, 3.2vw, 32px); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.po-field { display: grid; gap: 7px; }
.po-field label { font: 650 14.5px/1.2 var(--text); color: var(--ink); }
.po-field label i { font-style: normal; font-weight: 450; color: var(--muted); }
/* 17px: an iPhone zooms into a field whose text is smaller than 16px. */
.po-field input, .po-field select {
  width: 100%; min-height: 52px; padding: 0 15px; border-radius: 15px; border: 1.5px solid transparent;
  background-color: var(--well); color: var(--ink); font: 450 17px/1.2 var(--text);
  -webkit-appearance: none; appearance: none; transition: border-color 0.15s, background-color 0.15s;
}
.po-field select {
  padding-right: 42px; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236F6076' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 9.5 L12 14.5 L17 9.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 22px;
}
.po-field input:focus-visible, .po-field select:focus-visible { outline: none; border-color: var(--accent); background-color: var(--card); }
.po-field [aria-invalid="true"] { border-color: var(--gen); }
.po-error { font-size: 14.5px; line-height: 1.4; color: var(--gen-ink); }
.po-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.po-send { width: 100%; border: 0; cursor: pointer; }
.po-send[disabled] { opacity: 0.6; cursor: default; transform: none; }
.po-fine { font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.po-fine a { color: inherit; text-underline-offset: 3px; }
.po-done { justify-items: start; }
.po-done h2 { font-size: clamp(30px, 4vw, 40px); }
.po-tick { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--battery-tint); color: var(--battery-ink); }
.po-tick .icon { width: 26px; height: 26px; }
/* Inside the app the page is the form alone: no site menu, no footer. */
.in-app .nav-links, .in-app .nav-menu, .in-app .footer { display: none; }
.in-app .preorder { padding-top: clamp(88px, 12vw, 120px); }

/* ---------- the home page, as rebuilt in November 2026: fewer words, the app does the talking ---------- */

/* The bar's button comes before the menu on small screens, so Menu keeps its corner. */
@media (max-width: 1180px) {
  .nav .btn-sm { order: 2; margin-left: auto; }
  .nav-menu { order: 3; }
  .nav-pill:has(.btn-sm) .nav-menu { margin-left: 0; }
}
/* On a phone the hero has the Preorder button; the bar's own arrives once that one has gone. */
@media (max-width: 760px) {
  .nav-cta { opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0s 0.2s; }
  .nav.past .nav-cta { opacity: 1; visibility: visible; transition: opacity 0.2s ease; }
}

/* Hero: one line that changes its last words, one sentence, one button. */
.hero { padding: calc(64px + clamp(20px, 5vw, 64px)) 0 clamp(40px, 6vw, 80px); }
.hero-text { gap: 20px; }
.hero h1 { display: grid; font-size: clamp(44px, 4.9vw, 60px); line-height: 1.02; }
.rot { display: grid; }
.rot-w { grid-area: 1 / 1; justify-self: start; white-space: nowrap; opacity: 0; transform: translateY(0.4em); transition: opacity 0.4s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1); }
.rot-w.on { opacity: 1; transform: none; }
.rot-w.out { opacity: 0; transform: translateY(-0.4em); }
.hero .lede { max-width: 38ch; }
.assure { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font: 600 14.5px/1.2 var(--text); color: var(--ink2); }
.assure li { display: inline-flex; align-items: center; gap: 7px; }
.assure .icon { width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: var(--battery-tint); color: var(--battery-ink); stroke-width: 2.8; }
@media (max-width: 980px) {
  .hero h1 { font-size: clamp(32px, 10.4vw, 60px); }
  .stage { padding-top: 16px; }
}
@media (max-width: 520px) {
  .hero-text { gap: 16px; }
  .hero .actions { display: grid; width: 100%; gap: 10px; }
  .hero .actions .btn { width: 100%; }
  .hero .actions .btn-ghost { min-height: 48px; }
}

/* The box: the drawing first, three short steps beside it. */
.setup-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
.device-main { width: min(100%, 300px); }
.step { align-items: center; padding: 16px 20px; }
.step h3 { margin-bottom: 2px; }
.step p { font-size: 15.5px; }
@media (max-width: 860px) {
  .setup-grid { grid-template-columns: 1fr; }
  .device-main { width: min(40vw, 170px); }
}

/* Home automation: what the box runs, as four tiles. */
.runs { list-style: none; width: 100%; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.runs li { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 20px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); }
.runs h3 { font-size: 16.5px; }
.runs p { margin-top: 2px; font-size: 14px; line-height: 1.35; color: var(--ink2); }
@media (max-width: 520px) { .runs { grid-template-columns: 1fr; } }

/* Always in view: five things einie shows, one at a time. */
.explore { padding: clamp(56px, 8vw, 112px) 0; }
.explore .section-head { margin-bottom: clamp(18px, 3vw, 30px); }
.tabs { position: relative; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 12px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px 0 14px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--ink2); box-shadow: var(--shadow);
  font: 650 15.5px/1 var(--text); white-space: nowrap; cursor: pointer; transition: background 0.2s ease, color 0.2s ease;
}
.tab .icon { width: 18px; height: 18px; color: var(--tink); }
.tab[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: transparent; }
.tab[aria-selected="true"] .icon { color: inherit; }
.tab:focus-visible { outline: 2.5px solid var(--tone); outline-offset: 2px; border-radius: 999px; }
.panel { padding: clamp(20px, 4vw, 48px); border-radius: 32px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); }
.panel[hidden] { display: none; }
.panel h3 { font: 800 clamp(28px, 3.4vw, 44px)/1.04 var(--display); letter-spacing: -0.03em; text-wrap: balance; }

/* Also in einie: a row of small facts under the table. */
.extras { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.extras li { display: inline-flex; align-items: center; gap: 8px; padding: 10px 15px 10px 12px; border-radius: 999px; background: var(--well); color: var(--ink); font: 600 15px/1.2 var(--text); }
.extras .icon { width: 18px; height: 18px; color: var(--muted); }

/* The price: one big number, what it covers, the button. */
.price { padding: clamp(40px, 6vw, 80px) 0; }
.price-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; padding: clamp(28px, 5vw, 56px); border-radius: 32px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); }
.price-main { display: grid; gap: 12px; justify-items: start; }
.price-num { font: 800 clamp(88px, 13vw, 148px)/0.9 var(--display); letter-spacing: -0.05em; color: var(--ink); font-variant-numeric: tabular-nums; }
.price-main h2 { font-size: clamp(26px, 3vw, 36px); }
.price-side { display: grid; gap: 20px; justify-items: start; }
.price-side .btn { min-width: 220px; }
@media (max-width: 760px) { .price-card { grid-template-columns: 1fr; } .price-side .btn { width: 100%; } }

/* Less air between sections on a phone. */
@media (max-width: 760px) {
  .feature, .setup, .compare, .faq, .explore { padding: 40px 0; }
  .tools, .ai, .compat, .price { padding: 24px 0; }
  .compat .actions { display: grid; width: 100%; }
  .compat .actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .rot-w { transition: none; } }
