/* The Conservation overview (src/conserve/conserve-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-conserve:has(.hydro-sub:not([hidden])) #conserve-twin, #cat-conserve:has(.hydro-sub:not([hidden])) #conserve-tools { display: none; }

/* The hub's five launcher cards repeat the tab strip above the page, and they 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-conserve .hub-hero-panel #conserve-cards.hydro-card-grid { display: none !important; }

.cnv-tools { margin: 24px 0 0; }
.cnv-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; }
.cnv-tools[open] > summary { margin-bottom: 14px; }

.cnv-rule { margin: 10px 0 0; max-width: 62em; font-size: var(--guide-fs-sm); line-height: 1.5; color: var(--guide-color-ink-soft); }
.cnv-source { margin: 8px 0 0; max-width: 62em; font-size: var(--guide-fs-sm); color: var(--guide-color-ink-muted); }
.cnv-sentences { margin: 14px 0 0; display: grid; gap: 10px; max-width: 62em; }
.cnv-sentences p { margin: 0; font-size: var(--guide-fs-sm); line-height: 1.55; }
.cnv-h4 { margin: 18px 0 8px; font-size: var(--guide-fs-sm); font-weight: 600; color: var(--guide-color-ink-soft); }
.wqx-card-head + .cnv-h4 { margin-top: 0; }
.cnv-num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.cnv-table small { display: block; margin-top: 2px; font-size: var(--guide-fs-sm); color: var(--guide-color-ink-muted); white-space: normal; }
.cnv .wqx-table tr.is-on td { background: var(--guide-color-bg-2); }
.cnv .wqx-table .wqx-link { text-align: left; }

/* "who are you" buttons under the headline: four plain doors */
.cnv-start { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.cnv-startbtn { width: 100%; display: flex; align-items: flex-start; gap: 12px; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--guide-color-border-strong); background: var(--guide-color-paper); color: var(--guide-color-ink); cursor: pointer; font: inherit; }
.cnv-startbtn:hover, .cnv-startbtn:focus-visible { background: var(--guide-color-bg-2); }
.cnv-startbtn svg, .cnv-startbtn i { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--guide-color-lake); }
.cnv-startbtn b { display: block; font-size: var(--guide-fs-md); line-height: 1.3; }
.cnv-startbtn small { display: block; margin-top: 2px; font-size: var(--guide-fs-sm); color: var(--guide-color-ink-soft); }

/* the map: counties in one hue, five steps; no custom property, so the theme budget does not count them */
.cnv-mapctl { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.cnv-map { width: 100%; height: auto; display: block; max-height: 560px; }
.cnv-co { stroke: var(--guide-color-border-strong); stroke-width: 0.8; cursor: pointer; fill: var(--guide-color-bg-1); }
.cnv-co.cnv-none { fill: var(--guide-color-paper); }
.cnv-co.cnv-s0 { fill: color-mix(in srgb, var(--guide-color-lake) 8%, var(--guide-color-paper)); }
.cnv-co.cnv-s1 { fill: color-mix(in srgb, var(--guide-color-lake) 20%, var(--guide-color-paper)); }
.cnv-co.cnv-s2 { fill: color-mix(in srgb, var(--guide-color-lake) 34%, var(--guide-color-paper)); }
.cnv-co.cnv-s3 { fill: color-mix(in srgb, var(--guide-color-lake) 50%, var(--guide-color-paper)); }
.cnv-co.cnv-s4 { fill: color-mix(in srgb, var(--guide-color-lake) 66%, var(--guide-color-paper)); }
.cnv-co.is-sel { stroke: var(--guide-color-ink); stroke-width: 2.2; }
.cnv-co.is-zoom, .cnv-co.cnv-s0.is-zoom, .cnv-co.cnv-s1.is-zoom, .cnv-co.cnv-s2.is-zoom, .cnv-co.cnv-s3.is-zoom, .cnv-co.cnv-s4.is-zoom { cursor: default; fill: var(--guide-color-bg-1); }
.cnv-co:hover { stroke: var(--guide-color-ink); stroke-width: 1.6; }
.cnv-co:focus-visible { outline: 2px solid var(--guide-color-signal); outline-offset: 1px; }
.cnv-key { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--guide-color-border-strong); flex: none; }
.cnv-key.cnv-s0 { background: color-mix(in srgb, var(--guide-color-lake) 8%, var(--guide-color-paper)); }
.cnv-key.cnv-s1 { background: color-mix(in srgb, var(--guide-color-lake) 20%, var(--guide-color-paper)); }
.cnv-key.cnv-s2 { background: color-mix(in srgb, var(--guide-color-lake) 34%, var(--guide-color-paper)); }
.cnv-key.cnv-s3 { background: color-mix(in srgb, var(--guide-color-lake) 50%, var(--guide-color-paper)); }
.cnv-key.cnv-s4 { background: color-mix(in srgb, var(--guide-color-lake) 66%, var(--guide-color-paper)); }
/* dots: one hue; the holder class is the shape, repeated in the legend and in every tooltip; a paper ring keeps overlapping marks apart */
.cnv-dot { fill: var(--guide-color-ink); stroke: var(--guide-color-paper); stroke-width: 1; cursor: pointer; }
.cnv-dot.is-on { stroke: var(--guide-color-signal); stroke-width: 2.4; }
.cnv-dot:hover { stroke: var(--guide-color-signal); stroke-width: 2; }
.cnv-shape { width: 16px; height: 16px; flex: none; vertical-align: -3px; margin-right: 6px; }
.cnv-shape .cnv-dot { cursor: default; stroke: none; }
.cnv-kind { background: var(--guide-color-lake); }

/* list controls */
.cnv-ctl { display: flex; flex-wrap: wrap; gap: 12px 16px; margin: 0 0 12px; align-items: flex-end; }
.cnv-sort { display: grid; gap: 4px; font-size: var(--guide-fs-sm); color: var(--guide-color-ink-soft); }
.cnv-sort select, .cnv-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); }
.cnv-sort input { min-width: 240px; }
.wqx-card-head .cnv-sort { grid-auto-flow: column; align-items: center; gap: 8px; }

/* one record */
.cnv-record { scroll-margin-top: 80px; }
.cnv-verdict { margin: 10px 0 14px; font-size: var(--guide-fs-md); line-height: 1.5; }
.cnv-dl { display: grid; gap: 0; margin: 0 0 14px; border-top: 1px solid var(--guide-color-border-subtle); }
.cnv-dl > div { display: grid; grid-template-columns: minmax(150px, 30%) 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--guide-color-border-subtle); }
.cnv-dl dt { font-size: var(--guide-fs-sm); color: var(--guide-color-ink-soft); }
.cnv-dl dd { margin: 0; font-size: var(--guide-fs-sm); line-height: 1.5; }
.cnv-notes { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; font-size: var(--guide-fs-sm); line-height: 1.55; max-width: 62em; }

/* what you can do */
.cnv-lede { margin: 0 0 12px; font-size: var(--guide-fs-sm); line-height: 1.5; color: var(--guide-color-ink-soft); max-width: 62em; }
.cnv-steps, .cnv-caveats, .cnv-contacts, .cnv-sources { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: var(--guide-fs-sm); line-height: 1.55; max-width: 62em; }
.cnv-contacts { padding-left: 18px; gap: 10px; }
.cnv-caveats { margin-top: 4px; }
.cnv-refs { display: inline; color: var(--guide-color-ink-muted); }
.cnv .wqx-details { margin-top: 12px; font-size: var(--guide-fs-sm); }
.cnv .wqx-details ul { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }

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

@media print {
  .cnv-start, .cnv .wqx-pager, .cnv .wqx-tabs, .cnv .cnv-ctl, .cnv-mapctl { display: none !important; }
  .cnv-steps li, .cnv-contacts li { break-inside: avoid; }
  .cnv-tools { display: none; }
}
