/* Ready Kiwi shared reading surfaces and controls. Loaded after surface styles. */
:root {
  --ui-green: #103e31;
  --ui-green-hover: #185840;
  --ui-ink: #20352c;
  --ui-muted: #53665d;
  --ui-paper: #ffffff;
  --ui-ground: #f3f6f4;
  --ui-line: #d6e0da;
  --ui-radius: 10px;
  --ui-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
button, input, select, textarea { font-family: inherit; }
:where(button, a, input, select, summary, [tabindex]):focus-visible {
  outline: 3px solid #38856a;
  outline-offset: 3px;
}
:where(.dashboard-header, .unified-hero, .rk-chat-host) :focus-visible { outline-color: #9fe7c5; }
button:disabled { cursor: default; }
.word-logo { font-family: var(--ui-font); font-weight: 800; letter-spacing: -.045em; text-decoration: none; }
.word-logo span { color: #ff8c51; opacity: 1; }
body.live-civic { --font-display: var(--ui-font); --font-body: var(--ui-font); }
.dashboard-header .word-logo { font-size: 21px; }
.dashboard-header .header-right { gap: 12px; }
.dashboard-header .chat-launcher, .dashboard-header [aria-label='Local updates'],
.dashboard-nav a, .system-status-indicator { min-height: 44px; box-sizing: border-box; display: inline-flex; align-items: center; }

/* A local answer, then national context. Never truncate an urgent instruction. */
body.unified-app .uh-cols { width: 100%; max-width: 1120px; margin-inline: auto; gap: 48px; align-items: flex-start; }
body.unified-app .uh-inner { min-width: 0; width: 100%; }
body.unified-app .uh-status-word { font-size: clamp(28px, 3vw, 36px); margin: 6px 0 12px; line-height: 1.2; text-transform: none; font-weight: 700; letter-spacing: -.03em; }
body.unified-app .uh-brief-big { font-size: clamp(19px, 2vw, 24px); line-height: 1.35; max-width: 38ch; }
body.unified-app .uh-brief-big:empty { display: none; }
body.unified-app .uh-brief-sub { font-size: 16px; line-height: 1.6; max-width: 58ch; }
body.unified-app .uh-kicker { max-width: 100%; flex-wrap: wrap; font-size: 11px; letter-spacing: .09em; }
.uh-place-toggle { min-height: 44px; max-width: 100%; text-align: left; }
#uh-kicker-place { overflow-wrap: anywhere; }
.uh-brief-expand { margin:0; }
body.unified-app .uh-locate { margin-top: 24px; max-width: 540px; }
body.unified-app .uh-ny-pick { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
body.unified-app .uh-ny-pick input { flex: 1 1 220px; min-width: 0; width: auto; font-size: 16px; min-height: 46px; }
body.unified-app .uh-ny-gps { min-height: 46px; border-radius: var(--ui-radius); font-size: 14px; }
.uh-ny-sugg { min-width: 0; max-width: 100%; }
.uh-ny-sugg button { min-height: 44px; white-space: normal; }
body.unified-app .uh-controls { flex-wrap: wrap; margin-top: 10px; gap: 8px; }
.uh-ctl { min-height: 44px; padding: 8px 0; }
.uh-ctl-sep { margin-inline: 4px; }
body.unified-app .uh-natbrief { margin: 16px 0 10px; border-color: #658573; border-radius: var(--ui-radius); }
body.unified-app .uh-rail { flex: 0 1 400px; margin-top: 8px; }
body.unified-app .uh-rail-item { border-radius: var(--ui-radius); padding: 14px; background: #ffffff06; }
body.unified-app .uh-rail .ri-meta { font-size: 12px; line-height: 1.55; }
body.unified-app .uh-scrollcue { font-size: 13px; min-height: 44px; }
.ai-feedback-controls { color: var(--ui-muted); }
.unified-hero .ai-feedback-controls, .unified-hero .ai-feedback-controls-text { color: #b9ccc1; opacity: 1; }
.ai-feedback-btn { min-width: 44px; min-height: 44px; }

/* Compact filter disclosure and full-width card content. */
body:is(.unified-app,.has-unified-feed) .sidebar-panel,
body:is(.unified-app,.has-unified-feed) #alert-list-container { background: var(--ui-ground); }
body.live-civic .alerts-summary-bar { padding: 12px 18px; gap: 10px; align-items: center; }
body.live-civic .feed-filters-fold > summary.feed-filters-summary { min-height: 44px; padding: 12px; box-sizing: border-box; border-radius: 8px; background: #fff; border: 1px solid var(--ui-line); }
body.live-civic .feed-filters-fold[open] { width: 100%; }
#alerts-count-text { font-size: 12px; line-height: 1.5; color: var(--ui-muted); }
.uf-controls { display: grid; grid-template-columns: 1fr 1fr; padding: 12px 0; gap: 12px; border: 0; }
.uf-controls label { display: grid; gap: 6px; font-size: 12px; color: var(--ui-muted); }
.uf-controls select { min-height: 44px; width: 100%; max-width: none; padding: 10px 8px; font-size: 14px; color: var(--ui-ink); border-radius: 8px; }
.uf-list-note { line-height: 1.5; margin: 6px 0; }
body:is(.unified-app,.has-unified-feed) #alert-list-container .uf-feed-card { grid-template-columns: 36px minmax(0,1fr); padding: 14px 12px 8px; border-radius: var(--ui-radius); border-color: var(--ui-line); gap: 4px 12px; }
body:is(.unified-app,.has-unified-feed) #alert-list-container :is(.uf-quake-card,.uf-road-card) { grid-template-columns: minmax(0,1fr); }
.uf-glyph { width: 36px; height: 36px; border-radius: 8px; }
.uf-glyph svg { width: 25px; height: 25px; }
body .uf-feed-card h3 { font-size: 16px; line-height: 1.4; }
.uf-event-label { font-size: 12px; gap: 8px; }
.uf-section-heading { margin-top: 16px; font-size: 14px; }
.uf-history > summary { min-height: 44px; }

/* One concise map preview and a clearly reachable close action. */
.maplibregl-popup-close-button { min-width: 44px; min-height: 44px; font-size: 23px; padding: 0; color: #496357; border-radius: 8px; z-index: 2; }
.uf-map-card .maplibregl-popup-content { padding: 20px; border-radius: 12px; box-shadow: 0 8px 28px #173c302b; }
.uf-map-card .uf-status, .uf-map-card .uf-shaking-header { margin-right: 28px; }
.uf-map-card .popup-title { padding-right: 22px; font-size: 18px; line-height: 1.35; }
.uf-map-card .popup-desc { font-size: 14px; line-height: 1.5; }
.uf-popup-time { color: var(--ui-muted); font-size: 13px; line-height: 1.5; margin: 8px 0; }
.uf-map-card .uf-summary { font-size: 14px; line-height: 1.5; }
.uf-preview { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
button.popup-link { display: block; width: 100%; min-height: 44px; border: 0; border-radius: 8px; background: var(--ui-green); color: white; text-align: center; font: 600 14px var(--ui-font); text-transform: none; margin-top: 16px; cursor: pointer; }
button.popup-link:hover { background: var(--ui-green-hover); }
body:is(.unified-app,.has-unified-feed) :is(.map-legend,.source-disclosure) > summary { border: 1px solid var(--ui-line); border-radius: 8px; background: white; color: var(--ui-ink); min-height: 44px; padding: 13px 12px; font-size: 11px; box-sizing: border-box; }
.uf-map-identifier { min-width: 34px; height: 34px; border-width: 1.5px; box-shadow: 0 2px 4px #173c3020; }
.uf-map-identifier svg { width: 23px; height: 23px; }
.uf-map-identifier .nz-highway-shield { width: 34px; height: 39px; }

/* Modal structure is shared by alert details and reporting. */
.modal-overlay { visibility: hidden; backdrop-filter: blur(2px); }
.modal-overlay.active { visibility: visible; }
body .modal-card { max-height: calc(100dvh - 48px); border: 1px solid var(--ui-line); border-radius: 16px; box-shadow: 0 16px 48px #0c302a40; --bg-deep: #f4f7f5; --bg-lifted: #fff; --bg-card: #fff; --border: var(--ui-line); --text-main: var(--ui-ink); --text-secondary: var(--ui-muted); --text-muted: var(--ui-muted); background: #fff; color: var(--ui-ink); }
body .modal-header { flex: 0 0 auto; padding: 24px 28px 20px; }
body .modal-title-group { padding-right: 36px; }
body .modal-header h3 { font: 700 24px/1.25 var(--ui-font); letter-spacing: -.025em; }
body .modal-meta { font-size: 13px; line-height: 1.55; margin-top: 8px; }
body .modal-close-btn { width: 44px; height: 44px; display: grid; place-items: center; top: 12px; right: 12px; padding: 0; border-radius: 8px; }
body .modal-close-btn:hover { background: #edf3ef; }
body .modal-body { min-height: 0; flex: 1 1 auto; max-height: none; overflow-y: auto; overscroll-behavior: contain; padding: 24px 28px; gap: 24px; mask-image: none; -webkit-mask-image: none; }
#alert-modal .modal-body > * { flex-shrink: 0; order: 0; }
body .modal-body .description-card { margin: 0; padding: 0; border: 0; background: transparent; }
body .modal-body .description-card h4 { font-size: 15px; margin-bottom: 10px; }
body .modal-body .description-card .ai-summary { line-height: 1.6; }
.modal-card :is(.rkc-sub,.rkc-leadrow) { background: #f3f6f4; border-radius: var(--ui-radius); box-shadow: none; }
.modal-card .rkc-leadrow { padding: 14px; }
.modal-card .rkc-sub { padding: 16px; }
.modal-card .rkc-row { box-shadow: none; }
.modal-card .ambience-canvas, .modal-card .ambience-icon { opacity: .25; }
#modal-actions-section { padding: 16px; border: 1px solid var(--ui-line); border-radius: var(--ui-radius); background: #f3f7f4; }
#modal-actions-section .section-title { color: var(--ui-green); font-size: 15px; }
#modal-actions-section li { line-height: 1.55; }
#modal-history-section { order: 0; }
.local-breakdown-toggle, .felt-breakdown-toggle { min-height: 44px; }

/* Explicit report selection, visible location, single publishing action. */
.report-selected-place { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--ui-line); }
#report-place-label { font-weight: 600; overflow-wrap: anywhere; }
#report-change-place { flex: none; min-height: 44px; background: transparent; border: 0; color: var(--ui-green); text-decoration: underline; font-size: 14px; }
#report-kinds-section { gap: 16px; }
#report-kinds-section > .section-title { margin: 0; }
body .quick-report-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
body .report-tile { display: flex; flex-direction: row; gap: 10px; min-height: 60px; padding: 12px; border-radius: 8px; background: white; border: 1px solid var(--ui-line); box-shadow: none; color: var(--ui-ink); }
body .report-tile[aria-pressed='true'] { border: 2px solid var(--ui-green); padding: 11px; background: #eaf4ee; }
body .tile-icon-container { width: 28px; height: 28px; flex: 0 0 28px; background: transparent; color: var(--ui-green); box-shadow: none; }
body .tile-icon-container svg { width: 24px; height: 24px; }
body .tile-label { font-size: 13px; text-align: left; }
body .report-send { min-height: 46px; border: 0; border-radius: 8px; background: var(--ui-green); color: white; font-size: 15px; font-weight: 600; cursor: pointer; }
body .report-send:disabled { opacity: .45; cursor: default; }
body .location-option, body .location-search-container input, #report-note-input { min-height: 44px; background: white; border: 1px solid var(--ui-line); border-radius: 8px; font-size: 16px; }
body .search-suggestions { background: #fff; border-color: var(--ui-line); }
body .search-suggestion { min-height: 44px; }

/* Chat keeps its green identity; titles get their own row. */
.rk-chat-root, .rk-chat-host { --rk-sans: var(--ui-font); }
.rk-chat-host .chat-header { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.rk-chat-host .chat-header-text { width: 100%; padding-right: 40px; box-sizing: border-box; }
.rk-chat-host .chat-header h3 { font: 700 19px/1.35 var(--ui-font); margin-top: 6px; }
.rk-chat-host .chat-header-actions { display: flex; width: 100%; align-items: center; gap: 8px; }
.rk-chat-host #chat-close { position: absolute; top: 12px; right: 12px; }
.rk-chat-host .chat-close, .rk-chat-host .rk-board-btn { min-height: 44px; min-width: 44px; border-radius: 8px; }
.rk-chat-host .rk-board-btn { max-width: none; }
.rk-chat-host .chat-disclaimer, .rk-chat-host .chat-header-meta { font: 12px/1.5 var(--ui-font); }
.rk-starters { gap: 8px; }
.rk-starter { min-height: 44px; border-radius: 8px; }
.rk-rules button, .rk-composer button { min-height: 44px; border-radius: 8px; }
.rk-chat-host .msg.sys { background: #ffffff06; border-left-width: 2px; border-radius: 0 8px 8px 0; box-shadow: none; }

/* Supporting pages use the same masthead, font and neutral reading surface. */
body.rk-document, body.rk-status { font-family: var(--ui-font); background: var(--ui-ground); background-image: none; color: var(--ui-ink); --paper: #fff; --paper-deep: #eaf1ec; --ink: var(--ui-ink); --ink-soft: var(--ui-muted); --stone: var(--ui-muted); --rule: var(--ui-line); --c-bg: #f3f6f4; --c-text: #20352c; --c-sub: #53665d; --c-border: #d6e0da; --c-healthy: #185b40; --c-healthy-bg: #e1f0e7; --c-delayed: #86520b; --c-delayed-bg: #fff1d7; --c-offline: #ad2f36; --c-offline-bg: #fce9e9; }
body.rk-document header, body.rk-status .mast { background: var(--ui-green); border: 0; padding: 18px 0; }
body.rk-document .word-logo, body.rk-status .word-logo { color: #f4f7f5; font: 800 21px var(--ui-font); letter-spacing: -.045em; text-decoration: none; }
body.rk-status .word-logo span { color: #ff8c51; opacity: 1; }
body.rk-status nav[aria-label='Breadcrumb'] { color: #c1d6ca; font-size: 13px; }
body.rk-document :is(h1,h2,h3), body.rk-status :is(h1,h2,h3) { font-family: var(--ui-font); letter-spacing: -.025em; }
body.rk-document h1 { font-size: clamp(30px,5vw,42px); }
body.rk-document h2 { font-size: 22px; }
body.rk-document :is(.wrap,main), body.rk-status .wrap { max-width: 800px; }
body.rk-document a { color: var(--ui-green); text-underline-offset: 3px; }
body.rk-document .word-logo { color: #fff; }
body.rk-status .status-hero { align-items: flex-start; text-align: left; padding-block: 36px; }
body.rk-status .status-indicator { width: 48px; height: 48px; margin-bottom: 16px; }
body.rk-status #overall-status { font-size: clamp(26px,4vw,34px); }
body.rk-status .service-card { background: #fff; border-radius: var(--ui-radius); gap: 16px; }
body.rk-status .service-info { min-width: 0; }
body.rk-status .service-info h3 { font-size: 15px; }
body.rk-status .service-status { flex-shrink: 0; }

@media (min-width: 1200px) {
  body.unified-app .uh-inner { flex: 1 1 580px; max-width: 620px; }
  body.unified-app .unified-hero { padding-block: 24px; }
}
@media (max-width: 899px) {
  body.unified-app #unified-hero { overflow-x: hidden; padding: 24px 18px; box-sizing: border-box; }
  body.unified-app #unified-hero .uh-cols { margin-block: 0; padding-top: 0; display: block; min-width: 0; }
  body.unified-app .uh-inner { max-width: 100%; }
  body.unified-app .uh-status-word { font-size: 28px; }
  body.unified-app .uh-rail { width: 100%; margin-top: 24px; }
  body.unified-app .uh-pager { padding-block: 3px; height: 3px; }
  body.unified-app #app-deck { height: calc(100dvh - var(--header-height) - var(--civic-actionbar-h,56px) - 9px - env(safe-area-inset-bottom,0px)); }
  body.unified-app.has-emergency #app-deck { height: calc(100dvh - var(--header-height) - var(--civic-actionbar-h,56px) - 9px - env(safe-area-inset-bottom,0px) - var(--eb-h,46px)); }
  body.unified-app .uh-scrollcue { display: none; }
  body.unified-app .live-actionbar { padding-bottom: env(safe-area-inset-bottom,0px); }
  body.unified-app .sidebar-header { padding: 16px 18px 0; }
  body.unified-app .sidebar-header h2 { font-size: 22px; }
  body .modal-card { max-height: calc(100dvh - 24px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)); }
  body .modal-header { padding: 22px 20px 18px; }
  body .modal-header h3 { font-size: 22px; }
  body .modal-body { padding: 20px; gap: 20px; }
  body .modal-title-group { padding-right: 30px; }
  .rk-chat-host .chat-header { padding: 16px; gap: 10px; }
  .rk-chat-host .chat-header h3 { font-size: 18px; }
}
@media (max-width: 400px) {
  body .report-tile { padding: 10px 8px; gap: 7px; }
  body .report-tile[aria-pressed='true'] { padding: 9px 7px; }
  body .modal-header, body .modal-body { padding-inline: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* The tab bar supplies orientation after the first map hint. */
body.unified-app .deck-grab { opacity: 0; pointer-events: none; transition: opacity .2s; }
body.unified-app .map-hint-visible .deck-grab { opacity: 1; pointer-events: auto; }
.feed-scope { background: #e8eeea; border-radius: 8px; padding: 3px; }
.feed-scope button { min-height: 44px; border-radius: 6px; background: transparent; color: var(--ui-muted); }
.feed-scope button[aria-pressed='true'] { background: var(--ui-green); color: #fff; }
@media (max-width: 899px) {
  body.unified-app .map-viewport .source-disclosure { top: 12px; }
  body.unified-app .map-viewport .map-legend { top: 64px; }
  body.unified-app .map-hint-visible .map-viewport .source-disclosure { top: 38px; }
  body.unified-app .map-hint-visible .map-viewport .map-legend { top: 90px; }
}

.rk-rules button, .rk-composer button { background: #9be3bb; color: #103e31; font-weight: 700; }

@media (max-width: 899px) {
  .dashboard-header .system-status-indicator { display: none; }
}

/* Keep official road shields legible without overpowering nearby hazards. */
.maplibre-marker-wrapper { min-width: 44px; min-height: 44px; }
.uf-map-identifier { min-width: 34px; height: 34px; border-width: 1.5px; }
.uf-map-identifier svg { width: 23px; height: 23px; }
.uf-map-identifier .nz-highway-shield { width: 32px; height: 36px; }


/* Alert reading: one column, with colour reserved for status and actions. */
body.alert-detail-open { overflow: hidden; }
#alert-modal .modal-card { width: min(720px, calc(100vw - 48px)); }
#alert-modal .modal-body { gap: 20px; }
#alert-modal .modal-body > .description-card { margin: 0; }
#alert-modal .description-card h4 { font-size: 16px; margin: 0 0 10px; }
#modal-summary-content .ss-lead { font-size: 17px; line-height: 1.65; white-space: pre-line; }
#modal-summary-content .ss-field { display: block; }
#modal-summary-content .ss-flabel { display: block; margin-bottom: 6px; font-size: 14px; }
#modal-summary-content .ss-fbody { font-size: 16px; line-height: 1.6; color: var(--ui-ink); }
#alert-modal #modal-hero { margin: 0; }
#alert-modal .rkc-statrow { border: 0; border-block: 1px solid var(--ui-line); border-radius: 0; background: white; gap: 12px; }
#alert-modal .rkc-stat { padding: 14px 0; background: transparent; min-width: 0; }
#alert-modal .rkc-stat .k { font-size: 12px; text-transform: none; letter-spacing: 0; }
#alert-modal .rkc-stat .v { font-size: 23px; font-weight: 700; overflow-wrap: anywhere; }
#alert-modal :is(.quake-scale, #modal-bulletin) > summary { min-height: 44px; padding-block: 14px; box-sizing: border-box; font-size: 14px; font-weight: 600; cursor: pointer; }
#alert-modal :is(.quake-scale, #modal-bulletin) p { font-size: 15px; line-height: 1.6; }
#modal-bulletin { border: 1px solid var(--ui-line); border-radius: 10px; overflow: hidden; }
#modal-bulletin .bulletin-text { white-space: pre-line; margin-bottom: 16px; }
#alert-modal a { color: var(--ui-green); text-decoration: underline; text-underline-offset: 3px; }
#modal-actions-section { padding: 18px; border: 0; border-radius: 8px; }
#modal-actions-section h4 { font-size: 16px; margin-bottom: 12px; }
#modal-actions-section .actions-list { display: block; margin: 0; padding-left: 18px; list-style: disc; font-weight: 400; }
#modal-actions-section .actions-list li { padding-left: 2px; margin-top: 8px; font-size: 16px; line-height: 1.55; color: var(--ui-ink); }
#modal-actions-section .actions-list li::before { content: none; }
#modal-actions-section .actions-list li:has(> a) { list-style: none; margin-left: -18px; padding: 8px 0 0; border-top: 1px solid var(--ui-line); }
#modal-actions-section .actions-list li:has(> a):first-child { border: 0; padding-top: 0; margin-top: 0; }
#modal-actions-section a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
#alert-modal :is(.felt-toggle-row, .did-you-feel) { background: transparent; border: 0; border-radius: 0; padding: 0; margin: 0; }
#alert-modal .did-you-feel-head { display: block; }
#alert-modal .did-you-feel-privacy { display: block; margin-top: 6px; font-size: 12px; }
#alert-modal .did-you-feel-actions { gap: 8px; }
#alert-modal .did-you-feel-btn { min-height: 44px; min-width: 90px; border-radius: 8px; padding: 10px 8px; }
#modal-feedback { border-top: 1px solid var(--ui-line); padding-top: 16px; }
#modal-feedback h4 { font-size: 14px; margin: 0 0 6px; }
#modal-feedback p { font-size: 13px; color: var(--ui-muted); line-height: 1.5; margin: 6px 0; }
#modal-feedback p:empty { display: none; }
.alert-feedback-actions { display: flex; gap: 8px; margin-top: 12px; }
.alert-feedback-actions button { min-height: 44px; min-width: 64px; border: 1px solid var(--ui-line); background: white; color: var(--ui-ink); border-radius: 8px; cursor: pointer; }
.alert-feedback-actions button[aria-pressed='true'] { background: var(--ui-green); color: white; }
.alert-feedback-actions button:disabled { opacity: .5; cursor: default; }

/* A compact status introduction leaves the actual alerts in view. */
body.unified-app .uh-place-toggle { font-size: 22px; font-weight: 600; text-transform: none; letter-spacing: -.025em; }
body.unified-app .uh-inner { text-align: left; }
body.unified-app .uh-kicker { justify-content: flex-start; margin: 0; }
body.unified-app .uh-freshness { margin: 8px 0; font-size: 12px; }
body.unified-app .uh-national-context { margin-block: 0; }
body.unified-app .uh-national-context > summary { min-height: 44px; padding-block: 12px; box-sizing: border-box; }
body.unified-app .uh-controls { margin-top: 0; justify-content: flex-start; font-size: 13px; }
body.unified-app .uh-scrollcue { display: none; }
body.unified-app .uh-rail-item { background: transparent; border: 0; border-bottom: 1px solid #ffffff26; border-radius: 0; padding: 14px 0; }

/* Alerts are a readable list; feedback lives at the end of each detail. */
body:is(.unified-app,.has-unified-feed) #alert-list-container { padding-inline: 18px; background: #fff; }
body:is(.unified-app,.has-unified-feed) #alert-list-container .uf-feed-card { padding: 16px 0; margin: 0; border: 0; border-bottom: 1px solid var(--ui-line); border-radius: 0; box-shadow: none; }
body:is(.unified-app,.has-unified-feed) #alert-list-container .uf-feed-card.active { box-shadow: inset 3px 0 var(--ui-green); padding-left: 12px; }
.uf-feed-card .uf-shaking-header { background: transparent; border: 0; padding: 0; margin: 0 0 8px; }
.uf-feed-card .uf-shaking-header > svg { display: none; }
body.live-civic .alerts-summary-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 18px 12px; }
body.live-civic .feed-scope { width: auto; flex: 1 1 190px; margin: 0; padding: 0; order: 0; }
body.live-civic .feed-filters-fold { order: 1; }
body.live-civic .feed-filters-fold:not([open]) { margin: 0; }
body.live-civic .feed-filters-fold[open] { flex-basis: 100%; }
body.live-civic #alerts-count-text { flex-basis: 100%; order: 2; margin: 0; font-size: 12px; }
body.live-civic .feed-filters-fold > summary.feed-filters-summary { text-transform: none; font-size: 13px; }
body.live-civic .feed-filters-fold > summary.feed-filters-summary::after { content: '+'; }
body.live-civic .feed-filters-fold[open] > summary.feed-filters-summary::after { content: '−'; }
@media (max-width: 899px) {
  #alert-modal { padding: 0; }
  #alert-modal .modal-card { width: 100%; height: 100dvh; max-height: 100dvh; max-width: none; border: 0; border-radius: 0; }
  #alert-modal .modal-header { padding: calc(18px + env(safe-area-inset-top,0px)) 20px 18px; }
  #alert-modal .modal-close-btn { top: calc(10px + env(safe-area-inset-top,0px)); }
  #alert-modal .modal-body { padding: 20px 20px calc(24px + env(safe-area-inset-bottom,0px)); gap: 20px; }
  #alert-modal .modal-title-group { padding-right: 36px; }
  #alert-modal .modal-header h3 { font-size: 22px; }
  #alert-modal .modal-meta { font-size: 13px; }
  body.unified-app .uh-place-toggle { font-size: 20px; }
}

/* First visit: choose a place or browse nationwide before interpreting local status. */
body.unified-app .unified-hero { padding: 28px 24px 22px; }
body.unified-app .uh-cols { display: grid; grid-template-columns: minmax(0,1fr); gap: 28px; max-width: 1200px; }
body.unified-app .uh-inner { margin: 0; max-width: 100%; }
.uh-setup { min-width: 0; }
.uh-welcome-title { font-size: clamp(25px, 2.4vw, 34px); line-height: 1.2; font-weight: 700; letter-spacing: -.035em; margin: 0 0 12px; max-width: 20ch; }
.uh-welcome-copy { color: #d0e1d8; font-size: 15px; line-height: 1.6; max-width: 46ch; margin: 0; }
body.unified-app .uh-setup .uh-locate { margin: 20px 0 0; max-width: none; }
.uh-locate-lead { display: block; font-size: 13px; line-height: 1.5; }
.uh-browse { display: inline-flex; gap: 12px; align-items: center; min-height: 44px; margin-top: 6px; font-size: 14px; font-weight: 600; color: #b5f0d1; text-underline-offset: 4px; }
#uh-place-message { font-size: 14px; line-height: 1.5; color: #ffe1ab; }
#uh-place-message:empty { display: none; }
.uh-source-note { font-size: 12px; line-height: 1.6; color: #bfd2c7; margin: 12px 0 0; }
.uh-source-note a { color: inherit; text-underline-offset: 3px; }
body.unified-app .is-first-visit .uh-status-word { font-size: 15px; font-weight: 600; letter-spacing: 0; margin: 8px 0; }
body.unified-app .is-first-visit .uh-brief-big { font-size: clamp(20px, 2vw, 25px); margin: 8px 0; max-width: 45ch; }
body.unified-app .is-first-visit .uh-kicker { margin: 0 0 8px; }
body.unified-app .uh-rail { margin: 0; width: auto; }
body.unified-app .uh-setup:not([hidden]) ~ .uh-rail { display: none; }
body.unified-app .uh-stats { margin-top: 14px; }
body.unified-app .uh-scrollcue { display: none; }
body.unified-app .is-national-urgent .uh-inner { grid-column: 1 / -1; grid-row: 1; }
body.unified-app .is-national-urgent .uh-status-word { color: #ffad8a; font-size: 28px; }
@media (min-width: 900px) {
  body.unified-app .unified-hero:is(.is-first-visit,.has-notices) .uh-cols,
  body.unified-app .uh-cols:has(> .uh-setup:not([hidden])) { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 40px; }
  body.unified-app .is-first-visit:not(.is-national-urgent) .uh-inner { border-left: 1px solid #ffffff25; padding-left: 40px; box-sizing: border-box; }
  body.unified-app .dashboard-header { padding-block: 10px; min-height: 64px; box-sizing: border-box; }
}
@media (max-width: 899px) {
  body.unified-app #unified-hero .uh-cols { display: grid; padding-top: 0; gap: 24px; }
  body.unified-app .is-first-visit:not(.is-national-urgent) .uh-inner { border-top: 1px solid #ffffff25; padding-top: 20px; }
  body.unified-app .uh-setup .uh-ny-pick input { flex-basis: 100%; }
  body.unified-app .uh-ny-gps { flex: 1; }
  body.unified-app .uh-rail { margin: 0; }
  .uh-welcome-title { font-size: 27px; max-width: 23ch; }
}
.sidebar-title { overflow-wrap: anywhere; }
.alert-list-empty { padding: 28px 18px; color: var(--ui-ink); }
.alert-list-empty h3 { font-size: 19px; line-height: 1.35; margin: 0 0 10px; }
.alert-list-empty p { font-size: 14px; line-height: 1.6; color: var(--ui-muted); margin: 0 0 16px; }
.feed-empty-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.feed-empty-actions button, .uf-list-note button { min-height: 44px; border: 1px solid var(--ui-line); border-radius: 8px; padding: 10px 14px; background: white; color: var(--ui-green); font-size: 14px; font-weight: 600; cursor: pointer; }
.feed-empty-actions a { color: var(--ui-green); min-height: 44px; display: inline-flex; align-items: center; font-size: 14px; }
.map-footer { position:absolute; bottom:28px; left:16px; max-width:min(310px,calc(100% - 80px)); z-index:3; display:flex; flex-direction:column; align-items:flex-start; gap:10px; pointer-events:none; }
body .map-footer .map-report-fab { position:static; min-height:44px; pointer-events:auto; box-shadow:0 2px 8px #173c3020; }
.map-viewport:has(.felt-map-bar:not([hidden])) .map-footer { bottom:112px; }
.map-scope-caption { background: #fffffff2; border: 1px solid var(--ui-line); border-radius: 8px; padding: 10px 12px; color: var(--ui-ink); pointer-events: none; }
.map-scope-caption strong { display: block; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.map-scope-caption span { display: block; margin-top: 3px; font-size: 11px; line-height: 1.4; color: var(--ui-muted); }
body .uf-map-identifier.has-highway { position:relative; width:44px; height:48px; padding:0; border:0; background:transparent; box-shadow:none; }
.uf-map-identifier.has-highway .nz-highway-shield { width:40px; height:44px; }
.uf-road-incident { position:absolute; right:-7px; top:-6px; display:grid; place-items:center; width:23px; height:23px; border-radius:50%; background:#fff; color:#273d32; border:1.5px solid currentColor; box-shadow:0 1px 3px #173c3030; }
.uf-road-incident svg { width:16px; height:16px; }
.uf-tone-resolved .uf-road-incident { color:#237c52; }
.wx-peak-summary { margin:4px 0 8px; font-size:14px; line-height:1.5; color:var(--text-secondary); }
.wx-chart-key { display:flex; flex-wrap:wrap; gap:8px 16px; font-size:12px; line-height:1.5; color:var(--text-secondary); }
.wx-chart-key span { display:inline-flex; align-items:center; gap:6px; }
.wx-chart-key i { display:inline-block; width:18px; height:10px; flex:none; }
.wx-key-forecast { background:#64758720; }
.wx-key-warning { background:#e9a22435; }
.wx-chart-key .wx-key-threshold { height:0; border-top:2px dashed var(--hazard-red); }


.rk-cond .wx-tip { width:max-content; max-width:100%; box-sizing:border-box; white-space:normal; line-height:1.5; }
.rk-cond .wx-tip i { display:block; }

@media(max-width:600px) { .rk-cond .wx-tick-minor { display:none; } }

/* Compact disclosure rows share one rhythm with the rest of alert details. */
#alert-modal :is(#modal-telemetry-hud, #modal-cameras-container) { margin:0; }
#alert-modal .local-breakdown-container { margin:0; padding:0; border:1px solid var(--ui-line); border-radius:10px; overflow:hidden; }
#alert-modal :is(.local-breakdown-toggle, #modal-bulletin > summary) { display:flex; align-items:center; gap:12px; min-height:54px; padding:14px 16px; margin:0; font:600 16px/1.5 var(--ui-font); color:var(--ui-ink); background:#f7f9f7; }
#alert-modal .local-breakdown-toggle .toggle-icon { display:none; }
#modal-bulletin > summary { list-style:none; }
#modal-bulletin > summary::-webkit-details-marker { display:none; }
#modal-bulletin > summary::after { content:''; width:7px; height:7px; border-right:2px solid var(--ui-muted); border-bottom:2px solid var(--ui-muted); transform:rotate(45deg); margin-left:auto; margin-right:4px; flex:none; }
#modal-bulletin[open] > summary::after { transform:rotate(225deg); }
#alert-modal .local-breakdown-container.expanded > .local-breakdown-content { padding:16px; border-top:1px solid var(--ui-line); }
#alert-modal .local-breakdown-list { padding-top:0; }
#modal-bulletin[open] > summary { border-bottom:1px solid var(--ui-line); }
#modal-bulletin .bulletin-text { margin:16px; }
#modal-bulletin > a { display:flex; align-items:center; min-height:44px; margin:0 16px 12px; font-size:14px; }
#modal-news-section .actions-list { margin:0; }
#modal-news-list li { padding:0; }
#modal-news-list li::before { content:none; }
#modal-news-list a { display:block; min-height:44px; padding-block:8px; box-sizing:border-box; line-height:1.55; }
#alert-modal .attribution-row { margin-top:0; }

/* Both scopes belong on the Overview; only supporting detail is folded. */
body.unified-app .is-located .uh-inner { display:flex; flex-direction:column; gap:20px; }
.uh-local { min-width:0; }
body.unified-app .is-local-quiet .uh-status-word { font-size:22px; margin:4px 0 8px; }
body.unified-app .uh-brief-sub:empty { display:none; }
body.unified-app .uh-natbrief { text-align:left; margin:0; padding:20px; background:#ffffff08; border:1px solid #ffffff30; border-radius:12px; }
body.unified-app .uh-natbrief.is-urgent { border-color:#ff9577; }
.uh-natbrief.is-urgent .nb-tag { color:#ffb19b; }
.uh-natbrief .nb-tag { margin:0 0 10px; font-size:11px; letter-spacing:.08em; color:#b9dcc8; }
.uh-natbrief .nb-head { margin:0; font-size:22px; line-height:1.35; color:#f3f7f4; }
.uh-natbrief .nb-sub { margin:12px 0; font-size:16px; line-height:1.6; color:#d5e4dc; }
.uh-natbrief .nb-meta { margin:12px 0 4px; font-size:12px; line-height:1.5; color:#b9ccc1; }
.uh-natbrief .nb-browse { display:inline-flex; align-items:center; min-height:44px; font-size:14px; font-weight:600; color:#b5f0d1; text-underline-offset:4px; }
.nb-sources { border-top:1px solid #ffffff20; margin-top:8px; }
.nb-sources summary, .uh-source-details summary { min-height:44px; padding:12px 0; box-sizing:border-box; cursor:pointer; font-size:13px; color:#b9ccc1; }
.nb-sources p { font-size:13px; line-height:1.5; color:#b9ccc1; }
.nb-sources a { color:inherit; }
.uh-natbrief .ai-feedback-controls { margin:0; padding:8px 0; }
body.unified-app .is-located .uh-controls { margin:0; border-top:1px solid #ffffff20; padding-top:8px; }
@media(max-width:899px) {
  body.unified-app .is-located .uh-inner { gap:16px; }
  body.unified-app .uh-natbrief { padding:16px; }
  .uh-natbrief .nb-head { font-size:20px; }
  body.unified-app .is-located .uh-controls { gap:16px; }
  .is-located #uh-ny-change, .is-located .uh-ctl-sep { display:none; }
}
