:root{--dq-grid-panel:390px;--dq-grid-border:#dbe3ee;--dq-grid-text:#13213a;--dq-grid-muted:#627087;--dq-grid-soft:#f6f8fb;--dq-grid-shadow:0 16px 38px rgba(24,43,70,.16)}
.dq-electricity-page{background:#eef4f7;color:var(--dq-grid-text)}
.dq-electricity-workspace{position:relative;display:grid;grid-template-columns:var(--dq-grid-panel) minmax(0,1fr);min-height:calc(100vh - 76px);border-top:1px solid #d4e1e7;background:#d9eef4}
.dq-electricity-panel{position:relative;z-index:500;background:#fff;border-right:1px solid var(--dq-grid-border);height:calc(100vh - 76px);overflow:auto;overscroll-behavior:contain;padding:18px 18px 28px}
.dq-electricity-panel h1{font-size:1.36rem;line-height:1.2;margin:0 0 6px}.dq-electricity-panel p{line-height:1.45}.dq-electricity-eyebrow{font-size:.72rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#55708d;margin:0 0 6px}.dq-electricity-beta{display:inline-flex;align-items:center;border-radius:999px;background:#eaf8ef;color:#176a3d;padding:5px 9px;font-size:.72rem;font-weight:800;margin-bottom:10px}.dq-electricity-intro{font-size:.9rem;color:var(--dq-grid-muted);margin:0 0 16px}
.dq-grid-controls{display:grid;gap:12px;padding:14px 0 16px;border-top:1px solid var(--dq-grid-border);border-bottom:1px solid var(--dq-grid-border)}.dq-grid-control-label{font-size:.75rem;font-weight:800;color:#4b5f76;text-transform:uppercase;letter-spacing:.05em}.dq-grid-segment{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.dq-grid-segment[data-columns="3"]{grid-template-columns:repeat(3,minmax(0,1fr))}.dq-grid-segment button{min-height:38px;border:1px solid #ccd7e4;border-radius:10px;background:#f8fafc;color:#20314a;font-weight:750;cursor:pointer;padding:7px 8px}.dq-grid-segment button.is-active{background:#14243e;color:#fff;border-color:#14243e}.dq-grid-check{display:flex;gap:9px;align-items:center;font-size:.88rem;font-weight:650;color:#34475f}.dq-grid-check input{width:18px;height:18px}
.dq-grid-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:14px 0}.dq-grid-stat{background:var(--dq-grid-soft);border-radius:12px;padding:10px}.dq-grid-stat strong{display:block;font-size:1.05rem}.dq-grid-stat span{display:block;color:var(--dq-grid-muted);font-size:.72rem;margin-top:3px}.dq-grid-message{font-size:.8rem;color:var(--dq-grid-muted);margin:8px 0 0}.dq-grid-error{background:#fff4f2;color:#8a2e21;border:1px solid #ffd7d0;border-radius:10px;padding:10px 12px;margin:12px 0;font-size:.84rem}
.dq-grid-ranking{margin-top:18px}.dq-grid-ranking h2,.dq-grid-detail h2{font-size:1rem;margin:0 0 10px}.dq-grid-zone-list{display:grid;gap:7px}.dq-grid-zone-row{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;text-align:left;border:1px solid #dde5ef;border-radius:11px;background:#fff;padding:10px 11px;cursor:pointer}.dq-grid-zone-row:hover,.dq-grid-zone-row:focus-visible{border-color:#8aa9cf;box-shadow:0 0 0 2px rgba(68,117,176,.09)}.dq-grid-zone-row strong{display:block;font-size:.86rem}.dq-grid-zone-row small{display:block;font-size:.72rem;color:var(--dq-grid-muted);margin-top:2px}.dq-grid-zone-value{font-weight:850;font-variant-numeric:tabular-nums;white-space:nowrap}
.dq-grid-map-wrap{position:relative;min-width:0}.dq-grid-map{height:calc(100vh - 76px);min-height:650px;background:#dceff4}.dq-grid-legend{position:absolute;z-index:450;right:14px;bottom:18px;background:rgba(255,255,255,.96);border:1px solid #d8e2ec;border-radius:12px;padding:9px 10px;box-shadow:0 10px 26px rgba(30,55,80,.14);font-size:.72rem}.dq-grid-legend-title{font-weight:850;margin-bottom:6px}.dq-grid-legend-scale{display:flex;gap:7px;align-items:center}.dq-grid-legend-item{display:flex;align-items:center;gap:4px}.dq-grid-legend-dot{width:11px;height:11px;border-radius:50%;border:1px solid rgba(0,0,0,.12)}
.dq-grid-marker-host{background:transparent!important;border:0!important}.dq-grid-marker{width:48px;height:48px;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff;border:3px solid rgba(255,255,255,.96);box-shadow:0 3px 12px rgba(19,33,58,.35);font-weight:850;line-height:1;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.35);transition:transform .12s ease,box-shadow .12s ease}.dq-grid-marker:hover{transform:scale(1.08)}.dq-grid-marker.is-selected{box-shadow:0 0 0 4px #15243c,0 5px 16px rgba(19,33,58,.38);transform:scale(1.08)}.dq-grid-marker-id{font-size:.66rem}.dq-grid-marker-value{font-size:.72rem;margin-top:3px}.dq-grid-marker.is-missing{background:#8290a3!important;color:#fff}.leaflet-tooltip.dq-grid-flow-tooltip{border-radius:9px;border:1px solid #dce5ee;box-shadow:0 8px 22px rgba(20,38,62,.14);font-size:.78rem;color:#1d2b40}
.dq-grid-detail{margin-top:18px;padding-top:16px;border-top:1px solid var(--dq-grid-border)}.dq-grid-detail[hidden]{display:none}.dq-grid-back{appearance:none;border:0;background:transparent;color:#0a63c7;font-weight:800;padding:0;margin:0 0 10px;cursor:pointer}.dq-grid-detail-title{font-size:1.24rem!important;margin-bottom:2px!important}.dq-grid-detail-sub{font-size:.8rem;color:var(--dq-grid-muted);margin:0 0 10px}.dq-grid-freshness{border-radius:10px;padding:9px 10px;font-size:.8rem;font-weight:700;margin:10px 0}.dq-grid-freshness.current{background:#ebf8ef;color:#176a3d}.dq-grid-freshness.lagged{background:#fff7df;color:#805d05}.dq-grid-freshness.unavailable{background:#f0f3f7;color:#526075}.dq-grid-metrics{display:grid;grid-template-columns:1fr 1fr;gap:8px}.dq-grid-metric{background:var(--dq-grid-soft);border-radius:11px;padding:10px}.dq-grid-metric strong{display:block;font-size:1.12rem;font-variant-numeric:tabular-nums}.dq-grid-metric span{display:block;color:var(--dq-grid-muted);font-size:.72rem;margin-top:3px}.dq-grid-section{padding-top:14px;margin-top:14px;border-top:1px solid #e2e8f0}.dq-grid-section h3{font-size:.8rem;text-transform:uppercase;letter-spacing:.05em;color:#52667c;margin:0 0 8px}.dq-grid-kv{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;font-size:.8rem;padding:4px 0}.dq-grid-kv span:first-child{color:var(--dq-grid-muted)}.dq-grid-kv strong{text-align:right}.dq-grid-quality-flags{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}.dq-grid-quality-flag{border-radius:999px;background:#eef2f7;color:#53647a;padding:4px 7px;font-size:.65rem;font-weight:750}.dq-grid-source{font-size:.75rem;color:var(--dq-grid-muted);line-height:1.4}.dq-grid-history{width:100%;height:130px;display:block;background:#f8fafc;border-radius:10px}.dq-grid-history-empty{font-size:.75rem;color:var(--dq-grid-muted)}
.dq-electricity-about{background:#fff}.dq-electricity-about .container{max-width:1120px}.dq-electricity-about-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.dq-electricity-about-card{border:1px solid #e0e7ef;border-radius:16px;padding:18px;background:#fff}.dq-electricity-about-card h2{font-size:1rem;margin:0 0 8px}.dq-electricity-about-card p{font-size:.88rem;color:#586980;line-height:1.5;margin:0}
@media(max-width:980px){:root{--dq-grid-panel:340px}.dq-grid-marker{width:44px;height:44px}}
@media(max-width:720px){.dq-electricity-workspace{display:flex;flex-direction:column;min-height:0}.dq-grid-map-wrap{order:1}.dq-electricity-panel{order:2;height:auto;max-height:none;border-right:0;border-top:1px solid var(--dq-grid-border);padding:15px 16px 24px}.dq-grid-map{height:54vh;min-height:390px}.dq-grid-legend{right:10px;bottom:10px;max-width:calc(100% - 20px)}.dq-grid-marker{width:42px;height:42px;border-width:2px}.dq-grid-marker-id{font-size:.6rem}.dq-grid-marker-value{font-size:.67rem}.dq-grid-summary{margin-top:12px}.dq-electricity-about-grid{grid-template-columns:1fr}.dq-grid-segment button{min-height:42px}}
@media(prefers-reduced-motion:reduce){.dq-grid-marker{transition:none}}

/* v868.65 Electricity Map UX refinement */
.dq-grid-legend-note{margin-top:7px;padding-top:7px;border-top:1px solid #e2e8f0;color:#526075;font-weight:700;max-width:230px;line-height:1.3}.dq-grid-legend-note::before{content:'';display:inline-block;width:10px;height:10px;margin-right:5px;border-radius:50%;background:#8290a3;border:1px solid rgba(0,0,0,.12);vertical-align:-1px}.dq-grid-freshness{line-height:1.35}

/* v868.70 Electricity Map: zone choropleth with boundary flow arrows */
.dq-grid-legend-dot{width:13px;height:13px;border-radius:3px}
.leaflet-tooltip.dq-grid-flow-tooltip{z-index:1000}

.dq-grid-flow-scale{display:flex;align-items:center;flex-wrap:wrap;gap:.3rem .55rem;margin:-.2rem 0 .7rem;color:#526176;font-size:.66rem}.dq-grid-flow-scale strong{font-size:.68rem;color:#26364b;margin-right:.1rem}.dq-grid-flow-scale-item{display:inline-flex;align-items:center;gap:.2rem;white-space:nowrap}.dq-grid-flow-scale-item i{display:inline-block;width:14px;height:3px;border-radius:2px;background:var(--flow-color);box-shadow:0 0 0 1px rgba(20,34,52,.12)}
.dq-grid-flow-line{stroke-linecap:round;stroke-linejoin:round}.dq-grid-flow-line.is-moving{animation-name:dq-grid-flow-march;animation-timing-function:linear;animation-iteration-count:infinite}.dq-grid-flow-line.is-moving.is-aging{stroke-dasharray:5 5}.dq-grid-flow-line.is-moving.is-stale{stroke-dasharray:3 7}@keyframes dq-grid-flow-march{from{stroke-dashoffset:0}to{stroke-dashoffset:-40}}@media(prefers-reduced-motion:reduce){.dq-grid-flow-line.is-moving{animation:none}}

.dq-grid-flow-speed-note{flex-basis:100%;font-size:.64rem;color:#6b7888;margin-top:.05rem}

.dq-grid-hover-card{min-width:220px;max-width:290px;padding:2px 1px}.dq-grid-hover-title{display:block;margin:0 0 7px;font-size:.92rem;color:#10182b}.dq-grid-hover-row{display:flex;justify-content:space-between;gap:14px;padding:3px 0;border-top:1px solid #edf0f4}.dq-grid-hover-row span{color:#52647b}.dq-grid-hover-row b{color:#15243c;text-align:right;font-variant-numeric:tabular-nums}.dq-grid-hover-card small{display:block;margin-top:7px;color:#65758a}
.dq-grid-hover-flags{max-width:290px;line-height:1.4;overflow-wrap:anywhere}

.dq-grid-estimate-note{display:block;margin-top:.35rem;color:#7b5a12;font-size:.72rem;line-height:1.35}

/* v868.81: country data opens on click, never on hover */
.leaflet-popup.dq-grid-country-popup .leaflet-popup-content-wrapper{border-radius:11px;box-shadow:0 12px 30px rgba(16,34,58,.22)}.leaflet-popup.dq-grid-country-popup .leaflet-popup-content{margin:12px 14px;line-height:1.35}

/* v868.82: flow information also opens only after an explicit click */
.leaflet-popup.dq-grid-flow-popup .leaflet-popup-content-wrapper{border-radius:9px;box-shadow:0 8px 22px rgba(20,38,62,.18)}.leaflet-popup.dq-grid-flow-popup .leaflet-popup-content{margin:9px 12px;font-size:.78rem;color:#1d2b40}

.dq-grid-period{font:inherit;color:inherit;background:var(--surface,#fff);border:1px solid #b8c7d5;border-radius:10px;padding:10px 12px;max-width:100%;min-height:44px;margin-bottom:10px}.dq-grid-period:focus-visible{outline:3px solid #315f93;outline-offset:2px}@media(max-width:600px){.dq-grid-period{width:100%}}

/* v869.24 UI hotfix: keep the sticky site navigation/dropdown above the map workspace. */
.site-header{z-index:1200}

/* v8.69.35: the moving dashed NA flow segments are historical, not live */
.dq-grid-flow-history-note{flex-basis:100%;font-size:.65rem;color:#805e30;line-height:1.3;max-width:100%}
.dq-grid-flow-history-note[hidden]{display:none}

/* v8.69.44: missing consumption is a transparent zone, not a grey choropleth value. */
.dq-grid-coverage-card{position:absolute;z-index:465;top:12px;right:12px;display:flex;flex-direction:column;gap:3px;max-width:250px;padding:10px 12px;background:rgba(255,255,255,.95);border:1px solid #d9e3ec;border-radius:11px;box-shadow:0 4px 20px rgba(25,46,75,.12);color:#142942;pointer-events:none;line-height:1.3}
.dq-grid-coverage-card[hidden]{display:none}
.dq-grid-coverage-card strong{font-size:.77rem;font-weight:800}
.dq-grid-coverage-card span{font-size:.73rem;font-weight:700;color:#34465d}
.dq-grid-coverage-card small{font-size:.68rem;color:#52647b}
.dq-grid-legend-note.is-consumption::before{background:transparent;border:1px dashed #94a3b8}
@media(max-width:720px){.dq-grid-coverage-card{top:10px;right:10px;max-width:min(205px,calc(100% - 95px));padding:8px 10px}.dq-grid-coverage-card small{font-size:.66rem}}

/* v8.69.51: missing-data details remain reachable on grey map regions. */
.dq-grid-detail-open{display:block;width:100%;margin-top:.65rem;padding:.6rem;border:1px solid #cbd5e1;border-radius:.5rem;background:#f8fafc;color:#15243a;font:inherit;cursor:pointer}.dq-grid-detail-open:focus-visible{outline:3px solid #315f93;outline-offset:2px}.dq-grid-section>small{display:block;color:#536174;line-height:1.5;margin:.4rem 0}
