/* The Geology & Soils page (src/geology/geology-twin.js). Cards, tables, pills, tabs, pagers and the pop-up are the shared
   .wqx-* classes in wq-twin.css; only what this page adds is here. Colour comes from tokens only. No new keyframes. */

/* The page is landing content: it is not shown while a sub-page of the hub is open. */
#cat-geology:has(.hydro-sub:not([hidden])) #geology-twin { display: none; }

/* The hub's three launcher cards repeat the tab strip above the page and pushed the search below the first screen. The tools stay one click away in the tabs and in the fold at the bottom. */
/* tu-atlas.css forces every hub card grid to display:grid !important unless it is [hidden], so hiding needs the same weight. */
#cat-geology .hub-hero-panel #geo-cards.hydro-card-grid { display: none !important; }

.geotw-tools { margin: 24px 0 0; }
.geotw-tools > summary { cursor: pointer; padding: 12px 16px; border: 1px solid var(--guide-color-border-strong); border-radius: 12px; background: var(--guide-color-paper); font-size: var(--guide-fs-md); font-weight: 600; }
.geotw-tools[open] > summary { margin-bottom: 14px; }

.geotw-hint { margin: 8px 0 0; font-size: var(--guide-fs-sm); color: var(--guide-color-ink-soft); max-width: 62em; }
.geotw-try { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; font-size: var(--guide-fs-sm); color: var(--guide-color-ink-soft); }
.geotw-rule { margin: 10px 0 0; max-width: 62em; font-size: var(--guide-fs-sm); line-height: 1.5; color: var(--guide-color-ink-soft); }
.geotw-sentences { margin: 14px 0 0; display: grid; gap: 10px; max-width: 62em; }
.geotw-sentences p { margin: 0; font-size: var(--guide-fs-sm); line-height: 1.55; }
.geotw-h4 { margin: 18px 0 8px; font-size: var(--guide-fs-sm); font-weight: 600; color: var(--guide-color-ink-soft); }
.wqx-card-head + .geotw-h4 { margin-top: 0; }
.geotw-lede { margin: 0 0 12px; font-size: var(--guide-fs-sm); line-height: 1.55; max-width: 62em; }
.geotw-big { margin: 0 0 10px; font-size: var(--guide-fs-lg); font-weight: 600; line-height: 1.3; }
.geotw-big small { font-size: var(--guide-fs-sm); font-weight: 400; color: var(--guide-color-ink-muted); }
.geotw-coords { margin: 2px 0 0; font-size: var(--guide-fs-sm); color: var(--guide-color-ink-soft); font-variant-numeric: tabular-nums; }
.geotw-num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.geotw-table small, .geotw-dl small { display: block; margin-top: 2px; font-size: var(--guide-fs-sm); color: var(--guide-color-ink-muted); white-space: normal; }
.geotw .wqx-table tr.is-on td { background: var(--guide-color-bg-2); }
.geotw .wqx-table .wqx-link { text-align: left; }
.geotw-none { font-size: var(--guide-fs-sm); color: var(--guide-color-ink-muted); }

/* a place's head: title left, the four actions right */
.geotw-place { scroll-margin-top: 80px; }
.geotw-headact { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.geotw-reportgrid { margin-top: 14px; align-items: start; }
.geotw-place > .wqx-grid2 { margin-top: 14px; }

/* definition lists */
.geotw-dl { display: grid; gap: 0; margin: 0 0 14px; border-top: 1px solid var(--guide-color-border-subtle); }
.geotw-dl > div { display: grid; grid-template-columns: minmax(150px, 34%) 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--guide-color-border-subtle); }
.geotw-dl dt { font-size: var(--guide-fs-sm); color: var(--guide-color-ink-soft); }
.geotw-dl dd { margin: 0; font-size: var(--guide-fs-sm); line-height: 1.5; }
.geotw-dl--wide > div { grid-template-columns: minmax(170px, 26%) 1fr; }

/* range bars: a whisker from the 10th to the 90th percentile, a box for the middle half, a tick for the median */
.geotw-range { display: block; max-width: 100%; margin: 2px 0 4px; overflow: visible; }
.geotw-whisker { stroke: var(--guide-color-neutral-500); stroke-width: 1.4; }
.geotw-box { fill: color-mix(in srgb, var(--guide-color-lake) 28%, var(--guide-color-paper)); stroke: var(--guide-color-lake); stroke-width: 1.2; }
.geotw-median { stroke: var(--guide-color-ink); stroke-width: 2; }
.geotw-dot { fill: var(--guide-color-lake); stroke: var(--guide-color-paper); stroke-width: 1.5; }
.geotw-n { fill: var(--guide-color-ink-muted); }
.geotw-units td:first-child { min-width: 180px; }

/* a chart in a wide card keeps its own proportions instead of stretching its type to the card */
.geotw-chart { max-width: 640px; }
.geotw-place .wqx-seg-ctl { margin: 10px 0 14px; }

/* well list beside the map */
.geotw-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 18px; align-items: start; margin-top: 14px; }
.geotw-ctl { display: flex; flex-wrap: wrap; gap: 12px 16px; margin: 0 0 12px; align-items: flex-end; }
.geotw-sort { display: grid; gap: 4px; font-size: var(--guide-fs-sm); color: var(--guide-color-ink-soft); }
.geotw-sort select, .geotw-sort input { min-height: 40px; max-width: 100%; padding: 0 10px; border-radius: 8px; border: 1px solid var(--guide-color-border-strong); background: var(--guide-color-paper); color: var(--guide-color-ink); font: inherit; font-size: var(--guide-fs-sm); }
.wqx-card-head .geotw-sort { grid-auto-flow: column; align-items: center; gap: 8px; }

/* map marks: a surface ring keeps overlapping marks apart; faults are lines, earthquakes circles, wells small dots, the place a ringed cross */
.geotw-fault { stroke: var(--guide-color-ink-soft); stroke-width: 1.4; stroke-linejoin: round; stroke-dasharray: 5 2; }
/* One chromatic hue (the wells) and neutrals told apart by shape: a filled dot, a hollow ring, a line. Checked with the dataviz
   validator, 2026-11-22: lake against ink separates at delta-E 21.5 (colour-blind) and 22.4 (normal) in light, 16.0 and 19.0 in dark.
   Lake with plum failed (2.9 under deuteranopia), so no second hue is used. */
.geotw-quake { fill: color-mix(in srgb, var(--guide-color-ink) 10%, transparent); stroke: var(--guide-color-ink); stroke-width: 1.1; cursor: pointer; }
.geotw-well { fill: var(--guide-color-lake); stroke: var(--guide-color-paper); stroke-width: .8; cursor: pointer; }
.geotw-here circle { fill: none; stroke: var(--guide-color-ink); stroke-width: 1.8; }
.geotw-here path { stroke: var(--guide-color-ink); stroke-width: 1.8; fill: none; }
.geotw-radius { fill: color-mix(in srgb, var(--guide-color-lake) 6%, transparent); stroke: var(--guide-color-ink-muted); stroke-width: 1; stroke-dasharray: 4 3; }
.geotw-scale line { stroke: var(--guide-color-ink); stroke-width: 2; }
.geotw-scale text { fill: var(--guide-color-ink-soft); font-size: 12px; }
.geotw-key { display: inline-block; width: 11px; height: 11px; flex: none; }
.geotw-key--well { background: var(--guide-color-lake); border-radius: 50%; }
.geotw-key--quake { background: transparent; border: 1.5px solid var(--guide-color-ink); border-radius: 50%; }
.geotw-key--fault { width: 16px; height: 0; border-top: 2px dashed var(--guide-color-ink-soft); }
.geotw-key--here { background: transparent; border: 2px solid var(--guide-color-ink); border-radius: 50%; }
.geotw-quake:focus-visible, .geotw-well:focus-visible { outline: 2px solid var(--guide-color-signal); outline-offset: 2px; }
.geotw-kind { background: var(--guide-color-lake); }

/* questions to ask */
.geotw-asks { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 6px 22px; }
.geotw-ask ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: var(--guide-fs-sm); line-height: 1.55; }
.geotw-who { margin: 10px 0 0; font-size: var(--guide-fs-sm); line-height: 1.5; }

/* one record */
.geotw-record { scroll-margin-top: 80px; }
.geotw-record .wqx-searchwrap { margin: 0 0 14px; }

/* what you can do, sources */
.geotw-steps, .geotw-caveats { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: var(--guide-fs-sm); line-height: 1.55; max-width: 62em; }
.geotw-caveats { margin-top: 14px; }
.geotw .wqx-details { margin-top: 12px; font-size: var(--guide-fs-sm); }
.geotw .wqx-details ul { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }

@media (max-width: 860px) {
  .geotw-split { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  /* a table row becomes a stacked block: the name first, then each figure under its column's name */
  .geotw-table, .geotw-table tbody, .geotw-table tr, .geotw-table td { display: block; width: 100%; }
  .geotw-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .geotw-table tr { padding: 12px 0; border-bottom: 1px solid var(--guide-color-border-subtle); }
  .geotw-table td { padding: 3px 0; border: 0; white-space: normal; }
  .geotw-table td[data-label]::before { content: attr(data-label) ': '; color: var(--guide-color-ink-muted); font-size: var(--guide-fs-sm); }
  .geotw-table td.geotw-num { white-space: normal; }
  .geotw-table td small { display: inline; margin-left: 6px; }
  .geotw-table td.geotw-num small { white-space: nowrap; }
  .geotw-units td:first-child { min-width: 0; }
  .geotw-dl > div, .geotw-dl--wide > div { grid-template-columns: 1fr; gap: 2px; }
  .geotw-ctl { display: grid; grid-template-columns: 1fr; }
  .geotw-sort select, .geotw-sort input { width: 100%; }
  .wqx-card-head .geotw-sort { grid-auto-flow: row; }
  .geotw-headact { justify-content: flex-start; }
}

@media print {
  .geotw-try, .geotw .wqx-pager, .geotw .wqx-seg-ctl, .geotw .geotw-ctl, .geotw .wqx-tabs, .geotw .wqx-searchwrap, .geotw-headact, .geotw .wqx-actions, .geotw .wqx-scope { display: none !important; }
  .geotw .wqx-card { break-inside: avoid; }
  .geotw-split { grid-template-columns: 1fr; }
  .geotw-tools { display: none; }
}
