:root,
html[data-theme="volt-grid"] {
  color-scheme: dark;
  --bg: #05060c;
  --bg-2: rgba(12, 16, 28, 0.78);
  --card: rgba(14, 18, 32, 0.78);
  --card-solid: #101626;
  --ink: #eef2ff;
  --muted: #9aa3c0;
  --line: rgba(186, 210, 255, 0.14);
  --accent: #d6ff4a;
  --accent-2: #7cf0c2;
  --accent-ink: #10160a;
  --cool: #6ee7ff;
  --cool-set: #6ea8ff;
  --heat: #ff8a4c;
  --ok: #7dffb3;
  --bad: #ff6b8a;
  --violet: #b388ff;
  --shadow: 0 16px 40px rgba(2, 4, 16, 0.48);
  --radius: 8px;
  --font: "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --topbar-bg: linear-gradient(180deg, rgba(8, 10, 20, 0.94), rgba(8, 10, 20, 0.78));
  --nav-hover: rgba(186, 210, 255, 0.08);
  --nav-current: rgba(214, 255, 74, 0.14);
  --chip-bg: rgba(22, 28, 44, 0.92);
  --input-bg: rgba(8, 11, 22, 0.82);
  --focus-ring: rgba(214, 255, 74, 0.5);
  --hover-card: rgba(20, 26, 44, 0.9);
  --hover-border: rgba(214, 255, 74, 0.45);
  --flash-error-bg: rgba(255, 107, 138, 0.14);
  --flash-error-ink: #ffd2d2;
  --flash-ok-bg: rgba(125, 255, 179, 0.1);
  --flash-ok-ink: #c8ffe0;
  --badge-bg: rgba(27, 32, 48, 0.9);
  --ok-bg: rgba(125, 255, 179, 0.12);
  --bad-bg: rgba(255, 107, 107, 0.14);
  --paused-bg: rgba(200, 245, 74, 0.12);
  --heat-bg: rgba(255, 138, 76, 0.14);
  --cool-bg: rgba(110, 231, 255, 0.14);
  --button-grad: linear-gradient(135deg, var(--accent), #b6f06a);
  --secondary-bg: rgba(22, 28, 44, 0.92);
  --surface-2: rgba(8, 11, 22, 0.55);
  --drawer-bg: rgba(16, 22, 38, 0.96);
  --legend-cool: #8fd6ff;
  --legend-heat: #ffb27a;
  --legend-stuck: #ffd27a;
  --legend-down: #ff8d8d;
  --chart-grid: rgba(238, 242, 255, 0.12);
  --chart-axis: rgba(186, 210, 255, 0.28);
  --chart-dot: rgba(186, 210, 255, 0.58);
  --chart-dot-major: rgba(238, 242, 255, 0.9);
  --chart-point-stroke: rgba(5, 6, 12, 0.85);
  --wx-border: rgba(214, 255, 74, 0.16);
  --wx-bg: linear-gradient(180deg, rgba(16, 20, 32, 0.94), rgba(8, 10, 18, 0.96));
  --tstat-bg:
    radial-gradient(900px 420px at 8% -20%, rgba(214, 255, 74, 0.14), transparent 58%),
    radial-gradient(720px 380px at 110% 0%, rgba(110, 231, 255, 0.16), transparent 52%),
    linear-gradient(165deg, rgba(14, 22, 40, 0.94), rgba(10, 12, 24, 0.96));
  --auth-card: rgba(14, 18, 32, 0.86);
  --blob-a: radial-gradient(circle, rgba(214, 255, 74, 0.2), rgba(110, 231, 255, 0.08) 42%, transparent 70%);
  --blob-b: radial-gradient(circle at 40% 40%, rgba(179, 136, 255, 0.22), rgba(255, 107, 138, 0.08) 46%, transparent 72%);
  --bg-image:
    radial-gradient(1200px 700px at 8% -12%, rgba(214, 255, 74, 0.14), transparent 58%),
    radial-gradient(900px 620px at 96% 4%, rgba(110, 231, 255, 0.14), transparent 52%),
    radial-gradient(700px 520px at 78% 88%, rgba(179, 136, 255, 0.12), transparent 55%),
    repeating-linear-gradient(118deg, transparent 0 22px, rgba(186, 210, 255, 0.02) 22px 23px),
    linear-gradient(165deg, #07101c 0%, #05060c 42%, #0a0614 100%);
  --bg-image-mobile: linear-gradient(165deg, #07101c 0%, #05060c 42%, #0a0614 100%);
}

html[data-theme="noir-edge"] {
  color-scheme: dark;
  --bg: #050505;
  --bg-2: rgba(10, 10, 10, 0.92);
  --card: #111111;
  --card-solid: #111111;
  --ink: #fafafa;
  --muted: #a1a1aa;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #3b82f6;
  --accent-2: #60a5fa;
  --accent-ink: #050505;
  --cool: #38bdf8;
  --cool-set: #818cf8;
  --heat: #fb7185;
  --ok: #34d399;
  --bad: #f43f5e;
  --violet: #818cf8;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  --radius: 4px;
  --topbar-bg: #050505;
  --nav-hover: rgba(255, 255, 255, 0.06);
  --nav-current: rgba(59, 130, 246, 0.16);
  --chip-bg: #171717;
  --input-bg: #0a0a0a;
  --focus-ring: rgba(59, 130, 246, 0.55);
  --hover-card: #171717;
  --hover-border: rgba(59, 130, 246, 0.55);
  --flash-error-bg: rgba(244, 63, 94, 0.14);
  --flash-error-ink: #fecdd3;
  --flash-ok-bg: rgba(52, 211, 153, 0.12);
  --flash-ok-ink: #bbf7d0;
  --badge-bg: #171717;
  --ok-bg: rgba(52, 211, 153, 0.12);
  --bad-bg: rgba(244, 63, 94, 0.14);
  --paused-bg: rgba(59, 130, 246, 0.14);
  --heat-bg: rgba(251, 113, 133, 0.14);
  --cool-bg: rgba(56, 189, 248, 0.14);
  --button-grad: linear-gradient(135deg, #2563eb, #3b82f6);
  --secondary-bg: #171717;
  --surface-2: #0a0a0a;
  --drawer-bg: #0a0a0a;
  --legend-cool: #7dd3fc;
  --legend-heat: #fda4af;
  --legend-stuck: #fde68a;
  --legend-down: #fb7185;
  --chart-grid: rgba(250, 250, 250, 0.1);
  --chart-axis: rgba(250, 250, 250, 0.22);
  --chart-dot: rgba(250, 250, 250, 0.5);
  --chart-dot-major: #fafafa;
  --chart-point-stroke: #050505;
  --wx-border: rgba(59, 130, 246, 0.22);
  --wx-bg: #111111;
  --tstat-bg: linear-gradient(180deg, #111111, #0a0a0a);
  --auth-card: #111111;
  --blob-a: radial-gradient(circle, rgba(59, 130, 246, 0.16), transparent 68%);
  --blob-b: radial-gradient(circle, rgba(250, 250, 250, 0.05), transparent 70%);
  --bg-image:
    repeating-linear-gradient(90deg, transparent 0 47px, rgba(255, 255, 255, 0.025) 47px 48px),
    repeating-linear-gradient(0deg, transparent 0 47px, rgba(255, 255, 255, 0.025) 47px 48px),
    linear-gradient(180deg, #050505, #050505);
  --bg-image-mobile: #050505;
}

html[data-theme="paper-cut"] {
  color-scheme: light;
  --bg: #f3f4f6;
  --bg-2: rgba(255, 255, 255, 0.86);
  --card: #ffffff;
  --card-solid: #ffffff;
  --ink: #0b0d12;
  --muted: #4b5563;
  --line: rgba(11, 13, 18, 0.12);
  --accent: #0a5fff;
  --accent-2: #111827;
  --accent-ink: #ffffff;
  --cool: #0369a1;
  --cool-set: #1d4ed8;
  --heat: #c2410c;
  --ok: #047857;
  --bad: #be123c;
  --violet: #5b21b6;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  --radius: 6px;
  --topbar-bg: rgba(255, 255, 255, 0.92);
  --nav-hover: rgba(10, 95, 255, 0.08);
  --nav-current: rgba(10, 95, 255, 0.12);
  --chip-bg: #ffffff;
  --input-bg: #ffffff;
  --focus-ring: rgba(10, 95, 255, 0.45);
  --hover-card: #f8fafc;
  --hover-border: rgba(10, 95, 255, 0.45);
  --flash-error-bg: #ffe4e6;
  --flash-error-ink: #9f1239;
  --flash-ok-bg: #d1fae5;
  --flash-ok-ink: #065f46;
  --badge-bg: #eef2f7;
  --ok-bg: #d1fae5;
  --bad-bg: #ffe4e6;
  --paused-bg: #dbeafe;
  --heat-bg: #ffedd5;
  --cool-bg: #e0f2fe;
  --button-grad: linear-gradient(135deg, #0a5fff, #2563eb);
  --secondary-bg: #ffffff;
  --surface-2: #f8fafc;
  --drawer-bg: #ffffff;
  --legend-cool: #0369a1;
  --legend-heat: #c2410c;
  --legend-stuck: #b45309;
  --legend-down: #be123c;
  --chart-grid: rgba(11, 13, 18, 0.08);
  --chart-axis: rgba(11, 13, 18, 0.22);
  --chart-dot: rgba(11, 13, 18, 0.35);
  --chart-dot-major: #0b0d12;
  --chart-point-stroke: #ffffff;
  --wx-border: rgba(10, 95, 255, 0.18);
  --wx-bg: #ffffff;
  --tstat-bg: linear-gradient(180deg, #ffffff, #f8fafc);
  --auth-card: #ffffff;
  --blob-a: radial-gradient(circle, rgba(10, 95, 255, 0.1), transparent 70%);
  --blob-b: radial-gradient(circle, rgba(17, 24, 39, 0.06), transparent 72%);
  --bg-image:
    repeating-linear-gradient(90deg, transparent 0 31px, rgba(11, 13, 18, 0.035) 31px 32px),
    linear-gradient(180deg, #f8fafc 0%, #f3f4f6 100%);
  --bg-image-mobile: #f3f4f6;
}

html[data-theme="ember-ledger"] {
  color-scheme: dark;
  --bg: #0b0a09;
  --bg-2: rgba(22, 19, 17, 0.9);
  --card: rgba(22, 19, 17, 0.92);
  --card-solid: #161311;
  --ink: #f7f1e8;
  --muted: #b8a99a;
  --line: rgba(245, 165, 36, 0.16);
  --accent: #f5a524;
  --accent-2: #ffd36a;
  --accent-ink: #1a1208;
  --cool: #5eead4;
  --cool-set: #38bdf8;
  --heat: #ff6b3d;
  --ok: #4ade80;
  --bad: #fb7185;
  --violet: #e8c39e;
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
  --radius: 6px;
  --topbar-bg: rgba(11, 10, 9, 0.94);
  --nav-hover: rgba(245, 165, 36, 0.1);
  --nav-current: rgba(245, 165, 36, 0.16);
  --chip-bg: #1c1814;
  --input-bg: #100e0c;
  --focus-ring: rgba(245, 165, 36, 0.5);
  --hover-card: #1c1814;
  --hover-border: rgba(245, 165, 36, 0.5);
  --flash-error-bg: rgba(251, 113, 133, 0.14);
  --flash-error-ink: #fecdd3;
  --flash-ok-bg: rgba(74, 222, 128, 0.12);
  --flash-ok-ink: #bbf7d0;
  --badge-bg: #1c1814;
  --ok-bg: rgba(74, 222, 128, 0.12);
  --bad-bg: rgba(251, 113, 133, 0.14);
  --paused-bg: rgba(245, 165, 36, 0.14);
  --heat-bg: rgba(255, 107, 61, 0.14);
  --cool-bg: rgba(94, 234, 212, 0.12);
  --button-grad: linear-gradient(135deg, #f5a524, #ffd36a);
  --secondary-bg: #1c1814;
  --surface-2: #100e0c;
  --drawer-bg: #161311;
  --legend-cool: #5eead4;
  --legend-heat: #ff8a5c;
  --legend-stuck: #ffd36a;
  --legend-down: #fb7185;
  --chart-grid: rgba(247, 241, 232, 0.1);
  --chart-axis: rgba(245, 165, 36, 0.28);
  --chart-dot: rgba(247, 241, 232, 0.45);
  --chart-dot-major: #f7f1e8;
  --chart-point-stroke: #0b0a09;
  --wx-border: rgba(245, 165, 36, 0.22);
  --wx-bg: linear-gradient(180deg, #161311, #0b0a09);
  --tstat-bg:
    radial-gradient(900px 420px at 8% -20%, rgba(245, 165, 36, 0.12), transparent 58%),
    linear-gradient(180deg, #161311, #0b0a09);
  --auth-card: #161311;
  --blob-a: radial-gradient(circle, rgba(245, 165, 36, 0.16), transparent 70%);
  --blob-b: radial-gradient(circle, rgba(255, 107, 61, 0.1), transparent 72%);
  --bg-image:
    repeating-linear-gradient(-18deg, transparent 0 46px, rgba(245, 165, 36, 0.03) 46px 47px),
    linear-gradient(165deg, #120f0c 0%, #0b0a09 100%);
  --bg-image-mobile: linear-gradient(165deg, #120f0c 0%, #0b0a09 100%);
}

html[data-theme="ion-steel"] {
  color-scheme: dark;
  --bg: #05090e;
  --bg-2: rgba(12, 20, 28, 0.88);
  --card: rgba(12, 20, 28, 0.88);
  --card-solid: #0c141c;
  --ink: #e8f1f8;
  --muted: #8aa0b5;
  --line: rgba(58, 224, 255, 0.14);
  --accent: #00d4c8;
  --accent-2: #3ae0ff;
  --accent-ink: #04201e;
  --cool: #3ae0ff;
  --cool-set: #38bdf8;
  --heat: #ff7a45;
  --ok: #3dffb0;
  --bad: #ff4d6d;
  --violet: #7dd3fc;
  --shadow: 0 16px 36px rgba(0, 8, 16, 0.5);
  --radius: 6px;
  --topbar-bg: rgba(5, 9, 14, 0.94);
  --nav-hover: rgba(58, 224, 255, 0.08);
  --nav-current: rgba(0, 212, 200, 0.14);
  --chip-bg: #101820;
  --input-bg: #071018;
  --focus-ring: rgba(0, 212, 200, 0.5);
  --hover-card: #101820;
  --hover-border: rgba(0, 212, 200, 0.5);
  --flash-error-bg: rgba(255, 77, 109, 0.14);
  --flash-error-ink: #fecdd3;
  --flash-ok-bg: rgba(61, 255, 176, 0.1);
  --flash-ok-ink: #bbf7d0;
  --badge-bg: #101820;
  --ok-bg: rgba(61, 255, 176, 0.12);
  --bad-bg: rgba(255, 77, 109, 0.14);
  --paused-bg: rgba(0, 212, 200, 0.12);
  --heat-bg: rgba(255, 122, 69, 0.14);
  --cool-bg: rgba(58, 224, 255, 0.12);
  --button-grad: linear-gradient(135deg, #00d4c8, #3ae0ff);
  --secondary-bg: #101820;
  --surface-2: #071018;
  --drawer-bg: #0c141c;
  --legend-cool: #3ae0ff;
  --legend-heat: #ff9a6a;
  --legend-stuck: #fde68a;
  --legend-down: #ff4d6d;
  --chart-grid: rgba(232, 241, 248, 0.1);
  --chart-axis: rgba(58, 224, 255, 0.28);
  --chart-dot: rgba(58, 224, 255, 0.5);
  --chart-dot-major: #e8f1f8;
  --chart-point-stroke: #05090e;
  --wx-border: rgba(0, 212, 200, 0.2);
  --wx-bg: linear-gradient(180deg, #0c141c, #05090e);
  --tstat-bg:
    radial-gradient(900px 420px at 8% -20%, rgba(0, 212, 200, 0.12), transparent 58%),
    linear-gradient(180deg, #0c141c, #05090e);
  --auth-card: #0c141c;
  --blob-a: radial-gradient(circle, rgba(0, 212, 200, 0.16), transparent 70%);
  --blob-b: radial-gradient(circle, rgba(58, 224, 255, 0.12), transparent 72%);
  --bg-image:
    repeating-linear-gradient(118deg, transparent 0 22px, rgba(58, 224, 255, 0.03) 22px 23px),
    linear-gradient(165deg, #071018 0%, #05090e 100%);
  --bg-image-mobile: linear-gradient(165deg, #071018 0%, #05090e 100%);
}

html[data-theme="prism-field"] {
  color-scheme: dark;
  --bg: #040714;
  --bg-2: rgba(10, 14, 36, 0.72);
  --card: rgba(12, 16, 42, 0.58);
  --card-solid: #12162e;
  --ink: #f4f7ff;
  --muted: #a9b4d6;
  --line: rgba(124, 92, 255, 0.28);
  --accent: #7c5cff;
  --accent-2: #4dffd2;
  --accent-ink: #0a0618;
  --cool: #4dffd2;
  --cool-set: #7aa8ff;
  --heat: #ff7a59;
  --ok: #4dffb0;
  --bad: #ff5d8f;
  --violet: #c084fc;
  --shadow: 0 18px 44px rgba(4, 7, 20, 0.55);
  --radius: 22px;
  --topbar-bg: rgba(6, 8, 22, 0.72);
  --nav-hover: rgba(124, 92, 255, 0.14);
  --nav-current: rgba(77, 255, 210, 0.16);
  --chip-bg: rgba(18, 22, 46, 0.8);
  --input-bg: rgba(8, 10, 28, 0.78);
  --focus-ring: rgba(124, 92, 255, 0.55);
  --hover-card: rgba(20, 24, 52, 0.86);
  --hover-border: rgba(77, 255, 210, 0.5);
  --flash-error-bg: rgba(255, 93, 143, 0.16);
  --flash-error-ink: #ffd0de;
  --flash-ok-bg: rgba(77, 255, 176, 0.12);
  --flash-ok-ink: #c8ffe8;
  --badge-bg: rgba(18, 22, 46, 0.9);
  --ok-bg: rgba(77, 255, 176, 0.12);
  --bad-bg: rgba(255, 93, 143, 0.14);
  --paused-bg: rgba(124, 92, 255, 0.16);
  --heat-bg: rgba(255, 122, 89, 0.14);
  --cool-bg: rgba(77, 255, 210, 0.12);
  --button-grad: linear-gradient(135deg, #7c5cff, #4dffd2);
  --secondary-bg: rgba(18, 22, 46, 0.86);
  --surface-2: rgba(8, 10, 28, 0.62);
  --drawer-bg: rgba(8, 10, 26, 0.94);
  --legend-cool: #4dffd2;
  --legend-heat: #ff9a7a;
  --legend-stuck: #fde68a;
  --legend-down: #ff5d8f;
  --chart-grid: rgba(244, 247, 255, 0.1);
  --chart-axis: rgba(124, 92, 255, 0.32);
  --chart-dot: rgba(124, 92, 255, 0.55);
  --chart-dot-major: #f4f7ff;
  --chart-point-stroke: #040714;
  --wx-border: rgba(124, 92, 255, 0.28);
  --wx-bg: linear-gradient(180deg, rgba(16, 18, 46, 0.9), rgba(4, 7, 20, 0.94));
  --tstat-bg:
    radial-gradient(720px 380px at 0% 0%, rgba(124, 92, 255, 0.22), transparent 58%),
    linear-gradient(180deg, rgba(16, 18, 46, 0.86), rgba(4, 7, 20, 0.94));
  --auth-card: rgba(12, 16, 42, 0.78);
  --blob-a: radial-gradient(circle, rgba(124, 92, 255, 0.28), transparent 70%);
  --blob-b: radial-gradient(circle, rgba(77, 255, 210, 0.16), transparent 72%);
  --bg-image:
    radial-gradient(900px 620px at 8% -10%, rgba(124, 92, 255, 0.32), transparent 55%),
    radial-gradient(820px 540px at 96% 8%, rgba(77, 255, 210, 0.18), transparent 52%),
    radial-gradient(700px 480px at 50% 110%, rgba(255, 93, 143, 0.12), transparent 58%),
    linear-gradient(165deg, #0a0e28 0%, #040714 100%);
  --bg-image-mobile:
    radial-gradient(420px 280px at 10% 0%, rgba(124, 92, 255, 0.28), transparent 62%),
    linear-gradient(180deg, #0a0e28, #040714);
}

html[data-theme="mono-rail"] {
  color-scheme: dark;
  --bg: #070809;
  --bg-2: #0d0e10;
  --card: #111214;
  --card-solid: #111214;
  --ink: #f5f5f0;
  --muted: #9a9a94;
  --line: #2a2b2e;
  --accent: #ff3d2e;
  --accent-2: #f5f5f0;
  --accent-ink: #140403;
  --cool: #7ec8ff;
  --cool-set: #9bb4ff;
  --heat: #ff7a45;
  --ok: #7dff9a;
  --bad: #ff3d2e;
  --violet: #c9c4b8;
  --shadow: none;
  --radius: 0;
  --topbar-bg: #070809;
  --nav-hover: #16171a;
  --nav-current: #1b0c0a;
  --chip-bg: #070809;
  --input-bg: #070809;
  --focus-ring: rgba(255, 61, 46, 0.7);
  --hover-card: #16171a;
  --hover-border: #ff3d2e;
  --flash-error-bg: #2a0c0a;
  --flash-error-ink: #ffd0cc;
  --flash-ok-bg: #0c2114;
  --flash-ok-ink: #c8ffd6;
  --badge-bg: #070809;
  --ok-bg: #0c2114;
  --bad-bg: #2a0c0a;
  --paused-bg: #1b0c0a;
  --heat-bg: #24140c;
  --cool-bg: #0c1824;
  --button-grad: linear-gradient(180deg, #ff3d2e, #d4271b);
  --secondary-bg: #070809;
  --surface-2: #070809;
  --drawer-bg: #070809;
  --legend-cool: #7ec8ff;
  --legend-heat: #ff7a45;
  --legend-stuck: #f5d76e;
  --legend-down: #ff3d2e;
  --chart-grid: rgba(245, 245, 240, 0.1);
  --chart-axis: #2a2b2e;
  --chart-dot: #9a9a94;
  --chart-dot-major: #f5f5f0;
  --chart-point-stroke: #070809;
  --wx-border: #2a2b2e;
  --wx-bg: #111214;
  --tstat-bg: #111214;
  --auth-card: #111214;
  --blob-a: none;
  --blob-b: none;
  --bg-image:
    repeating-linear-gradient(90deg, transparent 0 79px, #151618 79px 80px),
    repeating-linear-gradient(0deg, transparent 0 39px, #121316 39px 40px),
    linear-gradient(180deg, #070809, #070809);
  --bg-image-mobile: repeating-linear-gradient(180deg, #070809 0 47px, #0d0e10 47px 48px);
}

html[data-theme="day-ledger"] {
  color-scheme: light;
  --bg: #efe7d8;
  --bg-2: rgba(255, 250, 241, 0.92);
  --card: #fffaf1;
  --card-solid: #fffaf1;
  --ink: #1c1914;
  --muted: #6b6256;
  --line: rgba(28, 25, 20, 0.16);
  --accent: #1c1914;
  --accent-2: #9a3412;
  --accent-ink: #fffaf1;
  --cool: #0f4c5c;
  --cool-set: #1d4ed8;
  --heat: #9a3412;
  --ok: #166534;
  --bad: #9f1239;
  --violet: #6b21a8;
  --shadow: 0 10px 24px rgba(28, 25, 20, 0.08);
  --radius: 4px;
  --topbar-bg: rgba(255, 250, 241, 0.94);
  --nav-hover: rgba(28, 25, 20, 0.06);
  --nav-current: rgba(154, 52, 18, 0.12);
  --chip-bg: #fffaf1;
  --input-bg: #fffaf1;
  --focus-ring: rgba(28, 25, 20, 0.45);
  --hover-card: #f6eee0;
  --hover-border: rgba(28, 25, 20, 0.4);
  --flash-error-bg: #fde2e4;
  --flash-error-ink: #9f1239;
  --flash-ok-bg: #dcfce7;
  --flash-ok-ink: #14532d;
  --badge-bg: #efe7d8;
  --ok-bg: #dcfce7;
  --bad-bg: #fde2e4;
  --paused-bg: #efe7d8;
  --heat-bg: #ffedd5;
  --cool-bg: #e0f2fe;
  --button-grad: linear-gradient(180deg, #1c1914, #2a241c);
  --secondary-bg: #fffaf1;
  --surface-2: #f6eee0;
  --drawer-bg: #fffaf1;
  --legend-cool: #0f4c5c;
  --legend-heat: #9a3412;
  --legend-stuck: #b45309;
  --legend-down: #9f1239;
  --chart-grid: rgba(28, 25, 20, 0.1);
  --chart-axis: rgba(28, 25, 20, 0.22);
  --chart-dot: rgba(28, 25, 20, 0.35);
  --chart-dot-major: #1c1914;
  --chart-point-stroke: #fffaf1;
  --wx-border: rgba(28, 25, 20, 0.16);
  --wx-bg: #fffaf1;
  --tstat-bg: linear-gradient(180deg, #fffaf1, #f6eee0);
  --auth-card: #fffaf1;
  --blob-a: none;
  --blob-b: none;
  --bg-image:
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(28, 25, 20, 0.04) 23px 24px),
    linear-gradient(180deg, #f6eee0, #efe7d8);
  --bg-image-mobile: linear-gradient(180deg, #f6eee0, #efe7d8);
}

html[data-theme="signal-deck"] {
  color-scheme: dark;
  --bg: #02110c;
  --bg-2: rgba(4, 24, 18, 0.88);
  --card: rgba(4, 28, 20, 0.86);
  --card-solid: #042018;
  --ink: #e8ffe8;
  --muted: #7fba8e;
  --line: rgba(57, 255, 20, 0.2);
  --accent: #39ff14;
  --accent-2: #00e5ff;
  --accent-ink: #02110c;
  --cool: #00e5ff;
  --cool-set: #7aa8ff;
  --heat: #ff7a45;
  --ok: #39ff14;
  --bad: #ff3355;
  --violet: #7ee0ff;
  --shadow: 0 0 0 1px rgba(57, 255, 20, 0.08);
  --radius: 2px;
  --topbar-bg: rgba(2, 17, 12, 0.94);
  --nav-hover: rgba(57, 255, 20, 0.08);
  --nav-current: rgba(57, 255, 20, 0.16);
  --chip-bg: #02160f;
  --input-bg: #02160f;
  --focus-ring: rgba(57, 255, 20, 0.55);
  --hover-card: #04281d;
  --hover-border: rgba(57, 255, 20, 0.55);
  --flash-error-bg: rgba(255, 51, 85, 0.14);
  --flash-error-ink: #ffd0d6;
  --flash-ok-bg: rgba(57, 255, 20, 0.1);
  --flash-ok-ink: #d4ffc8;
  --badge-bg: #02160f;
  --ok-bg: rgba(57, 255, 20, 0.1);
  --bad-bg: rgba(255, 51, 85, 0.14);
  --paused-bg: rgba(0, 229, 255, 0.12);
  --heat-bg: rgba(255, 122, 69, 0.14);
  --cool-bg: rgba(0, 229, 255, 0.12);
  --button-grad: linear-gradient(90deg, #39ff14, #00e5ff);
  --secondary-bg: #02160f;
  --surface-2: #02160f;
  --drawer-bg: #02160f;
  --legend-cool: #00e5ff;
  --legend-heat: #ff9a6a;
  --legend-stuck: #fde68a;
  --legend-down: #ff3355;
  --chart-grid: rgba(57, 255, 20, 0.12);
  --chart-axis: rgba(57, 255, 20, 0.28);
  --chart-dot: rgba(57, 255, 20, 0.5);
  --chart-dot-major: #e8ffe8;
  --chart-point-stroke: #02110c;
  --wx-border: rgba(57, 255, 20, 0.2);
  --wx-bg: linear-gradient(180deg, #042018, #02110c);
  --tstat-bg: linear-gradient(180deg, #042018, #02110c);
  --auth-card: #042018;
  --blob-a: radial-gradient(circle, rgba(57, 255, 20, 0.12), transparent 70%);
  --blob-b: radial-gradient(circle, rgba(0, 229, 255, 0.1), transparent 72%);
  --bg-image:
    repeating-radial-gradient(circle at 80% 10%, rgba(57, 255, 20, 0.08) 0 1px, transparent 1px 42px),
    linear-gradient(180deg, #03180f, #02110c);
  --bg-image-mobile:
    repeating-linear-gradient(90deg, transparent 0 15px, rgba(57, 255, 20, 0.06) 15px 16px),
    linear-gradient(180deg, #03180f, #02110c);
}

html[data-theme="obsidian-split"] {
  color-scheme: dark;
  --bg: #0a0610;
  --bg-2: rgba(18, 8, 24, 0.92);
  --card: #120818;
  --card-solid: #120818;
  --ink: #f7f0ff;
  --muted: #b39bc4;
  --line: rgba(255, 43, 214, 0.18);
  --accent: #ff2bd6;
  --accent-2: #7ee0ff;
  --accent-ink: #1a0414;
  --cool: #7ee0ff;
  --cool-set: #a78bfa;
  --heat: #ff7a45;
  --ok: #4dffb0;
  --bad: #ff4d6d;
  --violet: #c084fc;
  --shadow: 0 18px 40px rgba(8, 2, 14, 0.5);
  --radius: 14px;
  --topbar-bg: rgba(10, 6, 16, 0.94);
  --nav-hover: rgba(255, 43, 214, 0.1);
  --nav-current: rgba(255, 43, 214, 0.16);
  --chip-bg: #160a1e;
  --input-bg: #0e0714;
  --focus-ring: rgba(255, 43, 214, 0.5);
  --hover-card: #1a0c24;
  --hover-border: rgba(126, 224, 255, 0.5);
  --flash-error-bg: rgba(255, 77, 109, 0.14);
  --flash-error-ink: #ffd0d8;
  --flash-ok-bg: rgba(77, 255, 176, 0.1);
  --flash-ok-ink: #c8ffe0;
  --badge-bg: #160a1e;
  --ok-bg: rgba(77, 255, 176, 0.12);
  --bad-bg: rgba(255, 77, 109, 0.14);
  --paused-bg: rgba(255, 43, 214, 0.14);
  --heat-bg: rgba(255, 122, 69, 0.14);
  --cool-bg: rgba(126, 224, 255, 0.12);
  --button-grad: linear-gradient(135deg, #ff2bd6, #7ee0ff);
  --secondary-bg: #160a1e;
  --surface-2: #0e0714;
  --drawer-bg: #120818;
  --legend-cool: #7ee0ff;
  --legend-heat: #ff9a6a;
  --legend-stuck: #fde68a;
  --legend-down: #ff4d6d;
  --chart-grid: rgba(247, 240, 255, 0.1);
  --chart-axis: rgba(255, 43, 214, 0.28);
  --chart-dot: rgba(255, 43, 214, 0.45);
  --chart-dot-major: #f7f0ff;
  --chart-point-stroke: #0a0610;
  --wx-border: rgba(255, 43, 214, 0.2);
  --wx-bg: linear-gradient(90deg, #120818 0 55%, #071018 55% 100%);
  --tstat-bg: linear-gradient(90deg, #120818 0 58%, #071018 58% 100%);
  --auth-card: #120818;
  --blob-a: radial-gradient(circle, rgba(255, 43, 214, 0.16), transparent 70%);
  --blob-b: radial-gradient(circle, rgba(126, 224, 255, 0.12), transparent 72%);
  --bg-image:
    linear-gradient(90deg, #0a0610 0 54%, #061018 54% 100%),
    linear-gradient(180deg, #0a0610, #0a0610);
  --bg-image-mobile: linear-gradient(180deg, #120818 0 42%, #061018 42% 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  position: relative;
  isolation: isolate;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  background-image: var(--bg-image);
  background-attachment: scroll;
}
body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: -1;
  filter: blur(40px);
}
body::before {
  width: 42vw;
  height: 42vw;
  min-width: 280px;
  min-height: 280px;
  top: -8%;
  left: -6%;
  border-radius: 50%;
  background: var(--blob-a);
  animation: drift-a 28s ease-in-out infinite alternate;
}
body::after {
  width: 48vw;
  height: 48vw;
  min-width: 320px;
  min-height: 320px;
  right: -10%;
  bottom: -12%;
  border-radius: 46% 54% 42% 58%;
  background: var(--blob-b);
  animation: drift-b 36s ease-in-out infinite alternate;
}
@keyframes drift-a {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(8%, 12%) scale(1.12); }
}
@keyframes drift-b {
  from { transform: translate(0, 0) rotate(0deg); }
  to { transform: translate(-10%, -8%) rotate(12deg); }
}
@media (prefers-reduced-motion: reduce) {
  body::before, body::after { animation: none; }
}
@media (max-width: 859px) {
  body::before, body::after { display: none; }
  body { background-image: var(--bg-image-mobile); }
}

a { color: var(--cool); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 0.4rem; letter-spacing: -0.03em; }
h1 { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 650; }
h2 { font-size: 1.05rem; font-weight: 650; }
h3 { font-size: 0.95rem; font-weight: 650; margin-top: 1.1rem; }
.muted { color: var(--muted); }
.wrap {
  width: min(1240px, calc(100% - 1.5rem));
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: 1rem 0 calc(5.5rem + env(safe-area-inset-bottom, 0px));
  overflow-x: clip;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: calc(0.7rem + env(safe-area-inset-top, 0px)) 0.75rem 0.7rem;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand:hover { text-decoration: none; }
.mark {
  flex: 0 0 auto;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
}
.topbar-end {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  flex: 0 0 auto;
}
.who {
  color: var(--muted);
  font-size: 0.78rem;
  max-width: 22vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.icon-btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  height: 2.5rem;
  padding: 0 0.7rem;
  margin: 0;
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font: 600 0.78rem/1 var(--font);
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
}
.icon-btn svg { display: block; }
.back-btn { min-width: 2.5rem; }
.nav-toggle {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 2.5rem;
  height: 2.5rem;
  max-width: 2.5rem;
  max-height: 2.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  margin: 0;
  padding: 0;
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font: 16px/1 var(--font);
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
.nav-toggle span {
  display: block;
  width: 14px;
  height: 2px;
  border-radius: 1px;
  background: var(--ink);
}
.nav-drawer {
  display: none;
  position: absolute;
  right: 0.6rem;
  top: 3.4rem;
  min-width: 220px;
  background: var(--drawer-bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.6rem;
  box-shadow: var(--shadow);
}
.nav-drawer.open { display: grid; gap: 0.35rem; }
.nav-drawer a, .nav-drawer button, .nav-drawer span {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.7rem;
  border-radius: 10px;
  color: var(--ink);
  background: transparent;
  border: 0;
  font: inherit;
}
.nav-drawer a:hover, .nav-drawer button:hover { background: var(--nav-hover); text-decoration: none; }
.desktop-nav { display: none; align-items: center; gap: 0.35rem; }
.desktop-nav form { margin: 0; }
.nav-link {
  color: var(--ink);
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
}
.nav-link:hover { text-decoration: none; background: var(--nav-hover); }
.nav-link[aria-current="page"] {
  background: var(--nav-current);
  color: var(--accent);
}
.desktop-who { max-width: 10rem; margin-left: 0.15rem; }
a.who {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
a.who:hover { text-decoration: none; color: var(--accent); }
.nav-menu { position: relative; }
.nav-menu-toggle { cursor: pointer; background: transparent; border: 0; font: inherit; }
.nav-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  min-width: 11.5rem;
  display: grid;
  gap: 0.15rem;
  padding: 0.4rem;
  background: var(--drawer-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 30;
}
.nav-menu-panel[hidden] { display: none; }
.nav-menu-panel a {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 9px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
}
.nav-menu-panel a:hover { background: var(--nav-hover); text-decoration: none; }
.nav-menu-panel a[aria-current="page"] { background: var(--nav-current); color: var(--accent); }
.drawer-label {
  margin: 0.35rem 0 0;
  padding: 0.35rem 0.7rem 0.1rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.option-box {
  margin: 0.85rem 0 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
}
.option-box legend { padding: 0 0.3rem; font-weight: 650; }
.check-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}
button.ghost, .btn.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
}
button.ghost:hover, .btn.ghost:hover {
  color: var(--ink);
  border-color: var(--line);
  background: var(--secondary-bg);
}
button:disabled { opacity: 0.45; cursor: not-allowed; filter: none; transform: none; }
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin: 0 0 0.7rem;
}
.compact-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.compact-stats .stat { padding: 0.65rem 0.75rem; }
.compact-stats .stat b { font-size: 1.15rem; }
.status-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.hero {
  display: grid;
  gap: 0.85rem;
  margin: 0.4rem 0 1.1rem;
}
.kicker {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 0.95rem;
  backdrop-filter: blur(12px);
}
.stat b {
  display: block;
  font-family: var(--mono);
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}
.poll-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.85rem;
}
.poll-actions form { margin: 0; }
.filter-label {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.9rem;
}
.chip {
  appearance: none;
  background: var(--chip-bg);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
.chip.active {
  background: var(--button-grad);
  color: var(--accent-ink);
  border-color: transparent;
}
.legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}
.legend {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--chip-bg);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}
.legend.cool { color: var(--legend-cool); border-color: color-mix(in srgb, var(--legend-cool) 28%, transparent); }
.legend.heat { color: var(--legend-heat); border-color: color-mix(in srgb, var(--legend-heat) 28%, transparent); }
.legend.stuck { color: var(--legend-stuck); border-color: color-mix(in srgb, var(--legend-stuck) 28%, transparent); }
.legend.down { color: var(--legend-down); border-color: color-mix(in srgb, var(--legend-down) 28%, transparent); }
.search {
  width: 100%;
  margin: 0 0 0.9rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  backdrop-filter: blur(10px);
}

.card, .panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.9rem;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  min-width: 0;
}
.panel > .muted, .panel p {
  overflow-wrap: anywhere;
}
.flash-error, .flash-ok {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  margin: 0 0 0.8rem;
}
.flash-error { background: var(--flash-error-bg); color: var(--flash-error-ink); }
.flash-ok { background: var(--flash-ok-bg); color: var(--flash-ok-ink); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: var(--badge-bg);
}
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.paused { background: var(--paused-bg); color: var(--accent); }
.badge.heat { background: var(--heat-bg); color: var(--heat); }
.badge.cool { background: var(--cool-bg); color: var(--cool); }

label { display: block; margin: 0.75rem 0 0.35rem; color: var(--muted); font-size: 0.82rem; }
input[type=text],
input[type=password],
input[type=email],
input[type=search],
input[type=url],
input[type=tel],
input[type=number],
select,
textarea {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  padding: 0.8rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--ink);
  font: inherit;
  box-sizing: border-box;
}
input[type=email]::placeholder,
input[type=text]::placeholder,
input[type=password]::placeholder {
  color: var(--muted);
  opacity: 0.85;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus-ring); border-color: transparent; }
.check { display: flex; gap: 0.55rem; align-items: center; margin-top: 0.9rem; color: var(--ink); }
button, .btn {
  -webkit-appearance: none;
  appearance: none;
  background: var(--button-grad);
  color: var(--accent-ink);
  border: 0;
  border-radius: 12px;
  padding: 0.7rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
button:hover, .btn:hover { filter: brightness(1.06); }
button:active, .btn:active { transform: translateY(1px); }
button.secondary, .btn.secondary {
  background: var(--secondary-bg);
  color: var(--ink);
  border: 1px solid var(--line);
}
button.full { width: 100%; margin-top: 1rem; }

.building { margin: 0 0 1.4rem; }
.building-title {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0.2rem 0 0.7rem;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}
.unit-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1fr;
}
.unit-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 0.85rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.85rem 0.95rem;
  color: inherit;
  backdrop-filter: blur(10px);
  min-width: 0;
  overflow: hidden;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.unit-card:hover { border-color: var(--hover-border); text-decoration: none; background: var(--hover-card); }
.unit-card:focus-visible, .chip:focus-visible, .nav-toggle:focus-visible, .icon-btn:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
a[aria-current="page"] { border-color: var(--hover-border); }
.unit-card.stale { opacity: 0.55; }
.unit-card.unreachable { border-color: color-mix(in srgb, var(--bad) 55%, transparent); }
.unit-card .name {
  font-weight: 650;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.unit-card .meta {
  font-size: 0.8rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.unit-card .tenant {
  font-size: 0.8rem;
  color: var(--accent-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 0.15rem;
}
.unit-card .tenant-phone {
  font-size: 0.75rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.unit-card .temps { text-align: right; }
.temp {
  font-family: var(--mono);
  font-size: 1.7rem;
  line-height: 1;
  letter-spacing: -0.06em;
}
.setpoints { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); text-align: right; display: flex; gap: 0.45rem; justify-content: flex-end; }
.setpoints .c::before { content: "C "; color: var(--cool); }
.setpoints .h::before { content: "H "; color: var(--heat); }
.setpoints .c { color: var(--cool); }
.setpoints .h { color: var(--heat); }
.chips { display: flex; flex-wrap: wrap; gap: 0.3rem; grid-column: 1 / -1; }
.badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
}
.table-wrap.desktop-only { display: none; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.7rem 0.45rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; }
td.num { font-family: var(--mono); }
tr.stale { opacity: 0.45; }
.all-temps-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.all-temps-head h2,
.all-temps-head p { margin-bottom: 0.15rem; }
.all-temps-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.74rem;
}
.all-temps-summary span {
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
}
.all-temps-summary b { color: var(--ink); font-family: var(--mono); }
.temp-swatches { margin-top: 0.55rem; }
.bldg-chart { margin: 0.85rem 0 1.15rem; }
.bldg-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
  font-size: 0.82rem;
}
.bldg-metrics { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.3rem 0.7rem; color: var(--muted); font-size: 0.72rem; }
.bldg-metrics b { color: var(--ink); font-family: var(--mono); }
.bldg-plot {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}
.bldg-svg { display: block; width: 100%; min-width: 560px; height: 196px; overflow: visible; }
.bldg-gridline { stroke: var(--chart-grid); stroke-width: 1; }
.bldg-tick {
  fill: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}
.bldg-avg { stroke: color-mix(in srgb, var(--ink) 42%, transparent); stroke-width: 1; stroke-dasharray: 4 5; }
.bldg-axis { stroke: var(--chart-axis); stroke-width: 1; }
.bldg-unit { color: inherit; }
.bldg-stem { stroke: currentColor; stroke-width: 1; opacity: 0.28; }
.bldg-dot { fill: currentColor; stroke: var(--bg); stroke-width: 1; }
.bldg-unit-no {
  fill: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 650;
}
.bldg-unit:hover,
.bldg-unit:focus { text-decoration: none; outline: none; }
.bldg-unit:hover .bldg-dot,
.bldg-unit:focus .bldg-dot { fill: var(--ink); }
.bldg-unit:hover .bldg-unit-no,
.bldg-unit:focus .bldg-unit-no { fill: currentColor; }
.bldg-x {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .all-temps-head { flex-direction: column; gap: 0.35rem; }
  .all-temps-summary { justify-content: flex-start; }
  .bldg-chart-head { align-items: flex-start; flex-direction: column; gap: 0.2rem; }
  .bldg-metrics { justify-content: flex-start; }
  .bldg-svg { min-width: 720px; height: 196px; }
}
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-grid { stroke: var(--chart-grid); stroke-width: 1; }
.chart-grid-v { stroke: color-mix(in srgb, var(--ink) 6%, transparent); stroke-dasharray: 2 7; }
.chart-grid-v-major { stroke: var(--chart-grid); }
.chart-hour-dot { fill: var(--chart-dot); }
.chart-hour-dot.major { fill: var(--chart-dot-major); }
.chart-axis { stroke: var(--chart-axis); stroke-width: 1; }
.chart-label {
  fill: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}
.chart-x { font-size: 10px; }
.chart-line { vector-effect: non-scaling-stroke; }
.chart-point {
  stroke: var(--chart-point-stroke);
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
  transition: r 120ms ease, filter 120ms ease;
}
.chart-point:hover,
.chart-point:focus { r: 4.5px; filter: brightness(1.25); outline: none; }
.temp-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.2rem;
}
.temp-chart-head h2 { margin-bottom: 0.1rem; }
.temp-chart-meta,
.temp-chart-foot { margin: 0; font-size: 0.74rem; }
.temp-chart-foot { margin-top: -0.15rem; text-align: right; }
.temp-chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.42rem;
  font-size: 0.76rem;
  font-weight: 700;
}
.temp-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.24rem 0.48rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: var(--surface-2);
}
.temp-chart-legend i { font-style: normal; line-height: 1; }
.temp-chart-legend .ambient { color: var(--cool); }
.temp-chart-legend .outdoor { color: var(--accent); }
.temp-chart-legend .cool { color: var(--cool-set); }
.temp-chart-legend .heat { color: var(--heat); }
@media (max-width: 560px) {
  .temp-chart-head { flex-direction: column; gap: 0.45rem; }
  .temp-chart-legend { justify-content: flex-start; }
  .chart-point { r: 2.8px; }
}
.wx-shell {
  margin: 0 0 0.9rem;
  padding: 1rem 0.85rem 0.85rem;
  border-radius: 22px;
  border: 1px solid var(--wx-border);
  background: var(--wx-bg);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}
.wx-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 0 0.2rem 0.35rem;
}
.wx-head h2 { margin: 0; }
.wx-legend {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  min-width: 0;
}
.wx-scale {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 150px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink);
}
.wx-scale i {
  display: block;
  flex: 1 1 140px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(
    90deg,
    #f4fbff 0%,
    #2f80ed 10%,
    #2ec4d6 28%,
    #5cd68a 46%,
    #e8d65a 62%,
    #ffb052 76%,
    #ff6a3a 88%,
    #e84040 96%,
    #c81e1e 100%
  );
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}
.wx-chip {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
}
.wx-chip.rain { color: #b7e4ff; background: rgba(70, 140, 255, 0.16); white-space: nowrap; }
@media (max-width: 720px) {
  .wx-head { flex-direction: column; align-items: stretch; }
  .wx-legend { justify-content: flex-start; overflow-x: auto; }
}
.wx-svg { display: block; width: 100%; height: auto; overflow: visible; }
.wx-grid { stroke: rgba(255, 255, 255, 0.1); stroke-width: 1; stroke-dasharray: 4 7; }
.wx-grid-v { stroke: rgba(255, 255, 255, 0.08); stroke-width: 1; stroke-dasharray: 3 8; }
.wx-axis { fill: var(--muted); font-family: var(--mono); }
.wx-precip-fill {
  fill: url(#wx-precip-grad);
  stroke: var(--cool);
  stroke-width: 1.2;
}
.wx-temp-line {
  stroke: var(--cool);
  stroke-width: 3.2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.wx-now-dot { fill: var(--cool); stroke: var(--ink); stroke-width: 1.15; }
.wx-day { fill: var(--ink); font-weight: 650; }
.wx-day.is-today { fill: var(--accent); }
.wx-foot { margin: 0.15rem 0.2rem 0; color: var(--muted); font-size: 0.75rem; }
.wx-daily {
  margin: 0 0 0.9rem;
  padding: 0.85rem 0.7rem 0.4rem;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--card);
}
.wx-daily h2 { margin: 0 0.35rem 0.55rem; }
.wx-dayrow {
  display: grid;
  grid-template-columns: 5.6rem minmax(0, 1fr);
  gap: 0.7rem 0.9rem;
  padding: 0.75rem 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.wx-daymeta {
  display: grid;
  justify-items: start;
  gap: 0.28rem;
}
.wx-daymeta strong {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.wx-icon {
  width: 2.1rem;
  height: 1.6rem;
  display: block;
  background: no-repeat center / contain;
  opacity: 0.95;
}
.wx-icon.rain {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 36'><path fill='%23d7deee' d='M14 16c0-6 5-10 10-10 4 0 8 3 9 7 4 0 7 3 7 7 0 4-3 7-7 7H16c-4 0-7-3-7-7 0-3 2-6 5-7z'/><path fill='none' stroke='%234eb4ff' stroke-width='2.4' stroke-linecap='round' d='M18 28v5M24 29v5M30 28v5'/></svg>");
}
.wx-icon.storm {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 36'><path fill='%23d7deee' d='M14 14c0-5 4-9 9-9 4 0 7 3 8 6 4 0 7 3 7 7s-3 7-7 7H16c-4 0-7-3-7-7 0-3 2-6 5-7z'/><path fill='%23ffd36a' d='M26 18l-6 8h5l-2 7 8-10h-5z'/></svg>");
}
.wx-icon.snow {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 36'><path fill='%23d7deee' d='M14 14c0-5 4-9 9-9 4 0 7 3 8 6 4 0 7 3 7 7s-3 7-7 7H16c-4 0-7-3-7-7 0-3 2-6 5-7z'/><g fill='none' stroke='%23f4fbff' stroke-width='1.6'><path d='M24 24v8M21 26l6 4M27 26l-6 4'/></g></svg>");
}
.wx-icon.partly {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 36'><circle cx='16' cy='14' r='7' fill='%23ffc44d'/><path fill='%23d7deee' d='M18 18c0-4 3-7 7-7 3 0 6 2 7 5 3 0 6 3 6 6s-3 6-6 6H20c-3 0-6-3-6-6 0-2 1-5 4-5z'/></svg>");
}
.wx-icon.cloud {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 36'><path fill='%23c9d0e3' d='M14 18c0-5 4-9 9-9 4 0 7 3 8 6 4 0 7 3 7 7s-3 7-7 7H16c-4 0-7-3-7-7 0-3 2-6 5-7z'/></svg>");
}
.wx-icon.sun {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 36'><circle cx='24' cy='18' r='8' fill='%23ffc44d'/></svg>");
}
.wx-pop { color: var(--cool); font-family: var(--mono); font-size: 0.82rem; font-weight: 700; }
.wx-daytemps { min-width: 0; }
.wx-hl {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
  font-family: var(--mono);
  font-weight: 700;
}
.wx-dot { width: 0.55rem; height: 0.55rem; display: block; }
.wx-hl span { color: var(--muted); font-weight: 500; }
.wx-track {
  position: relative;
  height: 16px;
  margin: 1.15rem 0 1.2rem;
}
.wx-bar { display: block; width: 100%; height: 16px; overflow: visible; }
.wx-mark {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  transform: translateY(-50%);
}
.wx-mark svg { display: block; width: 16px; height: 16px; }
.wx-mark b {
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  color: var(--ink);
  font-size: 0.62rem;
  font-weight: 600;
  white-space: nowrap;
}
.wx-mark.above b {
  top: auto;
  bottom: 18px;
}
@media (max-width: 560px) {
  .wx-dayrow { grid-template-columns: 4.6rem minmax(0, 1fr); gap: 0.45rem; }
}
.tone-cool { background: var(--cool); color: var(--cool); }
.tone-auto { background: var(--accent); color: var(--accent); }
.tone-heat { background: var(--heat); color: var(--heat); }
.tone-off { background: var(--muted); color: var(--muted); }
.tone-offset { background: var(--bad); color: var(--bad); }
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin: 0.35rem 0 0.7rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.swatches span { display: inline-flex; align-items: center; gap: 0.35rem; }
.swatches i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 2px;
  display: inline-block;
}
.lag-table { display: table; width: 100%; table-layout: auto; }
.lag-table th, .lag-table td { padding: 0.65rem 0.4rem; }
.lag-table .unit-cell,
.lag-table .unit-cell a {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.lag-table .why,
.lag-table .note {
  white-space: nowrap;
}
.lag-table td.actions {
  white-space: nowrap;
  text-align: right;
}
.lag-table td.actions form { margin: 0; }
button.compact {
  padding: 0.38rem 0.65rem;
  font-size: 0.78rem;
  border-radius: 9px;
}
@media (max-width: 720px) {
  .panel { padding: 0.9rem 0.8rem; }
  .lag-table thead,
  .table-wrap table thead { display: none; }
  .lag-table,
  .lag-table tbody,
  .lag-table tr,
  .lag-table td,
  .table-wrap table,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap td {
    display: block;
    width: 100%;
  }
  .lag-table tr,
  .table-wrap tr {
    padding: 0.55rem 0 0.7rem;
    border-bottom: 1px solid var(--line);
  }
  .lag-table tr:last-child,
  .table-wrap tbody tr:last-child { border-bottom: 0; padding-bottom: 0.15rem; }
  .lag-table td,
  .table-wrap td {
    display: grid;
    grid-template-columns: 5.4rem minmax(0, 1fr);
    gap: 0.45rem 0.7rem;
    align-items: center;
    padding: 0.22rem 0;
    border: 0;
    min-width: 0;
  }
  .lag-table td::before,
  .table-wrap td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .lag-table td.actions {
    display: block;
    padding-top: 0.45rem;
    text-align: left;
  }
  .lag-table td.actions::before { display: none; }
  .lag-table .unit-cell {
    grid-template-columns: 5.4rem minmax(0, 1fr);
  }
  .lag-table .why,
  .lag-table .note {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
.disc {
  display: inline-block;
  color: var(--bad);
  font-weight: 700;
  margin-right: 0.25rem;
}

.auth {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.5rem 1.1rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
}
.auth-card {
  width: min(380px, 100%);
  background: var(--auth-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 2.15rem 1.7rem 1.65rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(140%);
  text-align: center;
}
.auth-lockup {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  margin: 0 0 1.45rem;
}
.auth-title {
  display: inline-flex;
  align-items: center;
  gap: 0.08em;
  margin: 0;
  color: var(--ink);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1;
}
.auth-title .mark {
  width: 0.98em;
  height: 1.18em;
  border-radius: 0.24em;
  font-size: 0.78em;
  letter-spacing: 0;
}
.auth-org {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.auth-card h1 {
  margin: 0 0 1.05rem;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.auth-card form { text-align: left; }
.auth-card label { margin-top: 0.85rem; }
.auth-card input[type=text],
.auth-card input[type=password],
.auth-card input[type=email] {
  border-radius: 10px;
  padding: 0.85rem 0.9rem;
}
.auth-card .flash-error,
.auth-card .flash-ok { text-align: left; }
.auth-card button.full {
  margin-top: 1.2rem;
  border-radius: 10px;
  padding: 0.85rem 1rem;
}
.auth-links {
  margin: 1.05rem 0 0;
  text-align: center;
}
.auth-links a { color: var(--muted); font-size: 0.82rem; font-weight: 650; }
.auth-links a:hover { color: var(--ink); }

.hero-temp {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}
.big-temp {
  font-family: var(--mono);
  font-size: clamp(3.4rem, 14vw, 5.4rem);
  line-height: 0.9;
  letter-spacing: -0.08em;
  background: linear-gradient(180deg, var(--ink), var(--cool));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }
.metric { background: var(--surface-2); border-radius: 14px; padding: 0.75rem; border: 1px solid var(--line); }
.metric span { display: block; color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.metric b { font-family: var(--mono); font-size: 1.15rem; }

.unit-sub { margin: 0 0 0.7rem; }
.tenant-verify {
  max-width: 28rem;
  margin: 0 auto 1rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
}
.tenant-verify .kicker { margin: 0 0 0.45rem; }
.tenant-verify dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 0.85rem;
  margin: 0;
}
.tenant-verify dl > div:nth-child(3) {
  grid-column: 1 / -1;
}
.tenant-verify dt {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.tenant-verify dd {
  margin: 0.15rem 0 0;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.tenant-verify a { color: var(--accent-2); }
.tstat-card {
  max-width: 28rem;
  margin: 0 auto 1rem;
  padding: 1.25rem 1.2rem 1.15rem;
  border-radius: 28px;
  background: var(--tstat-bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.tstat-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.4rem;
}
.tstat-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.tstat-refresh {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 999px;
  border: 1px solid var(--focus-ring);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
}
.tstat-refresh svg { width: 12px; height: 12px; }
.tstat-refresh:hover { filter: brightness(1.06); }
.tstat-refresh.spin svg { animation: tstat-spin 0.7s linear infinite; }
@keyframes tstat-spin { to { transform: rotate(360deg); } }
.tstat-title { font-size: 1.15rem; font-weight: 650; }
.tstat-id { color: var(--muted); font-size: 0.92rem; margin-top: 0.1rem; }
.tstat-unit {
  font-size: 0.78rem;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  white-space: nowrap;
  font-weight: 650;
}
.tstat-temp {
  text-align: center;
  font-size: clamp(3.6rem, 16vw, 5.2rem);
  font-weight: 650;
  letter-spacing: -0.06em;
  line-height: 1;
  margin: 0.2rem 0 1.35rem;
  color: var(--ink);
}
.tstat-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 2px solid transparent;
  background:
    linear-gradient(165deg, var(--surface-2), var(--card-solid)) padding-box,
    linear-gradient(90deg, var(--cool), var(--violet) 48%, var(--heat)) border-box;
}
.tstat-set { display: grid; gap: 0.12rem; }
.tstat-set.heat { text-align: right; justify-items: end; }
.tstat-set-label { color: var(--muted); font-size: 0.95rem; }
.tstat-set-val { font-size: 1.55rem; font-weight: 650; letter-spacing: -0.03em; }
.tstat-ico { font-size: 1.05rem; }
.tstat-ico.fire { filter: grayscale(0); }
.tstat-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-top: 1.2rem;
}
.tstat-pill span {
  display: block;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 0.45rem;
}
.tstat-pill b {
  display: block;
  text-align: center;
  background: var(--cool-bg);
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--cool) 28%, transparent);
  border-radius: 12px;
  padding: 0.72rem 0.5rem;
  font-weight: 650;
  text-transform: capitalize;
}
.tstat-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
  justify-content: center;
}
.tstat-live { display: none; }

.status-line { font-size: 0.82rem; color: var(--muted); margin: 0 0 0.8rem; word-break: break-word; }
.activity-log {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  max-height: 22rem;
  overflow: auto;
  display: grid;
  gap: 0.45rem;
}
.activity-log li {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 0.45rem 0.6rem;
  align-items: start;
  font-size: 0.82rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}
.activity-log li.bad { border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.activity-log time { color: var(--muted); font-family: var(--mono); font-size: 0.75rem; white-space: nowrap; }
.activity-log li > span:last-child { overflow-wrap: anywhere; }
.hidden { display: none !important; }

.charts-collapsed .bldg-plot,
.charts-collapsed .bldg-x { display: none; }
.charts-collapsed .bldg-chart {
  margin: 0.2rem 0;
  padding: 0.15rem 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 720px) {
  .unit-grid { grid-template-columns: repeat(2, 1fr); }
}
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.theme-switch input {
  appearance: none;
  width: 2.1rem;
  height: 1.2rem;
  margin: 0;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card-solid);
  position: relative;
  cursor: pointer;
}
.theme-switch input::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: var(--ink);
}
.theme-switch input:checked {
  background: var(--accent);
  border-color: transparent;
}
.theme-switch input:checked::after {
  left: auto;
  right: 1px;
  background: var(--accent-ink);
}
.theme-switch input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.desktop-theme-switch { margin-left: 0.35rem; }
.mobile-theme-switch span { display: none; }
.drawer-theme-switch {
  width: 100%;
  padding: 0.65rem 0.7rem;
  border-radius: 10px;
}
@media (min-width: 860px) {
  body { background-attachment: fixed; }
  .nav-toggle, .topbar-end { display: none; }
  .desktop-nav { display: flex; }
  .mobile-theme-switch, .drawer-theme-switch { display: none; }
  .wrap { padding-bottom: 2rem; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .hero-temp { grid-template-columns: auto 1fr; align-items: end; }
  .tstat-card { padding: 1.45rem 1.4rem 1.3rem; }
}
.account-row {
  padding: 0.85rem 1rem;
}
.account-row form { margin: 0 0 0.5rem; }
.account-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.6rem; }
.auth-back {
  position: fixed;
  top: calc(0.7rem + env(safe-area-inset-top, 0px));
  right: 0.75rem;
  z-index: 5;
}
@media (max-width: 480px) {
  .who { display: none; }
}
@media (min-width: 1100px) {
  .compact-stats { max-width: 28rem; margin-left: auto; }
  .hero { grid-template-columns: 1fr auto; align-items: end; }
}

.theme-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr;
}
.theme-card {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.theme-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.theme-preview {
  height: 5.4rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--preview-bg, var(--bg));
  position: relative;
}
.theme-preview::before,
.theme-preview::after {
  content: "";
  position: absolute;
  inset: auto;
}
.theme-preview::before {
  left: 0;
  right: 0;
  top: 0;
  height: 1.05rem;
  background: var(--preview-bar, var(--card-solid));
  border-bottom: 1px solid color-mix(in srgb, var(--preview-ink, var(--ink)) 12%, transparent);
}
.theme-preview::after {
  left: 0.7rem;
  bottom: 0.7rem;
  width: 2.4rem;
  height: 0.55rem;
  background: var(--preview-accent, var(--accent));
}
.theme-preview span {
  position: absolute;
  top: 1.7rem;
  left: 0.7rem;
  right: 0.7rem;
  height: 1.7rem;
  background: var(--preview-card, var(--card-solid));
  border: 1px solid color-mix(in srgb, var(--preview-ink, var(--ink)) 12%, transparent);
}
.theme-swatches {
  display: flex;
  gap: 0.35rem;
}
.theme-swatches i {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 2px;
  border: 1px solid var(--line);
  display: block;
}
.theme-card h2 { margin: 0; }
.theme-card .muted { margin: 0; }
.theme-card button { margin: 0; }
.theme-card.is-active button { background: var(--secondary-bg); color: var(--ink); border: 1px solid var(--line); }
@media (min-width: 720px) {
  .theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .theme-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

html[data-theme="prism-field"] .topbar,
html[data-theme="prism-field"] .card,
html[data-theme="prism-field"] .panel,
html[data-theme="prism-field"] .stat,
html[data-theme="prism-field"] .unit-card,
html[data-theme="prism-field"] .auth-card {
  backdrop-filter: blur(18px) saturate(150%);
}
html[data-theme="prism-field"] .mark,
html[data-theme="prism-field"] .chip,
html[data-theme="prism-field"] .badge,
html[data-theme="prism-field"] .theme-switch input {
  border-radius: 999px;
}
@media (max-width: 859px) {
  html[data-theme="prism-field"] .topbar {
    position: sticky;
    backdrop-filter: blur(22px) saturate(160%);
  }
  html[data-theme="prism-field"] .wrap { width: min(1240px, calc(100% - 1rem)); }
  html[data-theme="prism-field"] .unit-card,
  html[data-theme="prism-field"] .panel { border-radius: 18px; }
}

html[data-theme="mono-rail"] .topbar,
html[data-theme="mono-rail"] .card,
html[data-theme="mono-rail"] .panel,
html[data-theme="mono-rail"] .stat,
html[data-theme="mono-rail"] .unit-card,
html[data-theme="mono-rail"] .chip,
html[data-theme="mono-rail"] .badge,
html[data-theme="mono-rail"] .nav-drawer,
html[data-theme="mono-rail"] .auth-card,
html[data-theme="mono-rail"] .icon-btn,
html[data-theme="mono-rail"] .nav-toggle,
html[data-theme="mono-rail"] button,
html[data-theme="mono-rail"] .btn,
html[data-theme="mono-rail"] input,
html[data-theme="mono-rail"] select {
  border-radius: 0;
  backdrop-filter: none;
}
html[data-theme="mono-rail"] .mark { border-radius: 0; }
html[data-theme="mono-rail"] .kicker { letter-spacing: 0.28em; }
html[data-theme="mono-rail"] .unit-card {
  grid-template-columns: 1fr;
  gap: 0.2rem;
  border-left: 3px solid var(--accent);
}
html[data-theme="mono-rail"] .unit-card .temps { text-align: left; }
html[data-theme="mono-rail"] .setpoints { justify-content: flex-start; }
@media (max-width: 859px) {
  html[data-theme="mono-rail"] .unit-grid { grid-template-columns: 1fr; }
  html[data-theme="mono-rail"] .stats { grid-template-columns: 1fr 1fr; }
  html[data-theme="mono-rail"] .wrap { width: 100%; padding-left: 0; padding-right: 0; }
  html[data-theme="mono-rail"] .panel,
  html[data-theme="mono-rail"] .unit-card { border-left: 0; border-right: 0; border-radius: 0; }
}

html[data-theme="day-ledger"] .topbar { border-bottom-width: 2px; }
html[data-theme="day-ledger"] .kicker { color: var(--accent-2); }
html[data-theme="day-ledger"] .unit-card { box-shadow: 0 1px 0 var(--line); }
html[data-theme="day-ledger"] button,
html[data-theme="day-ledger"] .btn { letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.78rem; }
@media (max-width: 859px) {
  html[data-theme="day-ledger"] .icon-btn,
  html[data-theme="day-ledger"] .nav-toggle,
  html[data-theme="day-ledger"] .theme-switch input,
  html[data-theme="day-ledger"] .chip {
    min-height: 2.7rem;
  }
  html[data-theme="day-ledger"] .nav-drawer a,
  html[data-theme="day-ledger"] .nav-drawer button { min-height: 2.8rem; }
  html[data-theme="day-ledger"] .unit-card { padding: 1rem; }
  html[data-theme="day-ledger"] .temp { font-size: 2rem; }
}

html[data-theme="signal-deck"] .kicker,
html[data-theme="signal-deck"] .badge,
html[data-theme="signal-deck"] th {
  font-family: var(--mono);
  letter-spacing: 0.12em;
}
html[data-theme="signal-deck"] .chip,
html[data-theme="signal-deck"] .badge { border-radius: 2px; }
html[data-theme="signal-deck"] .unit-card {
  border-style: dashed;
  padding: 0.7rem 0.8rem;
}
html[data-theme="signal-deck"] .stat { border-style: dashed; }
html[data-theme="signal-deck"] .mark { border-radius: 2px; }
@media (max-width: 859px) {
  html[data-theme="signal-deck"] .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; }
  html[data-theme="signal-deck"] .stat { padding: 0.5rem 0.55rem; }
  html[data-theme="signal-deck"] .stat b { font-size: 1.05rem; }
  html[data-theme="signal-deck"] .unit-card { padding: 0.7rem; }
  html[data-theme="signal-deck"] .who { max-width: 18vw; }
}

html[data-theme="obsidian-split"] .topbar { border-bottom: 0; box-shadow: inset 0 -1px 0 var(--line); }
html[data-theme="obsidian-split"] .unit-card { border-left: 3px solid var(--accent); }
html[data-theme="obsidian-split"] .panel { border-left: 3px solid var(--accent-2); }
html[data-theme="obsidian-split"] .mark { border-radius: 4px; }
@media (max-width: 859px) {
  html[data-theme="obsidian-split"] .wrap { width: min(1240px, calc(100% - 0.9rem)); }
  html[data-theme="obsidian-split"] .unit-grid { gap: 0.45rem; }
  html[data-theme="obsidian-split"] .unit-card { border-radius: 12px; }
  html[data-theme="obsidian-split"] .nav-drawer { border-radius: 12px; }
}
