/* The Bedrock & Aquifer page (src/geology/bedrock-twin.js). It wears the Water Quality page's components
   (styles/modules/wq-twin.css); this file holds only what that page did not need: rock-type chips, range bars, the
   ladders, the quarter-degree map, well rows and the old tools folded under the page. Tokens only, no keyframes
   (styles/motion.css owns them). A "not named" or "mine ground" well is HOLLOW wherever it appears, so it cannot be read
   as a rock type. */

#bedrock-twin { max-width: 1180px; }
#bdx-head, #bdx-place, #bdx-record, #bdx-map, #bdx-groups, #bdx-counties, #bdx-law, #bdx-actions, #bdx-near-list { scroll-margin-top: 64px; }

/* The sentence is the page's headline and is long: one step down from the shared big heading so it reads as a sentence. */
.wqx-big.bdx-sentence { font-size: clamp(18px, 2.6vw, 24px); line-height: 1.38; max-width: 60em; font-weight: 600; }
.bdx-lead { margin: 10px 0; font-size: var(--guide-fs-md); line-height: 1.55; }
.bdx .wqx-tile b { font-size: var(--guide-fs-xl); overflow-wrap: anywhere; }

/* a rock-type group as a dot and a word */
.bdx-chip { display: inline-flex; align-items: center; gap: 6px; font-size: var(--guide-fs-sm); }
.bdx-dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; }
.bdx-dot.is-hollow { box-shadow: inset 0 0 0 1.5px var(--guide-color-ink-muted); }

/* the three ladders under the sentence */
.bdx-ladders { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin: 4px 0 12px; }
.bdx-ladder { min-width: 0; padding: 10px 12px; border-radius: 12px; background: var(--guide-color-bg-1); }
.bdx-ladder > b { display: block; font-size: var(--guide-fs-sm); margin-bottom: 4px; }
.bdx-track { position: relative; height: 22px; margin: 6px 2px 4px; }
.bdx-track::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 2px; background: var(--guide-color-border-default); }
.bdx-track-line { position: absolute; top: 9px; height: 4px; border-radius: 2px; background: var(--guide-color-lake); opacity: .45; }
.bdx-tick { position: absolute; top: 5px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--guide-color-lake); box-shadow: 0 0 0 2px var(--guide-color-bg-1); }
.bdx-tick.is-mid { top: 2px; width: 18px; height: 18px; margin-left: -9px; background: var(--guide-color-ink); }
.bdx-five { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 4px 8px; margin: 6px 0 0; }
.bdx-five dt { font-size: var(--guide-fs-xs); color: var(--guide-color-ink-muted); line-height: 1.25; }
.bdx-five dd { margin: 0; font-size: var(--guide-fs-md); font-weight: 600; font-variant-numeric: tabular-nums; }
.bdx-five .is-mid dt { color: var(--guide-color-ink-soft); }
.bdx-five .is-mid dd { font-size: var(--guide-fs-lg); }
.bdx-none { font-size: var(--guide-fs-sm); color: var(--guide-color-ink-muted); }

/* range bars */
.bdx-range { display: block; width: 100%; max-width: 240px; height: 18px; }
.bdx-range-axis { stroke: var(--guide-color-border-default); stroke-width: 1; }
.bdx-range-whisker { stroke: var(--guide-color-ink-soft); stroke-width: 2; stroke-linecap: round; }
.bdx-range-box { fill: var(--guide-color-lake); opacity: .55; }
.bdx-range-med { stroke: var(--guide-color-ink); stroke-width: 2.5; stroke-linecap: round; }
.bdx-key { width: 60px; height: 18px; vertical-align: middle; margin-right: 8px; }

/* the rock-type table */
.bdx-groups { display: grid; gap: 0; }
.bdx-grow { display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(130px, 1fr) minmax(130px, 1fr) minmax(130px, .9fr); gap: 12px; align-items: start; padding: 10px 4px; border-bottom: 1px solid var(--guide-color-border-subtle); }
.bdx-ghead { font-size: var(--guide-fs-xs); font-weight: 600; color: var(--guide-color-ink-soft); border-bottom: 1px solid var(--guide-color-border-default); }
.bdx-grow > span { display: grid; gap: 3px; min-width: 0; }
.bdx-grow small { font-size: var(--guide-fs-xs); color: var(--guide-color-ink-soft); line-height: 1.35; }
.bdx-grow small em { font-style: normal; color: var(--guide-color-ink-muted); }
.bdx-gname .bdx-chip { font-size: var(--guide-fs-md); font-weight: 600; }

/* the quarter-degree map */
.bdx-cell { fill: transparent; stroke: none; cursor: pointer; }
.bdx-cell:hover { stroke: var(--guide-color-ink); stroke-width: 1.4; }
.bdx-cell.is-few { fill: transparent; stroke: var(--guide-color-border-default); stroke-width: .5; stroke-dasharray: 2 2; }
.bdx-pin { fill: var(--guide-color-ink); stroke: var(--guide-color-paper); stroke-width: 1.2; pointer-events: none; }
.wqx-legend i.bdx-key-few { background: transparent; border: 1px dashed var(--guide-color-ink-muted); border-radius: 2px; }
.bdx-unit { color: var(--guide-color-ink-muted); }
.bdx-dot-well { stroke: var(--guide-color-paper); stroke-width: .8; cursor: pointer; fill: var(--guide-color-lake); }
.bdx-dot-well.is-step { fill: transparent; }
.bdx-dot-well.is-hollow { fill: var(--guide-color-paper); stroke: var(--guide-color-ink-muted); stroke-width: 1.1; }
.bdx-dot-well:hover { stroke: var(--guide-color-ink); stroke-width: 1.8; }
.bdx-radius { fill: none; stroke: var(--guide-color-ink-soft); stroke-width: 1; stroke-dasharray: 4 3; }

/* a place: the mapped rock beside the local map */
.bdx-place-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .bdx-place-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.bdx-place-grid p { margin: 6px 0; font-size: var(--guide-fs-md); line-height: 1.5; }
.bdx-mapped { padding: 10px 12px; border-radius: 12px; background: var(--guide-color-bg-1); }
.bdx-mapped > small { display: block; color: var(--guide-color-ink-soft); font-size: var(--guide-fs-sm); }
.bdx-localmap .bdx-local { max-height: 440px; }

/* well rows */
.bdx-wells { list-style: none; margin: 10px 0 0; padding: 0; display: grid; }
.bdx-wellrow { width: 100%; display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 10px 6px; border: 0; border-bottom: 1px solid var(--guide-color-border-subtle); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.bdx-wellrow:hover, .bdx-wellrow:focus-visible { background: var(--guide-color-bg-1); }
.bdx-wellrow-main { display: grid; gap: 2px; min-width: 0; }
.bdx-wellrow-main b { font-size: var(--guide-fs-md); }
.bdx-wellrow-main small { font-size: var(--guide-fs-sm); line-height: 1.4; color: var(--guide-color-ink-soft); overflow-wrap: anywhere; }
.bdx-wellrow-tags { display: grid; gap: 4px; justify-items: start; flex: none; }

/* law cards show when they were read, closed */
.bdx-readon { font-size: var(--guide-fs-xs); color: var(--guide-color-ink-muted); }

/* sort control and the unit browser */
.bdx-sort { display: inline-flex; align-items: center; gap: 8px; font-size: var(--guide-fs-sm); color: var(--guide-color-ink-soft); }
.bdx-sort select, .bdx-units select, .bdx-units input { font: inherit; font-size: var(--guide-fs-sm); padding: 6px 8px; border-radius: 8px; border: 1px solid var(--guide-color-border-strong); background: var(--guide-color-bg-1); color: var(--guide-color-ink); }
.bdx-units { margin-top: 14px; }
.bdx-units > summary { cursor: pointer; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--guide-color-border-default); background: var(--guide-color-bg-1); font-size: var(--guide-fs-md); font-weight: 600; }
.bdx-units > summary small { display: block; font-weight: 400; font-size: var(--guide-fs-sm); color: var(--guide-color-ink-soft); margin-top: 2px; }
.bdx-units[open] > summary { margin-bottom: 10px; }

/* the maps, layer toggles and AI buttons that were on this page before the rebuild */
.bdx-tools { max-width: 1180px; margin-top: 18px; }
.bdx-tools > summary { cursor: pointer; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--guide-color-border-default); background: var(--guide-color-bg-1); font-size: var(--guide-fs-md); font-weight: 600; }
.bdx-tools > summary small { display: block; font-weight: 400; font-size: var(--guide-fs-sm); color: var(--guide-color-ink-soft); margin-top: 2px; }
.bdx-tools[open] > summary { margin-bottom: 12px; }

/* numbers stay whole: a long table scrolls sideways inside its own wrapper instead of breaking 19,275 across two lines */
.bdx .wqx-table td, .bdx .wqx-table th { white-space: nowrap; }
.bdx .wqx-table td:first-child { white-space: normal; min-width: 96px; }

@media (max-width: 760px) {
  .bdx-grow { grid-template-columns: 1fr; gap: 6px; }
  .bdx-ghead { display: none; }
  .bdx-wellrow { flex-direction: column; gap: 6px; }
  .bdx-wellrow-tags { grid-auto-flow: column; gap: 8px; }
  /* the maps are drawn 760 and 520 units wide, so on a phone a 3-unit dot is about 2px: draw the wells larger there */
  .bdx-dot-well { r: 6px; }
}
@media print {
  .bdx-tools, .bdx-sort, .bdx-units, .wqx-finder { display: none; }
  .bdx-grow, .bdx-wellrow, .bdx-ladder { break-inside: avoid; }
}
