/* The Gage View page (src/streamflow/gage-twin.js). Rules that restyle an element also carrying a .wqx-* class are
   written `.gvx .gvx-x` so they win whichever order the two sheets load in (Vite reorders them in production).
   Layout, cards, tables, tabs, pills and the pop-up come from
   wq-twin.css (.wqx-*); only what is new to this page is here. Colour is tokens only. Polarity is three colours
   (below warm, normal grey, above cool); distance from normal is a ring, not a second shade. */

.gvx { --gvx-normal: var(--guide-color-neutral-400); }
/* The grey midpoint has to sit apart from the pastel dark-theme brick and lake, so it steps down a shade there. */
[data-theme="dark"] .gvx { --gvx-normal: var(--guide-color-neutral-500); }

.gvx-memo { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--guide-color-bg-1); font-size: var(--guide-fs-md); line-height: 1.5; max-width: 72ch; }
.gvx .wqx-big span { font-variant-numeric: tabular-nums; }

/* The bar's legend carries the counts; white figures on a pastel segment fail contrast in the dark theme. */
.gvx .wqx-seg b { display: none; }

/* pills: a dot of the class colour beside words in ink, never coloured text */
.gvx .gvx-pill { display: inline-flex; align-items: center; gap: 6px; white-space: normal; }
.gvx .gvx-pill i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.gvx .gvx-pill--none i { background: transparent; border: 1.5px solid var(--guide-color-ink-muted); }

/* lists */
.gvx .gvx-table td { vertical-align: top; }
.gvx .gvx-name { text-align: left; font-weight: 600; }
.gvx-meta { display: block; margin-top: 2px; font-size: var(--guide-fs-xs); color: var(--guide-color-ink-muted); line-height: 1.35; }
.gvx-meta-inline { color: var(--guide-color-ink-muted); }
.gvx-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gvx .gvx-table th.gvx-num { text-align: right; }
.gvx-when { white-space: nowrap; color: var(--guide-color-ink-soft); }
.gvx-count { margin-left: 4px; font-variant-numeric: tabular-nums; opacity: .75; }
.wqx-results .gvx-hit-row { grid-template-columns: minmax(0, 1fr); }
.gvx-hit-row span { font-size: var(--guide-fs-sm); color: var(--guide-color-ink-soft); }
@media (max-width: 560px) {
  .gvx-table th:nth-child(5), .gvx-table td:nth-child(5) { display: none; }
  .gvx-table th, .gvx-table td { padding-left: 4px; padding-right: 4px; }
}

/* one gauge */
.gvx .gvx-site { scroll-margin-top: 12px; }
.gvx-site-name { font-family: var(--guide-font-display, inherit); font-size: var(--guide-fs-2xl); line-height: 1.15; overflow-wrap: anywhere; }
.gvx-now { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 14px; align-items: start; }
@media (min-width: 720px) { .gvx-now { grid-template-columns: auto minmax(0, 1fr); gap: 24px; } }
.gvx-now-fig b { display: block; font-size: clamp(40px, 9vw, 64px); line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.gvx-now-fig span { display: block; margin-top: 4px; font-size: var(--guide-fs-sm); color: var(--guide-color-ink-soft); }
.gvx-now-say p { margin: 8px 0 0; line-height: 1.5; max-width: 68ch; }
.gvx-now-say .wqx-fresh { color: var(--guide-color-ink-muted); }
.gvx .gvx-next p:first-child { margin-top: 0; }
.gvx .gvx-next .wqx-btn { margin-top: 8px; }
.gvx-block { margin-top: 18px; min-width: 0; }
.gvx-block p { margin: 6px 0 0; font-size: var(--guide-fs-sm); line-height: 1.5; }
.gvx-h4 { font-size: var(--guide-fs-md); font-weight: 700; }
.gvx-h5 { margin: 0; font-size: var(--guide-fs-sm); font-weight: 700; }
.gvx .gvx-trend { margin-top: 18px; }
.gvx-trendcol { min-width: 0; margin-top: 10px; }

/* steps and sources */
.gvx-steps { margin: 0; padding-left: 22px; display: grid; gap: 12px; font-size: var(--guide-fs-sm); line-height: 1.5; }
.gvx-steps b { display: block; font-size: var(--guide-fs-md); }
.gvx-steps span { color: var(--guide-color-ink-soft); }
.gvx-sources { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: var(--guide-fs-sm); line-height: 1.5; color: var(--guide-color-ink-soft); }
.wqx-modal .wqx-quote cite { display: block; margin-top: 6px; font-style: normal; font-size: var(--guide-fs-xs); }

/* keys */
.gvx .gvx-key { margin-top: 10px; }
.gvx .gvx-key .gvx-key-dot { width: 11px; height: 11px; border-radius: 50%; }
.gvx .gvx-key .gvx-key-dot--ring { background: transparent; border: 1.5px solid var(--guide-color-ink-soft); box-shadow: inset 0 0 0 2.5px var(--guide-color-paper), inset 0 0 0 6px var(--guide-color-ink-soft); }
.gvx .gvx-key .gvx-key-dot--none { background: transparent; border: 1.5px solid var(--guide-color-ink-muted); }
.gvx .gvx-key .gvx-key-line { width: 18px; height: 0; border-radius: 0; border-top: 2px solid var(--guide-color-ink); }
.gvx .gvx-key .gvx-key-line--dash { border-top: 1.5px dashed var(--guide-color-ink-soft); }
.gvx .gvx-key .gvx-key-line--p5 { border-top: 1.5px dotted var(--guide-color-brick); }
.gvx .gvx-key .gvx-key-band { width: 18px; height: 11px; border-radius: 2px; background: var(--guide-color-lake); opacity: .34; }
.gvx .gvx-key .gvx-key-band--wide { opacity: .14; }

/* the state map */
.gvx-dot { stroke: var(--guide-color-paper); stroke-width: 1.4; cursor: pointer; }
.gvx-dot--none { fill: var(--guide-color-paper); stroke: var(--guide-color-ink-muted); stroke-width: 1.3; }
.gvx-dot.is-sel { stroke: var(--guide-color-ink); stroke-width: 2.4; }
.gvx-dot:focus-visible { outline: 2px solid var(--guide-color-signal); outline-offset: 2px; }
.gvx-ring { fill: none; stroke-width: 1.5; pointer-events: none; }

/* charts: thin marks, recessive grid. Drawn at the width they are shown (gage-twin.js chartW), so their text is real 12px. */
.gvx .gvx-chart, .gvx .gvx-ladder, .gvx .gvx-years { width: auto; max-width: 100%; height: auto; }
.gvx-grid { stroke: var(--guide-color-border-subtle); stroke-width: 1; }
.gvx-band { fill: var(--guide-color-lake); opacity: .22; }
.gvx-band--wide { opacity: .12; }
.gvx-median { fill: none; stroke: var(--guide-color-ink-soft); stroke-width: 1.3; stroke-dasharray: 4 3; }
.gvx-p5 { fill: none; stroke: var(--guide-color-brick); stroke-width: 1.4; stroke-dasharray: 1.5 3; stroke-linecap: round; }
.gvx-flow { fill: none; stroke: var(--guide-color-ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.gvx-flow-end { fill: var(--guide-color-ink); stroke: var(--guide-color-paper); stroke-width: 2; }
.gvx-end-val { fill: var(--guide-color-ink); font-size: var(--guide-fs-sm); font-weight: 700; }
.gvx-hit { fill: transparent; }
.gvx-hit:hover { fill: var(--guide-color-ink); fill-opacity: .06; }
.gvx-stage-track { fill: var(--guide-color-bg-4); }
.gvx-stage-fill { fill: var(--guide-color-lake); }
.gvx-stage-tick { stroke: var(--guide-color-ink); stroke-width: 2; }
.gvx-stage-fc { fill: var(--guide-color-paper); stroke: var(--guide-color-ink); stroke-width: 2; }
.gvx-stage-lead { stroke: var(--guide-color-border-strong); stroke-width: 1; }
/* Water temperature: the line is ink like the flow line; the fishing rule's limits are brick like its 5th-percentile line. */
.gvx-tline { fill: none; stroke: var(--guide-color-ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.gvx-tdot { fill: var(--guide-color-ink); stroke: var(--guide-color-paper); stroke-width: 2; }
.gvx-tval { fill: var(--guide-color-ink); font-size: var(--guide-fs-xs); font-weight: 600; font-variant-numeric: tabular-nums; }
.gvx-tlimit { stroke: var(--guide-color-brick); stroke-width: 1.4; stroke-dasharray: 1.5 3; stroke-linecap: round; }
.gvx-now-temp { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--guide-color-border-subtle); }
.gvx-now-solo .gvx-now-temp { margin-top: 0; padding-top: 0; border-top: 0; }
.gvx-now-temp span { max-width: 30ch; }
.gvx-now-temp b { font-size: clamp(26px, 5vw, 34px); }
.gvx-temp-wrap { margin-top: 12px; }
.gvx-yr { fill: var(--guide-color-lake); stroke: var(--guide-color-paper); stroke-width: 1.5; }
.gvx line.gvx-trend { stroke: var(--guide-color-ink); stroke-width: 1.5; stroke-dasharray: 5 3; }

/* the older all-stations list, kept under the page for reservoirs, wells, snow and weather sites */
.gvx-all-stations { margin: 6px 0 24px; padding: 14px 18px; border: 1px solid var(--guide-color-border-default); border-radius: 16px; background: var(--guide-color-paper); }
.gvx-all-stations > summary { cursor: pointer; font-weight: 700; font-size: var(--guide-fs-md); }
.gvx-all-stations > summary span { display: block; margin-top: 2px; font-weight: 400; font-size: var(--guide-fs-sm); color: var(--guide-color-ink-soft); }

@media print {
  .gvx-all-stations, .gvx [data-gv-act="close-site"], .gvx .wqx-pager { display: none !important; }
  .gvx-site, .gvx-block { break-inside: avoid; }
}
