/* Site power page. Colours come from the theme variables, so it follows light and dark mode. */
.sp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:14px}
.sp-card{padding:18px;display:flex;flex-direction:column;gap:12px;border-left:3px solid var(--line)}
.sp-card.sp-healthy{border-left-color:var(--g)}.sp-card.sp-warning{border-left-color:var(--a)}.sp-card.sp-critical{border-left-color:var(--r)}
.sp-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.sp-head h3{margin:0;font-size:17px;color:var(--txt);letter-spacing:-.01em}.sp-head small{color:var(--muted);font-size:12px}
.sp-main{display:flex;justify-content:space-between;align-items:flex-end;gap:12px}
.sp-volts{font-size:40px;font-weight:700;line-height:1;color:var(--txt);letter-spacing:-.03em;font-variant-numeric:tabular-nums}
.sp-volts span{font-size:16px;color:var(--muted);margin-left:4px;font-weight:600}
.sp-facts{display:grid;grid-template-columns:auto auto;gap:14px;text-align:right}
.sp-facts small{display:block;font-size:10px;letter-spacing:.1em;color:var(--muted);font-weight:700}.sp-facts b{font-size:14px;color:var(--txt);font-variant-numeric:tabular-nums}
.sp-level{height:8px;border-radius:99px;background:var(--surface-3);overflow:hidden}
.sp-level i{display:block;height:100%;border-radius:99px;transition:width .5s ease}
.sp-level .sp-ok{background:var(--g)}.sp-level .sp-warn{background:var(--a)}.sp-level .sp-crit{background:var(--r)}
.sp-spark{height:64px}.sp-spark svg,.sp-chart svg{width:100%;display:block}
.sp-chart{min-height:230px;margin:10px 0 16px}
.sp-line{fill:none;stroke:var(--accent);stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.sp-off{fill:var(--a);opacity:.14}
.sp-l-mains,.sp-l-warn,.sp-l-crit{stroke-width:1;stroke-dasharray:4 4}
.sp-l-mains{stroke:var(--muted)}.sp-l-warn{stroke:var(--a)}.sp-l-crit{stroke:var(--r)}
.sp-ax{fill:var(--muted);font-size:10px}
.sp-empty{display:grid;place-items:center;height:100%;min-height:60px;color:var(--muted);font-size:12px;border:1px dashed var(--line);border-radius:10px}
.sp-alarms{display:flex;flex-wrap:wrap;gap:6px}
.sp-meta{color:var(--muted);font-size:12px;line-height:1.5}
.sp-actions{display:flex;gap:6px;flex-wrap:wrap}.sp-actions .btn{padding:7px 10px;font-size:12px}
.sp-start{padding:24px;grid-column:1/-1}.sp-start h3{margin:0 0 6px;color:var(--txt)}.sp-start p{color:var(--muted);max-width:640px;line-height:1.55}
.sp-hist-head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;flex-wrap:wrap}
.sp-legend{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:6px}
.sp-legend i{display:inline-block;width:14px;height:10px;border-radius:2px;margin-left:8px}
.sp-key-off{background:var(--a);opacity:.3}.sp-key-warn{border-top:2px dashed var(--a);height:0!important}.sp-key-crit{border-top:2px dashed var(--r);height:0!important}
.sp-outages table{width:100%}
.sp-guide h4{margin:16px 0 6px;color:var(--txt)}.sp-guide p{color:var(--muted);line-height:1.6;margin:0 0 8px}.sp-guide code{font-size:12px}
.sp-chart{position:relative}
.sp-dot{fill:var(--accent)}.sp-hover{fill:var(--accent);stroke:var(--surface,#fff);stroke-width:2}
.sp-cross{stroke:var(--muted);stroke-width:1;stroke-dasharray:2 3}
.sp-tip{position:absolute;top:6px;width:150px;padding:6px 9px;border-radius:8px;background:var(--surface-2,var(--surface-3));border:1px solid var(--line);font-size:12px;color:var(--muted);display:flex;flex-direction:column;gap:2px;pointer-events:none;box-shadow:0 4px 14px rgba(0,0,0,.18)}
.sp-tip b{color:var(--txt);font-size:14px;font-variant-numeric:tabular-nums}
.sp-ranges{display:flex;flex-wrap:wrap;gap:6px}.sp-ranges .btn{padding:6px 10px;font-size:12px}
.sp-hist-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px;margin-top:12px}
.sp-hist-stats .quality-stat{padding:10px 12px}.sp-hist-stats strong{font-size:18px}
.sp-live{display:inline-flex;align-items:center;gap:6px;margin-right:6px;color:var(--g);font-weight:600}
.sp-live-dot{width:8px!important;height:8px!important;border-radius:50%;background:var(--g);margin:0!important;animation:sp-pulse 1.6s ease-in-out infinite}
@keyframes sp-pulse{50%{opacity:.35}}
@media(prefers-reduced-motion:reduce){.sp-live-dot{animation:none}}
.sp-problem{font-size:12px;line-height:1.45;color:var(--a);background:color-mix(in srgb,var(--a) 10%,transparent);border-radius:8px;padding:8px 10px}
@media(max-width:520px){.sp-grid{grid-template-columns:1fr}.sp-volts{font-size:34px}.sp-facts{gap:10px}}
