:root {
  color-scheme: light;
  --page:#f9f9f7; --surface:#fcfcfb; --ink:#0b0b0b; --ink2:#52514e; --muted:#898781;
  --grid:#e1e0d9; --axis:#c3c2b7; --border:rgba(11,11,11,.10); --shadow:0 1px 2px rgba(11,11,11,.04);
  --solar:#eb6834; --house:#2a78d6; --grid-c:#1baf7a; --good:#006300; --bad:#d03b3b; --warn:#c98500; --violet:#6250d6;
  --y1:#2a78d6; --y2:#eb6834; --y3:#1baf7a; --y4:#eda100; --y5:#e87ba4; --y6:#008300; --y7:#6250d6;   /* one colour per year (history page) */
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page:#0d0d0d; --surface:#1a1a19; --ink:#f0efec; --ink2:#c3c2b7;
    --grid:#2c2c2a; --axis:#383835; --border:rgba(255,255,255,.10); --shadow:none;
    --solar:#d95926; --house:#3987e5; --grid-c:#199e70; --good:#0ca30c; --warn:#fab219; --violet:#9085e9;
    --y1:#3987e5; --y2:#d95926; --y3:#199e70; --y4:#c98500; --y5:#d55181; --y6:#008300; --y7:#9085e9;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page:#0d0d0d; --surface:#1a1a19; --ink:#f0efec; --ink2:#c3c2b7;
  --grid:#2c2c2a; --axis:#383835; --border:rgba(255,255,255,.10); --shadow:none;
  --solar:#d95926; --house:#3987e5; --grid-c:#199e70; --good:#0ca30c; --warn:#fab219; --violet:#9085e9;
  --y1:#3987e5; --y2:#d95926; --y3:#199e70; --y4:#c98500; --y5:#d55181; --y6:#008300; --y7:#9085e9;
}
:root[data-theme="transparent"] { --page:transparent }
* { box-sizing:border-box }
body { margin:0; background:var(--page); color:var(--ink); font:15px/1.45 'DM Sans',system-ui,-apple-system,"Segoe UI",sans-serif }
main { max-width:1040px; margin:0 auto; padding:20px 16px 32px }
header { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:16px; flex-wrap:wrap }
h1 { font-size:22px; margin:0; font-weight:650; letter-spacing:-.01em }
.date .wx { display:inline-flex; align-items:center; gap:6px; margin-left:12px; padding-left:12px; border-left:1px solid var(--border); font-weight:550; color:var(--ink) }
.date .wx[hidden] { display:none }
#site::before { content:""; display:inline-block; width:1.05em; height:1.05em; margin-right:.4em; vertical-align:-.14em;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -12 24 24' fill='none' stroke='%23f5b800' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle r='4.6' fill='%23f5b800'/%3E%3Cpath d='M0-7.5V-10.5M0 7.5V10.5M-7.5 0H-10.5M7.5 0H10.5M-5.3-5.3L-7.4-7.4M5.3 5.3L7.4 7.4M-5.3 5.3L-7.4 7.4M5.3-5.3L7.4-7.4'/%3E%3C/svg%3E") center/contain no-repeat }
.date { color:var(--muted); font-size:13px; margin-top:2px }
.pill { display:inline-flex; align-items:center; gap:8px; padding:5px 12px; border:1px solid var(--border); border-radius:999px;
        background:var(--surface); color:var(--ink2); font-size:13px }
.dot { width:8px; height:8px; border-radius:50%; background:var(--good); box-shadow:0 0 0 0 currentColor; animation:pulse 2s infinite; color:var(--good) }
.dot.bad { background:var(--bad); color:var(--bad); animation:none }
.dot.warn { background:var(--warn); color:var(--warn) }
.dot.off { background:var(--muted); color:var(--muted); animation:none }
@keyframes pulse { 0%{box-shadow:0 0 0 0 color-mix(in srgb,currentColor 50%,transparent)} 70%,100%{box-shadow:0 0 0 7px transparent} }
.card { background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:16px 18px; box-shadow:var(--shadow) }
.row { display:grid; gap:14px; margin-bottom:14px }
.hero { grid-template-columns:minmax(0,1.7fr) minmax(0,1fr) }
.tiles { grid-template-columns:repeat(auto-fit,minmax(180px,1fr)) }
.two { grid-template-columns:repeat(auto-fit,minmax(300px,1fr)) }
@media (max-width:760px){ .hero{grid-template-columns:1fr} }
.label { color:var(--ink2); font-size:12px; font-weight:500 }
.big { font-size:32px; font-weight:650; margin-top:4px; letter-spacing:-.02em }
.unit { font-size:15px; color:var(--ink2); font-weight:400; margin-left:2px }
.sub { color:var(--muted); font-size:13px; margin-top:2px }
.note { color:var(--muted); font-size:12px; margin:-6px 2px 14px }
.good { color:var(--good) } .badc { color:var(--bad) } .warnc { color:var(--warn) }
h2 { font-size:14px; margin:0 0 10px; font-weight:600; display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap }
.head-right { display:flex; align-items:center; gap:10px }
.link-btn { font-size:13px; color:var(--ink2); text-decoration:none; border:1px solid var(--border); border-radius:8px; padding:4px 12px; background:var(--surface) }
select.sel { background:var(--surface); color:var(--ink); border:1px solid var(--border); border-radius:8px; padding:4px 10px; font:inherit; font-size:13px }
.link-btn:hover { color:var(--ink); border-color:var(--ink2) }
/* top bar copied from the BeeIT front page */
.site-nav { display:flex; align-items:center; justify-content:space-between; padding:1.25rem 2.5rem; border-bottom:.5px solid var(--border);
            background:var(--surface); position:sticky; top:0; z-index:100; font-family:'DM Sans',system-ui,sans-serif }
.nav-logo { display:flex; align-items:center; gap:10px; text-decoration:none }
.logo-text { font-size:18px; font-weight:500; color:var(--ink); letter-spacing:-.3px }
.logo-text span { color:#F5A623 }
.nav-lang { display:flex; gap:4px }
.lang-btn { font-family:'DM Mono',ui-monospace,Consolas,monospace; font-size:11px; padding:4px 10px; border:.5px solid var(--border); border-radius:4px;
            cursor:pointer; background:transparent; color:var(--ink2); transition:all .15s }
.lang-btn[aria-pressed="true"] { background:var(--ink); color:var(--surface); border-color:var(--ink) }
.embedded .site-nav { display:none }
@media (max-width:640px){ .site-nav { padding:1rem 1.25rem } }
.tabs { display:inline-flex; border:1px solid var(--border); border-radius:8px; overflow:hidden }
.tabs button { background:none; border:0; color:var(--ink2); padding:4px 12px; cursor:pointer; font:inherit; font-size:13px }
.tabs button+button { border-left:1px solid var(--border) }
.tabs button[aria-pressed="true"] { background:var(--ink); color:var(--surface) }
svg { width:100%; height:auto; display:block; overflow:visible }
svg text { fill:var(--muted); font-size:11px; font-family:inherit }
.legend { display:flex; gap:16px; font-size:12px; color:var(--ink2); margin:0 0 6px; flex-wrap:wrap }
.legend i { display:inline-block; width:10px; height:10px; border-radius:3px; margin-right:6px; vertical-align:-1px }
.legend i.dash { height:0; width:16px; border-top:2px dashed var(--ink2); border-radius:0; vertical-align:3px }
.gauge-wrap { display:flex; flex-direction:column; align-items:center; justify-content:center; height:100% }
.gauge-wrap svg { max-width:230px }
.gauge-wrap .sub { text-align:center }
table { width:100%; border-collapse:collapse; font-variant-numeric:tabular-nums }
th,td { padding:9px 6px; text-align:right; border-bottom:1px solid var(--border); font-size:14px }
th:first-child,td:first-child { text-align:left }
th { color:var(--ink2); font-weight:500; font-size:12px }
tr:last-child td { border-bottom:0 }
.kv { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:6px }
.kv .big { font-size:24px }
.warnbox { border:1px solid var(--warn); border-radius:10px; padding:8px 12px; font-size:13px; color:var(--ink2); margin-bottom:14px }
.tip { position:fixed; z-index:9; pointer-events:none; display:none; background:var(--surface); color:var(--ink); border:1px solid var(--border);
       border-radius:8px; padding:7px 10px; font-size:12px; box-shadow:0 4px 14px rgba(0,0,0,.15); line-height:1.5 }
.tip b { font-weight:600 }
.tip i { display:inline-block; width:8px; height:8px; border-radius:2px; margin-right:6px }
.updated { color:var(--muted); font-size:12px; text-align:center; margin-top:18px }
.divider { border-top:1px solid var(--border); margin-top:22px }
.site-foot { display:flex; align-items:center; justify-content:space-between; gap:8px 16px; flex-wrap:wrap; padding:18px 2px 0;
             font:12px ui-monospace,"DM Mono",SFMono-Regular,Consolas,monospace; color:var(--muted) }
.site-foot a { color:var(--ink2); text-decoration:none; border-bottom:1px solid var(--border) }
.site-foot a:hover { color:var(--ink); border-color:var(--ink2) }
.foot-dot { width:5px; height:5px; background:#F5A623; border-radius:50%; display:inline-block; margin:0 6px; vertical-align:middle }
.embedded .divider, .embedded .site-foot { display:none }
.flow-line { fill:none; stroke-width:3; stroke-linecap:round; stroke:var(--axis) }
.flow-glow { fill:none; stroke:currentColor; stroke-width:3; stroke-linecap:round; opacity:.4 }
.flow-dot { fill:currentColor; filter:drop-shadow(0 0 4px currentColor) }
@media (prefers-reduced-motion:reduce){ .dot{animation:none} .flow-dot{display:none} .flow-glow{opacity:.8} .sky-star,.sky-rain,.sky-snow{animation:none} .sky-rain,.sky-snow{display:none} }

/* sky behind the live flow: --sky is set from the weather in Geta, see applySky() in index.html */
#flowCard { background:linear-gradient(180deg, color-mix(in srgb, var(--sky, var(--surface)) 24%, var(--surface)), var(--surface) 85%) }
.sky-star { fill:#e8c14a; opacity:.85; animation:twinkle 3s ease-in-out infinite }
@keyframes twinkle { 50% { opacity:.15 } }
.sky-rain { fill:none; stroke:var(--house); stroke-width:1.5; stroke-linecap:round; opacity:.35; animation:fall 1s linear infinite }
.sky-snow { fill:#8fb8e0; opacity:.9; animation:fall 5s linear infinite }
@keyframes fall { from { transform:translateY(-15px) } to { transform:translateY(270px) } }

/* next-hours strip */
.card[hidden] { display:none }
.hours { display:flex; gap:4px; overflow-x:auto; padding-bottom:4px }
.hr { flex:1 0 56px; display:flex; flex-direction:column; align-items:center; gap:2px; font-size:12px; color:var(--muted); text-align:center }
.hr-t { font-weight:550; color:var(--ink2) }
.hr:first-child .hr-t { color:var(--ink) }
.hr-temp { color:var(--ink); font-weight:600; font-size:13px }
.hr-bar { height:26px; width:10px; display:flex; align-items:flex-end; margin-top:4px }
.hr-bar i { display:block; width:100%; background:var(--solar); border-radius:3px 3px 0 0 }
.hr-kwh { font-variant-numeric:tabular-nums }

/* sunrise - sunset arc, surplus hint, record badge */
.sun-track { fill:none; stroke:var(--muted); stroke-width:1.5; stroke-dasharray:3 4; opacity:.6 }
.sun-done { fill:none; stroke:#f5b800; stroke-width:2.5; stroke-linecap:round }
.sun-dot { fill:#f5b800; filter:drop-shadow(0 0 4px #f5b800) }
.sun-t { font-size:12px; fill:var(--muted) }
.night .sun-track { opacity:.3 }
.night .sun-t { opacity:.7 }
.hint { margin-top:6px; padding:8px 12px; border-radius:10px; font-size:13px; color:var(--ink);
  background:color-mix(in srgb, var(--solar) 12%, var(--surface)); border:1px solid color-mix(in srgb, var(--solar) 30%, var(--surface)) }
.hint[hidden], .badge[hidden] { display:none }
.badge { display:inline-block; margin-top:6px; padding:2px 10px; border-radius:999px; font-size:12px; font-weight:600; color:var(--ink);
  background:color-mix(in srgb, var(--solar) 18%, var(--surface)) }

.link-btn[hidden] { display:none }

/* kiosk (?kiosk): only the live flow, big, for a wall-mounted tablet or screen. See common.js and the end of index.js. */
.kiosk { cursor:none }
.kiosk .site-nav, .kiosk .head-right a.link-btn:not(#strWarn) { display:none }
.kiosk main { max-width:none; padding:2vh 3vw }
.kiosk main > :not(header):not(.hero) { display:none !important }
.kiosk .hero { grid-template-columns:minmax(0,2.2fr) minmax(0,1fr) }
.kiosk h1 { font-size:clamp(22px, 3.4vw, 40px) }
.kiosk .date { font-size:clamp(14px, 1.8vw, 22px) }
.kiosk .wx { font-size:clamp(16px, 2.2vw, 28px) }
.kiosk .wx svg { width:1.6em; height:1.6em }
@media (max-width:760px){ .kiosk .hero { grid-template-columns:1fr } }
