/* Energy is an editorial companion to the homepage and writing index. */
.writing-page-energy { background: #080a10; }
.writing-page-energy :is(#stars, .grid, .aurora, .noise, .vignette) { display: none; }
.energy-page { position: relative; z-index: 1; color: var(--text); }
.energy-page :is(h1,h2,p,figure) { margin: 0; }
.energy-page a { text-decoration: none; }
.energy-page h1, .energy-page h2 { font-family: var(--body); font-weight: 800; letter-spacing: -.065em; line-height: .96; }
.energy-page h2 span, .energy-page h1 span { color: var(--amber); }
.energy-page h2 { margin-top: 25px; font-size: clamp(2.8rem,4.8vw,5rem); }
.energy-hero, .energy-story, .energy-live, .energy-today, .energy-impact, .energy-note { padding: var(--site-section-space) var(--site-gutter); border-bottom: 1px solid var(--line-strong); }
.energy-hero { padding-top: 40px; padding-bottom: 26px; background: radial-gradient(ellipse at 85% 28%,rgba(167,139,250,.09),transparent 38%), radial-gradient(ellipse at 8% 85%,rgba(20,184,166,.055),transparent 35%), linear-gradient(90deg,rgba(167,139,250,.035) 1px,transparent 1px), #080a10; background-size: auto,auto,8% 100%,auto; }
.energy-overline, .energy-hero-foot, .card-top { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font: .58rem/1.6 var(--mono); letter-spacing: .08em; }
.energy-overline span:first-child { color: var(--amber); }
.energy-hero-grid { display: grid; grid-template-columns: 1.4fr .42fr; align-items: end; gap: 8%; margin: 65px 0 60px; }
.energy-label { color: var(--amber); font: 700 .65rem/1.5 var(--mono); letter-spacing: .13em; }
.energy-hero h1 { margin: 28px 0; font-size: clamp(3.6rem,6vw,6.2rem); }
.energy-hero h1 em { display: inline-block; color: #e0d7fa; font-style: normal; letter-spacing: .035em; filter: url(#clean-text-outline); }
.energy-intro { max-width: 47ch; color: var(--text-soft); font-size: 1rem; line-height: 1.7; }
.energy-link { display: inline-block; margin-top: 35px; padding-bottom: 10px; border-bottom: 1px solid rgba(71,240,210,.65); color: var(--teal); font: 700 .62rem var(--mono); letter-spacing: .08em; }
.energy-link:hover { color: var(--text); }
.energy-illustration { width: min(100%,300px); justify-self: end; }
.energy-illustration svg { display: block; width: 100%; height: auto; }
.energy-illustration figcaption { display: flex; justify-content: space-between; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line-strong); color: var(--muted); font: .52rem var(--mono); letter-spacing: .08em; }
.energy-illustration figcaption span:nth-child(even) { color: var(--amber); }
.energy-hero-foot { padding-top: 18px; border-top: 1px solid var(--line-strong); }
.energy-story { display: grid; grid-template-columns: 1fr .65fr; gap: 8%; align-items: start; background: #10101a; }
.story-copy, .impact-copy > p:not(.energy-label) { max-width: 58ch; color: var(--text-soft); font: 1rem/1.75 var(--body); }
.story-copy p + p { margin-top: 20px; }
.energy-live { background: radial-gradient(ellipse at 85% 35%,rgba(167,139,250,.06),transparent 42%), #0b0e16; }
.energy-section-head { display: flex; justify-content: space-between; align-items: end; gap: 25px; }
.live-status { display: flex; align-items: center; gap: 9px; color: var(--muted); font: .62rem/1.5 var(--mono); }
.live-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.live-status.is-live i { background: var(--teal); }
.energy-lede { max-width: 60ch; margin: 24px 0 35px !important; color: var(--text-soft); line-height: 1.7; }
.energy-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.energy-card { display: flex; flex-direction: column; min-width: 0; min-height: 230px; padding: clamp(20px,2vw,28px); border: 1px solid var(--line-strong); background: #10131d; }
.energy-card.featured { border-color: rgba(167,139,250,.2); background: radial-gradient(ellipse at 90% 0,rgba(167,139,250,.14),transparent 55%), linear-gradient(140deg,#151322,#0b0e17); }
.card-top { font-size: .56rem; }
.card-top span:first-child { color: var(--amber); }
.card-value { display: flex; align-items: baseline; gap: 8px; margin: auto 0 15px; padding-top: 45px; }
.card-value strong, .impact-stats strong { font: 800 clamp(2.7rem,4vw,4rem)/1 var(--body); letter-spacing: -.06em; }
.card-value small, .impact-stats small { color: var(--teal); font: .75rem var(--mono); }
.energy-card p, .today-grid p, .impact-stats p { color: var(--text-soft); font-size: .87rem; line-height: 1.65; }
.energy-update { margin-top: 18px !important; color: var(--muted); font: .6rem/1.6 var(--mono); }
.energy-today { background: #0b0d15; }
.energy-aside { color: var(--muted); text-align: right; font: .6rem/1.8 var(--mono); }
.today-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin-top: 45px; border-top: 1px solid var(--line-strong); }
.today-grid article { padding: 28px 24px 0 0; }
.today-grid article + article { padding-left: 24px; border-left: 1px solid var(--line-strong); }
.today-grid span, .impact-stats span { color: var(--amber); font: .58rem var(--mono); letter-spacing: .08em; }
.today-grid strong { display: block; margin: 22px 0 12px; font: 800 2.5rem/1 var(--body); letter-spacing: -.06em; }
.today-grid small { color: var(--teal); font: .75rem var(--mono); letter-spacing: 0; }
.energy-impact { display: grid; grid-template-columns: 1fr .65fr; gap: 8%; align-items: start; background: radial-gradient(ellipse at 85% 35%,rgba(167,139,250,.06),transparent 42%), #0b0e16; }
.impact-copy > p:not(.energy-label) { margin-top: 24px; }
.impact-stats { border-top: 1px solid var(--line-strong); }
.impact-stats article { padding: 25px 0; border-bottom: 1px solid var(--line-strong); }
.impact-stats strong { display: block; margin: 20px 0 10px; color: var(--text); }
.energy-note { background: radial-gradient(ellipse at 82% 70%,rgba(167,139,250,.12),transparent 40%),linear-gradient(90deg,rgba(167,139,250,.045) 1px,transparent 1px),#080a10; background-size: auto,8% 100%,auto; }
.energy-note > p:not(.energy-label) { max-width: 58ch; margin-top: 25px; color: var(--text-soft); line-height: 1.7; }
@media (max-width: 900px) { .energy-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .energy-hero-grid { grid-template-columns: 1fr .55fr; } }
@media (max-width: 700px) {
  .energy-hero, .energy-story, .energy-live, .energy-today, .energy-impact, .energy-note { padding: 50px 22px; }
  .energy-hero { padding-top: 30px; padding-bottom: 25px; }
  .energy-overline span:last-child, .energy-hero-foot span:last-child { display: none; }
  .energy-hero-grid { grid-template-columns: 1fr; gap: 35px; margin: 45px 0 35px; }
  .energy-hero h1 { font-size: clamp(2.75rem,9vw,4rem); }
  .energy-illustration { width: min(65%,230px); justify-self: end; }
  .energy-story, .energy-impact { grid-template-columns: 1fr; gap: 28px; }
  .energy-section-head { align-items: start; flex-direction: column; }
  .energy-aside { text-align: left; }
  .today-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .today-grid article { padding: 24px 12px 24px 0; }
  .today-grid article + article { padding-left: 16px; }
  .today-grid article:nth-child(3) { border-left: 0; border-top: 1px solid var(--line-strong); padding-left: 0; }
  .today-grid article:nth-child(4) { border-top: 1px solid var(--line-strong); }
}
@media (max-width: 400px) { .energy-grid { grid-template-columns: 1fr; } .energy-card { min-height: 190px; } }

/* A schematic and a measured-history view, using the site's restrained interface language. */
.energy-flow { padding: 25px 30px 22px; margin-bottom: 16px; border: 1px solid rgba(167,139,250,.18); background: radial-gradient(ellipse at 50% 20%,rgba(167,139,250,.09),transparent 55%),#10131d; }
.flow-caption { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font: .58rem var(--mono); letter-spacing: .08em; }
.flow-caption span:first-child { color: var(--amber); }
.flow-map { display: grid; grid-template-columns: minmax(100px,1fr) minmax(25px,.6fr) minmax(100px,1fr) minmax(25px,.6fr) minmax(100px,1fr); align-items: center; max-width: 820px; margin: 38px auto 24px; }
.flow-node { display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center; color: var(--muted); font: .57rem var(--mono); letter-spacing: .08em; }
.flow-icon { display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid rgba(167,139,250,.3); background: #111623; color: var(--violet); font: 1.7rem var(--body); }
.flow-home .flow-icon { border-color: rgba(71,240,210,.45); color: var(--teal); background: rgba(71,240,210,.05); }
.flow-node strong, .flow-battery strong { color: var(--text); font: 700 1.35rem var(--body); letter-spacing: -.04em; }
.flow-node small, .flow-battery small { color: var(--muted); font: .6rem var(--mono); letter-spacing: 0; }
.flow-path { height: 1px; background: linear-gradient(90deg,rgba(167,139,250,.15),rgba(167,139,250,.65),rgba(71,240,210,.25)); }
.flow-battery { grid-column: 3; display: flex; align-items: center; flex-direction: column; gap: 8px; margin-top: 22px; padding-top: 22px; border-top: 1px solid rgba(71,240,210,.3); color: var(--muted); font: .55rem var(--mono); letter-spacing: .05em; }
.battery-mark { display: flex; gap: 3px; padding: 3px; border: 1px solid rgba(167,139,250,.3); }
.battery-mark i { display: block; width: 9px; height: 6px; background: rgba(167,139,250,.2); }
.energy-flow > p { color: var(--muted); font: .6rem/1.7 var(--mono); }
.energy-history { padding: var(--site-section-space) var(--site-gutter); border-bottom: 1px solid var(--line-strong); background: #10101a; }
.history-intro { max-width: 39ch; color: var(--text-soft); font: 1rem/1.7 var(--body); }
.history-panel { margin-top: 45px; padding: clamp(22px,3vw,38px); border: 1px solid var(--line-strong); background: radial-gradient(ellipse at 90% 0,rgba(167,139,250,.10),transparent 48%),#0d1019; }
.history-toolbar { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.history-kicker, .history-legend, .history-axis, .history-note, .history-explainer > span { color: var(--muted); font: .58rem/1.6 var(--mono); letter-spacing: .07em; }
.history-kicker { color: var(--amber); }
.history-toolbar h3 { margin: 13px 0 0; font: 700 clamp(1.4rem,2vw,2rem)/1.1 var(--body); letter-spacing: -.05em; }
.history-toolbar h3 span { color: var(--amber); }
.history-controls { display: flex; border: 1px solid var(--line-strong); }
.history-controls button { padding: 11px 14px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font: .58rem var(--mono); }
.history-controls button[aria-pressed="true"] { background: rgba(167,139,250,.16); color: var(--text); }
.history-legend { display: flex; flex-wrap: wrap; gap: 18px; margin: 32px 0 15px; }
.history-legend span { display: flex; align-items: center; gap: 7px; }
.history-legend i { width: 7px; height: 7px; background: var(--violet); }
.history-legend span:nth-child(2) i { background: var(--amber); }.history-legend span:nth-child(3) i { background: var(--teal); }
.history-chart-wrap { overflow-x: auto; }
.history-chart { position: relative; display: flex; align-items: end; gap: 4px; min-height: 260px; padding-top: 30px; border-bottom: 1px solid var(--line-strong); background: repeating-linear-gradient(to bottom,transparent 0,transparent calc(25% - 1px),rgba(200,210,227,.09) calc(25% - 1px),rgba(200,210,227,.09) 25%); }
.history-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; text-align: center; background: rgba(13,16,25,.65); }
.history-empty span { color: var(--violet); font-size: 1.5rem; }.history-empty strong { margin-top: 8px; font: 700 1rem var(--body); }.history-empty p { max-width: 38ch; margin-top: 8px; color: var(--muted); font: .8rem/1.6 var(--body); }
.history-day { display: flex; align-items: end; justify-content: center; gap: 2px; flex: 1; min-width: 0; height: 230px; }
.history-bar { width: min(12px,28%); min-height: 2px; background: var(--violet); }.history-bar.solar { background: var(--amber); }.history-bar.grid-import { background: var(--teal); }
.history-axis { display: flex; justify-content: space-between; gap: 10px; margin-top: 13px; }.history-note { margin-top: 20px !important; text-transform: none; letter-spacing: 0; }
.history-explainer { display: grid; grid-template-columns: 1fr 1fr; gap: 8%; padding-top: 28px; }.history-explainer > span { color: var(--amber); }.history-explainer p { max-width: 55ch; color: var(--text-soft); font: .9rem/1.7 var(--body); }
@media(max-width:700px) { .energy-flow,.history-panel { padding: 22px 18px; }.flow-map { grid-template-columns: minmax(65px,1fr) minmax(10px,.3fr) minmax(65px,1fr) minmax(10px,.3fr) minmax(65px,1fr); }.flow-node strong { font-size: 1.1rem; }.flow-icon { width: 42px; height: 42px; }.energy-history { padding: 50px 22px; }.history-toolbar { flex-direction: column; }.history-explainer { grid-template-columns: 1fr; gap: 12px; } }
.energy-car { display: grid; grid-template-columns: 1fr .8fr; align-items: start; gap: 8%; padding: var(--site-section-space) var(--site-gutter); border-bottom: 1px solid var(--line-strong); background: radial-gradient(ellipse at 85% 30%,rgba(167,139,250,.08),transparent 42%),#0b0e16; }
.car-copy > p:not(.energy-label) { max-width: 49ch; margin-top: 22px; color: var(--text-soft); font: 1rem/1.7 var(--body); }
.car-panel { padding: clamp(24px,3vw,38px); border: 1px solid rgba(167,139,250,.2); background: linear-gradient(140deg,#151322,#0b0e17); }
.car-panel-top, .car-panel-foot, .car-shares span { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font: .58rem/1.6 var(--mono); letter-spacing: .08em; }
.car-panel-top span:first-child { color: var(--amber); }
.car-shares { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 42px 0 28px; }
.car-shares strong { display: block; margin-top: 14px; font: 800 clamp(2.5rem,4vw,4rem)/1 var(--body); letter-spacing: -.06em; }
.car-shares div:last-child strong { color: var(--teal); }
.car-shares small { color: var(--muted); font: .75rem var(--mono); letter-spacing: 0; }
.car-split { display: flex; height: 8px; background: rgba(200,210,227,.12); }
.car-split i:first-child { width: 0; background: var(--violet); }.car-split i:last-child { width: 0; background: var(--teal); }
.car-panel-foot { align-items: baseline; margin-top: 25px; }.car-panel-foot strong { color: var(--text); font: 700 1.2rem var(--body); }.car-panel-foot small { color: var(--muted); font: .65rem var(--mono); }
.car-panel > p { margin-top: 20px; color: var(--muted); font: .65rem/1.7 var(--mono); }
.history-legend span:nth-child(2) i, .history-bar.car { background: #ff88a7; }.history-legend span:nth-child(3) i { background: var(--amber); }.history-legend span:nth-child(4) i { background: var(--teal); }
@media(max-width:700px) { .energy-car { grid-template-columns: 1fr; gap: 30px; padding: 50px 22px; } }
.grid-carbon { grid-column: 1 / -1; display: grid; grid-template-columns: 1.3fr .7fr .7fr; gap: 8%; padding-top: 30px; margin-top: 20px; border-top: 1px solid var(--line-strong); }
.grid-carbon span { color: var(--amber); font: .58rem/1.6 var(--mono); letter-spacing: .08em; }
.grid-carbon p { max-width: 48ch; margin-top: 14px; color: var(--text-soft); font: .87rem/1.7 var(--body); }
.grid-carbon strong { display: block; margin-top: 18px; font: 800 clamp(1.8rem,3vw,2.6rem)/1 var(--body); letter-spacing: -.05em; }
.grid-carbon small { color: var(--teal); font: .68rem var(--mono); letter-spacing: 0; }
@media(max-width:700px) { .grid-carbon { grid-template-columns: 1fr 1fr; gap: 24px; }.grid-carbon > div:first-child { grid-column: 1 / -1; } }
/* Personal copy follows the same reading width and rhythm as the writing pages. */
.energy-intro h2 { margin: 0 0 18px; font: 700 clamp(1.3rem,2vw,1.8rem)/1.2 var(--body); letter-spacing: -.04em; }
.energy-intro p + p, .energy-lede p + p, .today-intro p + p, .history-intro p + p { margin-top: 16px; }
.today-intro { max-width: 60ch; margin-top: 28px; color: var(--text-soft); font: 1rem/1.7 var(--body); }
.history-intro { max-width: 48ch; }
.energy-homelab { display: grid; grid-template-columns: 1fr .8fr; align-items: start; gap: 8%; padding: var(--site-section-space) var(--site-gutter); border-bottom: 1px solid var(--line-strong); background: #10101a; }
.energy-homelab > div:first-child > p:not(.energy-label) { max-width: 46ch; margin-top: 22px; color: var(--text-soft); font: 1rem/1.7 var(--body); }
.homelab-panel { padding: clamp(24px,3vw,38px); border: 1px solid var(--line-strong); background: radial-gradient(ellipse at 90% 0,rgba(167,139,250,.12),transparent 55%),#10131d; }
.homelab-top { display: flex; justify-content: space-between; gap: 15px; color: var(--muted); font: .58rem/1.6 var(--mono); letter-spacing: .08em; }
.homelab-top span:first-child { color: var(--amber); }
.homelab-readings { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 42px 0 28px; }
.homelab-readings span { color: var(--muted); font: .58rem/1.6 var(--mono); letter-spacing: .08em; }
.homelab-readings strong { display: block; margin-top: 14px; font: 800 clamp(2.5rem,4vw,4rem)/1 var(--body); }
.homelab-readings small { color: var(--teal); font: .75rem var(--mono); }
.homelab-panel > p { padding-top: 20px; border-top: 1px solid var(--line-strong); color: var(--text-soft); font: .87rem/1.7 var(--body); }
@media(max-width:700px) { .energy-homelab { grid-template-columns: 1fr; gap: 30px; padding: 50px 22px; } }
/* Live system: directional signals indicate each measured connection, not energy provenance. */
.flow-stage { position: relative; width: 100%; max-width: 860px; aspect-ratio: 1000 / 520; margin: 28px auto 24px; }
.flow-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.flow-track, .flow-current { fill: none; stroke: rgba(167,139,250,.2); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.flow-track-car { stroke-dasharray: 3 5; }
.flow-current { opacity: 0; stroke: var(--teal); stroke-width: 2.5; stroke-dasharray: 5 12; }
.flow-current.is-active { opacity: .8; animation: flow-in 1.8s linear infinite; }
.flow-current.is-reverse { animation-direction: reverse; }
@keyframes flow-in { to { stroke-dashoffset: -17; } }
.flow-item { position: absolute; transform: translate(-50%,-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; width: 150px; padding: 12px 8px; text-align: center; color: var(--muted); background: #10131d; font: .58rem/1.2 var(--mono); letter-spacing: .07em; }
.flow-item-solar { left: 15%; top: 22%; }.flow-item-grid { left: 85%; top: 22%; }.flow-item-home { left: 50%; top: 50%; }.flow-item-battery { left: 15%; top: 78%; }.flow-item-car { left: 85%; top: 78%; }
.flow-symbol { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 2px; border: 1px solid rgba(167,139,250,.35); color: var(--violet); font: 1.65rem var(--body); }
.flow-item-home .flow-symbol { border-color: rgba(71,240,210,.5); color: var(--teal); background: rgba(71,240,210,.05); }
.flow-item strong { color: var(--text); font: 700 1.35rem/1 var(--body); letter-spacing: -.04em; }
.flow-item strong small, .flow-detail { color: var(--muted); font: .57rem/1.4 var(--mono); letter-spacing: 0; }
.flow-detail b { font-weight: 400; }
@media(max-width:700px) { .flow-stage { aspect-ratio: 1; margin: 20px auto; }.flow-item { width: 105px; padding: 8px 3px; gap: 5px; font-size: .52rem; }.flow-symbol { width: 38px; height: 38px; font-size: 1.4rem; }.flow-item strong { font-size: 1.05rem; }.flow-item strong small,.flow-detail { font-size: .5rem; } }
@media(max-width:400px) { .flow-item { width: 86px; }.flow-item strong { font-size: 1rem; }.flow-symbol { width: 34px; height: 34px; } }
@media(prefers-reduced-motion:reduce) { .flow-current.is-active { animation: none; stroke-dasharray: none; } }
.flow-symbol svg { width: 24px; height: 24px; }
@media(max-width:700px) { .flow-symbol svg { width: 20px; height: 20px; } }
.ev-history { margin: 0 var(--site-gutter) var(--site-section-space); padding: clamp(24px,3vw,38px); border: 1px solid var(--line-strong); background: radial-gradient(ellipse at 90% 0,rgba(167,139,250,.1),transparent 48%),#0d1019; }
.ev-history > p:not(.history-note) { max-width: 60ch; margin: 20px 0; color: var(--text-soft); font: .9rem/1.7 var(--body); }
.ev-chart-unit { color: var(--muted); font: .58rem/1.6 var(--mono); letter-spacing: .08em; }
.ev-chart { position: relative; min-height: 220px; border-bottom: 1px solid var(--line-strong); background: repeating-linear-gradient(to bottom,transparent 0,transparent calc(25% - 1px),rgba(200,210,227,.09) calc(25% - 1px),rgba(200,210,227,.09) 25%); }
.ev-chart svg { display: block; width: 100%; height: 220px; overflow: visible; }
.ev-chart-line { fill: none; stroke: var(--teal); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.ev-chart-point { fill: var(--teal); }
@media(max-width:700px) { .ev-history { margin: 0 22px 50px; padding: 24px 18px; } }
/* A single space for exploring household totals and car sessions. */
.history-panel { padding: clamp(24px,3vw,42px); background: radial-gradient(ellipse at 85% 0,rgba(167,139,250,.12),transparent 48%),linear-gradient(145deg,#11131f,#0b0e16); }
.history-subtitle { margin-top: 12px !important; color: var(--text-soft); font: .9rem/1.6 var(--body); }
.history-navigation { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-top: 38px; border-bottom: 1px solid var(--line-strong); }
.history-modes { display: flex; flex-wrap: wrap; gap: 25px; }
.history-modes button { padding: 0 0 14px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; cursor: pointer; font: 700 .62rem var(--mono); letter-spacing: .05em; }
.history-modes button[aria-pressed="true"] { border-color: var(--teal); color: var(--text); }
.history-unit { padding-bottom: 14px; color: var(--muted); font: .58rem var(--mono); white-space: nowrap; }
.history-context { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 22px 0; }
.history-context .history-legend { margin: 0; }
.history-context > span { color: var(--text-soft); font: .6rem var(--mono); white-space: nowrap; }
.history-legend .session-legend i { background: var(--teal); }
.history-chart { min-height: 300px; padding-top: 0; background: repeating-linear-gradient(to bottom,transparent 0,transparent calc(25% - 1px),rgba(200,210,227,.07) calc(25% - 1px),rgba(200,210,227,.07) 25%); }
.history-day { height: 300px; gap: 3px; cursor: crosshair; transition: background .2s; }
.history-day:hover,.history-day:focus-visible { background: rgba(167,139,250,.07); }
.history-bar { max-width: 13px; border-radius: 2px 2px 0 0; box-shadow: 0 0 20px rgba(71,240,210,.08); }
.history-session-svg { display: block; width: 100%; height: 300px; overflow: visible; }
.history-session-svg .ev-chart-line { stroke: var(--teal); stroke-width: 2; fill: none; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.history-session-svg .ev-chart-point { fill: var(--teal); cursor: crosshair; }
.history-detail { min-height: 45px; margin-top: 20px; padding: 13px 16px; border-left: 2px solid var(--violet); color: var(--text-soft); background: rgba(167,139,250,.06); font: .68rem/1.6 var(--mono); }
@media(max-width:700px) { .history-navigation { margin-top: 30px; }.history-context { align-items: start; flex-direction: column; gap: 12px; }.history-chart,.history-day,.history-session-svg { min-height: 220px; height: 220px; }.history-modes { gap: 16px; }.history-modes button { font-size: .57rem; }.history-detail { font-size: .6rem; } }
.history-readings { margin-top: 20px; color: var(--text-soft); font: .65rem/1.7 var(--mono); }
.history-readings summary { cursor: pointer; color: var(--teal); }
.history-readings > div { max-height: 240px; overflow: auto; margin-top: 12px; border-top: 1px solid var(--line-strong); }
.history-readings > div > div { display: flex; justify-content: space-between; gap: 20px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.history-readings strong { color: var(--text); }
/* Measurement surfaces */
.today-grid { gap: 1px; padding: 1px; margin-top: 42px; border: 0; background: var(--line-strong); }
.today-grid article,.today-grid article + article { position: relative; min-width: 0; min-height: 215px; padding: 24px; border: 0; background: #10131c; }
.today-grid article:nth-child(2) { background: radial-gradient(ellipse at 90% 0,rgba(255,189,89,.08),transparent 65%),#10131c; }
.today-grid article:nth-child(3) { background: radial-gradient(ellipse at 90% 0,rgba(71,240,210,.08),transparent 65%),#10131c; }
.today-label { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.today-label span:last-child { color: var(--muted); font-size: .52rem; }
.today-grid strong { margin: 40px 0 14px; font-size: clamp(2.4rem,3vw,3.2rem); }
.today-grid strong b { font-weight: 800; }
.today-grid small { margin-left: 4px; }
.today-grid p { max-width: 28ch; color: var(--muted); }
.car-panel,.homelab-panel { box-shadow: inset 0 1px rgba(255,255,255,.03); }
.car-shares > div+div,.homelab-readings > div+div { padding-left: 24px; border-left: 1px solid var(--line-strong); }
.car-split { height: 6px; }
.car-panel-foot { padding-top: 18px; border-top: 1px solid var(--line); }
.impact-stats article { padding: 24px; border: 1px solid var(--line-strong); background: rgba(16,19,29,.85); }
.impact-stats article + article { border-top: 0; }
.impact-stats { border: 0; }
.grid-carbon { align-items: start; }
.grid-carbon > div:nth-child(n+2) { padding-left: 20px; border-left: 1px solid var(--line-strong); }
/* Charts */
.history-panel { border-color: rgba(167,139,250,.22); }
.history-controls { background: rgba(6,7,11,.45); }
.history-controls button { min-width: 68px; transition: color .2s,background .2s; }
.history-controls button:hover,.history-modes button:hover { color: var(--teal); }
.history-legend { gap: 18px 22px; }
.history-legend i { width: 8px; height: 8px; border-radius: 50%; }
.history-plot { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 14px; }
.history-y-axis { display: flex; flex-direction: column; justify-content: space-between; height: 300px; color: var(--muted); font: .6rem/1 var(--mono); text-align: right; }
.history-chart { border-bottom-color: rgba(200,210,227,.2); }
.history-day { gap: 3px; }
.history-bar { width: min(18px,22%); max-width: 18px; border-radius: 3px 3px 0 0; background: linear-gradient(0deg,rgba(167,139,250,.45),#a78bfa); }
.history-bar.car { background: linear-gradient(0deg,rgba(255,136,167,.4),#ff88a7); }
.history-bar.solar { background: linear-gradient(0deg,rgba(255,189,89,.4),#ffbd59); }
.history-bar.grid-import { background: linear-gradient(0deg,rgba(71,240,210,.38),#47f0d2); }
.history-axis { margin-left: 58px; }
.history-detail { border-left-color: var(--teal); }
.history-session-svg .ev-chart-line { filter: drop-shadow(0 0 5px rgba(71,240,210,.25)); }
@media(max-width:700px) {
  .today-grid article,.today-grid article + article { min-height: 180px; padding: 20px 16px; border: 0; }
  .today-grid strong { margin: 32px 0 12px; font-size: 2.3rem; }
  .car-shares > div+div,.homelab-readings > div+div { padding-left: 15px; }
  .grid-carbon > div:nth-child(n+2) { padding-left: 12px; }
  .history-plot { grid-template-columns: 32px minmax(0,1fr); gap: 8px; }
  .history-y-axis { height: 220px; font-size: .53rem; }
  .history-axis { margin-left: 40px; }
  .history-bar { width: min(12px,22%); }
}
/* A softer, instrument-like energy diagram. */
.energy-flow { background: radial-gradient(ellipse at 50% 48%,rgba(167,139,250,.1),transparent 53%),linear-gradient(135deg,#10131d,#0c1019); }
.flow-stage::before { content: ''; position: absolute; width: 23%; aspect-ratio: 1; left: 50%; top: 50%; transform: translate(-50%,-50%); border: 1px solid rgba(167,139,250,.12); border-radius: 50%; pointer-events: none; }
.flow-item { background: radial-gradient(ellipse at center,#10131d 42%,rgba(16,19,29,.96) 58%,transparent 76%); }
.flow-symbol { border-radius: 50%; border-color: rgba(167,139,250,.32); background: radial-gradient(circle at 30% 25%,rgba(167,139,250,.15),rgba(16,19,29,.95)); box-shadow: 0 0 0 5px rgba(167,139,250,.035); }
.flow-item-home .flow-symbol { box-shadow: 0 0 0 7px rgba(71,240,210,.04),0 0 28px rgba(71,240,210,.1); }
.flow-track { stroke: rgba(167,139,250,.3); }
.flow-current { stroke-width: 3; filter: drop-shadow(0 0 4px rgba(71,240,210,.5)); }
.history-section-label { padding-bottom: 14px; color: var(--text-soft); font: 700 .62rem var(--mono); letter-spacing: .05em; }
.history-legend span:nth-child(2) i { background: #ff587c; }
.history-bar.car { background: linear-gradient(0deg,rgba(255,88,124,.4),#ff587c); }
/* Flow rings: the readings are the focus; the lines carry the movement. */
.energy-flow { background: radial-gradient(ellipse at 50% 48%,rgba(167,139,250,.09),transparent 54%),linear-gradient(135deg,#10131d,#0b0f18); }
.flow-stage { max-width: 880px; aspect-ratio: 1000 / 600; margin: 32px auto 28px; }
.flow-stage::before { display: none; }
.flow-orbit { fill: none; stroke: rgba(167,139,250,.14); stroke-width: 1; stroke-dasharray: 2 10; vector-effect: non-scaling-stroke; }
.flow-orbit.inner { stroke: rgba(71,240,210,.09); stroke-dasharray: none; }
.flow-track { stroke: rgba(167,139,250,.28); }
.flow-track.solar-track { stroke: rgba(255,189,89,.28); }
.flow-current.solar-current { stroke: var(--amber); filter: drop-shadow(0 0 4px rgba(255,189,89,.5)); }
.flow-item { width: 145px; padding: 12px 8px; gap: 7px; background: radial-gradient(ellipse,#10131d 40%,rgba(16,19,29,.96) 60%,transparent 77%); }
.flow-item-solar { left: 50%; top: 10%; }.flow-item-grid { left: 50%; top: 90%; }.flow-item-home { left: 50%; top: 50%; }.flow-item-battery { left: 15%; top: 50%; }.flow-item-car { left: 85%; top: 50%; }
.flow-index { color: var(--muted); font: 700 .58rem/1.4 var(--mono); letter-spacing: .1em; }
.flow-item strong { color: var(--text); font: 800 clamp(1.7rem,2.6vw,2.5rem)/1 var(--body); letter-spacing: -.06em; }
.flow-item strong small { margin-left: 2px; color: var(--teal); font: .65rem var(--mono); letter-spacing: 0; }
.flow-item-home { width: 170px; padding: 20px 10px; background: radial-gradient(ellipse,rgba(19,37,39,.98),#10131d 70%,transparent 85%); }
.flow-item-home .flow-index { color: var(--teal); }
.flow-item-home strong { font-size: clamp(2rem,3.3vw,3rem); }
@media(max-width:700px) {
  .flow-stage { height: 420px; aspect-ratio: auto; margin: 24px auto; }
  .flow-item { width: 90px; padding: 8px 2px; gap: 5px; }
  .flow-item-home { width: 105px; padding: 14px 4px; }
  .flow-item strong { font-size: 1.3rem; }.flow-item-home strong { font-size: 1.65rem; }
  .flow-index { font-size: .5rem; }.flow-item strong small,.flow-detail { font-size: .5rem; }
}
@media(max-width:360px) { .flow-item { width: 80px; }.flow-item-home { width: 92px; } }
/* Power-flow diagram: readings and connections, without icon badges. */
.flow-stage { max-width: 1000px; aspect-ratio: 1000 / 520; margin: 28px auto 22px; }
.flow-item { width: 145px; padding: 12px 8px; gap: 7px; background: radial-gradient(ellipse,#10131d 38%,rgba(16,19,29,.96) 60%,transparent 78%); }
.flow-item-solar { left:15%;top:25%; }.flow-item-home { left:50%;top:25%; }.flow-item-grid { left:85%;top:25%; }
.flow-item-battery { left:30%;top:79%; }.flow-item-car { left:70%;top:79%; }
.flow-item-home { width:165px; background:radial-gradient(ellipse,rgba(19,37,39,.98),#10131d 65%,transparent 83%); }
.flow-index { color:var(--text-soft); font:700 .6rem/1.4 var(--mono);letter-spacing:.1em; }
.flow-item-home .flow-index { color:var(--teal); }
.flow-item strong { font-size:clamp(1.7rem,2.4vw,2.3rem); }
.flow-item-home strong { font-size:clamp(2rem,3vw,2.8rem); }
@media(max-width:700px) {
  .flow-stage { height: 340px; aspect-ratio:auto; margin:22px auto; }
  .flow-item { width:94px; padding:8px 2px; gap:5px; }.flow-item-home { width:105px; }
  .flow-item strong { font-size:1.25rem; }.flow-item-home strong { font-size:1.6rem; }
  .flow-index { font-size:.51rem; }
}
@media(max-width:360px) { .flow-item {width:80px}.flow-item-home {width:90px} }
/* Keep the readings directly on the diagram's background. */
.flow-item,.flow-item-home { background:transparent; }
.flow-item-home { width:145px; padding:12px 8px; }
.flow-item-home .flow-index { color:var(--text-soft); }
.flow-item-home strong { font-size:clamp(1.7rem,2.4vw,2.3rem); }
@media(max-width:700px) { .flow-item-home { width:94px; padding:8px 2px; }.flow-item-home strong { font-size:1.25rem; } }
@media(max-width:360px) { .flow-item-home { width:80px; } }
