/* The Home page twin (src/home/home-twin.js): Montana's water this week. Only what is new lives here; cards, tables,
   pills, tabs, the pager and the pop-up are the shared .wqx-* classes in wq-twin.css. Tokens only, 12px type floor,
   no keyframes (styles/motion.css owns them), no thick side edges, no backdrop-filter. */

/* The sentence, directly under the search. */
.hmx-head { margin: 14px auto 6px; padding: 16px 18px; max-width: 100%; text-align: left; border: 1px solid var(--guide-color-border-default); border-radius: 16px; background: var(--guide-color-paper); color: var(--guide-color-ink); }
.hmx-kicker { margin: 0 0 6px; font-size: var(--guide-fs-xs); font-weight: 700; color: var(--guide-color-ink-muted); }
.hmx-sentence { margin: 0; font-family: var(--guide-font-display, inherit); font-size: clamp(18px, 2.6vw, 24px); font-weight: 600; line-height: 1.32; overflow-wrap: anywhere; }
.hmx-sentence--county { font-size: clamp(16px, 2.2vw, 20px); }
.hmx-sentence-wait, .hmx-sentence-fail { margin: 14px 0 0; font-size: var(--guide-fs-sm); color: var(--guide-color-ink-muted); }
.hmx-head-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 10px 0 0; font-size: var(--guide-fs-xs); color: var(--guide-color-ink-muted); line-height: 1.5; }
.hmx-head-foot > span { flex: 1 1 260px; }
.hmx-head-foot a:not(.wqx-btn) { color: var(--guide-color-link); }
.hmx-btn-sm { padding: 6px 11px; font-size: var(--guide-fs-xs); text-decoration: none; }
.hmx-hits { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--guide-color-border-subtle); font-size: var(--guide-fs-xs); color: var(--guide-color-ink-muted); }
.hmx-hit { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--guide-color-border-strong); background: var(--guide-color-bg-1); color: var(--guide-color-ink); font: inherit; font-size: var(--guide-fs-xs); cursor: pointer; text-align: left; }
.hmx-hit:hover { background: var(--guide-color-bg-2); }
.hmx-hit i, .hmx-hit svg { width: 14px; height: 14px; flex: none; }

/* The body. */
.hmx { --hmx-flow-mid: var(--guide-color-neutral-400); }
[data-theme="dark"] .hmx { --hmx-flow-mid: var(--guide-color-neutral-600); }
.hmx { text-align: left; margin-top: 8px; }
.hmx h4 { margin: 16px 0 8px; font-size: var(--guide-fs-md); font-weight: 700; }
.hmx h4:first-child { margin-top: 0; }
.hmx-readings { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.hmx-tile h3 { margin: 0 0 6px; font-size: var(--guide-fs-xs); font-weight: 700; color: var(--guide-color-ink-muted); }
.hmx-tilechart { margin-top: 10px; }
.hmx-tile .hmx-legend b { display: inline; font-size: inherit; }
.hmx-tile small { margin-top: 8px; line-height: 1.45; }
.hmx-tile b.hmx-absent { font-size: var(--guide-fs-lg); color: var(--guide-color-ink-soft); }
.hmx-date { font-size: var(--guide-fs-xs); color: var(--guide-color-ink-muted); }
.hmx-muted { color: var(--guide-color-ink-muted); font-size: var(--guide-fs-xs); }
.hmx-find { margin: 12px 0 0; font-size: var(--guide-fs-sm); line-height: 1.5; }
.hmx-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 0; font-size: var(--guide-fs-sm); }
.hmx-select { max-width: 100%; padding: 7px 10px; border-radius: 10px; 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); }
.hmx-record-tools { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hmx-not-right { margin-top: 12px; }
.hmx-grid2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 16px; }
.hmx-grid2 > * { min-width: 0; }
@media (min-width: 900px) { .hmx-grid2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.hmx-rights { margin: 14px 0 0; font-size: var(--guide-fs-sm); }
.hmx-stations { margin: 8px 0 0; padding-left: 18px; font-size: var(--guide-fs-sm); line-height: 1.5; }
.hmx-details { margin-top: 10px; font-size: var(--guide-fs-sm); }
.hmx-details summary { cursor: pointer; color: var(--guide-color-ink-soft); }
.hmx-details ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; line-height: 1.5; color: var(--guide-color-ink-soft); }

/* Charts. */
.hmx-mapwrap { max-width: 760px; margin: 0 auto; }
.hmx-map { display: block; width: 100%; height: auto; }
.hmx-chart { position: relative; padding: 8px 0 22px 40px; }
.hmx-area { display: block; width: 100%; height: 190px; }
.hmx-chart-y, .hmx-chart-x { position: absolute; font-size: var(--guide-fs-xs); color: var(--guide-color-ink-muted); font-variant-numeric: tabular-nums; pointer-events: none; }
.hmx-chart-y { left: 0; top: 8px; width: 34px; height: 190px; }
.hmx-chart-y span { position: absolute; right: 0; transform: translateY(-50%); }
.hmx-chart-x { left: 40px; right: 0; bottom: 0; height: 18px; }
.hmx-chart-x span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.hmx-county { stroke: var(--guide-color-ink-4); stroke-width: 0.75; cursor: pointer; }
.hmx-county.is-unknown { stroke: var(--guide-color-border-strong); stroke-dasharray: 3 3; }
.hmx-county-link { outline: none; }
.hmx-county:hover, .hmx-county-link:focus-visible .hmx-county, .hmx-county.is-on { stroke: var(--guide-color-ink); stroke-width: 2.5; paint-order: fill; }
.hmx-grid { stroke: var(--guide-color-border-default); stroke-width: 1; }
.hmx-cross { stroke: var(--guide-color-ink); stroke-width: 1; pointer-events: none; }
.hmx-plot { cursor: crosshair; }
.hmx-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 0; padding: 0; list-style: none; font-size: var(--guide-fs-xs); color: var(--guide-color-ink-soft); }
.hmx-legend li { display: inline-flex; align-items: center; gap: 6px; }
.hmx-legend b { color: var(--guide-color-ink); font-variant-numeric: tabular-nums; }
.hmx-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--guide-color-border-strong); flex: none; vertical-align: -1px; margin-right: 6px; }
.hmx-legend .hmx-swatch { margin-right: 0; }
.hmx-segbar { display: flex; gap: 2px; height: 18px; border-radius: 4px; overflow: hidden; }
.hmx-seg { min-width: 3px; }

/* A run of weeks against a rule's count. */
.hmx-runs { margin-top: 14px; font-size: var(--guide-fs-sm); line-height: 1.5; }
.hmx-runs p { margin: 0 0 8px; }
.hmx-runrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.hmx-runrow > span:first-child { flex: 0 1 230px; color: var(--guide-color-ink-soft); }
.hmx-run { display: inline-flex; gap: 2px; }
.hmx-cell { width: 12px; height: 12px; border-radius: 2px; border: 1px solid var(--guide-color-border-strong); background: var(--guide-color-bg-1); }
.hmx-cell.is-on { background: var(--guide-color-drought-d2); border-color: var(--guide-color-drought-d2); }
.hmx-run-n { font-variant-numeric: tabular-nums; font-weight: 700; }

/* The county table. */
.hmx-sort { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.hmx-sort:hover { color: var(--guide-color-ink); text-decoration: underline; }
.hmx-sort i, .hmx-sort svg { width: 12px; height: 12px; }
.hmx-table td:nth-child(n+3), .hmx-table th:nth-child(n+3) { font-variant-numeric: tabular-nums; }

/* Sources. */
.hmx-sources { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; font-size: var(--guide-fs-sm); line-height: 1.5; }
.hmx-sources li { display: grid; gap: 2px; }
.hmx-sources span { color: var(--guide-color-ink-soft); }

@media (max-width: 560px) {
  .hmx-head { padding: 14px; }
  .hmx-head-foot .wqx-btn { flex: 1 1 auto; justify-content: center; }
}

/* Print: the sentence, the open county and the tables, without the controls. */
@media print {
  .hmx-head-foot .wqx-btn, .hmx-hits, .hmx-pick, .hmx-record-tools, .hmx .wqx-actions, .hmx .wqx-pager, .hmx .wqx-tabs { display: none; }
  .hmx-head, .hmx-record { break-inside: avoid; border-color: var(--guide-color-border-strong); }
}

/* The Home band (2026-11-22, Jamie: "Yes, adopt it"). The same solid navy ground as the hub heroes
   (hero-band.css): a serif headline, one lede, no gradient, no glow, no blur, no art. The ground is the same in both
   themes, so every colour on it is an on-dark token, never --guide-color-ink. Jamie's own order and wording stand:
   the red spelled-out name, then the headline, then the one subline. The name stays Montana red and so sits on a
   white chip, as the wordmark does on the hubs, because the red mark is never recoloured. The subline cannot stay
   red on navy (2.2:1), so on this ground it reads in the on-dark lede colour. There is no signal-coloured action
   here: the search and the map button below stay lake, which is the action colour Home settled on 2026-11-13. */
#home-hero .home-band {
  align-self: stretch;
  container-type: inline-size;
  margin: 0 0 var(--guide-sp-5);
  padding: var(--guide-sp-6);
  border: 1px solid var(--guide-color-border-default);
  border-radius: var(--guide-radius-xl);
  background: var(--guide-color-sky-navy);
  color: var(--guide-color-on-dark);
  text-align: left;
}
#home-hero .home-band .home-hero-expansion {
  display: inline-block;
  margin: 0 0 var(--guide-sp-4);
  padding: 6px 10px 5px;
  border-radius: var(--guide-radius-xs);
  background: var(--guide-color-white);
  color: var(--guide-color-mt-red);
  font-size: var(--guide-fs-xs);
  letter-spacing: 0.06em;
  line-height: 1.25;
  text-align: left;
}
#home-hero .home-band .home-hero-lede {
  margin: 0 0 var(--guide-sp-3);
  max-width: 22ch;
  font-size: clamp(28px, 5.2cqi, 46px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.015em;
  color: var(--guide-color-white);
  text-align: left;
  text-wrap: balance;
}
#home-hero .home-band .home-hero-subtitle {
  margin: 0;
  max-width: 62ch;
  font-size: var(--guide-fs-lg);
  line-height: 1.5;
  color: var(--guide-color-on-dark-2);
  text-align: left;
}
/* The ways in sit ON the band (2026-11-23, Jamie: move all of it into the hero): the free card and the key card side by
   side, then the search. The ground is the same navy in both themes, so everything here is a fixed on-navy colour
   (white, on-dark, sky-navy), never a theme token that flips: the light card stays light and the key card stays a
   raised navy panel in light and dark. Each [data-theme="dark"] line outranks the dark-mode rules in tu-atlas.css and
   dashboard-home.css, which were written for the page ground. */
#home-hero .home-band .home-compare {
  margin: var(--guide-sp-5) 0 var(--guide-sp-4);
  border: 1px solid color-mix(in srgb, var(--guide-color-white) 30%, transparent);
  box-shadow: none;
}
[data-theme="dark"] #home-hero .home-band .home-compare { border-color: color-mix(in srgb, var(--guide-color-white) 30%, transparent); }
#home-hero .home-band .home-ai-summary.home-ai--free,
[data-theme="dark"] #home-hero .home-band .home-ai-summary.home-ai--free { background: var(--guide-color-white); color: var(--guide-color-sky-navy); }
#home-hero .home-band .home-ai--free .home-ai-badge,
#home-hero .home-band .home-ai--free .home-ai-cta,
[data-theme="dark"] #home-hero .home-band .home-ai--free .home-ai-badge,
[data-theme="dark"] #home-hero .home-band .home-ai--free .home-ai-cta { background: var(--guide-color-sky-navy); color: var(--guide-color-white); }
#home-hero .home-band .home-compare > .home-ai-summary:not(.home-ai--free),
[data-theme="dark"] #home-hero .home-band .home-compare > .home-ai-summary:not(.home-ai--free) {
  background: color-mix(in srgb, var(--guide-color-white) 8%, var(--guide-color-sky-navy));
  color: var(--guide-color-on-dark);
}
#home-hero .home-band .home-ai-summary:not(.home-ai--free) .home-ai-badge,
#home-hero .home-band .home-ai-summary:not(.home-ai--free) .home-ai-cta,
[data-theme="dark"] #home-hero .home-band .home-ai-summary:not(.home-ai--free) .home-ai-badge,
[data-theme="dark"] #home-hero .home-band .home-ai-summary:not(.home-ai--free) .home-ai-cta { background: var(--guide-color-white); color: var(--guide-color-sky-navy); }
/* Agency doors, under the two cards: each opens the AI splash on that agency's ten starter questions. */
#home-hero .home-band .home-agency-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--guide-sp-2);
  margin: 0 0 var(--guide-sp-4);
}
#home-hero .home-band .home-agency-lede { margin-right: var(--guide-sp-1); font-size: var(--guide-fs-sm); color: color-mix(in srgb, var(--guide-color-white) 85%, transparent); }
#home-hero .home-band .home-agency-btn {
  appearance: none; min-height: 44px; padding: 0 var(--guide-sp-4);
  border: 1px solid color-mix(in srgb, var(--guide-color-white) 55%, transparent);
  border-radius: var(--guide-radius-pill, 999px);
  background: transparent; color: var(--guide-color-white);
  font: inherit; font-size: var(--guide-fs-sm); font-weight: var(--guide-fw-bold); cursor: pointer;
}
#home-hero .home-band .home-agency-btn:hover { background: var(--guide-color-white); color: var(--guide-color-sky-navy); }
#home-hero .home-band .home-agency-btn:focus-visible { outline: 3px solid var(--guide-color-white); outline-offset: 2px; }
#home-hero .home-band .home-search-wrap,
[data-theme="dark"] #home-hero .home-band .home-search-wrap {
  background: var(--guide-color-white);
  border: 1px solid var(--guide-color-white);
  box-shadow: none;
}
#home-hero .home-band .home-search-wrap:focus-within,
[data-theme="dark"] #home-hero .home-band .home-search-wrap:focus-within {
  border-color: var(--guide-color-action);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--guide-color-action) 45%, transparent);
}
#home-hero .home-band #home-search,
[data-theme="dark"] #home-hero .home-band #home-search { color: var(--guide-color-sky-navy); }
#home-hero .home-band #home-search::placeholder,
[data-theme="dark"] #home-hero .home-band #home-search::placeholder { color: color-mix(in srgb, var(--guide-color-sky-navy) 68%, var(--guide-color-white)); }
#home-hero .home-band .home-search-ico,
[data-theme="dark"] #home-hero .home-band .home-search-ico,
#home-hero .home-band .voice-btn,
[data-theme="dark"] #home-hero .home-band .voice-btn { color: var(--guide-color-sky-navy); border-color: var(--guide-color-sky-navy); }

@container (max-width: 480px) {
  #home-hero .home-band .home-hero-subtitle { font-size: var(--guide-fs-md); }
}
@media (max-width: 520px) {
  #home-hero .home-band { padding: var(--guide-sp-4); margin-bottom: var(--guide-sp-3); }
  #home-hero .home-band .home-hero-lede { font-size: var(--guide-fs-2xl); }
  #home-hero .home-band .home-hero-subtitle { font-size: var(--guide-fs-sm); }
}
@media print {
  #home-hero .home-band { background: none; color: inherit; border-color: currentColor; }
  #home-hero .home-band .home-hero-lede, #home-hero .home-band .home-hero-subtitle { color: inherit; }
}
