@font-face {
  font-family: "Public Sans"; src: url(fonts/public-sans-400.ttf) format("truetype"); font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Public Sans"; src: url(fonts/public-sans-600.ttf) format("truetype"); font-weight: 600; font-display: swap;
}
@font-face {
  font-family: "Public Sans"; src: url(fonts/public-sans-700.ttf) format("truetype"); font-weight: 700; font-display: swap;
}
:root {
  --ground: #f2f5f3; --surface: #ffffff; --ink: #20352c; --muted: #58665e; --line: #d1dbd5;
  --forest: #154c3b; --forest-hover: #22644e; --green: #236248; --green-soft: #e2eee7;
  --water: #17659b; --water-soft: #e8f1f7; --amber: #8b530b; --amber-soft: #fff0cf;
  --red: #ac3035; --red-soft: #fbe9e7; --radius: 4px;
  --font: "Public Sans", sans-serif; --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--muted) var(--ground); }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 15px/1.6 var(--font); letter-spacing: 0; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a, input, select { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
a { color: var(--water); text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--water); outline-offset: 3px; }
::selection { background: var(--forest); color: #fff; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 600; line-height: 1.25; text-wrap: balance; }
h1 { font-size: 32px; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
p { max-width: 70ch; }
small { font-size: 12px; }
i { font-size: 18px; }
[hidden] { display: none !important; }
.numeric { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: 12px; padding: 12px; background: #fff; z-index: 100; transform: translateY(-200%); }
.skip:focus { transform: none; }
.header { background: var(--forest); color: #fff; }
.header :focus-visible { outline-color: #fff; }
.header-inner { max-width: 1400px; margin: auto; min-height: 76px; padding: 14px 32px; display: flex; align-items: center; gap: 40px; }
.brand { color: #fff; display: flex; align-items: center; gap: 12px; text-decoration: none; font-size: 23px; font-weight: 700; white-space: nowrap; }
.brand i { font-size: 27px; color: #b8ddcb; }
.brand small { color: #c9e0d5; font-size: 12px; font-weight: 400; display: block; }
.brand-name { display: grid; line-height: 1.25; }
.global-nav { display: flex; gap: 4px; }
.global-nav a { min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 11px 16px; color: #d1e5da; text-decoration: none; font-size: 14px; border-radius: var(--radius); }
.global-nav a:hover { background: var(--forest-hover); color: #fff; }
.global-nav a[aria-current=page] { background: #fff; color: var(--forest); font-weight: 600; }
.directory { margin-left: auto; color: #d1e5da; text-decoration: none; min-height: 44px; display: grid; place-items: center; width: 44px; border-radius: var(--radius); }
.directory:hover { background: var(--forest-hover); color: #fff; }
.notice { background: var(--amber-soft); color: #63400e; font-size: 13px; padding: 12px 32px; }
.notice-inner { max-width: 1336px; margin: auto; display: flex; align-items: flex-start; gap: 10px; }
.notice i { margin-top: 2px; }
.notice strong { font-weight: 700; }
main { max-width: 1400px; margin: auto; padding: 32px; }
.title-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 24px; }
.title-row p { color: var(--muted); margin-top: 8px; }
.device-time { color: var(--muted); text-align: right; font-size: 12px; }
.device-time time { display: block; color: var(--ink); font-size: 14px; white-space: nowrap; }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.scenarios { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); padding: 0; margin: 0; border-radius: var(--radius); min-width: 0; }
.scenarios label { cursor: pointer; display: block; }
.scenarios span { padding: 11px 16px; min-height: 44px; display: block; color: var(--muted); background: var(--surface); }
.scenarios label + label { border-left: 1px solid var(--line); }
.scenarios input:checked + span { background: var(--green-soft); color: var(--forest); font-weight: 600; }
.scenarios input:focus-visible + span { outline: 3px solid var(--water); outline-offset: -3px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; font-size: 14px; font-weight: 600; line-height: 1.4; text-decoration: none; }
.btn:hover { background: var(--green-soft); }
.btn.primary { background: var(--forest); border-color: var(--forest); color: #fff; }
.btn.primary:hover { background: var(--forest-hover); }
.btn.red { background: var(--red-soft); color: var(--red); border-color: var(--red); }
.btn.icon { width: 44px; padding: 0; }
.btn.link { border: 0; background: transparent; color: var(--water); padding-left: 0; justify-content: flex-start; }
.monitor { display: grid; grid-template-columns: 300px minmax(0,1fr); background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.station-roster { border-right: 1px solid var(--line); }
.roster-heading { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid var(--line); }
.roster-heading h2 { font-size: 16px; }
.roster-heading small { color: var(--muted); }
.station { border: 0; border-bottom: 1px solid var(--line); width: 100%; padding: 18px 20px; background: var(--surface); color: var(--ink); text-align: left; display: grid; gap: 10px; }
.station:hover { background: var(--ground); }
.station[aria-pressed=true] { background: var(--green-soft); }
.station strong { font-size: 15px; display: block; }
.station small { display: block; color: var(--muted); }
.station-top, .station-bottom { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.station-bottom { flex-wrap: wrap; }
.station-bottom .numeric { font-size: 20px; font-weight: 600; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--green); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status[data-severity=rising] { color: var(--amber); }
.status[data-severity=high] { color: var(--red); }
.roster-note { padding: 18px 20px; font-size: 12px; color: var(--muted); }
.trace-workspace { min-width: 0; padding: 24px 28px; }
.trace-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.trace-heading h2 { font-size: 20px; }
.trace-heading p { font-size: 12px; color: var(--muted); margin-top: 5px; }
.trace-reading { display: flex; align-items: center; gap: 18px; margin: 20px 0 4px; }
.trace-reading strong { font-size: 30px; line-height: 1.1; font-weight: 600; }
.trace-reading span { font-size: 13px; color: var(--muted); }
.trace-reading .rain { margin-left: auto; text-align: right; }
.chart { width: 100%; height: auto; aspect-ratio: 680 / 300; display: block; font: 12px var(--font); }
.chart .axis { fill: var(--muted); }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .threshold { stroke: var(--amber); stroke-width: 1; stroke-dasharray: 5 5; }
.chart .water-area { fill: var(--water-soft); }
.chart .water-line { stroke: var(--water); stroke-width: 3; fill: none; stroke-linejoin: round; }
.chart .water-dot { fill: var(--water); stroke: #fff; stroke-width: 2; }
.chart-caption { display: flex; justify-content: space-between; gap: 16px; font-size: 12px; color: var(--muted); }
.chart-caption strong { font-weight: 400; color: var(--amber); }
.lower-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; margin-top: 32px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-head h2 { font-size: 19px; }
.section-head small { color: var(--muted); }
.route-diagram { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); position: relative; background: var(--water-soft); padding: 24px 16px; gap: 16px; }
.route-diagram::before { content: ""; position: absolute; top: 41px; left: 17%; right: 17%; height: 3px; background: var(--water); }
.route-stop { position: relative; text-align: center; }
.route-stop i { display: grid; place-items: center; background: #fff; color: var(--water); border: 2px solid var(--water); border-radius: 50%; width: 36px; height: 36px; margin: 0 auto 12px; }
.route-stop strong { font-size: 13px; display: block; }
.route-stop small { font-size: 11px; display: block; color: var(--muted); }
.route-stop[data-severity=high] i { color: var(--red); border-color: var(--red); }
.route-stop[data-severity=rising] i { color: var(--amber); border-color: var(--amber); }
.caption { color: var(--muted); font-size: 12px; margin-top: 12px; }
.event-list { list-style: none; margin: 0; padding: 0; }
.event-list li { display: grid; grid-template-columns: 76px minmax(0,1fr); gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 13px; }
.event-list time { font-family: var(--mono); color: var(--muted); font-size: 11px; padding-top: 2px; }
.event-list strong { display: block; font-weight: 600; }
.event-list small { color: var(--muted); display: block; margin-top: 4px; }
.links-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-top: 40px; border-top: 1px solid var(--line); padding: 24px 0 0; }
.links-band p { color: var(--muted); font-size: 13px; }
.community-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); gap: 40px; }
.advisory { background: var(--green-soft); padding: 28px; }
.advisory[data-severity=rising] { background: var(--amber-soft); }
.advisory[data-severity=high] { background: var(--red-soft); }
.advisory h2 { font-size: 27px; margin-top: 16px; }
.advisory p { margin-top: 12px; color: var(--muted); font-size: 14px; }
.advisory .status { font-size: 13px; }
.advisory dl { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
dt { color: var(--muted); font-size: 12px; }
dd { margin: 4px 0 0; font-weight: 600; }
.resources { padding-top: 28px; }
.resource { border-top: 1px solid var(--line); padding: 18px 0; display: block; text-decoration: none; }
.resource strong { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 15px; }
.resource span { color: var(--muted); font-size: 13px; display: block; margin-top: 5px; }
.resource:hover strong { color: var(--water); }
.checklist { list-style: none; margin: 16px 0 0; padding: 0; }
.checklist li { padding: 14px 0; border-top: 1px solid var(--line); }
.checklist label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.checklist input { width: 20px; height: 20px; accent-color: var(--forest); margin: 2px 0 0; flex-shrink: 0; }
.checklist strong { font-size: 14px; font-weight: 600; }
.checklist small { color: var(--muted); display: block; margin-top: 4px; }
.checklist label:has(input:checked) strong { color: var(--green); }
.table-wrap { margin-top: 28px; }
.station-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.station-table th { font-size: 12px; color: var(--muted); font-weight: 400; text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); }
.station-table td { padding: 16px 8px; border-bottom: 1px solid var(--line); }
.station-table small { display: block; color: var(--muted); }
.report-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); gap: 48px; }
.report-form { border-top: 1px solid var(--line); padding-top: 24px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 20px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 8px; }
.field input:not([type=checkbox]), .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 11px 12px; min-height: 44px; color: var(--ink); caret-color: var(--forest); }
.field textarea { resize: vertical; min-height: 104px; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }
.field input[type=file] { font-size: 12px; }
.field input::file-selector-button { border: 0; padding: 7px 10px; border-radius: 2px; color: var(--forest); background: var(--green-soft); font: 600 12px var(--font); margin-right: 12px; cursor: pointer; }
.field-help { color: var(--muted); font-size: 12px; display: block; margin-top: 6px; }
.location-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 8px 0 24px; }
.location-row p { font-size: 12px; color: var(--muted); max-width: 45ch; }
.form-notice { color: var(--muted); font-size: 12px; margin-top: 12px; }
.form-status { font-size: 13px; min-height: 24px; margin-bottom: 12px; }
.form-status[data-error=true] { color: var(--red); }
.report-tools { display: flex; align-items: center; gap: 8px; }
.report-tools select { padding: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); min-height: 44px; border-radius: var(--radius); font-size: 12px; }
.report-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.report-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.report-item strong { display: block; font-weight: 600; font-size: 14px; }
.report-item small { color: var(--muted); display: block; margin-top: 5px; }
.empty-state { color: var(--muted); padding: 32px 0; font-size: 14px; }
.storage-state { color: var(--muted); font-size: 12px; margin: 12px 0; }
.photo-preview { max-width: 240px; max-height: 160px; width: auto; object-fit: contain; display: block; margin-top: 12px; border-radius: var(--radius); }
dialog { border: 0; border-radius: 6px; padding: 0; background: var(--surface); color: var(--ink); width: min(560px,calc(100% - 32px)); max-height: 85vh; overflow: auto; box-shadow: 0 16px 40px rgb(32 53 44 / .16); }
dialog::backdrop { background: rgb(16 34 25 / .55); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 20px; }
.dialog-body { padding: 24px; }
.dialog-body p + p { margin-top: 12px; }
.dialog-body dl { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 20px 0; }
.dialog-actions { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.report-note { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.detail-photo { width: 100%; max-height: 300px; object-fit: contain; background: var(--ground); margin-top: 20px; }
.clear-check { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0 0; font-size: 13px; }
.clear-check input { width: 20px; height: 20px; accent-color: var(--red); }
.footer { max-width: 1336px; margin: 0 auto; padding: 24px 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; font-size: 12px; color: var(--muted); }
.footer nav { display: flex; gap: 20px; }
@media (max-width: 1050px) {
  .header-inner { gap: 20px; padding: 14px 24px; }
  main { padding: 28px 24px; }
  .monitor { grid-template-columns: 250px minmax(0,1fr); }
  .trace-workspace { padding: 24px 20px; }
  .scenarios span { padding: 11px 12px; font-size: 12px; }
  .lower-grid, .community-grid { gap: 28px; }
  .report-grid { gap: 32px; }
  .footer { margin: 0 24px; }
}
@media (max-width: 760px) {
  .header-inner { flex-wrap: wrap; padding: 16px 20px; gap: 16px; }
  .brand { font-size: 21px; }
  .global-nav { order: 3; width: 100%; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .global-nav a { padding: 10px 5px; font-size: 12px; justify-content: center; gap: 7px; }
  .global-nav i { font-size: 14px; }
  .directory { margin-left: auto; }
  .notice { padding: 12px 20px; font-size: 12px; }
  main { padding: 24px 20px 32px; }
  h1 { font-size: 28px; }
  .title-row { align-items: flex-start; flex-direction: column; gap: 12px; }
  .device-time { text-align: left; }
  .device-time time { display: inline; margin-left: 8px; font-size: 12px; }
  .toolbar { gap: 12px; }
  .scenarios { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .scenarios span { padding: 10px 12px; font-size: 12px; }
  .scenarios label:nth-of-type(3) { border-left: 0; border-top: 1px solid var(--line); }
  .scenarios label:nth-of-type(4) { border-top: 1px solid var(--line); }
  .monitor { grid-template-columns: 1fr; }
  .station-roster { border: 0; }
  .station-buttons { display: grid; grid-template-columns: 1fr 1fr; }
  .station { padding: 14px 12px; }
  .station:nth-child(odd) { border-right: 1px solid var(--line); }
  .station strong { font-size: 13px; }
  .station small { font-size: 11px; }
  .station-bottom .numeric { font-size: 18px; }
  .station-top { gap: 6px; align-items: flex-start; }
  .station-top > i { display: none; }
  .status { font-size: 11px; }
  .roster-heading { padding: 16px 12px; }
  .roster-note { padding: 12px; }
  .trace-workspace { padding: 20px 12px; border-top: 1px solid var(--line); }
  .trace-heading h2 { font-size: 18px; }
  .trace-reading { gap: 12px; }
  .trace-reading strong { font-size: 27px; }
  .trace-reading span { font-size: 12px; }
  .chart-caption { flex-direction: column; gap: 4px; }
  .lower-grid, .community-grid, .report-grid { grid-template-columns: 1fr; gap: 28px; }
  .route-diagram { gap: 8px; padding: 20px 8px; }
  .route-diagram::before { top: 37px; }
  .route-stop strong { font-size: 11px; }
  .route-stop small { font-size: 10px; }
  .section-head { flex-wrap: wrap; gap: 10px; }
  .advisory { padding: 22px 20px; }
  .advisory h2 { font-size: 24px; }
  .station-table { font-size: 12px; }
  .station-table td, .station-table th { padding: 12px 4px; }
  .station-table th:nth-child(3), .station-table td:nth-child(3) { display: none; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .links-band { margin-top: 28px; }
  .footer { margin: 0 20px; flex-direction: column; gap: 12px; }
  .dialog-head, .dialog-body { padding: 20px; }
  .dialog-body dl { grid-template-columns: 1fr; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.plot { position: relative; }
.chart { height: 300px; aspect-ratio: auto; }
.plot-y { position: absolute; top: 40px; left: 0; height: 217px; display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--muted); pointer-events: none; }
.plot-times { position: absolute; left: 8.82%; right: 8.82%; bottom: 16px; display: flex; justify-content: space-between; gap: 4px; font: 11px var(--mono); color: var(--muted); }
@media (max-width: 420px) { .plot-times span:nth-child(2), .plot-times span:nth-child(4) { visibility: hidden; } }
