/* Drought (src/drought/drought-twin.js). Cards, tables, pills, tabs, pagers, the pop-up and the county map are the shared .wqx-* classes
   (wq-twin.css) and the Conservation overview's .cnv-* classes (conserve-twin.css); the charts reuse the Home page's .hmx-* classes
   (home-twin.css). Only what this page adds is here. Colour comes from tokens only. No new keyframes. */

/* The older drought tools stay one click away, in a closed fold under the page. */
.dtx-tools { margin: 24px 0 0; }
.dtx-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; }
.dtx-tools[open] > summary { margin-bottom: 14px; }

/* what is due: a date, how far off it is, and who decides */
.dtx-dues { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.dtx-due { display: flex; gap: 14px; padding: 14px; border: 1px solid var(--guide-color-border-default); border-radius: 12px; background: var(--guide-color-paper); }
.dtx-due-when { flex: 0 0 auto; min-width: 7.5em; }
.dtx-due-when b { display: block; font-size: var(--guide-fs-lg); font-variant-numeric: tabular-nums; }
.dtx-due-when span { font-size: var(--guide-fs-sm); color: var(--guide-color-ink-soft); }
.dtx-due-what h4 { margin: 0 0 2px; font-size: var(--guide-fs-md); }
.dtx-due-what p { margin: 6px 0 0; font-size: var(--guide-fs-sm); line-height: 1.5; }
.dtx-due-what .dtx-who { color: var(--guide-color-ink-soft); margin-top: 0; }

/* a county: the section that follows the headline once a place is picked */
.dtx-county { margin: 0 0 16px; }
.dtx-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; }

/* FSA's five rows, each in words with Met or Not met (never colour alone) */
.dtx-tiers { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.dtx-tiers li { display: grid; grid-template-columns: 2em 1fr auto; gap: 10px; align-items: start; padding: 8px 10px; border: 1px solid var(--guide-color-border-subtle); border-radius: 10px; font-size: var(--guide-fs-sm); line-height: 1.45; }
.dtx-tiers li.is-met { background: var(--guide-color-bg-2); border-color: var(--guide-color-border-strong); }
.dtx-tier-n { font-weight: 700; font-variant-numeric: tabular-nums; }
.dtx-tier-t small { display: block; color: var(--guide-color-ink-soft); font-size: var(--guide-fs-xs); margin-top: 2px; }
.dtx-tier-s { font-weight: 600; white-space: nowrap; }
.dtx-tiers li.is-not .dtx-tier-s { color: var(--guide-color-ink-soft); font-weight: 500; }

.dtx-trig { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; font-size: var(--guide-fs-sm); line-height: 1.5; }

/* one-hue year bars and the same-week bars: a mark in the lake hue, this year in ink */
.dtx-bar { fill: var(--guide-color-lake); }
.dtx-bar.is-now { fill: var(--guide-color-ink); }

/* law cards: compact tiles that open the pop-up */
.dtx-lawgrid { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.dtx-lawcard { display: flex; flex-direction: column; gap: 4px; width: 100%; height: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--guide-color-border-default); border-radius: 12px; background: var(--guide-color-paper); color: var(--guide-color-ink); font: inherit; cursor: pointer; }
.dtx-lawcard:hover, .dtx-lawcard:focus-visible { border-color: var(--guide-color-lake); }
.dtx-lawcard b { font-size: var(--guide-fs-md); line-height: 1.35; }
.dtx-lawcard small { font-size: var(--guide-fs-xs); color: var(--guide-color-ink-soft); }
.dtx-lawcard span { font-size: var(--guide-fs-sm); color: var(--guide-color-ink-muted); margin-top: auto; }

/* inside the pop-up */
.dtx-dl { margin: 12px 0; display: grid; gap: 4px; }
.dtx-dl dt { font-weight: 700; font-size: var(--guide-fs-sm); margin-top: 8px; }
.dtx-dl dd { margin: 0; font-size: var(--guide-fs-sm); line-height: 1.55; }
.dtx-quote { margin: 12px 0; padding: 10px 14px; border: 1px solid var(--guide-color-border-subtle); border-radius: 10px; background: var(--guide-color-bg-1); font-size: var(--guide-fs-sm); line-height: 1.55; }
.dtx-quote cite { display: block; margin-top: 4px; font-style: normal; font-size: var(--guide-fs-xs); color: var(--guide-color-ink-soft); }
.dtx-cite { margin: 8px 0 4px; font-size: var(--guide-fs-sm); }
.dtx-links { margin: 0 0 8px; padding-left: 18px; font-size: var(--guide-fs-xs); overflow-wrap: anywhere; }

/* who to call, and the plans on file */
.dtx-who-list, .dtx-plans { margin: 0 0 12px; padding-left: 18px; font-size: var(--guide-fs-sm); line-height: 1.5; }
.dtx-who-list small { display: block; color: var(--guide-color-ink-soft); font-size: var(--guide-fs-xs); }

.dtx .cnv-table td:first-child { min-width: 9em; }
.dtx .cnv-sources li, .dtx .cnv-caveats li { overflow-wrap: anywhere; }

/* The page lives in the hub's side panel, which is narrow whatever the screen is: two columns only when there is room for both. */
.dtx .wqx-grid2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }

/* On a phone the drawer's collapsed rail would sit over the right edge of the page, so it is not drawn (the page already holds what it shows). */
@media (max-width: 900px) {
  #main-content.drought-map-mode > #right-drawer.rd-collapsed { display: none; }
}

@media (max-width: 640px) {
  .dtx-due { flex-direction: column; gap: 6px; }
  .dtx-tiers li { grid-template-columns: 1.6em 1fr; }
  .dtx-tier-s { grid-column: 2; }
}

@media print {
  .dtx-tools, .dtx .wqx-finder, .dtx .cnv-start, .dtx .wqx-actions, .dtx .wqx-tabs, .dtx .dtx-actions, .dtx .wqx-pager { display: none; }
  .dtx-due, .dtx-tiers li, .dtx .wqx-card, .dtx .wqx-tile, .dtx-lawcard { break-inside: avoid; }
}
