/* Presentation layer. Contrast tokens and accessible interaction rules live in site.css. */
/* On the root as well as the body. site.css paints :root white, and a white root stops the body's colour reaching the whole canvas: it then ends where
   the content does, which in a frame taller than the content is a band with white below it. (:root, not html: it has to outrank that rule.) */
:root, body { background: #f4f7f9; }
.page-shell { padding: 28px; }
.intro { align-items: flex-end; gap: 24px; margin-bottom: 22px; }
h1 { font-size: clamp(1.75rem, 2.5vw, 2.125rem); font-weight: 700; letter-spacing: -.035em; }
.intro #introduction { margin-top: 8px; }
.time-zone-note { flex-shrink: 0; max-width: 15rem; margin: 0; text-align: right; }
.intro-meta { padding-top: 6px; }
.workspace { gap: 20px; }
.outage-summary { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px 20px; border-radius: 12px; border-top: 3px solid var(--accent); box-shadow: 0 3px 12px #25354008; }
.summary-heading { width: 100%; gap: 12px; }
.overview-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; }
.overview-title h2 { margin: 0; font-size: 1.25rem; letter-spacing: -.02em; }
.overview-condition { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; font-weight: 600; color: var(--link); }
.overview-condition > span { width: 7px; height: 7px; flex: none; border-radius: 50%; background: currentColor; }
.overview-condition.has-outages, .overview-condition.is-delayed { color: var(--unplanned); }
/* All clear: a green check, and only here. Dark enough to read as text on white (5.1:1). */
.overview-condition.is-clear { color: #2e7d32; }
.overview-check { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.refresh-control { display: flex; align-items: center; gap: 12px; flex: none; }
.refresh-countdown { color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.refresh-countdown:empty { display: none; }
.summary-heading .plain-button { padding: 6px 10px; min-height: 44px; border: 1px solid var(--control-border); border-radius: 6px; flex: none; }
.overview-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; min-width: 0; }
.overview-group { min-width: 0; }
.overview-metric .overview-title { margin: 0; color: var(--ink); font-size: .875rem; font-weight: 600; line-height: 1.5; }
/* Planned work is one card; electric and water are two columns inside it, told apart by their colour, not boxed. */
.overview-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
.overview-part { margin: 0; min-width: 0; }
.overview-planned .overview-electric, .overview-planned .overview-water { background: none; padding: 0 0 0 12px; }
.overview-planned .overview-part dt { font-size: .875rem; font-weight: 600; }
/* Plain lines, not figures: "2 scheduled", "1 happening now". */
.overview-metric .overview-line { margin: 6px 0 0; font-size: 1.25rem; font-weight: 650; line-height: 1.3; letter-spacing: 0; color: var(--ink); }
.overview-metric .overview-none, .overview-planned .overview-part .overview-none { color: var(--muted); font-weight: 400; font-size: 1rem; }
.overview-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; min-width: 0; }
.overview-metric { padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: #f4f7f9; min-width: 0; }
.overview-metric dt { color: var(--ink); font-size: .875rem; font-weight: 600; }
.overview-metric dd { margin: 5px 0 0; font-size: 2.25rem; font-weight: 700; line-height: 1.15; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.overview-metric .overview-metric-note { margin-top: 7px; color: var(--muted); font-size: .875rem; font-weight: 400; line-height: 1.5; letter-spacing: 0; }
.overview-impact { background: #fff3eb; border-left: 3px solid var(--unplanned); }
.overview-impact dd:not(.overview-metric-note) { color: var(--unplanned); }
/* The two boxes are shortcuts to the matching tab. The title is the real button, so the keyboard and a screen reader find it, and it stretches over the whole box. */
.overview-metric { position: relative; cursor: pointer; transition: box-shadow .2s var(--ease-out); }
.overview-metric:hover { box-shadow: 0 2px 10px #25354026; }
.overview-jump { min-height: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; }
.overview-jump::after { content: ""; position: absolute; inset: 0; border-radius: 8px; }
.overview-jump:focus-visible { outline: none; }
.overview-jump:focus-visible::after { outline: 3px solid var(--link); outline-offset: 2px; }
/* Planned work is drawn in the utility's colour, as on the map: electric orange, water blue. */
.overview-electric { background: #fff3eb; border-left: 3px solid var(--accent); }
.overview-electric dd:not(.overview-metric-note) { color: var(--unplanned); }
.overview-water { background: #eef7fc; border-left: 3px solid var(--primary); }
.overview-water dd:not(.overview-metric-note) { color: var(--planned); }
.overview-update { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; }
.outage-summary .freshness { padding: 0; border: 0; max-width: none; }
.outage-summary .freshness .status-dot { margin-top: 7px; }
.outage-summary .freshness > div { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.outage-summary .freshness strong { font-weight: 600; }
.outage-summary .freshness div > span { margin: 0; }
.overview-refresh-note { font-size: .875rem; color: var(--muted); }
.outage-summary .inline-warning { margin: 0; }
.map-column { position: relative; border-radius: 12px; box-shadow: 0 4px 16px #25354009; }
/* The map's own bar, and only that: which map, which basemap, where to look. Leaving the map is a different
   kind of thing and lives outside it. */
.map-toolbar { padding: 12px 16px; gap: 10px 20px; }
.map-tabs { border-radius: 8px; padding: 4px; gap: 4px; background: #f0f4f7; }
.map-tabs button { padding: 10px 18px; border-radius: 6px; }
/* The selected tab sits ON the sliding pill (.map-tabs-indicator), so its own background and shadow are
   turned off and its text is white - the same pairing site.css gives it without this file. */
.map-tabs .selected, .map-tabs .selected:hover { background: transparent; box-shadow: none; color: #fff; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.map-tabs button:not(.selected):hover { color: var(--link); }
.map-tools { gap: 16px; }
.map-details-link { text-underline-offset: 4px; }
.map-details-link span { margin-left: 4px; display: inline-block; transition: transform .3s var(--spring); }
.map-details-link:hover span { transform: translateY(2px); }
/* The basemap choice lives on the map, in the corner beside the zoom buttons (outages.js moves it there): one icon button the size of
   theirs, which opens upwards on two pictures to choose between. The names are for screen readers and a tooltip only. */
/* The map's bottom-right corner lays its parts out side by side; the basemap button goes above the zoom buttons instead, like one more of them. */
.esri-ui-bottom-right { flex-direction: column; align-items: flex-end; gap: 8px; }
.basemap-control .dropdown-button { justify-content: center; gap: 0; width: 32px; height: 32px; min-height: 0; padding: 0; border: 0; border-radius: 2px; background: #fff; color: #6e6e6e; box-shadow: 0 1px 2px #0000004d; }
.basemap-control .dropdown-button:hover:not(:disabled), .basemap-control .dropdown-button[aria-expanded=true] { background: #f3f3f3; color: #151515; border: 0; }
.basemap-control .dropdown-button .icon { width: 18px; height: 18px; }
.basemap-control .dropdown-menu { top: auto; bottom: calc(100% + 8px); right: 0; display: flex; gap: 8px; min-width: 0; padding: 8px; transform-origin: bottom right; transform: translateY(8px) scale(.96); }
.basemap-control .dropdown.is-open .dropdown-menu { transform: none; }
.basemap-control .dropdown-menu [role=option], .basemap-control .dropdown-menu [role=option]:hover { flex: none; min-height: 0; justify-content: center; padding: 3px; border: 2px solid transparent; border-radius: 8px; }
.basemap-control .dropdown-menu [aria-selected=true] { border-color: var(--link); }
.basemap-control .dropdown-menu [aria-selected=true]::after { content: none; }
.basemap-thumb { display: block; width: 48px; height: 48px; border-radius: 5px; }
/* The one dropdown (dropdown.js): the button has the tabs' radius and weight, the chevron turns, and the list
   drops in on the page's spring with the chosen option ticked. */
.dropdown-button { border-radius: 8px; padding: 9px 12px; box-shadow: 0 1px 2px #25354012; }
.dropdown-button:hover:not(:disabled) { border-color: var(--link); background: #f7fafc; }
.dropdown-button:disabled { box-shadow: none; }
.dropdown-chevron { transition: transform .45s var(--bounce); }
.dropdown.is-open .dropdown-chevron { transform: rotate(180deg); }
.dropdown-menu { border-radius: 10px; border-color: var(--line); transform-origin: top right; opacity: 0; transform: translateY(-8px) scale(.96); transition: opacity .18s var(--ease-out), transform .45s var(--bounce); }
.dropdown.is-open .dropdown-menu { opacity: 1; transform: none; }
.dropdown-menu [role=option] { border-radius: 6px; transition: background-color .2s var(--ease-out), padding-left .25s var(--spring); }
.dropdown-menu [role=option]:hover { padding-left: 16px; }
.address-results { border-radius: 10px; box-shadow: 0 8px 24px #25354026; }
.address-results button { padding: 12px 14px; transition: background-color .25s var(--ease-out), padding-left .3s var(--spring); }
.address-results button:hover, .address-results button:focus-visible { padding-left: 18px; }
.plain-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.plain-button:hover, .map-link:hover { text-decoration: underline; text-underline-offset: 4px; }
#reset-map { padding: 8px 0; }
.icon { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.map-shell { height: clamp(580px, 48vw, 740px); }
/* It floats ON the map, so it is as small as it can be and still be usable: the map is what the reader came
   for, and a panel that fills a corner of it is a panel in the way. Targets stay 44px; the savings come from
   the padding, the gaps, and a Search button that is a magnifier rather than a word. */
.map-navigation { top: 16px; left: 16px; width: 390px; padding: 8px; border-radius: 10px; box-shadow: 0 6px 24px #25354026; }
.map-navigation label { font-weight: 650; margin-bottom: 10px; }
.address-search-row { gap: 6px; }
.address-search-row input { flex: 1 1 auto; padding: 9px 11px; font-size: .9375rem; }
.address-field:has(> .field-clear:not([hidden])) input { padding-right: 42px; }
.field-clear .icon { width: 16px; height: 16px; stroke-width: 2.2; }
.icon-button { border-radius: 8px; }
.icon-button .icon { width: 19px; height: 19px; stroke-width: 2; }
.icon-button.is-primary:hover:not(:disabled) { background: #005a89; border-color: #005a89; }
.icon-button:not(.is-primary):hover:not(:disabled) { border-color: var(--link); background: #eef7fc; }
.location-status { margin-top: 6px; font-size: .8125rem; line-height: 1.45; }
.address-results { margin-top: 8px; }

/* The popover that names an icon button. Glass: what is behind it - the map, or the panel - shows through
   blurred and a little brighter, which is what keeps a label this small legible over photography. It is
   decoration; the button's real name is the text beside the icon, which only a screen reader reads. */
[data-tip] { position: relative; }
[data-tip]::after {
    content: attr(data-tip);
    position: absolute; top: calc(100% + 8px); left: 50%;
    z-index: 30; padding: 6px 10px; border-radius: 9px;
    font-size: .75rem; font-weight: 600; white-space: nowrap; color: var(--ink);
    background: rgba(255, 255, 255, .62);
    -webkit-backdrop-filter: blur(14px) saturate(180%); backdrop-filter: blur(14px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, .7); box-shadow: 0 8px 24px #2535401f;
    opacity: 0; translate: -50% -6px; pointer-events: none;
    transition: opacity .18s var(--ease-out), translate .35s var(--bounce);
}
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; translate: -50% 0; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    [data-tip]::after { background: rgba(255, 255, 255, .96); }
}
@media (prefers-reduced-motion: reduce) { [data-tip]::after { translate: -50% 0; } }
.address-search-row input { border-radius: 6px; padding: 11px 12px; }
.map-legend { padding: 18px 22px 10px; gap: 16px 26px; }
.awareness { background: #eef7fc; padding: 16px 22px; border-top: 1px solid var(--line); }
/* "If your area is shaded, we already know" - the one sentence that saves a phone call, so it reads as the strongest line under the map. */
.awareness { justify-content: center; }
.awareness .wording { flex: 0 1 auto; }
.awareness p { font-size: .875rem; font-weight: 700; text-align: center; }
/* While something is out, the box that says "if your area is shaded, we already know" breathes: its tint deepens a little and settles, twice, like the
   active status dot, and then holds still. Colour only, no movement, and none at all for a reader who asked for less motion. */
.awareness.is-pulsing { animation: awareness-pulse 2.4s ease-in-out 2; }
@keyframes awareness-pulse {
    0%, 100% { background-color: #eef7fc; }
    45% { background-color: #d3e9f7; }
}
@media (prefers-reduced-motion: reduce), print { .awareness.is-pulsing { animation: none; } }
/* The lists are the page's three sections and used to run into one another 30px apart with nothing between.
   Each now opens with a rule and stands well clear of the last, so "At a glance", "Current outages" and
   "Recently restored" read as separate parts of the page rather than one long column. */
#outage-content { gap: 52px; margin-top: 16px; }
#outage-content > section { border-top: 1px solid var(--line); padding-top: 30px; }
.outage-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.list-heading { justify-content: flex-start; gap: 12px; margin-bottom: 2px; }
.list-heading h2 { font-size: 1.5rem; }
.count { padding: 2px 9px; background: white; border: 1px solid var(--line); min-width: 30px; font-weight: 600; }
.outage-card { display: flex; flex-direction: column; position: relative; padding: 18px 20px; border-radius: 10px; border-left-width: 4px; box-shadow: 0 2px 6px #25354004; container-type: inline-size; }
.card-top { flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.outage-badge { padding: 4px 9px; margin-left: -2px; border-radius: 4px; background: #fff3eb; }
.planned .outage-badge { background: #eef7fc; }
.outage-badge i { width: 7px; height: 7px; }
.outage-status { border: 1px solid var(--line); border-radius: 4px; padding: 3px 8px; }
.outage-status.is-active { display: inline-flex; align-items: center; gap: 8px; --active-halo: #00699f26; }
.outage-status.is-active::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--link); animation: active-status-pulse 2.4s ease-out 2; }
/* Two gentle pulses on appearance/refresh, then settle; keep the label steady. */
@keyframes active-status-pulse {
    0%, 15% { box-shadow: 0 0 0 0 var(--active-halo); }
    75%, 100% { box-shadow: 0 0 0 5px transparent; }
}
@media (prefers-reduced-motion: reduce), print {
    .outage-status.is-active::before { animation: none; }
}

/* The halo on the card the map just sent you to lives in the motion section at the foot of this
   file - it has to be declared after .is-live .outage-card, which would otherwise outrank it. */
.outage-card h3 { font-size: 1.25rem; line-height: 1.35; margin-bottom: 6px; }
.cause { margin-bottom: 12px; }
.streets { font-size: 1rem; margin-bottom: 8px; }
.streets span { margin-bottom: 4px; }
.event-details { gap: 10px 24px; padding: 4px 0 12px; }
.restoration { padding-top: 12px; }
.restoration strong { font-size: 1.5rem; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-right: .25em; }
.restoration progress { height: 8px; margin-top: 8px; }
.progress-caption { margin-top: 6px; }
.public-message { border-left: 2px solid var(--control-border); border-radius: 0 6px 6px 0; padding: 10px 12px; margin: 4px 0 10px; }
/* The whole strip across the foot of the card is the button, and it fills with the outage's colour under a
   pointer - so the thing that looks pressable is the thing that is. The negative margins take it out to the
   card's edges; the radius matches the card's corners so the fill does not square them off. */
.map-link { margin: 12px -20px -18px; padding: 12px 20px; border-radius: 0 0 8px 8px; font-weight: 650; }
/* The fill is a gradient, and a gradient cannot be transitioned - setting one on hover made it snap in.
   It lives on a layer of its own instead, and what fades is that layer's opacity. */
.map-link { position: relative; isolation: isolate; }
.map-link::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(120% 180% at 50% 50%, color-mix(in srgb, var(--category, var(--link)) 82%, white) 0%, var(--category, var(--link)) 62%, color-mix(in srgb, var(--category, var(--link)) 88%, black) 100%);
    opacity: 0;
    z-index: -1;
    transition: opacity .3s var(--ease-out);
}
.map-link:hover, .map-link:focus-visible { color: #fff; text-decoration: none; }
.map-link:hover::before, .map-link:focus-visible::before { opacity: 1; }
.map-link:active::before { opacity: 1; background: var(--category, var(--link)); }
@media (prefers-reduced-motion: reduce) { .map-link::before { transition-duration: .01ms; } }
.map-link:hover span, .map-link:focus-visible span { background: rgba(255, 255, 255, .22); }
.map-link:focus-visible { outline-offset: -3px; }
.restoration { margin-bottom: 12px; }
.map-link span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #eef7fc; transition: background-color .25s var(--ease-out); }
/* Two cards in a row are as tall as the taller. The details take the spare height, so the "View area on map" bar is always at the
   bottom of its card, not floating mid-card with white space beneath it; the details' own rows stay at the top. */
.outage-card-details { display: grid; min-width: 0; flex: 1 1 auto; align-content: start; }
.outage-facts, .outage-impact { min-width: 0; }
@container (min-width: 42rem) {
    .outage-card-details:has(.outage-impact) { grid-template-columns: 1.1fr 1fr; gap: 24px; padding-bottom: 10px; }
    .outage-impact { border-left: 1px solid var(--line); padding-left: 24px; }
    .outage-impact .restoration { border-top: 0; padding-top: 0; }
}
/* Room above a card that is scrolled to the top of the screen (outages.js bringCardIntoView). */
.outage-card { scroll-margin-top: 24px; }
/* "Show on map" needs both script and a map; without either it would be a button that does nothing. */
html:not(.js-enabled) .restored-map-toggle, .map-failed .restored-map-toggle { display: none; }
/* The facts and the map button share a row, the button last. Its own round icon button, not .map-link: that
   one is the full-width bar along the foot of an outage card, with negative margins and a gradient layer. */
.restored-facts { display: flex; align-items: center; gap: 24px; min-width: 0; }
.restored-map-toggle {
    flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
    border: 1px solid var(--link); border-radius: 50%; background: #fff; color: var(--link); cursor: pointer;
}
.restored-map-toggle .icon { width: 22px; height: 22px; }
.restored-map-toggle:hover { background: #eef7fc; }
.restored-map-toggle[aria-pressed="true"] { background: #2e7d32; border-color: #2e7d32; color: #fff; }
.restored-map-toggle[aria-pressed="true"]:hover { background: #1b5e20; }
@media (max-width: 760px) { .restored-facts { flex-wrap: wrap; } }
.legend-note { color: var(--muted); font-size: .875rem; }
.legend-swatch.restored { color: #2e7d32; border-radius: 0; background: rgba(46, 125, 50, .14); }
.recent-section { margin-top: 0; border-top: 1px solid var(--line); }
.recent-heading { align-items: center; margin-bottom: 20px; }
.recent-heading h3 { font-size: 1.5rem; margin: 0; }
/* Inside a list's grid, the recently restored spans every column and sits apart from the cards above it. */
.outage-list > .recent-section { grid-column: 1 / -1; margin-top: 18px; }
/* A label over one group of cards in the grid: the whole row, with the cards that follow it close beneath. */
.outage-list > .list-group { grid-column: 1 / -1; margin: 10px 0 -2px; font-size: 1.0625rem; font-weight: 650; }
.outage-list > .list-group:first-of-type { margin-top: 0; }
.restored-card { border-radius: 10px; padding: 22px 24px; gap: 24px; }
.resolved-badge { background: #edf6fc; font-weight: 600; }
.page-footer { padding: 24px 28px; background: white; border-radius: 12px; margin-top: 44px; border-color: var(--line); border-top: 3px solid var(--primary); }
.page-footer h2 { font-size: 1.375rem; margin-bottom: 10px; }
.report-panel { border-radius: 12px; box-shadow: 0 3px 12px #25354008; margin-top: 4px; }
.tip-button { border-radius: 8px; box-shadow: 0 1px 2px #25354012; }
.tip-button:hover:not(:disabled) { border-color: var(--link); background: #eef7fc; }
.tip-button.is-primary:hover:not(:disabled) { background: #005a89; border-color: #005a89; }
.tip-close .icon { width: 16px; height: 16px; stroke-width: 2.2; }
@media (max-width: 760px) {
    .tip-flow { padding: 0 34px; }
    .tip-answers .tip-button { flex: 1 1 8rem; }
}
.report-button { border-radius: 8px; }
.report-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.warning, .inline-warning { border-left: 3px solid var(--unplanned); }

@media (max-width: 1100px) {
    .time-zone-note { max-width: 11rem; }
    .map-tools { gap: 12px; }
}
@media (max-width: 760px) {
    .page-shell { padding: 16px; }
    #outage-content { gap: 40px; }
    #outage-content > section { padding-top: 24px; }
    .intro { align-items: flex-start; flex-direction: column; gap: 8px; margin-bottom: 18px; }
    .time-zone-note { max-width: none; text-align: left; }
    .intro-meta { align-items: flex-start; padding-top: 0; gap: 6px; }
    .outage-summary { padding: 14px; gap: 12px; }
    .summary-heading { flex-direction: row; align-items: flex-start; flex-wrap: nowrap; }
    .overview-title { flex-direction: column; align-items: flex-start; }
    .overview-groups { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .overview-split { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .overview-metrics { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .overview-metric { padding: 12px; }
    .overview-metric dd { font-size: 2rem; }
    .map-toolbar { padding: 12px; gap: 10px; }
    .map-tabs { width: 100%; }
    .map-tabs button { flex: 1 1 6rem; padding: 10px; }
    .map-tools { width: 100%; justify-content: space-between; gap: 10px 14px; }
    .map-shell { height: auto; }
    .map-navigation { position: relative; top: auto; left: auto; width: 100%; max-width: none; border-radius: 0; box-shadow: none; padding: 12px 16px; }
    #outage-map { height: 560px; }
    .map-legend { padding: 16px 16px 10px; }
    .awareness { padding: 16px; }
    .outage-card { padding: 16px; }
    .map-link { margin: 12px -16px -16px; padding: 12px 16px; }
    .restored-card { padding: 20px; }
    .outage-list { grid-template-columns: minmax(0, 1fr); }
    .page-footer { padding: 22px; }
    .recent-heading { align-items: flex-start; }
}
@media print {
    body { background: white; }
    .page-shell { padding: 0; }
    .outage-summary, .outage-card, .report-panel, .page-footer { box-shadow: none; }
}

/* ---- Motion. One family of easings - quick to start, long to settle - for everything on the page that moves:
   content arriving, the tab pill sliding, buttons under a finger, the map (outages.js hands goTo the same feel).
   Nothing moves twice: the page rises in once on load; after that a refresh only cross-fades what it replaced,
   and a list the reader switched to rises again because they asked for it. All of it is off for a reader who
   asked their system for less motion. */
/* --bounce overshoots by a few percent and settles: a nudge at the end of a move, not a spring toy. */
:root { --ease-out: cubic-bezier(.22, .61, .36, 1); --spring: cubic-bezier(.32, .72, 0, 1); --bounce: cubic-bezier(.3, 1.18, .5, 1); }
html { scroll-behavior: smooth; }
@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
.notice-banner, .warning, .outage-summary, .report-panel, .outage-card, .restored-card, .empty-state, .recent-section, .page-footer, .address-results, .location-status { animation: rise-in .55s var(--ease-out) both; }
.is-live .outage-summary, .is-live .outage-card, .is-live .restored-card, .is-live .empty-state, .is-live .recent-section { animation: fade-in .4s var(--ease-out) both; }
/* A list the reader switches to rises in as ONE thing: the animation is on the list itself, not on its children. On the children it was overriding their own
   fade-in, and when outages.js took the class off 800ms later their own animation took over and played again - a second flash after the first. */
.is-live .outage-list.is-entering { animation: rise-in .5s var(--ease-out) both; }
.tip-body > * { animation: rise-in .4s var(--ease-out) both; }
.tip-body > :nth-child(2) { animation-delay: 60ms; }
.tip-body > :nth-child(3) { animation-delay: 110ms; }
.outage-list > :nth-child(2), .recent-section > :nth-child(3) { animation-delay: 50ms; }
.outage-list > :nth-child(3), .recent-section > :nth-child(4) { animation-delay: 100ms; }
.outage-list > :nth-child(4), .recent-section > :nth-child(5) { animation-delay: 150ms; }
.outage-list > :nth-child(n+5), .recent-section > :nth-child(n+6) { animation-delay: 200ms; }
/* The card the map just sent you to. Three beats of its own category colour, then nothing: enough
   to find it after a jump, not enough to pull the eye afterwards. The halo is a box-shadow, so it
   never shifts the layout or nudges the scroll position the jump just set.
   It must be declared here, below `.is-live .outage-card`: that rule is also two classes, so the
   later one wins and a pulse written higher up is silently replaced by the refresh cross-fade on
   every card the reader can actually click - which is every card, a moment after load. */
.outage-card.is-targeted, .is-live .outage-card.is-targeted { animation: card-pulse 1.9s var(--ease-out) 1; }
@keyframes card-pulse {
    0%   { box-shadow: 0 0 0 0 transparent; }
    12%  { box-shadow: 0 0 0 5px var(--category); }
    30%  { box-shadow: 0 0 0 0 transparent; }
    48%  { box-shadow: 0 0 0 5px var(--category); }
    66%  { box-shadow: 0 0 0 0 transparent; }
    82%  { box-shadow: 0 0 0 5px var(--category); }
    100% { box-shadow: 0 0 0 0 transparent; }
}
@media print { .outage-card.is-targeted, .is-live .outage-card.is-targeted { animation: none; } }
button, .report-button, .map-link, .icon-button, .map-details-link { transition: background-color .25s var(--ease-out), color .25s var(--ease-out), border-color .25s var(--ease-out), box-shadow .25s var(--ease-out), opacity .25s var(--ease-out), transform .3s var(--spring); }
/* A small button may shrink under the finger; a bar the width of the card may not - it reads as the card
   breaking. The exceptions are in the selector because `button:not(:disabled):active` outranks a class. */
/* .overview-jump is one of them: its ::after is stretched over the whole overview box, and a transformed button becomes the containing block of that overlay, so pressing it shrank the overlay to the button and the click landed on the box. */
button:not(:disabled):not(.map-link):not(.field-clear):not(.overview-jump):active, .report-button:active { transform: scale(.97); }
.map-tabs { position: relative; isolation: isolate; }
.map-tabs-indicator { position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 6px; background: var(--link); box-shadow: 0 2px 6px #00699f3d; z-index: 0; }
/* The pill slides with a small overshoot at the end; its width eases plainly. */
.map-tabs.is-settled .map-tabs-indicator { transition: transform .5s var(--bounce), width .45s var(--spring); }
.map-tabs button { position: relative; z-index: 1; }
.map-message { transition: opacity .5s var(--ease-out), visibility .5s; }
/* It follows the pointer, so it moves every frame: only the fade is animated, never the position. */
.map-tip { animation: fade-in .16s var(--ease-out) both; }
.map-message.is-gone { opacity: 0; visibility: hidden; pointer-events: none; }
#refresh.is-busy .icon { animation: spin .9s linear infinite; }
.overview-condition, .overview-metric dd, .count, .freshness { transition: color .35s var(--ease-out), background-color .35s var(--ease-out); }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, ::before, ::after { animation-duration: .01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    /* The rule above collapses every animation to nothing, which for the halo would mean no answer
       at all to "which card?". So it stops being an animation: the colour is simply held while the
       class is on, and outages.js takes the class off on a timer instead of on animationend. */
    .outage-card.is-targeted, .is-live .outage-card.is-targeted { animation: none !important; box-shadow: 0 0 0 5px var(--category); }
}
@media (forced-colors: active) {
    .map-tabs-indicator { display: none; }
}


/* One outage opened from an email link: a panel above the map, in the page's own card style. */
.outage-focus {
    margin: 0 0 16px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-left: 5px solid var(--primary);
    border-radius: 8px;
    background: var(--paper);
}
/* The band is the utility's colour, as on the map and the outage cards: orange for a power outage (unplanned, or planned electric), blue for water. */
.outage-focus[data-look="Unplanned"], .outage-focus[data-look="Electric"] { border-left-color: var(--accent); }
.outage-focus[data-look="Water"] { border-left-color: var(--primary); }
.outage-focus[data-look="Restored"] { border-left-color: #2e7d32; }
.outage-focus[data-state="NotFound"], .outage-focus[data-state="Unavailable"], .outage-focus[data-state="Withdrawn"], .outage-focus[data-state="Closed"] { border-left-color: var(--control-border); }
.outage-focus h2 { margin: 0 0 4px; font-size: 1rem; color: var(--muted); font-weight: 600; }
.outage-focus .focus-status { margin: 0 0 12px; font-size: 1.15rem; font-weight: 600; }
.outage-focus h3 { margin: 0 0 2px; font-size: 1rem; }
.outage-focus .event-details { margin: 8px 0; }

/* The page for one outage opened from an email link: a single centred column - back link, the outage, its area. */
.linked-layout { max-width: 900px; margin: 0 auto; }
.back-link { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 16px; padding: 8px 0; font-weight: 600; color: var(--link); text-decoration: none; }
.back-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.linked-map .map-shell { height: clamp(320px, 42vw, 480px); }
.linked-map[hidden] { display: none; }
@media (max-width: 760px) { .linked-map .map-shell { height: 320px; } .linked-map #outage-map { height: 100%; } }

/* A map answers only while it has focus (map-engage.js): until then the wheel and a swipe scroll the page. */
#outage-map:focus { outline: none; }
.map-shell.is-engaged #outage-map { box-shadow: inset 0 0 0 3px #0083c7; }
.map-shell:not(.is-engaged) #outage-map .esri-view-surface { touch-action: pan-x pan-y pinch-zoom !important; }
/* Once it has been tapped, the map takes the finger: one finger pans it, two pinch it, and the page waits until a touch elsewhere hands it back. */
.map-shell.is-engaged #outage-map .esri-view-surface { touch-action: none !important; }
.map-engage-hint { position: absolute; left: 50%; bottom: 18px; transform: translate(-50%, 6px); z-index: 3; padding: 9px 16px; border-radius: 999px; background: #253540e6; color: #fff; font-size: 0.9rem; font-weight: 600; pointer-events: none; opacity: 0; transition: opacity 0.2s ease, transform 0.2s ease; max-width: calc(100% - 32px); text-align: center; }
.map-engage-hint.is-shown { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .map-engage-hint { transition: none; } }

.linked-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.linked-top .back-link { margin: 0; }

/* ---- In a frame. The page is meant to be embedded, and a frame is rarely the width of a screen: it is a column in somebody
   else's page, anywhere from a phone to a little over half a laptop. So nothing here is sized by guessing at a device; the
   layout gives way as the room does. Heights are tied to width, never to the frame's height: a host that resizes its frame to fit
   its content would otherwise grow the page, which grows the frame, which grows the page. ---- */

/* The title block and what sits beside it: side by side only while there is room for both to breathe. Below that the notes
   go under the subtitle, on one line if they fit, instead of crowding it from the right. */
@media (max-width: 1000px) {
    .intro { align-items: flex-start; flex-direction: column; gap: 8px; margin-bottom: 18px; }
    .intro-meta { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; padding-top: 0; }
    .time-zone-note { max-width: none; text-align: left; }
}

/* Columns appear only where each has room for its own words; a number and its label never share a line with a neighbour. */
.overview-groups { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.overview-split { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.overview-metrics { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
/* Two cards across wherever each can be a comfortable card, one where it cannot, and never a fixed two. */
.outage-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, max(19rem, calc(50% - 10px))), 1fr)); }

/* A map the height of the column it is in, within limits, so a narrow frame is not given a map taller than the frame. */
.map-shell { height: clamp(420px, 48vw, 740px); }
@media (max-width: 760px) { .map-shell { height: auto; } #outage-map { height: clamp(340px, 85vw, 560px); } }

/* The heading row of "At a glance" gives the refresh control its own line before it lets it push out of the card. */
@media (max-width: 560px) {
    .summary-heading { flex-wrap: wrap; }
    .refresh-control { width: 100%; justify-content: space-between; }
}

/* What planned work is, beneath its cause: the planners' own words, quieter than the title and not a label. */
.work-description { margin: -6px 0 12px; font-size: .8125rem; line-height: 1.5; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }

/* ---- "Saw or heard something?" (tip.js). A column like the single-outage page, a card per question. ---- */
.tip-head h1 { margin: 0 0 6px; }
.tip-intro { margin: 0 0 8px; color: var(--muted); }
.tip-emergency { margin: 0 0 18px; font-weight: 650; color: var(--unplanned); }
.tip-section { margin: 0 0 16px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); min-width: 0; }
.tip-section > legend, .tip-section > h2, .tip-label { display: block; margin: 0 0 10px; padding: 0; font-size: 1.0625rem; font-weight: 650; }
.tip-section > legend { float: left; width: 100%; }
.tip-section > legend + * { clear: both; }
.tip-help { margin: -4px 0 12px; color: var(--muted); font-size: .875rem; }
.tip-choices { display: grid; gap: 8px; }
.tip-choice { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafb; cursor: pointer; }
.tip-choice:hover { border-color: var(--link); background: #eef7fc; }
.tip-choice:has(input:checked) { border-color: var(--link); background: #eef7fc; }
.tip-choice input { width: 20px; height: 20px; flex: none; accent-color: var(--link); }
.tip-field-error { margin: 10px 0 0; color: var(--unplanned); font-weight: 600; }
.tip-status { margin: 0 0 16px; padding: 12px 16px; border-left: 3px solid var(--unplanned); border-radius: 0 8px 8px 0; background: #fff3eb; font-weight: 600; }
.tip-status[hidden], .tip-field-error[hidden] { display: none; }
.tip-map { border: 1px solid var(--line); overflow: hidden; }
.tip-map .map-shell { height: clamp(320px, 55vw, 440px); }
.tip-section textarea { display: block; width: 100%; min-height: 120px; padding: 12px; border: 1px solid var(--control-border); border-radius: 8px; font: inherit; resize: vertical; box-sizing: border-box; }
.tip-count { margin: 6px 0 0; text-align: right; color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.tip-drop { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; padding: 22px 16px; border: 2px dashed var(--control-border); border-radius: 10px; background: #f8fafb; text-align: center; }
.tip-drop.is-over, .tip-drop:focus-within { border-color: var(--link); background: #eef7fc; }
.tip-drop-label { color: var(--link); font-weight: 600; cursor: pointer; }
.js-enabled .tip-drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.js-enabled .tip-camera { position: relative; z-index: 1; }
.tip-camera { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 1px solid var(--link); border-radius: 8px; background: #fff; color: var(--link); font: inherit; font-weight: 600; cursor: pointer; }
.tip-camera[hidden] { display: none; }
.tip-photo-list { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0 0; padding: 0; list-style: none; }
.tip-photo-list li { display: grid; gap: 6px; width: 104px; justify-items: center; }
.tip-photo-list img { width: 104px; height: 104px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.tip-photo-list button { border: 0; background: none; color: var(--link); font: inherit; font-size: .875rem; text-decoration: underline; cursor: pointer; }
.tip-submit { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 32px; border: 0; border-radius: 8px; background: var(--link); color: #fff; font: inherit; font-weight: 650; cursor: pointer; }
.tip-submit:hover:not(:disabled) { background: #005a89; }
.tip-submit:disabled { opacity: .7; cursor: progress; }
/* Off the page rather than display:none, which some robots skip. A person never reaches it by keyboard (tabindex -1) or by eye. */
.tip-trap { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.tip-panel { margin: 0 0 16px; padding: 28px 24px; border: 1px solid var(--line); border-top: 3px solid var(--primary); border-radius: 12px; background: var(--paper); }
.tip-done { text-align: center; }
.tip-done .overview-check { width: 44px; height: 44px; color: #2e7d32; }
.tip-done h1 { margin: 8px 0 12px; }
.tip-link { color: var(--link); font-weight: 600; }
@media (max-width: 520px) { .tip-section { padding: 16px; } .tip-submit { width: 100%; } }
.tip-map .map-shell { height: auto; }
.tip-map #outage-map { height: clamp(300px, 80vw, 440px); }

/* The end of the tip form: a rule above it, and the human check and the button centred beneath. */
.tip-finish { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-top: 8px; padding-top: 22px; border-top: 1px solid var(--line); }
.tip-finish .tip-challenge { display: flex; justify-content: center; min-height: 65px; }
.tip-finish form { margin: 0; }

/* ---- All clear: the badge in the "no current outages" card. A green disc pops in, the check draws itself, one ring ripples out and a few
   sparks fly off - once, when it first appears (outages.js keeps a refresh from replaying it). Drawn to its finished state by default, so it is
   complete wherever the animation does not run: reduced motion, print, and a refresh. ---- */
.empty-state.is-clear { display: flex; align-items: center; gap: 18px; }
.empty-state-text { min-width: 0; }
.all-clear-badge { position: relative; flex: none; width: 52px; height: 52px; color: #2e7d32; }
.all-clear-badge svg { position: relative; display: block; width: 52px; height: 52px; overflow: visible; }
.ac-disc { fill: currentColor; transform-origin: 26px 26px; animation: ac-pop .55s cubic-bezier(.3, 1.4, .5, 1) both; }
.ac-ring { fill: none; stroke: currentColor; stroke-width: 2; transform-origin: 26px 26px; opacity: 0; animation: ac-ripple .9s .2s ease-out both; }
.ac-check { fill: none; stroke: #fff; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 0; animation: ac-draw .4s .3s ease-out both; }
.ac-spark { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #7bc67e; opacity: 0;
    transform: rotate(var(--a)) translateY(-22px); animation: ac-spark .7s .35s ease-out both; }
.ac-spark:nth-child(even) { background: #ffb74d; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; }
@keyframes ac-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes ac-draw { from { stroke-dashoffset: 40; } to { stroke-dashoffset: 0; } }
@keyframes ac-ripple { from { transform: scale(1); opacity: .55; } to { transform: scale(1.7); opacity: 0; } }
@keyframes ac-spark { 0% { opacity: 0; transform: rotate(var(--a)) translateY(-22px) scale(.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-40px) scale(1); } }
.all-clear-badge.is-settled .ac-disc, .all-clear-badge.is-settled .ac-ring, .all-clear-badge.is-settled .ac-check, .all-clear-badge.is-settled .ac-spark { animation: none; }
.all-clear-badge.is-settled .ac-ring, .all-clear-badge.is-settled .ac-spark { opacity: 0; }
@media (prefers-reduced-motion: reduce), print {
    .ac-disc, .ac-ring, .ac-check, .ac-spark { animation: none; }
    .ac-ring, .ac-spark { opacity: 0; }
}
@media (forced-colors: active) { .ac-disc { fill: Highlight; } .ac-check { stroke: HighlightText; } }

/* ---- The build's version, at the very foot of every page: small, light, centred, and still readable. ---- */
.app-links { padding: 18px 16px 0; text-align: center; font-size: .8125rem; }
.app-links a { color: #4a5b66; text-decoration: underline; text-underline-offset: 2px; }
.app-links a:hover, .app-links a:focus-visible { color: var(--primary); }
.app-links + .app-version { padding-top: 6px; }
.app-version { padding: 14px 16px 26px; text-align: center; font-size: .75rem; line-height: 1.2; letter-spacing: .02em; color: #6b7882; }
