/* The Surface Water page (src/streamflow/surface-twin.js). Cards, tables, tabs, pagers and the pop-up are the shared
   .wqx-* classes in wq-twin.css; this sheet holds only what is new here. Colour comes from tokens only. Flow against
   normal is a diverging scale set in surface-twin-charts.js; a gauge that cannot be compared is a hollow ring. */

.swx-finder { position: sticky; top: 0; z-index: 15; padding: 8px 0; background: var(--guide-color-paper); }
.swx-place { padding: 4px 0 0; }
.swx-place-h { display: flex; align-items: center; gap: 6px; padding: 8px 10px 2px; font-size: var(--guide-fs-xs); color: var(--guide-color-ink-muted); }
.swx-place-h svg, .swx-place-h i { width: 14px; height: 14px; }
.swx-place button { grid-template-columns: 1fr; }
.swx-place button small { grid-column: 1; }

.swx-dark { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; padding: 12px 14px; border: 1px dashed var(--guide-color-line-strong); border-radius: 12px; font-size: var(--guide-fs-sm); line-height: 1.5; color: var(--guide-color-ink-soft); }
.swx-dark svg, .swx-dark i { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.swx-dark b { color: var(--guide-color-ink); }

/* map */
.swx-map .swx-dot { cursor: pointer; outline: none; }
.swx-map .swx-dot:focus-visible circle:not(.wqx-hit) { stroke: var(--guide-color-signal); stroke-width: 3; }
.swx-map .swx-dot.is-sel circle:not(.wqx-hit) { stroke: var(--guide-color-ink); }
.swx-maplegend { margin-top: 12px; }
.wqx-legend i.swx-hollow { background: transparent; box-shadow: inset 0 0 0 1.5px var(--guide-color-line-strong); border-radius: 50%; }
.wqx-legend i.swx-halo { background: transparent; box-shadow: inset 0 0 0 1.5px var(--guide-color-ink); border-radius: 50%; }

/* basins */
.swx-basins { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.swx-basins li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.swx-basin-name { justify-self: start; padding: 0; border: 0; background: none; font: inherit; font-weight: 600; font-size: var(--guide-fs-sm); color: var(--guide-color-link); cursor: pointer; text-align: left; }
.swx-basin-name em { display: block; font-style: normal; font-weight: 400; font-size: var(--guide-fs-xs); color: var(--guide-color-ink-muted); }
.swx-basin-bar { display: flex; gap: 2px; height: 14px; border-radius: 4px; overflow: hidden; }
.swx-basin-bar.is-empty { height: auto; overflow: visible; }
.swx-basin-bar i { font-style: normal; font-size: var(--guide-fs-xs); color: var(--guide-color-ink-muted); }
.swx-basin-fig { font-size: var(--guide-fs-xs); color: var(--guide-color-ink-soft); font-variant-numeric: tabular-nums; }
.swx-basin-fig em { font-style: normal; margin-left: 8px; color: var(--guide-color-ink-muted); }

.swx-meter { display: inline-block; vertical-align: middle; width: 72px; height: 8px; margin-right: 6px; border-radius: 4px; background: var(--guide-color-bg-2); overflow: hidden; }
.swx-meter span { display: block; height: 100%; border-radius: 4px; background: var(--guide-color-lake); }

/* one gauge */
.swx-verdict { margin: 14px 0 6px; font-size: var(--guide-fs-lg); line-height: 1.4; }
.swx-vdot { display: inline-block; width: 14px; height: 14px; margin-right: 8px; border-radius: 50%; vertical-align: -1px; }
.swx-vdot.is-hollow { box-shadow: inset 0 0 0 2px var(--guide-color-line-strong); }
.swx-kv { margin: 10px 0 0; font-size: var(--guide-fs-sm); line-height: 1.5; }
.swx-rec-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); margin-top: 8px; }
.swx-rec-grid > * { min-width: 0; }
@media (min-width: 900px) { .swx-rec-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.swx-record .wqx-callout { display: flex; gap: 10px; align-items: flex-start; }
.swx-record .wqx-callout svg, .swx-record .wqx-callout i { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.swx-temps td { text-align: center; font-variant-numeric: tabular-nums; }

/* today against the record: a strip of the five zones with a marker */
.swx-strip { margin: 26px 0 8px; }
.swx-strip-track { position: relative; height: 16px; border-radius: 5px; background: var(--guide-color-bg-2); }
.swx-zone { position: absolute; top: 0; bottom: 0; box-shadow: inset -2px 0 0 var(--guide-color-paper); }
.swx-zone:first-child { border-radius: 5px 0 0 5px; }
.swx-median { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: repeating-linear-gradient(to bottom, var(--guide-color-ink-muted) 0 3px, transparent 3px 6px); }
.swx-lowline { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--guide-color-ink); }
.swx-now { position: absolute; top: -6px; bottom: -6px; width: 4px; margin-left: -2px; border-radius: 2px; background: var(--guide-color-ink); box-shadow: 0 0 0 2px var(--guide-color-paper); }
.swx-now b { position: absolute; bottom: calc(100% + 3px); left: 50%; transform: translateX(-50%); padding: 1px 6px; border-radius: 6px; background: var(--guide-color-ink); color: var(--guide-color-paper); font-size: var(--guide-fs-xs); white-space: nowrap; font-variant-numeric: tabular-nums; }
.swx-strip-ax { position: relative; height: 18px; margin-top: 4px; font-size: var(--guide-fs-xs); color: var(--guide-color-ink-muted); font-variant-numeric: tabular-nums; }
.swx-strip-ax span { position: absolute; transform: translateX(-50%); white-space: nowrap; }

.wqx-legend i.swx-key-band { background: var(--guide-color-neutral-400); opacity: .45; }
.wqx-legend i.swx-key-band.is-wide { opacity: .22; }
.wqx-legend i.swx-key-dash { background: transparent; height: 0; border-top: 2px dashed var(--guide-color-ink-muted); border-radius: 0; }

/* flood ladder */
.swx-ladder { margin: 30px 0 10px; }
.swx-ladder-track { position: relative; height: 6px; border-radius: 3px; background: var(--guide-color-bg-2); }
.swx-rung { position: absolute; top: -4px; width: 2px; height: 14px; margin-left: -1px; background: var(--guide-color-ink-soft); }
.swx-ladder-key { margin: 12px 0 0; font-size: var(--guide-fs-xs); color: var(--guide-color-ink-muted); font-variant-numeric: tabular-nums; }

.swx-sources { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: var(--guide-fs-sm); line-height: 1.5; color: var(--guide-color-ink-soft); }

@media (max-width: 560px) {
  .swx-finder .wqx-scope-lbl { display: none; }
  .swx-finder .wqx-scope { flex-wrap: nowrap; }
  .swx-finder .wqx-scope select { flex: 1 1 0; min-width: 0; }
}
@media print {
  .wqx .swx-finder, .swx-map .wqx-hit { display: none; }
  .swx-record { border-width: 1px; break-inside: auto; }
}
.swx-extras { display: flex; flex-wrap: wrap; align-items: center; gap: var(--guide-sp-2) var(--guide-sp-4); margin: 8px 0 24px; }
@media print { .swx-extras { display: none; } }
