/* The Nature Conservancy page (src/tnc/tnc-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 lives inside the
   Conservation hub's #conserve-tnc sub-page, so it is shown only when that sub-page is. */

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

/* the older tools: one closed fold under the page */
.tnc-tools { margin: 24px 0 0; }
.tnc-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; }
.tnc-tools[open] > summary { margin-bottom: 14px; }

/* who to call: a plain boxed note, one border all round */
.tnc-call { margin: 16px 0 0; padding: 12px 14px; border: 1px solid var(--guide-color-border-strong); border-radius: 12px; background: var(--guide-color-paper); max-width: 62em; }
.tnc-call b { display: flex; align-items: center; gap: 8px; font-size: var(--guide-fs-md); }
.tnc-call b svg, .tnc-call b i { width: 18px; height: 18px; flex: none; color: var(--guide-color-lake); }
.tnc-call p { margin: 6px 0 0; font-size: var(--guide-fs-sm); line-height: 1.55; }

/* "who are you" buttons under the headline: four plain doors */
.tnc-start { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.tnc-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); font: inherit; cursor: pointer; }
.tnc-startbtn:hover, .tnc-startbtn:focus-visible { background: var(--guide-color-bg-2); }
.tnc-startbtn svg, .tnc-startbtn i { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--guide-color-lake); }
.tnc-startbtn b { display: block; font-size: var(--guide-fs-md); line-height: 1.3; }
.tnc-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; land TNC owns or manages is a filled shape, an easement an outline */
.tnc-mapctl { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.tnc-map { width: 100%; height: auto; display: block; max-height: 560px; }
.tnc-co { stroke: var(--guide-color-border-strong); stroke-width: 0.8; cursor: pointer; fill: var(--guide-color-bg-1); }
.tnc-co.tnc-none { fill: var(--guide-color-paper); }
.tnc-co.tnc-s0 { fill: color-mix(in srgb, var(--guide-color-lake) 8%, var(--guide-color-paper)); }
.tnc-co.tnc-s1 { fill: color-mix(in srgb, var(--guide-color-lake) 20%, var(--guide-color-paper)); }
.tnc-co.tnc-s2 { fill: color-mix(in srgb, var(--guide-color-lake) 34%, var(--guide-color-paper)); }
.tnc-co.tnc-s3 { fill: color-mix(in srgb, var(--guide-color-lake) 50%, var(--guide-color-paper)); }
.tnc-co.tnc-s4 { fill: color-mix(in srgb, var(--guide-color-lake) 66%, var(--guide-color-paper)); }
.tnc-co.is-sel { stroke: var(--guide-color-ink); stroke-width: 2.2; }
.tnc-co.is-zoom, .tnc-co.tnc-s0.is-zoom, .tnc-co.tnc-s1.is-zoom, .tnc-co.tnc-s2.is-zoom, .tnc-co.tnc-s3.is-zoom, .tnc-co.tnc-s4.is-zoom { cursor: default; fill: var(--guide-color-bg-1); }
.tnc-co:hover { stroke: var(--guide-color-ink); stroke-width: 1.6; }
.tnc-co:focus-visible { outline: 2px solid var(--guide-color-signal); outline-offset: 1px; }
.tnc-ease { fill: none; stroke: var(--guide-color-ink); stroke-width: 0.9; pointer-events: all; }
.tnc-fee { fill: var(--guide-color-ink); fill-opacity: 0.85; stroke: var(--guide-color-paper); stroke-width: 0.4; }
.tnc-shapes { pointer-events: auto; }
.tnc-key { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--guide-color-border-strong); flex: none; }
.tnc-key.tnc-s0 { background: color-mix(in srgb, var(--guide-color-lake) 8%, var(--guide-color-paper)); }
.tnc-key.tnc-s1 { background: color-mix(in srgb, var(--guide-color-lake) 20%, var(--guide-color-paper)); }
.tnc-key.tnc-s2 { background: color-mix(in srgb, var(--guide-color-lake) 34%, var(--guide-color-paper)); }
.tnc-key.tnc-s3 { background: color-mix(in srgb, var(--guide-color-lake) 50%, var(--guide-color-paper)); }
.tnc-key.tnc-s4 { background: color-mix(in srgb, var(--guide-color-lake) 66%, var(--guide-color-paper)); }
.tnc-key.tnc-key-fee { background: var(--guide-color-ink); border-color: var(--guide-color-ink); }
.tnc-key.tnc-key-ease { background: var(--guide-color-paper); border-color: var(--guide-color-ink); }

/* which number to print, and the method */
.tnc-print { margin: 14px 0 0; padding: 12px 14px; border: 1px solid var(--guide-color-border-strong); border-radius: 12px; background: var(--guide-color-bg-1); max-width: 62em; }
.tnc-print b { display: flex; align-items: center; gap: 8px; font-size: var(--guide-fs-md); }
.tnc-print b svg, .tnc-print b i { width: 18px; height: 18px; flex: none; color: var(--guide-color-lake); }
.tnc-print p { margin: 8px 0 0; font-size: var(--guide-fs-sm); line-height: 1.55; }
.tnc-print ul { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: var(--guide-fs-sm); line-height: 1.5; }
.tnc-method { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 8px; font-size: var(--guide-fs-sm); line-height: 1.55; }

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

/* one record, shown between the search and the list so the search stays in reach */
.tnc-record { margin: 0 0 16px; padding: 14px; border: 1px solid var(--guide-color-border-strong); border-radius: 12px; background: var(--guide-color-bg-1); scroll-margin-top: 80px; }
.tnc-verdict { margin: 10px 0 14px; font-size: var(--guide-fs-md); line-height: 1.5; }
.tnc-dl { display: grid; gap: 0; margin: 0 0 14px; border-top: 1px solid var(--guide-color-border-subtle); }
.tnc-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); }
.tnc-dl dt { font-size: var(--guide-fs-sm); color: var(--guide-color-ink-soft); }
.tnc-dl dd { margin: 0; font-size: var(--guide-fs-sm); line-height: 1.5; }
.tnc-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 */
.tnc-lede { margin: 0 0 12px; font-size: var(--guide-fs-sm); line-height: 1.5; color: var(--guide-color-ink-soft); max-width: 62em; }
.tnc-steps, .tnc-caveats, .tnc-contacts, .tnc-sources { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: var(--guide-fs-sm); line-height: 1.55; max-width: 62em; }
.tnc-contacts { padding-left: 18px; gap: 10px; }
.tnc-caveats { margin-top: 4px; }
.tnc-refs { display: inline; color: var(--guide-color-ink-muted); }
.tnc .wqx-details { margin-top: 12px; font-size: var(--guide-fs-sm); }
.tnc .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 */
  .tnc-table, .tnc-table tbody, .tnc-table tr, .tnc-table td { display: block; width: 100%; }
  .tnc-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tnc-table tr { padding: 12px 0; border-bottom: 1px solid var(--guide-color-border-subtle); }
  .tnc-table td { padding: 3px 0; border: 0; white-space: normal; }
  .tnc-table td[data-label]::before { content: attr(data-label) ': '; color: var(--guide-color-ink-muted); font-size: var(--guide-fs-sm); }
  .tnc-table td.tnc-num { white-space: normal; }
  .tnc-table td small { display: inline; margin-left: 6px; }
  .tnc-dl > div { grid-template-columns: 1fr; gap: 2px; }
  .tnc-ctl { display: grid; grid-template-columns: 1fr; }
  .tnc-sort select, .tnc-sort input { width: 100%; min-width: 0; }
  .wqx-card-head .tnc-sort { grid-auto-flow: row; }
}

@media print {
  .tnc-start, .tnc .wqx-pager, .tnc .wqx-tabs, .tnc .tnc-ctl, .tnc-mapctl, .tnc .wqx-actions, #conserve-tnc .hydro-back { display: none !important; }
  .tnc-steps li, .tnc-contacts li, .tnc-record, .tnc-print { break-inside: avoid; }
  .tnc-tools { display: none; }
}
