/* Island Power. Same Dia Bonito look as Island Weather: dark green, gold, Archivo. Big numbers, plain words. */
@font-face{font-family:"Archivo";font-style:normal;font-weight:300 600;font-display:swap;src:url("../weather/fonts/archivo-latin.woff2") format("woff2")}
:root{
  --bg:#0a1310;--lift:#0e1915;--ink:#ede7da;--dim:#9aa89f;--accent:#8fb8a8;--gold:#E9C46A;--warn:#e9a46a;--bad:#e8715c;
  --sea:#4aa3b0;--live:#6fcf97;--grey:#6f7d75;--solar:#E9C46A;--house:#e9a46a;--batt:#6fcf97;
  --edge:rgba(237,231,218,.09);--edge2:rgba(237,231,218,.18);
  --card:linear-gradient(165deg,#13231d 0%,#0e1915 62%,#0c1612 100%);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--ink);font:18px/1.4 "Archivo",-apple-system,BlinkMacSystemFont,"Helvetica Neue",system-ui,sans-serif;-webkit-text-size-adjust:100%}
body{background:radial-gradient(1100px 420px at 50% -120px,rgba(233,196,106,.10),transparent 70%),var(--bg);background-color:var(--bg)}
[hidden]{display:none!important}
h1,h2,p{margin:0}
:focus-visible{outline:2px solid var(--gold);outline-offset:3px;border-radius:8px}

header{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:6px 12px;padding:calc(14px + env(safe-area-inset-top)) 18px 8px;max-width:1100px;margin:0 auto}
.brand{display:flex;align-items:center;gap:11px;min-width:0}
.brand img{flex:none;width:40px;height:40px}
.brand h1{font-size:23px;font-weight:600;line-height:1.1}
.upd{flex:1 1 100%;display:flex;align-items:center;gap:8px;color:var(--dim);font-size:15px}
.upd #updated{flex:1;min-width:0}
.refresh{flex:none;font:inherit;font-size:15px;font-weight:600;color:var(--bg);background:var(--gold);border:0;border-radius:999px;min-height:44px;min-width:92px;padding:0 18px;cursor:pointer;-webkit-tap-highlight-color:transparent}
.refresh:active{opacity:.8}
.refresh:disabled{opacity:.55;cursor:default}
.back{flex:none;display:inline-flex;align-items:center;min-height:44px;color:var(--ink);text-decoration:none;font-size:15px;font-weight:600;background:rgba(143,184,168,.12);border:1px solid var(--edge2);border-radius:999px;padding:9px 16px}
i.dot{display:inline-block;flex:none;width:10px;height:10px;border-radius:50%;background:var(--grey)}
i.dot.live{background:var(--live);animation:pulse 2.4s ease-out infinite}
i.dot.bad{background:var(--bad)}
@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(111,207,151,.5)}70%,100%{box-shadow:0 0 0 8px rgba(111,207,151,0)}}

#banners{max-width:1100px;margin:0 auto;padding:0 16px}
.banner{background:#2a1d15;border:1px solid var(--warn);border-radius:16px;padding:12px 16px;margin:6px 0;font-size:16px}
.banner.bad{border-color:var(--bad)}
#grid{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;padding:8px 16px calc(32px + env(safe-area-inset-bottom));max-width:1100px;margin:0 auto}
@media (min-width:760px){#grid{grid-template-columns:repeat(2,minmax(0,1fr))}.status,.flowcard,.wide{grid-column:span 2}}

.card{background:var(--card);border:1px solid var(--edge);border-radius:24px;padding:20px;min-width:0;box-shadow:inset 0 1px 0 rgba(255,255,255,.04),0 18px 34px -24px rgba(0,0,0,.8);transition:opacity .3s}
.card.old{opacity:.55}
.card h2{font-size:16px;font-weight:600;color:var(--dim);margin-bottom:14px;letter-spacing:.01em}
.dim{color:var(--dim)}
.sm{font-size:15px}

/* The sentence at the top */
.status{border-left:8px solid var(--live);padding:20px 20px 20px 18px}
.status.warn{border-left-color:var(--warn)}
.status.bad{border-left-color:var(--bad)}
.status .head{font-size:26px;font-weight:600;line-height:1.2}
.status .det{font-size:18px;color:var(--dim);margin-top:8px}

/* The picture of where the power goes */
.flowcard{padding:10px 8px 6px}
#flow{display:block;width:100%;max-width:520px;height:auto;margin:0 auto}
#flow text{font-family:inherit;fill:var(--ink)}
#flow .lab{font-size:15px;font-weight:600;fill:var(--dim)}
#flow .val{font-size:29px;font-weight:600}
#flow .sub{font-size:14px;fill:var(--dim)}
#flow .node{fill:#0e1915;stroke:var(--edge2);stroke-width:1.5}
#flow .off{opacity:.5}
#flow .wire{fill:none;stroke:var(--edge2);stroke-width:3;stroke-linecap:round}
#flow .live{stroke-dasharray:2 11;animation:flow 1.1s linear infinite}
@keyframes flow{to{stroke-dashoffset:-13}}
@media (prefers-reduced-motion:reduce){#flow .live{animation:none;stroke-dasharray:none}}

/* Daily energy */
.tiles{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.tile{background:rgba(0,0,0,.22);border:1px solid var(--edge);border-radius:18px;padding:14px 14px 0;overflow:hidden}
.tile .t{font-size:15px;color:var(--dim);line-height:1.25;min-height:2.5em}
.tile .n{font-size:38px;font-weight:600;line-height:1.1;margin:6px 0 10px;letter-spacing:-.01em}
.tile .n small{font-size:16px;font-weight:500;color:var(--dim);margin-left:4px}
.tile .bar{height:6px;margin:0 -14px}
.extra{margin-top:12px;color:var(--dim);font-size:16px}

/* Forecast */
.vs,.tomorrow{display:grid;gap:12px}
.vs{grid-template-columns:1fr 1fr}
.vs>div,.tomorrow{background:rgba(0,0,0,.22);border:1px solid var(--edge);border-radius:18px;padding:14px}
.tomorrow{margin-top:14px}
.vs .t,.tomorrow .t{font-size:15px;color:var(--dim)}
.vs .n,.tomorrow .n{font-size:34px;font-weight:600;line-height:1.1;margin:6px 0 4px}
.vs .n small,.tomorrow .n small{font-size:16px;font-weight:500;color:var(--dim);margin-left:4px}
.vs .r,.tomorrow .r{font-size:15px;color:var(--dim)}
#c-forecast h3{font-size:16px;font-weight:600;margin:14px 0 8px;color:var(--dim)}
#c-forecast h3:first-child{margin-top:0}
.past{display:grid;gap:2px;font-size:16px}
.pr{display:grid;grid-template-columns:.7fr .9fr 1.7fr .7fr;gap:6px;padding:6px 2px;border-bottom:1px solid var(--edge)}
.pr.ph{color:var(--dim);font-size:14px}
.fbatt{margin-top:12px;font-size:17px}

/* Graph */
.legend{display:flex;flex-wrap:wrap;gap:6px 16px;font-size:15px;color:var(--dim);margin-bottom:6px}
.legend i{display:inline-block;width:14px;height:6px;border-radius:3px;margin-right:6px;vertical-align:middle}
.chart{display:block;width:100%;height:auto}
.chart text{font-family:inherit;fill:var(--dim);font-size:12px}
.chart .grid{stroke:rgba(237,231,218,.08);stroke-width:1}
.chart .ref{stroke:var(--bad);stroke-width:1;stroke-dasharray:4 4;opacity:.7}
.gl{margin:10px 0 2px;font-size:15px;color:var(--dim)}

/* Health */
.rows>div{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 0;border-top:1px solid var(--edge);font-size:18px}
.rows>div:first-child{border-top:0;padding-top:0}
.pill{flex:none;font-size:14px;font-weight:600;padding:5px 12px;border-radius:999px;background:rgba(111,207,151,.14);color:var(--live)}
.pill.warm{background:rgba(233,164,106,.16);color:var(--warn)}
.pill.hot{background:rgba(232,113,92,.18);color:var(--bad)}
.pill.unknown{background:rgba(154,168,159,.14);color:var(--dim)}
.rows .v{display:flex;align-items:center;gap:10px;font-weight:600}
.state{margin-top:12px;font-size:17px}
.state.bad{color:#e8715c}

/* Locked */
#locked{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px}
.lock-card{width:100%;max-width:420px;background:var(--card);border:1px solid var(--edge);border-radius:24px;padding:26px}
.lock-card h1{font-size:26px;margin-bottom:12px}
.lock-card input{width:100%;font:inherit;font-size:18px;padding:14px;margin-top:16px;border-radius:14px;border:1px solid var(--edge2);background:var(--bg);color:var(--ink)}
.lock-card button{width:100%;margin-top:12px;font:inherit;font-weight:600;font-size:18px;padding:14px;border:0;border-radius:14px;background:var(--gold);color:#14302b;cursor:pointer;min-height:52px}
.lock-msg{margin-top:12px;color:var(--warn);min-height:1.4em}
