/* Demo-only layout: one scroll container, intrinsic-height cards. */
.uf-banner{flex:none;background:#e9dab7;color:#243d32;padding:7px 16px;font-size:11px;line-height:1.4;text-align:center;z-index:2}


body:is(.unified-app, .has-unified-feed) #alert-list-container{display:block;overflow-y:auto;overflow-x:hidden;min-height:0;scrollbar-gutter:stable;padding:0 10px 12px}
body:is(.unified-app, .has-unified-feed) #alert-list-container .uf-feed-card{display:grid;grid-template-columns:28px minmax(0,1fr) 30px;align-items:start;gap:10px;flex:none;height:auto;min-height:0;margin:6px 0;padding:12px;border:1px solid #d2d1c6;border-radius:10px;background:#f4f1e8;box-shadow:none;transition:border-color .15s,background .15s;cursor:pointer;overflow:visible}
.uf-card-body{min-width:0;overflow-wrap:anywhere}
.uf-card-top{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:3px 8px;line-height:1.3}
.uf-source{font-size:10px;font-weight:700;color:#18513f}.uf-source.unverified{color:#586770}
.uf-card-top small{font-size:10px;color:#5e6a64;white-space:nowrap}
body .uf-feed-card h3{font-size:14px;line-height:1.35;margin:5px 0 3px;color:#182c23}
body .uf-feed-card p{font-size:12px;line-height:1.35;margin:0;color:#5c6961}
.uf-eyebrow{display:block;font-size:10px;font-weight:700;color:#27634e;line-height:1.4;margin-top:4px}
.uf-glyph{display:grid;place-items:center;width:28px;height:28px;box-sizing:border-box;margin-top:18px;border:1px solid var(--alert-accent);border-radius:50%;color:var(--alert-accent);font-size:18px}
.uf-votes{display:flex;flex-direction:column;align-items:center;gap:1px;align-self:center}
.uf-votes button{display:grid;place-items:center;width:30px;height:30px;padding:0;border:1px solid transparent;border-radius:6px;background:transparent;font-size:18px;color:#4d6256;cursor:pointer}
.uf-votes button:hover{background:#e5e9df}.uf-votes button[aria-pressed=true]{background:#205c45;color:#fff}.uf-votes span{font-size:11px;line-height:14px;font-variant-numeric:tabular-nums}
body:is(.unified-app, .has-unified-feed) #alert-list-container .uf-feed-card:hover,body:is(.unified-app, .has-unified-feed) #alert-list-container .uf-feed-card.active,body:is(.unified-app, .has-unified-feed) #alert-list-container .uf-hover{border-color:#27765c;background:#edf2e8;transform:none;box-shadow:none}
.uf-feed-card:focus-visible,.uf-votes button:focus-visible{outline:2px solid #27765c;outline-offset:2px}
.uf-list-note{font-size:10px;line-height:1.5;color:#5a6960;margin:10px 3px}
.uf-controls{display:flex;flex-wrap:wrap;gap:8px;padding:8px 16px;border-bottom:1px solid #dad7cb;flex:none}
.uf-controls label{font-size:11px;color:#526357;display:flex;gap:5px;align-items:center;min-width:0}.uf-controls select{border:1px solid #c9cabc;background:#f4f1e8;border-radius:7px;padding:7px;color:#203e30;max-width:140px;min-width:0}
body:is(.unified-app, .has-unified-feed) .feed-mode-tabs{display:none!important}
.uf-map-card{max-width:min(360px,calc(100vw - 36px))!important}
.uf-map-card .maplibregl-popup-content{border-radius:14px;padding:18px;background:#fff;box-shadow:0 12px 38px #173c3038;max-height:60vh;overflow:auto;overflow-wrap:anywhere}
.uf-map-card .popup-title{font-size:17px;color:#183e30}.uf-status{font-size:10px;line-height:1.4;color:#226447;font-weight:700;margin-bottom:8px}.uf-summary{font-size:13px;line-height:1.5;color:#34443b}.uf-map-card details{border-top:1px solid #d6d5c9;padding:12px 0;margin:10px 0}.uf-map-card summary{font-weight:700;cursor:pointer}.uf-more{background:#174c3b;color:white;border:0;border-radius:8px;padding:10px;cursor:pointer}
@media(max-width:899px){.uf-banner{font-size:10px}.uf-map-card .maplibregl-popup-content{max-height:45vh}}
@media(prefers-reduced-motion:reduce){.uf-feed-card{transition:none}}

/* Expanded overlays remain inside the visible map; scroll their own content. */
.uf-map-card .maplibregl-popup-content{box-sizing:border-box;overscroll-behavior:contain}
.uf-card-shifted .maplibregl-popup-tip{visibility:hidden}
body:is(.unified-app, .has-unified-feed) .map-viewport{container-type:size}
body:is(.unified-app, .has-unified-feed) .source-disclosure,body:is(.unified-app, .has-unified-feed) .map-legend{box-sizing:border-box;max-width:calc(100% - 70px);max-height:calc(100cqh - 100px);overflow:auto;overscroll-behavior:contain}
body:is(.unified-app, .has-unified-feed) .source-disclosure[open],body:is(.unified-app, .has-unified-feed) .map-legend[open]{z-index:40}
body:is(.unified-app, .has-unified-feed) .source-disclosure > summary,body:is(.unified-app, .has-unified-feed) .map-legend > summary{position:sticky;top:0;z-index:1}
/* Selected and hovered markers must not paint over the reading surface. */
.uf-map-card{z-index:1100}
/* Neutral surfaces with semantic event/status cues. */
body:is(.unified-app, .has-unified-feed) .sidebar-panel,body:is(.unified-app, .has-unified-feed) #alert-list-container{background:#f3f5f7}
body:is(.unified-app, .has-unified-feed) .sidebar-panel{--paper:#fff;--paper-2:#f3f5f7;--ink:#202b35}
body:is(.unified-app, .has-unified-feed) #alert-list-container .uf-feed-card{--alert-accent:#647587;background:#fff;border-color:#dce2e7;border-left:3px solid var(--alert-accent)}
body:is(.unified-app, .has-unified-feed) #alert-list-container .uf-tone-warning{--alert-accent:#9c6000}
body:is(.unified-app, .has-unified-feed) #alert-list-container .uf-tone-watch{--alert-accent:#746020}
body:is(.unified-app, .has-unified-feed) #alert-list-container .uf-tone-urgent{--alert-accent:#bb3037}
body:is(.unified-app, .has-unified-feed) #alert-list-container .uf-tone-resolved{--alert-accent:#237c52}
.uf-glyph{border:0;border-radius:7px;background:color-mix(in srgb,var(--alert-accent) 10%,white);color:var(--alert-accent);margin-top:20px}
.uf-glyph svg{width:23px;height:23px}
.uf-event-label{display:flex;flex-wrap:wrap;align-items:center;gap:3px 6px;font-size:10px;font-weight:700;color:#485969;margin-top:5px}
.uf-event-label span{color:var(--alert-accent);background:color-mix(in srgb,var(--alert-accent) 9%,white);padding:2px 5px;border-radius:4px}
.uf-controls select{background:#fff;border-color:#ccd5dc}
.uf-banner{background:#e8eef2;color:#405361}
.uf-map-card .maplibregl-popup-content,body:is(.unified-app, .has-unified-feed) .source-disclosure,body:is(.unified-app, .has-unified-feed) .source-disclosure-body{background:#fff}
body:is(.unified-app, .has-unified-feed) #alert-list-container .uf-feed-card:hover,body:is(.unified-app, .has-unified-feed) #alert-list-container .uf-feed-card.active{background:#f1f7f5}
body:is(.unified-app, .has-unified-feed) .source-disclosure:not([open]){background:transparent}
body:is(.unified-app, .has-unified-feed) .source-disclosure > summary{background:#fff;border-color:#dce2e7}

/* Scan-first list: prominent identifiers, readable content, quiet metadata. */
body:is(.unified-app, .has-unified-feed) #alert-list-container .uf-feed-card{grid-template-columns:48px minmax(0,1fr) 28px;gap:10px;padding:12px 10px}
.uf-glyph{width:48px;height:40px;margin-top:3px;font-size:16px;font-weight:800;border-radius:7px}
.uf-glyph svg{width:29px;height:29px}
body .uf-feed-card h3{font-size:17px;line-height:1.3;margin:6px 0}
body .uf-feed-card p{font-size:14px;line-height:1.4}
.uf-event-label{margin:0;font-size:13px;justify-content:space-between}
.uf-event-label small{font-size:12px;font-weight:400;color:#596975}
.uf-card-top{margin-top:8px}.uf-source{font-size:12px;font-weight:500;color:#586b75}
.uf-eyebrow{font-size:12px;font-weight:400;color:#61717b}
.uf-votes{align-self:start;margin-top:3px}.uf-votes button{width:28px;height:32px;font-size:17px}
.uf-votes button[aria-pressed=true]{background:#e5eaf0;color:#253f54;box-shadow:inset 0 0 0 1px #8a9dad}
.uf-section-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:15px;line-height:1.4;color:#344955;margin:20px 3px 8px}
.uf-section-heading span{font-size:12px;color:#667985;font-weight:400}
.uf-history{margin-top:18px;border-top:1px solid #d5dde3;padding-top:12px}
.uf-history>summary{font-size:15px;font-weight:600;color:#526570;padding:8px 3px;cursor:pointer}
.uf-list-note{font-size:12px}
.uf-map-identifier{display:grid;place-items:center;min-width:40px;height:38px;padding:0 4px;box-sizing:border-box;background:#fff;border:2px solid #647587;border-radius:9px;color:#405565;font-size:13px;font-weight:800;box-shadow:0 2px 5px #182c2330}
.uf-map-identifier svg{width:25px;height:25px}
.uf-map-identifier.uf-tone-warning{border-color:#9c6000;color:#9c6000}
.uf-map-identifier.uf-tone-urgent{border-color:#bb3037;color:#bb3037}
.uf-map-identifier.uf-tone-resolved{border-color:#237c52;color:#237c52}
.uf-impact{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-top:6px!important}

/* Base popup chrome uses !important with theme tokens. Override the tokens
   on the popup itself so its background AND pointer share the neutral palette. */
body:is(.unified-app, .has-unified-feed) .maplibregl-popup{--bg-lifted:#fff;--text-main:#202b35;--border:#dce2e7}
.uf-glyph.has-highway{background:transparent!important;border:0!important;padding:0;box-shadow:none;height:48px}
.uf-glyph .nz-highway-shield,.uf-map-identifier .nz-highway-shield{width:42px;height:48px;filter:drop-shadow(0 1px 2px #23344240)}
.uf-popup-shield{width:38px;height:43px;margin-bottom:8px}.uf-popup-shield svg{width:100%;height:100%}
.uf-feed-card[style] .uf-event-label span{color:#26333e;background:color-mix(in srgb,var(--alert-accent) 35%,white)}
.uf-feed-card[style] .uf-glyph:not(.has-highway){color:#26333e;background:var(--alert-accent)}

/* Familiar green guide-sign treatment, separate from incident status. */
.uf-road-sign{display:flex;align-items:center;gap:9px;max-width:100%;box-sizing:border-box;background:#176b4b;color:#fff;border:2px solid #fff;outline:1px solid #cbd7d1;border-radius:5px;padding:5px 9px;margin:1px 1px 10px;font-size:14px;font-weight:700;line-height:1.25}
.uf-road-sign .nz-highway-shield{width:30px;height:33px;flex:0 0 30px}
.uf-road-sign>span{min-width:0;overflow-wrap:anywhere}
body:is(.unified-app, .has-unified-feed) #alert-list-container .uf-road-card{grid-template-columns:minmax(0,1fr) 28px}
.uf-road-card>.uf-glyph{display:none}
.uf-popup-road{margin:0 0 12px}.uf-popup-road .uf-road-sign{font-size:15px}
body:is(.unified-app, .has-unified-feed) #alert-list-container .uf-quake-card{grid-template-columns:minmax(0,1fr) 28px}
.uf-quake-card>.uf-glyph{display:none}
.uf-shaking-header{display:flex;align-items:center;gap:10px;padding:10px;border-radius:7px;background:color-mix(in srgb,var(--alert-accent,#a7b3bf) 25%,white);border-left:4px solid var(--alert-accent,#a7b3bf);margin-bottom:9px;color:#25333d}
.uf-shaking-header>svg{width:30px;height:30px;flex:0 0 30px}
.uf-shaking-header strong{display:block;font-size:16px;line-height:1.3}
.uf-shaking-header small{display:block;font-size:12px;line-height:1.4;margin-top:3px;color:#52626d}
.uf-quake-card .uf-event-label>span{background:transparent;color:#52626d;font-weight:400;padding:0}

body:is(.unified-app, .has-unified-feed) .modal-card{--civic-paper:#fff;--bg-lifted:#fff;--bg-card:#fff;background:#fff}

/* Local conditions share the modal's surface rather than nesting another card. */
body:is(.unified-app,.has-unified-feed) .modal-card { width:680px; max-width:calc(100% - 24px); }
body:is(.unified-app,.has-unified-feed) #modal-telemetry-hud { background:transparent; border:0; border-radius:0; padding:0; box-shadow:none; }
body:is(.unified-app,.has-unified-feed) .local-breakdown-toggle { font-size:19px; padding:8px 0 16px; }
body:is(.unified-app,.has-unified-feed) .local-breakdown-container.expanded > .local-breakdown-content { max-height:none; overflow:visible; }
.rk-cond-location { display:block; font-size:14px; font-weight:600; margin:12px 0; }
.rk-cond-location select { display:block; width:100%; min-height:44px; margin-top:5px; padding:8px 12px; font:inherit; color:#202b35; background:#fff; border:1px solid #bfcbd3; border-radius:6px; }
.rk-cond .rk-cond-stamp, .rk-cond .rk-cond-src { font-size:14px; line-height:1.5; letter-spacing:0; text-transform:none; }
.rk-cond .rk-cond-now { white-space:normal; }
.rk-cond-period, .rk-cond-more { font-size:14px; line-height:1.5; color:#46545e; }
.rk-cond .rk-cond-tiles { grid-auto-flow:row; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 18px; }
.rk-cond .rk-cond-tile { border:0; border-bottom:2px solid #dce2e7; border-radius:0; background:transparent; padding:14px 4px; gap:6px; }
.rk-cond .rk-cond-tile.on { background:#f2f6f8; border-color:var(--tile-accent); }
.rk-cond .rk-cond-tile .k { font-size:14px; text-transform:none; letter-spacing:0; }
.rk-cond .rk-cond-tile .k .kt { white-space:normal; overflow:visible; }
.rk-cond .rk-cond-tile .v { font-size:28px; white-space:normal; }
.rk-cond .rk-cond-tile .v small, .rk-cond .rk-cond-tile .q { font-size:14px; }
.rk-cond .rk-cond-tile .q { display:block; overflow:visible; min-height:0; }
.rk-cond .wx-title-text { font-size:16px; line-height:1.4; }
.rk-cond .wx-axis, .rk-cond .wx-now-label, .rk-cond .wx-threshold-label { font-size:16px; }
.rk-cond-more { border-top:1px solid #dce2e7; margin-top:18px; padding-top:14px; }
.rk-cond-more summary { cursor:pointer; font-size:16px; font-weight:600; }
.rk-cond-extra { margin-top:12px; font-size:18px; }
@media(max-width:600px) { body:is(.unified-app,.has-unified-feed) .modal-card { width:calc(100% - 16px); } }
@media(max-width:600px) {
  .rk-cond .wx-axis, .rk-cond .wx-now-label, .rk-cond .wx-threshold-label { font-size:23px; }
  .rk-cond .wx-title-text { font-size:16px; }
}

.rk-cond .wx-peak-label { font-size:15px; }
@media(max-width:600px) { .rk-cond .wx-peak-label { font-size:21px; } }
