/* ==========================================================================
   OUTAGEAUSTRALIA.COM (AU + NZ) — Australian Civic & Public Utility Stylesheet
   Inspired by Bureau of Meteorology (BOM), Service NSW & ABC Emergency.
   Daylight-first, crisp 4px-6px structural edges, tabular numerals, zero AI bloat.
   ========================================================================== */

:root {
    --bg-body: #f5f7f9;
    --bg-surface: #ffffff;
    --bg-subtle: #edf1f5;
    --bg-navy: #0b2545;
    --bg-navy-deep: #071930;

    --border-hairline: #d5dde5;
    --border-strong: #b8c4d0;

    --text-primary: #101828;
    --text-secondary: #344054;
    --text-muted: #5c6877;

    --brand-navy: #0b2545;
    --brand-eucalyptus: #1b6b4f;
    --brand-eucalyptus-hover: #14533d;
    --brand-eucalyptus-soft: #e6f3ed;
    --brand-link: #00529b;
    --brand-link-hover: #00386b;

    --status-ok-fg: #14533d;
    --status-ok-bg: #e6f3ed;
    --status-ok-bd: #9fd3bb;

    --status-warn-fg: #854d0e;
    --status-warn-bg: #fef3c7;
    --status-warn-bd: #f3c969;

    --status-danger-fg: #991b1b;
    --status-danger-bg: #fee2e2;
    --status-danger-bd: #f5a3a3;

    --status-info-fg: #075985;
    --status-info-bg: #e0f2fe;
    --status-info-bd: #93c5fd;

    --radius-sm: 4px;
    --radius-md: 6px;
    --shadow-panel: 0 1px 2px rgba(16, 24, 40, 0.05);

    --font-sans: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.55;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: clip;
}

main {
    flex: 1;
}

a {
    color: var(--brand-link);
    text-decoration: none;
}

a:hover {
    color: var(--brand-link-hover);
    text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #00529b;
    outline-offset: 2px;
}

.mono {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 16px;
}

.oa-svg {
    vertical-align: -0.16em;
    flex-shrink: 0;
}

/* Top Emergency & Jurisdiction Strip */
.civic-govbar {
    background: var(--bg-navy-deep);
    color: #dbe4ee;
    font-size: 0.78rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.civic-govbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    flex-wrap: wrap;
}

.civic-emergency-note {
    display: flex;
    align-items: center;
    gap: 8px;
}

.civic-emergency-tag {
    background: #b91c1c;
    color: #ffffff;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.civic-jurisdiction {
    display: flex;
    align-items: center;
    gap: 14px;
}

.country-switch {
    display: inline-flex;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.country-switch a {
    color: #cbd5e1;
    padding: 2px 9px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
}

.country-switch a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.country-switch a.is-active {
    background: var(--brand-eucalyptus);
    color: #ffffff;
}

/* Primary Masthead */
.civic-header {
    background: var(--bg-navy);
    border-top: 3px solid var(--brand-eucalyptus);
    border-bottom: 1px solid #061529;
    color: #ffffff;
}

.civic-header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 13px 0;
}

.civic-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: #ffffff;
    text-decoration: none;
}

.civic-brand:hover {
    color: #ffffff;
    text-decoration: none;
}

.civic-brand-mark {
    width: 34px;
    height: 34px;
    background: #14365d;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6ee7b7;
}

.civic-brand-name {
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: -0.015em;
    line-height: 1.1;
}

.civic-brand-sub {
    display: block;
    font-size: 0.72rem;
    color: #9fb3c8;
    font-weight: 500;
    margin-top: 2px;
}

.civic-nav {
    display: flex;
    align-items: center;
    gap: 2px;
}

.civic-nav a {
    color: #e2e8f0;
    font-size: 0.86rem;
    font-weight: 600;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    white-space: nowrap;
}

.civic-nav a:hover,
.civic-nav a.is-active {
    background: rgba(255, 255, 255, 0.11);
    color: #ffffff;
}

.civic-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 9px 15px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.12s ease, border-color 0.12s ease;
}

.btn:hover {
    text-decoration: none;
}

.btn-sm {
    padding: 6px 11px;
    font-size: 0.8rem;
}

.btn-primary {
    background: var(--brand-eucalyptus);
    color: #ffffff;
    border-color: var(--brand-eucalyptus);
}

.btn-primary:hover {
    background: var(--brand-eucalyptus-hover);
    color: #ffffff;
}

.btn-report {
    background: #c2410c;
    color: #ffffff;
    border-color: #9a3412;
}

.btn-report:hover {
    background: #9a3412;
    color: #ffffff;
}

.btn-outline {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.btn-outline:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
}

/* Secondary Sector Strip */
.sector-strip {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-hairline);
}

.sector-strip-inner {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    padding: 7px 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.sector-strip-inner::-webkit-scrollbar {
    display: none;
}

.sector-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    font-size: 0.81rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    text-decoration: none;
    border: 1px solid transparent;
}

.sector-link:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
    text-decoration: none;
}

.sector-link.is-active {
    background: var(--brand-eucalyptus-soft);
    color: var(--status-ok-fg);
    border-color: var(--status-ok-bd);
}

/* Breadcrumbs */
.breadcrumb-bar {
    padding: 10px 0;
    font-size: 0.81rem;
    color: var(--text-muted);
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb-sep {
    color: #98a2b3;
}

/* Hero Lookup Band (Left-aligned Civic Desk) */
.lookup-band {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-hairline);
    padding: 24px 0 22px;
}

.lookup-grid {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 24px;
    align-items: center;
}

.lookup-kicker {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--brand-eucalyptus);
    margin-bottom: 6px;
}

.lookup-title {
    font-size: clamp(1.45rem, 2.5vw, 1.95rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.lookup-lead {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0 0 16px 0;
    max-width: 66ch;
}

/* Search Box & Autocomplete */
.search-box-wrap {
    position: relative;
    max-width: 640px;
}

.search-form {
    display: flex;
    gap: 8px;
}

.search-input-group {
    position: relative;
    flex: 1;
}

.search-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    height: 44px;
    padding: 8px 12px 8px 38px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: #ffffff;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.12);
    z-index: 90;
    max-height: 360px;
    overflow-y: auto;
}

.search-dropdown[hidden] {
    display: none;
}

.search-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 13px;
    border-bottom: 1px solid var(--bg-subtle);
    color: var(--text-primary);
    text-decoration: none;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover,
.search-item.is-focused {
    background: #f0f5fa;
    text-decoration: none;
}

.search-item-title {
    font-weight: 700;
    font-size: 0.88rem;
}

.search-item-sub {
    font-size: 0.76rem;
    color: var(--text-muted);
}

/* National Telemetry Summary Box */
.telemetry-box {
    background: var(--bg-body);
    border: 1px solid var(--border-hairline);
    border-left: 4px solid var(--brand-navy);
    border-radius: var(--radius-sm);
    padding: 15px 18px;
}

.telemetry-box-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-hairline);
}

.telemetry-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.telemetry-metric-val {
    font-family: var(--font-mono);
    font-size: 1.38rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-primary);
}

.telemetry-metric-lbl {
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Panels, Grids & Two-Column Layout */
.section {
    padding: 24px 0;
}

.layout-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
    align-items: start;
}

.panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-panel);
    margin-bottom: 20px;
}

.panel-head {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-hairline);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.panel-title {
    font-size: 1.04rem;
    font-weight: 800;
    margin: 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-body {
    padding: 18px;
}

/* Status Badges */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 3px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.status-ok {
    color: var(--status-ok-fg);
    background: var(--status-ok-bg);
    border-color: var(--status-ok-bd);
}

.status-warn {
    color: var(--status-warn-fg);
    background: var(--status-warn-bg);
    border-color: var(--status-warn-bd);
}

.status-danger {
    color: var(--status-danger-fg);
    background: var(--status-danger-bg);
    border-color: var(--status-danger-bd);
}

.status-info {
    color: var(--status-info-fg);
    background: var(--status-info-bg);
    border-color: var(--status-info-bd);
}

/* State / Region Tabs Strip */
.state-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 8px;
}

.state-tile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    text-decoration: none;
}

.state-tile:hover {
    border-color: var(--brand-link);
    background: #f8fbff;
    text-decoration: none;
}

.state-code {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.86rem;
    color: var(--brand-navy);
}

.state-name {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Data Tables */
.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th,
.data-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-hairline);
    vertical-align: top;
}

.data-table th {
    background: #f8fafb;
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background: #f9fbfd;
}

/* Provider Directory Grid */
.provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
    gap: 10px;
}

.provider-row-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 13px;
    background: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    text-decoration: none;
}

.provider-row-card:hover {
    border-color: var(--brand-link);
    background: #f8fbff;
    text-decoration: none;
}

.provider-row-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary);
}

.provider-row-meta {
    font-size: 0.74rem;
    color: var(--text-muted);
}

/* Utility Distributor Summary Matrix (Suburb & Postcode pages) */
.utility-matrix {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
    gap: 12px;
}

.utility-cell {
    padding: 13px 15px;
    border: 1px solid var(--border-hairline);
    border-top: 3px solid var(--brand-navy);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
}

.utility-cell-type {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.utility-cell-name {
    font-size: 0.96rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* Forms */
.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-size: 0.83rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.form-control {
    width: 100%;
    padding: 9px 11px;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: #ffffff;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
}

textarea.form-control {
    resize: vertical;
    min-height: 88px;
}

/* Notice & Safety Callouts */
.callout {
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-hairline);
    border-left-width: 4px;
    font-size: 0.88rem;
    margin-bottom: 16px;
}

.callout-warn {
    background: #fffbeb;
    border-color: #fde68a;
    border-left-color: #d97706;
    color: #78350f;
}

.callout-danger {
    background: #fef2f2;
    border-color: #fecaca;
    border-left-color: #b91c1c;
    color: #7f1d1d;
}

.callout-info {
    background: #f0f7ff;
    border-color: #bfdbfe;
    border-left-color: #00529b;
    color: #1e3a8a;
}

/* Editorial / Legal / Dossier Prose */
.prose {
    color: var(--text-secondary);
    font-size: 0.94rem;
    line-height: 1.68;
}

.prose h2 {
    color: var(--text-primary);
    font-size: 1.22rem;
    font-weight: 800;
    margin: 24px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-hairline);
}

.prose h3 {
    color: var(--text-primary);
    font-size: 1.03rem;
    font-weight: 700;
    margin: 18px 0 6px;
}

.prose p {
    margin: 0 0 12px;
}

.prose ul, .prose ol {
    margin: 0 0 14px;
    padding-left: 20px;
}

.prose li {
    margin-bottom: 5px;
}

/* CLS-Safe Ad Wrapper */
.ad-slot-wrapper {
    margin: 16px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-subtle);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

/* Footer */
.civic-footer {
    background: var(--bg-navy);
    color: #cbd5e1;
    border-top: 4px solid var(--brand-eucalyptus);
    margin-top: 36px;
    font-size: 0.85rem;
}

.civic-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 28px;
    padding: 36px 0 28px;
}

.civic-footer h3 {
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 12px;
}

.civic-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.civic-footer li {
    margin-bottom: 7px;
}

.civic-footer a {
    color: #cbd5e1;
    text-decoration: none;
}

.civic-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.civic-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.78rem;
    color: #94a3b8;
}

/* Responsive */
@media (max-width: 980px) {
    .lookup-grid,
    .layout-sidebar {
        grid-template-columns: 1fr;
    }

    .civic-nav {
        display: none;
    }

    .civic-nav.is-open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: var(--bg-navy);
        padding: 10px 16px 16px;
        border-bottom: 2px solid var(--brand-eucalyptus);
        z-index: 100;
    }

    .civic-header {
        position: relative;
    }

    .mobile-menu-btn {
        display: inline-flex;
    }

    .civic-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .search-form {
        flex-direction: column;
    }

    .telemetry-metrics {
        grid-template-columns: 1fr 1fr;
    }

    .civic-footer-grid {
        grid-template-columns: 1fr;
    }
}


/* Compact Cookie Consent Banner */
.oa-cookie-trigger {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
}
.oa-cookie-banner {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 950;
    max-width: 390px;
    background: #0f1f33;
    color: #e2e8f0;
    border: 1px solid #2b4260;
    border-radius: var(--radius-md);
    padding: 12px 14px;
    box-shadow: 0 10px 26px rgba(10, 22, 40, 0.28);
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.81rem;
    line-height: 1.45;
}
.oa-cookie-banner[hidden] {
    display: none;
}
.oa-cookie-banner a {
    color: #93c5fd;
    text-decoration: underline;
}
.oa-cookie-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.oa-cookie-actions .btn-outline {
    background: transparent;
    color: #e2e8f0;
    border-color: #475569;
}
.oa-cookie-actions .btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
}
@media (max-width: 520px) {
    .oa-cookie-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
    }
}

/* Guide Table of Contents & Editorial Figures */
.oa-toc {
    background: #f8fafc;
    border: 1px solid var(--border-subtle);
    border-left: 4px solid var(--brand-navy);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin: 16px 0 22px;
}
.oa-toc-title {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--brand-navy);
    margin: 0 0 8px;
}
.oa-toc ol {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 5px;
    font-size: 0.9rem;
}
.oa-toc a {
    color: var(--text-primary);
    font-weight: 600;
}
.oa-figure {
    margin: 22px 0;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: #f8fafc;
    overflow: hidden;
}
.oa-figure img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.oa-figure figcaption {
    padding: 9px 14px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-hairline);
    line-height: 1.45;
}
.oa-guide-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--border-hairline);
}


/* Factual 4-KPI Strip & 4-Stage Restoration Progress Tracker */
.oa-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 11px;
}
.oa-kpi-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-top: 3px solid var(--brand-navy);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    box-shadow: var(--shadow-panel);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 5px;
    min-width: 0;
}
.oa-kpi-card.is-severity-critical,
.oa-kpi-card.is-severity-high {
    border-top-color: #b91c1c;
}
.oa-kpi-card.is-severity-medium {
    border-top-color: #d97706;
}
.oa-kpi-card.is-severity-low {
    border-top-color: var(--brand-eucalyptus);
}
.oa-kpi-lbl {
    font-size: 0.71rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 700;
    line-height: 1.25;
}
.oa-kpi-val {
    font-size: 1.04rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.25;
    word-break: break-word;
}
.oa-kpi-val-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: wrap;
}
.oa-progress-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}
.oa-progress-step {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-size: 0.76rem;
    color: var(--text-muted);
    font-weight: 600;
}
.oa-progress-dot {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: var(--bg-subtle);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
}
.oa-progress-step.is-done {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}
.oa-progress-step.is-done .oa-progress-dot {
    background: #16a34a;
    color: #ffffff;
}
.oa-progress-step.is-current {
    border-color: var(--brand-navy);
    background: #eff6ff;
    color: var(--brand-navy);
    font-weight: 700;
}
.oa-progress-step.is-current .oa-progress-dot {
    background: var(--brand-navy);
    color: #ffffff;
}
@media (max-width: 780px) {
    .oa-kpi-grid,
    .oa-progress-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Shared Responsive Grids */
.oa-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.oa-grid-split {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 18px;
    align-items: start;
}
.oa-guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 16px;
}

/* Mobile-First Compact Layout & Zero Wasted Whitespace (<= 640px) */
@media (max-width: 640px) {
    .container {
        padding: 0 12px;
    }

    .civic-govbar-inner {
        padding: 4px 0;
        font-size: 0.72rem;
        gap: 8px;
        flex-wrap: nowrap;
    }
    .civic-emergency-note {
        gap: 6px;
        min-width: 0;
        line-height: 1.25;
    }
    .civic-jurisdiction {
        gap: 6px;
        flex-shrink: 0;
    }
    .civic-jurisdiction > span.mono {
        display: none;
    }
    .country-switch a {
        padding: 2px 7px;
        font-size: 0.71rem;
    }

    .civic-header-main {
        padding: 9px 0;
        gap: 8px;
    }
    .civic-brand {
        gap: 8px;
        min-width: 0;
    }
    .civic-brand-mark {
        width: 30px;
        height: 30px;
        flex-shrink: 0;
    }
    .civic-brand-name {
        font-size: 1.02rem;
    }
    .civic-brand-sub {
        display: none;
    }
    .civic-header-actions {
        gap: 6px;
        flex-shrink: 0;
    }
    .civic-header-actions .btn-report {
        padding: 6px 9px;
        font-size: 0.76rem;
    }
    .mobile-menu-btn {
        min-height: 34px;
        padding: 5px 9px;
        font-size: 0.78rem;
    }
    .civic-nav.is-open a {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 10px 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .sector-strip-inner {
        padding: 5px 0;
        gap: 3px;
    }
    .sector-link {
        padding: 5px 8px;
        font-size: 0.78rem;
    }

    .breadcrumb-bar {
        padding: 7px 0;
        font-size: 0.76rem;
    }
    .lookup-band {
        padding: 14px 0 !important;
    }
    .lookup-grid {
        gap: 14px;
    }
    .lookup-kicker {
        font-size: 0.7rem;
        margin-bottom: 4px;
    }
    .lookup-title {
        font-size: 1.24rem;
        line-height: 1.22;
        margin-bottom: 6px;
    }
    .lookup-lead {
        font-size: 0.87rem;
        margin-bottom: 10px !important;
    }

    .search-input,
    .form-control {
        font-size: 16px;
    }

    .telemetry-box {
        padding: 11px 13px;
    }
    .telemetry-metric-val {
        font-size: 1.18rem;
    }

    .section {
        padding: 12px 0;
    }
    .layout-sidebar {
        gap: 12px;
    }
    .panel {
        margin-bottom: 12px;
    }
    .panel-head {
        padding: 10px 12px;
        gap: 8px;
    }
    .panel-title {
        font-size: 0.94rem;
        gap: 6px;
    }
    .panel-body {
        padding: 12px;
    }
    .callout {
        padding: 10px 12px;
        font-size: 0.84rem;
        margin-bottom: 12px;
    }

    .oa-kpi-grid {
        gap: 7px;
    }
    .oa-kpi-card {
        padding: 8px 10px;
    }
    .oa-kpi-lbl {
        font-size: 0.68rem;
    }
    .oa-kpi-val {
        font-size: 0.88rem;
    }
    .oa-progress-bar {
        gap: 6px;
        margin-top: 8px;
    }
    .oa-progress-step {
        padding: 6px 8px;
        font-size: 0.72rem;
    }

    .state-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }
    .state-tile {
        padding: 8px 10px;
    }
    .utility-matrix {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .utility-cell {
        padding: 9px 10px;
    }
    .utility-cell-name {
        font-size: 0.86rem;
        word-break: break-word;
    }
    .provider-grid {
        grid-template-columns: 1fr;
        gap: 7px;
    }
    .provider-row-card {
        padding: 9px 11px;
    }
    .oa-grid-2,
    .oa-grid-split {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    #oaIncidentMap,
    #oaLocationMap {
        height: 210px !important;
    }

    /* Stack key-value Fact Sheet tables cleanly on small screens; keep list tables horizontally scrollable */
    .data-table tbody tr th {
        display: block;
        width: 100% !important;
        white-space: normal;
        background: transparent;
        border-bottom: none;
        padding: 8px 12px 2px;
        font-size: 0.71rem;
    }
    .data-table tbody tr th + td {
        display: block;
        width: 100%;
        padding: 0 12px 9px;
        font-size: 0.85rem;
        word-break: break-word;
    }
    .data-table thead th,
    .data-table tbody td {
        padding: 8px 10px;
        font-size: 0.81rem;
    }

    .ad-slot-wrapper {
        margin: 12px 0;
    }
    .civic-footer {
        margin-top: 18px;
    }
    .civic-footer-grid {
        gap: 16px;
        padding: 20px 0 14px;
    }
    .civic-footer-bottom {
        padding: 12px 0;
        gap: 8px;
    }
}

/* Sector Selector Pills (Smart Fault Reporting Desk) */
.oa-sector-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.oa-sector-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    min-height: 36px;
    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.oa-sector-pill:hover {
    background: var(--bg-subtle);
    border-color: var(--brand-navy);
}
.oa-sector-pill.is-active {
    background: var(--brand-navy);
    color: #ffffff;
    border-color: var(--brand-navy);
}

/* Citizen-Verified Field Observation Card */
.oa-citizen-card {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-left: 4px solid #d97706;
    border-radius: var(--radius-md);
    padding: 13px 16px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-panel);
}
.oa-citizen-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.oa-citizen-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    font-size: 0.92rem;
    color: #78350f;
}
.oa-citizen-quote {
    margin: 0 0 8px;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    color: var(--text-primary);
    line-height: 1.5;
}
.oa-citizen-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.78rem;
    color: #92400e;
}

/* Regional OneSignal Push Alert Card (Zero Cookie-Banner Overlap) */
.oa-push-card {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 940;
    max-width: 370px;
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
    border-top: 3px solid var(--brand-navy);
    border-radius: var(--radius-md);
    padding: 13px 14px;
    box-shadow: 0 12px 28px rgba(11, 37, 69, 0.22);
    font-size: 0.82rem;
    line-height: 1.45;
}
.oa-push-card[hidden] {
    display: none;
}
.oa-push-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 5px;
}
.oa-push-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 800;
    font-size: 0.88rem;
    color: var(--brand-navy);
}
.oa-push-badge-ico {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #fef2f2;
    color: #b91c1c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.oa-push-close {
    background: transparent;
    border: 0;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 6px;
}
.oa-push-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
}
.oa-push-success {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--status-ok-fg);
    font-weight: 700;
    font-size: 0.85rem;
}
.oa-push-success[hidden] {
    display: none;
}
@media (max-width: 520px) {
    .oa-push-card {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
        padding: 11px 12px;
    }
}
