:root {
    color-scheme: light;
    --ink: #24354b;
    --ink-deep: #10243c;
    --muted: #5b6b80;
    --accent: #2563eb;
    --accent-soft: #eaf0fd;
    --amber: #d98a12;
    --canvas: #f7f9fc;
    --surface: #fff;
    --line: #dfe6ef;
    --blue: #2574bc;
    --green: #2d863e;
    --orange: #c2830b;
    --red: #d33742;
    --purple: #8548ab;
    --maroon: #792b40;
    --unknown: #7b8482;
    --radius: 16px;
    --shadow: 0 4px 24px rgba(16, 36, 60, .045);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: "DM Sans", Arial, sans-serif; font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, select, summary { cursor: pointer; }
button, input, select, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button:disabled, select:disabled, input:disabled { cursor: not-allowed; opacity: .55; }
button, a, select, input { transition: border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
img, svg { max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-family: "Manrope", Arial, sans-serif; }
h2 { font-size: clamp(24px, 2.4vw, 31px); font-weight: 800; letter-spacing: -.9px; line-height: 1.35; }
h3 { font-size: 17px; font-weight: 800; letter-spacing: -.35px; line-height: 1.45; }
::selection { background: #dce8ff; color: var(--ink-deep); }
:focus-visible { outline: 3px solid #2563eb; outline-offset: 4px; }
[hidden] { display: none !important; }
.container { width: min(1240px, calc(100% - 80px)); margin-inline: auto; }
.icon { width: 21px; height: 21px; flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 10000; top: -70px; left: 20px; padding: 12px 20px; border-radius: 8px; background: var(--ink-deep); color: white; }
.skip-link:focus { top: 12px; }

/* Public portal identity */
.utility-bar { background: var(--ink-deep); color: #d9e4f4; font-size: 12px; letter-spacing: .2px; }
.utility-inner { min-height: 31px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.utility-dot { color: #8aa1bd; padding-inline: 8px; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 94px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; min-height: 44px; }
.brand-mark { display: grid; place-items: center; height: 42px; width: 42px; border-radius: 13px; background: var(--ink-deep); color: #eff4ff; }
.brand-mark .icon { width: 28px; height: 28px; }
.brand-type { font-family: "Manrope", Arial, sans-serif; font-size: 22px; font-weight: 500; letter-spacing: -1.1px; line-height: 1.1; }
.brand-type > span { font-weight: 800; }
.brand-dot { color: var(--accent); }
.brand-type small { display: block; margin-top: 6px; font-size: 8px; font-weight: 600; letter-spacing: 3.3px; }
.main-nav { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; min-width: 0; gap: 8px 30px; margin-left: auto; margin-right: 38px; }
.main-nav a { position: relative; display: flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 13px; font-weight: 600; }
.main-nav a:hover, .main-nav a.active { color: var(--ink-deep); }
.main-nav a.active::after { content: ""; position: absolute; height: 3px; width: 18px; bottom: 0; left: 0; background: var(--accent); border-radius: 2px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 10px 16px; border: 1px solid transparent; border-radius: 8px; font-size: 12px; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.button .icon { width: 17px; height: 17px; }
.button-outline { background: var(--surface); border-color: var(--line); color: var(--ink-deep); }
.button-outline:hover:not(:disabled) { background: var(--accent-soft); border-color: #b5c8e8; }
.button-soft { background: var(--accent-soft); color: var(--ink-deep); }
.button-soft:hover:not(:disabled) { background: #dce7ff; }
.button-small { padding: 8px 12px; }
.icon-button { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; }
.icon-button:hover:not(:disabled) { background: var(--accent-soft); border-color: #b5c8e8; }
.icon-button .icon { width: 19px; height: 19px; }
#refresh-button[aria-busy="true"] .icon { animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Air and landscape introduction */
.hero { background: linear-gradient(108deg, #eef4fc 0%, #f5f8fd 58%, #edf3fa 100%); border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 74px; padding-block: 43px 46px; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 1.8px; line-height: 1.5; }
.eyebrow-line { width: 24px; height: 2px; background: var(--accent); }
.eyebrow.muted { color: var(--muted); font-size: 12px; letter-spacing: 1.7px; margin-bottom: 7px; }
.hero h1 { margin-top: 17px; font-size: clamp(35px, 3.8vw, 49px); font-weight: 800; line-height: 1.23; letter-spacing: -1.8px; }
.hero h1 > span { color: var(--accent); }
.hero-copy > p { max-width: 530px; margin-top: 17px; color: #53647a; font-size: 15px; line-height: 1.8; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 22px; }
.source-tag { display: inline-flex; align-items: center; gap: 7px; color: #315781; font-size: 12px; font-weight: 600; }
.source-tag .icon { width: 15px; height: 15px; }
.hero-meta-note { font-size: 12px; color: var(--muted); }
.hero-art { position: relative; width: 100%; max-width: 480px; justify-self: end; padding-bottom: 17px; margin: 0; }
.hero-photo { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; object-position: center; border: 1px solid #d8e2ef; border-radius: 17px; box-shadow: 0 15px 38px -24px rgba(16, 36, 60, .3); }
.hero-caption, .hero-art-caption { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.hero-art:has(.hero-art-caption) { padding-bottom: 0; }
.hero-art:has(.hero-art-caption) .art-label { position: relative; top: auto; bottom: auto; left: auto; transform: none; width: fit-content; max-width: calc(100% - 36px); margin: -29px 18px 0; }
.landscape-art { width: 100%; height: auto; border-radius: 17px; box-shadow: 0 18px 36px -27px rgba(16, 36, 60, .3); }
.art-label { position: absolute; bottom: 0; left: -22px; display: flex; align-items: center; gap: 10px; padding: 13px 18px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 7px 22px rgba(16, 36, 60, .09); color: #607088; font-size: 12px; line-height: 1.55; }
.art-label > .icon { width: 29px; height: 29px; color: var(--accent); }
.art-label strong { color: var(--ink-deep); font-size: 12px; font-weight: 700; }

/* Monitoring overview */
.monitoring { padding-top: 36px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.update-controls { display: flex; align-items: center; gap: 12px; }
.data-status { display: inline-flex; align-items: center; gap: 7px; color: #46617e; font-size: 12px; line-height: 1.5; }
.status-dot { display: inline-block; width: 6px; height: 6px; background: #2563eb; border-radius: 50%; flex-shrink: 0; }
.data-status.warning { color: #80531c; }
.data-status.warning .status-dot { background: #c48929; }
.data-status.error { color: #a3353c; }
.data-status.error .status-dot { background: var(--red); }
.data-message { margin-bottom: 18px; padding: 11px 15px; color: #365479; background: #eff5ff; border: 1px solid #d9e5f7; border-radius: 8px; font-size: 12px; line-height: 1.7; }
.data-message.warning { color: #77501c; background: #fff8e9; border-color: #eedcba; }
.data-message.error { color: #96363b; background: #fdf0ef; border-color: #efd3d4; }
.data-message a { text-decoration: underline; text-underline-offset: 3px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat-card { padding: 20px 22px 17px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow); }
.stat-label { display: flex; align-items: center; gap: 7px; color: #627087; font-size: 12px; font-weight: 500; }
.stat-number { margin-block: 7px 2px; font-family: "Manrope", Arial, sans-serif; font-size: 36px; font-weight: 800; letter-spacing: -1px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.stat-foot { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.stat-foot .icon { width: 13px; height: 13px; }
.stat-foot > span:not(:first-child) { margin-left: auto; font-weight: 600; }
.stat-alert { border-top: 2px solid #e6c287; padding-top: 19px; }
.dot { display: inline-block; flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; }
.category-good { background: var(--blue); }
.category-moderate { background: var(--green); }
.category-unhealthy { background: #e0af2f; }
.category-very-unhealthy { background: var(--red); }
.category-hazardous { background: var(--purple); }
.category-emergency { background: var(--maroon); }
.category-unknown { background: var(--unknown); }

/* Labelled location filters */
.filter-panel { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1.4fr auto; align-items: end; gap: 16px; margin-top: 24px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; }
.filter-intro { display: flex; align-items: center; gap: 10px; align-self: center; padding-right: 16px; border-right: 1px solid var(--line); font-size: 12px; font-weight: 700; line-height: 1.4; }
.filter-intro .icon { color: var(--accent); }
.filter-intro small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; font-weight: 400; }
.field { min-width: 0; }
.field label { display: block; margin-bottom: 6px; color: #607087; font-size: 12px; font-weight: 500; }
select, input[type="search"] { min-height: 44px; width: 100%; border: 1px solid #dae2ef; border-radius: 7px; background: #fff; color: #33465e; font-size: 13px; line-height: 1.5; }
select { padding: 10px 30px 10px 12px; }
input[type="search"] { padding: 10px 12px 10px 36px; }
input::placeholder { color: #607088; opacity: 1; }
select:hover:not(:disabled), input:hover:not(:disabled) { border-color: #9fb9df; }
.search-input { position: relative; }
.search-input .icon { position: absolute; top: 13px; left: 12px; width: 17px; height: 17px; color: #7e91a7; pointer-events: none; }
.coverage-note { display: flex; align-items: flex-start; gap: 7px; margin-top: 11px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.coverage-note .icon { width: 13px; height: 13px; margin-top: 2px; }

/* Map and station dashboard */
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px; margin-top: 25px; align-items: stretch; }
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 21px 22px 17px; }
.panel-heading p { margin-top: 5px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.map-container { position: relative; margin-inline: 15px; border: 1px solid #dce4ef; border-radius: 9px; overflow: hidden; background: #eaf0f7; }
#station-map { position: relative; height: 420px; width: 100%; isolation: isolate; font-family: "DM Sans", Arial, sans-serif; background: #eaf0f7; }
.map-fallback { height: 100%; display: grid; place-items: center; padding: 30px; color: var(--muted); font-size: 13px; text-align: center; background: radial-gradient(ellipse at 70% 25%, #dce6f3 0%, transparent 55%), #edf2f8; }
.map-caption { position: absolute; z-index: 600; left: 12px; bottom: 27px; display: inline-flex; align-items: center; gap: 7px; max-width: calc(100% - 24px); padding: 7px 11px; border: 1px solid #d9e4f0; border-radius: 6px; background: rgba(255, 255, 255, .95); color: #496381; font-size: 12px; box-shadow: 0 3px 10px rgba(16, 36, 60, .07); pointer-events: none; }
.map-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 13px; padding: 15px 21px 17px; color: var(--muted); font-size: 12px; }
.map-legend > span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.map-legend .dot { width: 6px; height: 6px; }
.location-feedback { padding: 0 21px 14px; font-size: 12px; color: #776026; }
.location-feedback:empty { display: none; }
.leaflet-container a { color: #2a5990; }
.leaflet-bar { border-color: #cddaea !important; box-shadow: 0 2px 10px rgba(16, 36, 60, .08) !important; }
.leaflet-bar a { width: 44px !important; height: 44px !important; line-height: 44px !important; }
.leaflet-control-attribution { font-size: 12px !important; }
.leaflet-popup-content-wrapper { border-radius: 10px; box-shadow: 0 4px 22px rgba(16, 36, 60, .15); }
.leaflet-popup-content { margin: 13px 17px; font-size: 12px; line-height: 1.7; }
.leaflet-popup-content strong { display: block; font-family: "Manrope", Arial, sans-serif; color: var(--ink-deep); }
.leaflet-popup-content .category-badge { margin-top: 6px; }
.leaflet-popup-close-button { width: 32px !important; height: 32px !important; line-height: 32px !important; }
.station-marker { --category-color: var(--unknown); --category-soft: #f0f2f1; display: flex; align-items: center; justify-content: center; background: transparent; border: 0; color: white; font-family: "Manrope", Arial, sans-serif; font-size: 12px; font-weight: 800; }
.station-marker > span { display: grid; place-items: center; width: 30px; height: 30px; background: var(--category-color); border: 2px solid #fff; border-radius: 50%; box-shadow: 0 2px 7px rgba(16, 36, 60, .22); }
.station-marker.is-selected > span { outline: 3px solid var(--ink-deep); outline-offset: 2px; }
.station-marker.is-selected { z-index: 1000 !important; }
.station-marker.unhealthy > span { color: #3c2d07; background: #e0af2f; }
.station-marker:hover > span { box-shadow: 0 0 0 4px rgba(255, 255, 255, .65), 0 2px 8px rgba(16, 36, 60, .3); }
.leaflet-tile-pane { filter: saturate(.3) brightness(1.04); }
.detail-panel { padding-bottom: 17px; }
.detail-panel .panel-heading { align-items: flex-start; }
.detail-icon { width: 32px; height: 32px; padding: 5px; margin-top: 7px; border-radius: 9px; color: #5e7ea8; background: #eef4ff; }
.detail-panel .eyebrow { margin-bottom: 5px; font-size: 12px; }
.reading-block { display: flex; flex-wrap: wrap; align-items: center; gap: 23px; margin: 9px 23px 20px; }
.reading-block > div { min-width: 0; max-width: 100%; }
.reading-number { font-family: "Manrope", Arial, sans-serif; font-size: 69px; font-weight: 800; line-height: 1.15; letter-spacing: -3px; font-variant-numeric: tabular-nums; }
.reading-number small { display: block; padding-top: 5px; font-family: "DM Sans", Arial, sans-serif; font-size: 12px; font-weight: 500; letter-spacing: 1.5px; color: var(--muted); }
.reading-block p { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.category-badge { --category-color: var(--unknown); --category-soft: #f0f2f1; display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 5px 9px; border: 1px solid transparent; border-radius: 5px; background: var(--category-soft); color: var(--category-color); font-size: 12px; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.good { --category-color: #276dab; --category-soft: #eaf2fa; }
.moderate { --category-color: #2e7b3d; --category-soft: #ebf5ec; }
.unhealthy { --category-color: #8c610a; --category-soft: #fff5dc; }
.very-unhealthy { --category-color: #bc3542; --category-soft: #fbecee; }
.hazardous { --category-color: #7d429d; --category-soft: #f2ebf7; }
.emergency { --category-color: #792b40; --category-soft: #f5e7ed; }
.unknown { --category-color: #656f6b; --category-soft: #eff2ef; }
.ipu-mini-scale { display: flex; position: relative; height: 6px; margin-inline: 23px; border-radius: 3px; }
.ipu-mini-scale i { flex: 1; }
.ipu-mini-scale i:first-child { border-radius: 3px 0 0 3px; }
.ipu-mini-scale i:nth-child(5) { border-radius: 0 3px 3px 0; }
.ipu-mini-scale > span { position: absolute; top: -6px; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid var(--ink-deep); transform: translateX(-50%); }
.scale-labels { display: flex; justify-content: space-between; margin: 6px 23px 19px; color: #607088; font-size: 12px; }
.station-advice { display: flex; align-items: flex-start; gap: 9px; margin-inline: 23px; padding: 11px 13px; background: #f2f6fc; border: 1px solid #e1e9f5; border-radius: 8px; color: #516680; }
.station-advice .icon { width: 17px; height: 17px; margin-top: 2px; color: var(--accent); }
.station-advice p { font-size: 12px; line-height: 1.7; }
.trend-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 21px 23px 5px; }
.trend-heading h4 { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; }
.trend-heading .icon { width: 16px; height: 16px; color: var(--accent); }
.trend-heading > span { color: var(--muted); font-size: 12px; }
.trend-chart { min-height: 137px; margin: 0 15px; }
.trend-svg { display: block; width: 100%; height: auto; overflow: visible; }
.trend-svg text { font-family: "DM Sans", Arial, sans-serif; font-size: 12px; fill: #5d7088; }
.trend-grid { stroke: #e6edf6; stroke-width: 1; }
.trend-line { fill: none; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.threshold-line { stroke: #d98a12; stroke-width: 1; stroke-dasharray: 4 4; }
.chart-label { fill: #5b6f88; font-size: 12px; }
.trend-chart .empty-state { min-height: 135px; display: grid; align-content: center; padding: 25px 15px; }
.trend-data { margin: 0 23px; color: var(--muted); font-size: 12px; }
.trend-data summary { width: fit-content; padding-block: 12px; min-height: 44px; text-decoration: underline; text-decoration-color: #bacbe4; text-underline-offset: 3px; }
.trend-table-wrap { position: relative; max-height: 200px; overflow: auto; border: 1px solid var(--line); border-radius: 7px; }
.trend-data table { width: 100%; border-collapse: collapse; font-size: 12px; }
.trend-data th, .trend-data td { padding: 7px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.trend-data th { background: #f5f8fc; font-weight: 500; }
.trend-data td:last-child { font-variant-numeric: tabular-nums; font-weight: 700; }
.trend-periods { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 8px 23px 4px; }
.trend-periods button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; padding: 8px 12px; border: 1px solid #dce5f3; border-radius: 7px; background: #f7f9fd; color: #516882; font-size: 12px; font-weight: 600; }
.trend-periods button:hover:not(:disabled) { border-color: #a6bfe8; background: #edf3ff; color: #234d90; }
.trend-periods button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: 0 2px 6px rgba(37, 99, 235, .15); }
.trend-coverage { margin: 5px 23px 8px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.trend-coverage.warning { color: #835817; }
.empty-state { color: var(--muted); font-size: 12px; text-align: center; }

/* Accessible station list */
.stations-panel { margin-top: 22px; overflow: hidden; }
.table-controls { display: flex; align-items: center; gap: 10px; }
.table-controls select { min-width: 145px; width: auto; font-size: 12px; }
.table-scroll { position: relative; width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.stations-table { width: 100%; border-collapse: collapse; text-align: left; }
.stations-table th { padding: 12px 22px; background: #f4f7fc; color: #5c6d84; border-block: 1px solid #e3eaf4; font-size: 12px; font-weight: 500; letter-spacing: .15px; white-space: nowrap; }
.stations-table td { padding: 13px 22px; border-bottom: 1px solid #edf1f7; color: #5d6e83; font-size: 14px; line-height: 1.5; vertical-align: middle; }
.stations-table td:first-child { color: var(--ink-deep); font-weight: 700; min-width: 185px; }
.stations-table td:nth-child(2) { min-width: 160px; }
.stations-table td:nth-child(3) { color: var(--ink-deep); font-family: "Manrope", Arial, sans-serif; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stations-table td:nth-child(5) { font-size: 12px; white-space: nowrap; }
.stations-table td:last-child { width: 66px; padding: 8px 16px; }
.stations-table td small, .stations-table td .station-district { display: block; margin-top: 2px; color: #64778f; font-size: 12px; font-weight: 400; }
.stations-table td strong { font-weight: 700; }
.stations-table td .icon { width: 17px; height: 17px; }
.stations-table .empty-state { height: 90px; font-family: "DM Sans", Arial, sans-serif; font-size: 12px; font-weight: 400; color: var(--muted); }
.station-row { transition: background-color .16s ease; }
.station-row:hover { background: #f8faff; }
.station-row.selected { background: #edf4ff; }
.station-row.selected td:first-child { box-shadow: inset 3px 0 0 #2563eb; }
.station-row button { display: grid; place-items: center; width: 44px; height: 44px; margin-left: auto; background: transparent; border: 1px solid #dce5f1; border-radius: 7px; color: #5879a3; }
.station-row button:hover { background: #eaf2ff; border-color: #a6bee3; }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 22px; }
.table-footer > p { color: #61748c; font-size: 12px; }
.pagination { display: flex; align-items: center; gap: 12px; }
.pagination .icon-button { width: 44px; height: 44px; border-color: #e0e8f3; }
.pagination > span { min-width: 36px; color: var(--muted); font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }

/* IPU infographic and practical health guidance */
.guide-section { padding-top: 49px; }
.text-link { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; color: #315fa0; font-size: 12px; font-weight: 600; }
.text-link .icon { width: 15px; height: 15px; }
.text-link:hover { color: var(--ink-deep); text-decoration: underline; text-underline-offset: 3px; }
.ipu-guide { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.guide-card { position: relative; padding: 20px 19px 19px; min-height: 192px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); overflow: hidden; }
.guide-range { font-family: "Manrope", Arial, sans-serif; color: var(--category-color); font-size: 23px; font-weight: 800; letter-spacing: -.75px; line-height: 1.4; }
.guide-bar { display: block; width: 30px; height: 3px; margin: 10px 0 15px; border-radius: 3px; }
.guide-card h3 { margin-bottom: 6px; font-size: 13px; letter-spacing: -.3px; }
.guide-card p { color: #586a82; font-size: 14px; line-height: 1.75; }
.guide-note { margin-top: 12px; color: #627087; font-size: 12px; line-height: 1.7; }
.source-section { display: flex; align-items: flex-start; gap: 14px; margin-block: 30px 37px; padding: 19px 22px; border: 1px solid var(--line); border-radius: 10px; background: #f0f4fa; }
.source-icon { display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; border-radius: 7px; background: #e3ecf8; color: #486b99; }
.source-icon .icon { width: 17px; height: 17px; }
.source-section h3 { margin-bottom: 5px; font-size: 12px; font-weight: 700; }
.source-section p { max-width: 1050px; font-size: 12px; color: #536b85; line-height: 1.8; }
.source-section a { color: #315f99; text-decoration: underline; text-underline-offset: 2px; }
#source-detail { margin-top: 5px; font-size: 12px; color: #576e88; }
.site-footer { background: var(--surface); border-top: 1px solid var(--line); }
.system-footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; width: 100%; gap: 24px; padding: 16px 14px; }
.system-footer-public > .system-footer-inner { width: 100%; }
.system-footer-inner > div { min-width: 0; }
.system-footer-identity strong { font-family: "Manrope", Arial, sans-serif; color: var(--ink-deep); font-size: 14px; font-weight: 700; }
.system-footer-inner p { color: var(--muted); font-size: 12px; line-height: 1.65; }
.system-footer-identity > p { margin-top: 3px; }
.system-footer-identity .footer-copyright { margin-top: 7px; }
.system-footer-details { text-align: right; }
.system-footer-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 16px; }
.footer-browsers { display: inline-flex; align-items: center; gap: 6px; }
.footer-browsers svg, .system-version-badge svg { flex-shrink: 0; }
.system-version-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px; background: #f8fafc; color: var(--ink-deep); font-size: 12px; line-height: 1.5; white-space: nowrap; }
.system-version-badge svg { color: var(--accent); }
.system-footer-details .footer-mottos { margin-top: 7px; }

/* Education guidance and official reference documents */
@media (min-width: 1600px) {
    .hero-inner { padding-block: 52px; }
}

@media (max-width: 1100px) {
    .container { width: calc(100% - 56px); }
    .main-nav { margin-right: 10px; gap: 22px; }
    .hero-inner { gap: 42px; }
    .hero h1 { font-size: 40px; }
    .hero-meta-note { width: 100%; }
    .filter-panel { grid-template-columns: 1fr 1fr 1.3fr auto; gap: 12px; }
    .filter-intro { grid-column: 1 / -1; border: 0; padding: 0 0 6px; }
    .filter-intro small { display: inline; margin-left: 12px; }
    .dashboard-grid { gap: 16px; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
    .panel-heading { padding-inline: 18px; gap: 10px; }
    .panel-heading h3 { font-size: 15px; }
    .map-panel .button-small { padding: 8px 10px; font-size: 12px; }
    .reading-block { gap: 16px; margin-inline: 19px; }
    .reading-number { font-size: 61px; }
    .detail-panel .category-badge { font-size: 12px; }
    .ipu-mini-scale, .station-advice, .trend-heading, .trend-data { margin-inline: 19px; }
    .scale-labels { margin-inline: 19px; }
    .stations-table th, .stations-table td { padding-inline: 17px; }
    .guide-card { padding-inline: 15px; min-height: 206px; }
    .ipu-guide { gap: 11px; }
}

@media (max-width: 820px) {
    .container { width: calc(100% - 40px); }
    .header-inner { min-height: 82px; gap: 16px; }
    .main-nav { gap: 19px; margin-right: 0; }
    .main-nav a { font-size: 12px; }
    .header-source { display: none; }
    .hero-inner { grid-template-columns: 1.2fr 1fr; gap: 30px; padding-block: 35px 38px; }
    .hero h1 { font-size: 32px; letter-spacing: -1.2px; }
    .hero-copy > p { font-size: 15px; }
    .hero .eyebrow { font-size: 12px; letter-spacing: 1.2px; }
    .hero-meta { margin-top: 15px; }
    .source-tag { font-size: 12px; }
    .hero-meta-note { font-size: 12px; }
    .art-label { left: -12px; padding: 10px 12px; font-size: 12px; }
    .art-label strong { font-size: 12px; }
    .art-label > .icon { width: 23px; height: 23px; }
    .desktop-break { display: none; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
    .stat-card { padding: 17px 14px 15px; }
    .stat-alert { padding-top: 16px; }
    .stat-label { font-size: 12px; gap: 5px; }
    .stat-number { font-size: 30px; }
    .stat-foot { font-size: 12px; }
    .stat-foot > span:not(:first-child) { margin-left: 0; }
    .filter-panel { padding: 17px; gap: 11px; }
    .filter-intro { font-size: 12px; }
    .filter-panel select, .filter-panel input { font-size: 12px; }
    .filter-reset { font-size: 12px; padding-inline: 12px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .map-panel .panel-heading h3 { font-size: 17px; }
    .detail-panel { display: grid; grid-template-columns: 1fr 1fr; align-content: start; padding: 0 5px 17px; }
    .detail-panel .panel-heading { grid-column: 1 / -1; padding-block: 20px 10px; }
    .reading-block { grid-column: 1; grid-row: 2; align-self: center; margin-block: 15px 22px; }
    .ipu-mini-scale { grid-column: 1; grid-row: 3; }
    .scale-labels { grid-column: 1; grid-row: 4; margin-bottom: 13px; }
    .station-advice { grid-column: 1; grid-row: 5 / 7; }
    .trend-heading { grid-column: 2; grid-row: 2; align-self: start; margin-top: 13px; }
    .trend-chart { grid-column: 2; grid-row: 2 / 6; align-self: center; padding-top: 35px; }
    .trend-data { grid-column: 2; grid-row: 6; }
    .trend-periods { grid-column: 2; grid-row: 2; align-self: start; margin-top: 45px; }
    .trend-coverage { grid-column: 2; grid-row: 6; margin-top: 0; }
    .detail-panel:has(.trend-periods) { display: block; }
    .detail-panel:has(.trend-periods) .trend-chart { padding-top: 0; }
    .detail-panel:has(.trend-coverage) .trend-data { grid-row: 7; }
    .trend-chart .empty-state { min-height: 120px; }
    .ipu-guide { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .guide-range { font-size: 20px; }
    .guide-card { padding: 16px 12px; min-height: 215px; }
    .guide-card h3 { font-size: 12px; }
    .guide-card p { font-size: 14px; }
    .system-footer-inner { gap: 18px; }
}

@media (max-width: 600px) {
    .container { width: calc(100% - 32px); }
    .utility-inner { min-height: 30px; font-size: 12px; gap: 8px; }
    .utility-inner > span:last-child { display: none; }
    .utility-dot { padding-inline: 3px; }
    .header-inner { flex-wrap: wrap; gap: 5px; padding-block: 14px 8px; }
    .brand { gap: 9px; }
    .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
    .brand-mark .icon { width: 24px; height: 24px; }
    .brand-type { font-size: 20px; }
    .brand-type small { margin-top: 5px; font-size: 7px; }
    .main-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; gap: 6px 12px; margin: 6px 0 0; }
    .main-nav a { justify-content: center; text-align: center; font-size: 12px; min-height: 44px; }
    .main-nav a.active::after { width: 100%; height: 2px; }
    .hero-inner { grid-template-columns: 1fr; gap: 26px; padding-block: 30px 28px; }
    .hero h1 { margin-top: 14px; font-size: 37px; letter-spacing: -1.45px; }
    .hero-copy > p { font-size: 15px; line-height: 1.85; }
    .hero .eyebrow { font-size: 12px; letter-spacing: 1.5px; }
    .hero-meta { gap: 6px; }
    .source-tag { font-size: 12px; }
    .hero-meta-note { font-size: 12px; }
    .hero-art { max-width: none; padding-bottom: 13px; }
    .hero-photo { aspect-ratio: 1.75 / 1; object-position: center; border-radius: 12px; }
    .landscape-art { max-height: 189px; object-fit: cover; }
    .art-label { left: 12px; bottom: 0; padding: 10px 13px; font-size: 12px; }
    .art-label strong { font-size: 12px; }
    .monitoring { padding-top: 28px; }
    .section-heading { gap: 12px; align-items: flex-start; margin-bottom: 18px; }
    h2 { font-size: 23px; letter-spacing: -.75px; }
    .eyebrow.muted { margin-bottom: 6px; font-size: 12px; letter-spacing: 1.2px; }
    .update-controls { gap: 7px; align-items: center; padding-top: 4px; }
    .data-status { gap: 5px; max-width: 86px; font-size: 12px; line-height: 1.55; }
    .update-controls .icon-button { width: 44px; height: 44px; }
    .data-message { font-size: 12px; padding: 10px 12px; margin-bottom: 16px; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .stat-card { padding: 16px 17px 14px; }
    .stat-alert { padding-top: 15px; }
    .stat-label { font-size: 12px; }
    .stat-number { font-size: 34px; margin-block: 4px 2px; }
    .stat-foot { font-size: 12px; gap: 5px; }
    .stat-foot > span:not(:first-child) { margin-left: auto; }
    .filter-panel { grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 20px; padding: 17px; }
    .filter-intro { grid-column: 1 / -1; padding-bottom: 2px; }
    .filter-intro small { display: block; margin: 3px 0 0; font-size: 12px; }
    .filter-intro .icon { width: 21px; height: 21px; }
    .field label { font-size: 12px; }
    .filter-panel select, .filter-panel input { font-size: 12px; }
    .search-field { grid-column: 1 / -1; }
    .filter-reset { grid-column: 1 / -1; width: 100%; font-size: 12px; }
    .coverage-note { margin-top: 10px; font-size: 12px; }
    .dashboard-grid { margin-top: 20px; gap: 18px; }
    .panel-heading { padding: 18px 17px 15px; }
    .panel-heading p { font-size: 14px; }
    .map-panel .panel-heading h3 { font-size: 15px; }
    .map-panel .panel-heading { flex-wrap: wrap; align-items: flex-start; }
    .map-panel .button-small { gap: 5px; padding-inline: 10px; font-size: 12px; }
    .map-container { margin-inline: 10px; }
    #station-map { height: 330px; }
    .map-caption { font-size: 12px; }
    .map-legend { gap: 8px 10px; padding: 13px 17px 16px; font-size: 12px; }
    .location-feedback { font-size: 12px; }
    .detail-panel { display: block; padding: 0 0 15px; }
    .detail-panel .panel-heading { padding: 20px 20px 12px; }
    .detail-panel .panel-heading h3 { font-size: 18px; }
    .detail-panel .panel-heading p { font-size: 14px; }
    .detail-panel .eyebrow { font-size: 12px; }
    .reading-block { margin: 10px 21px 20px; gap: 25px; }
    .reading-number { font-size: 72px; }
    .detail-panel .category-badge { font-size: 12px; }
    .reading-block p { font-size: 12px; }
    .ipu-mini-scale, .station-advice, .trend-heading, .trend-data { margin-inline: 21px; }
    .scale-labels { margin: 7px 21px 18px; }
    .station-advice { padding: 12px; }
    .station-advice p { font-size: 12px; }
    .trend-heading { margin-top: 21px; }
    .trend-heading h4 { font-size: 12px; }
    .trend-heading > span { font-size: 12px; }
    .trend-chart { padding-top: 0; min-height: 160px; margin-inline: 14px; }
    .trend-data { font-size: 12px; }
    .trend-periods, .trend-coverage { margin-inline: 21px; }
    .detail-panel:has(.trend-periods) .trend-chart { padding-top: 0; }
    .stations-panel { margin-top: 20px; }
    .stations-panel .panel-heading { align-items: stretch; flex-direction: column; gap: 12px; }
    .table-controls { justify-content: space-between; }
    .table-controls select { flex: 1; font-size: 12px; }
    .table-controls .button { min-width: 72px; font-size: 12px; }
    .stations-table { min-width: 740px; }
    .stations-table th, .stations-table td { padding-inline: 16px; }
    .table-footer { padding: 11px 16px; gap: 12px; }
    .table-footer > p { max-width: 155px; font-size: 12px; }
    .pagination { gap: 7px; }
    .pagination > span { font-size: 12px; }
    .guide-section { padding-top: 35px; }
    .guide-section .section-heading { flex-direction: column; gap: 3px; margin-bottom: 17px; }
    .guide-section h2 { font-size: 22px; }
    .text-link { font-size: 12px; }
    .ipu-guide { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .guide-card { min-height: 188px; padding: 17px 16px; }
    .guide-range { font-size: 23px; }
    .guide-card h3 { font-size: 12px; }
    .guide-card p { font-size: 14px; }
    .guide-card:last-child { grid-column: 1 / -1; min-height: 130px; padding-right: 110px; }
    .guide-card:last-child::after { content: "!"; position: absolute; display: grid; place-items: center; right: 24px; top: 31px; width: 48px; height: 48px; border: 1px solid #e9def1; border-radius: 50%; background: #f8f3fb; color: #8d60a5; font-family: "Manrope", Arial, sans-serif; font-size: 22px; font-weight: 700; }
    .guide-card:last-child .guide-bar { margin-block: 5px 10px; }
    .guide-note { font-size: 12px; }
    .source-section { gap: 11px; padding: 16px; margin-block: 25px 28px; }
    .source-section h3 { font-size: 12px; }
    .source-section p { font-size: 12px; }
    #source-detail { font-size: 12px; }
    .system-footer-inner { grid-template-columns: 1fr; gap: 12px; padding-block: 16px; }
    .system-footer-details { text-align: left; }
    .system-footer-meta { justify-content: flex-start; }
}

@media (max-width: 360px) {
    .container { width: calc(100% - 24px); }
    .utility-inner > span:last-child { display: none; }
    .hero h1 { font-size: 33px; }
    .stat-label { font-size: 12px; }
    .stat-card { padding-inline: 14px; }
    .stat-foot { font-size: 12px; }
    .section-heading h2 { font-size: 21px; }
    .data-status { max-width: 70px; }
    .filter-panel { padding: 14px; gap: 11px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
    body { background: #fff; color: #111; font-size: 12px; }
    .container { width: 100%; }
    .utility-bar, .main-nav, .header-source, .hero-art, .filter-panel, .update-controls, .map-panel, .table-controls, .pagination, .trend-data { display: none; }
    .header-inner { min-height: 60px; }
    .hero-inner { display: block; padding-block: 20px; }
    .hero h1 { font-size: 30px; }
    .dashboard-grid { display: block; }
    .panel, .guide-card, .stat-card { break-inside: avoid; box-shadow: none; }
    .detail-panel { max-width: 520px; }
    .table-scroll { overflow: visible; }
    .stations-table { min-width: 0; }
    .stations-table th, .stations-table td { padding: 6px 8px; }
    .stations-table td:last-child, .stations-table th:last-child { display: none; }
    .guide-section { margin-top: 20px; padding-top: 20px; }
    .guide-card { min-height: 150px; }
}
