/* Cancer Policy Lab — homepage-only rules: the hero ("the line"), the Medicaid Coverage Watch
   band with the state tile map, and the curtain between them (the band waits at the foot of the
   first screen, then slides up over the hero). Loaded by index.html only, right after site.css,
   so the other pages do not download them; values come from tokens.css. The featured research
   cards and the theme cards, which were here, are on /our-work/ (their rules are in
   research.css); About the lab, which was here too, is its own page, /about/ (about.css). */

/* ---------- Hero: "the line" ----------
   The first screen is a deep teal field (a dark shade of the accent); the Medicaid Coverage
   Watch band, a sheet of the site's paper, shows at its foot and slides up over it as the next
   panel ("The curtain", below). The lab mark at full scale: the H1 above a teal rule that runs
   the full width of the screen, one sentence and one way in ("Read about us", to /about/) below
   it, and a field of small dots parted by the rule (the line a policy draws and the people it
   sorts). The field is decorative inline SVG (aria-hidden, drawn by
   scripts/build_hero_field.py); its colors are mixed against --hl-bg in that script, so change
   both together.
   The hero fills the first screen under the 73px header less the top of the band (--hc-peek:
   48px on phones, 64px from 900px; from 900px between 576px and 960px), its content centred, so
   the band's line and the top of its sheet show at the foot of the first screen. While the
   curtain runs, the hero is taller by --hc-breath, plain teal under that first screen: the
   short stretch that opens under the content before the band rises ("The curtain"). The glow
   stays on the first screen's part. From 900px the field sits at right, centred on the rule.
   Under 900px the field is a 240px band (288px from 600px) across the screen between the H1
   and the sentence, cropped and faded top and bottom.
   Contrast on the lightest part of the background (#0B3532): white 13.4:1, --hl-ink-2 11.4:1;
   the main button's text #082B29 on #F7F6F2 14.0:1.
   Motion: the rule draws in from the left and the two halves of the field part from it, once,
   in 2.6s. None of it under prefers-reduced-motion. Transforms and opacity only, so nothing moves the
   layout. At the foot of the first screen, in the space under the content, the scroll cue
   ("The scroll cue", below). */
.hero--line {
  --hl-bg: #082B29;
  --hl-bg-2: #0B3532;      /* the glow behind the field */
  --hl-ink: #FFFFFF;
  --hl-ink-2: #E6EFED;     /* the sentence */
  --hl-rule: #33A193;      /* the line: a lighter teal of the mark's rule, 4.8:1 on the field */
  --hl-band: 16rem;        /* height of the dot band under 900px */
}
.hero--line {
  position: relative;
  overflow: hidden; overflow: clip;
  display: flex; align-items: center;
  min-height: calc(100svh - 4.5625rem - var(--hc-peek) + var(--hc-breath));
  padding-block: var(--space-5) calc(max(var(--space-6), var(--hc-cue-room, 0px)) + var(--hc-breath));
  background: var(--hl-bg);
  /* The glow, on the first screen's part only and faded out before its bottom edge, so the
     band's top edge and its shadow meet plain teal. */
  background-image: linear-gradient(to bottom, transparent 70%, var(--hl-bg)), radial-gradient(ellipse 60% 70% at 72% 55%, var(--hl-bg-2), var(--hl-bg));
  background-size: 100% calc(100% - var(--hc-breath));
  background-repeat: no-repeat;
  color: var(--hl-ink);
}
.hl { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); }
.hl > * { min-width: 0; }
.hl > :not(.hl-line) { position: relative; z-index: 1; }
.hero--line h1 { color: var(--hl-ink); font-size: clamp(2.25rem, 1.6rem + 3.2vw, 5.25rem); line-height: 1.06; letter-spacing: -0.018em; max-width: 10.5em; }
/* The H1 breaks only between its phrases ("From the statehouse / to the bedside, / and back.")
   where each phrase fits on a line (from 30rem); narrower, it wraps as usual, so nothing is cut. */
@media (min-width: 30rem) { .hero--line h1 .hl-nb { white-space: nowrap; } }

.hero--line .hl-lead { margin-top: 0; max-width: 26em; color: var(--hl-ink-2); line-height: 1.45; }

/* The rule: 4px (3px on phones), from the left edge of the screen to the right edge. The band's
   top edge carries the same line (.cwb::before). */
.hl-line { position: relative; height: 3px; margin-block: calc(var(--hl-band) / 2); }
.hl-line::before {
  content: ""; position: absolute; top: 0; bottom: 0; z-index: 1;
  left: calc(-1 * (var(--gutter) + max(0px, (100vw - var(--page-max)) / 2)));
  right: calc(-1 * (var(--gutter) + max(0px, (100vw - var(--page-max)) / 2)));
  background: var(--hl-rule); transform-origin: 0 50%;
}
/* The field. Under 900px: a band centred on the rule, the full width of the screen, faded at
   its top and bottom edges; the drawing inside is wider than the band and centred. */
.hl-field {
  position: absolute; z-index: 0; top: 50%; height: var(--hl-band); translate: 0 -50%;
  left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter));
  overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
}
.hl-svg { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: clamp(27.5rem, 112vw, 36rem); max-width: none; height: auto; }
.hl-up, .hl-down { transform-box: view-box; }

.hl-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }
.hl-btn {
  display: inline-flex; align-items: center; gap: 0.625rem; min-height: 3rem;
  padding: 0.625rem 1.125rem; border: 2px solid rgba(255, 255, 255, 0.6); border-radius: 2px;
  font-size: var(--text-body); font-weight: 600; line-height: 1.3;
  color: var(--hl-ink); text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.hl-btn:hover { border-color: var(--hl-ink); background-color: rgba(255, 255, 255, 0.08); }
.hl-btn--primary { background: #F7F6F2; border-color: #F7F6F2; color: var(--hl-bg); }
.hl-btn--primary:hover { background: #FFFFFF; border-color: #FFFFFF; }
.hl-arrow { display: inline-block; transition: transform 0.15s ease; }
.hl-btn:hover .hl-arrow { transform: translateX(3px); }
.hero--line :focus-visible { outline: 3px solid var(--hl-ink); outline-offset: 3px; }

/* Short or narrow phones: a shorter dot band, so the sentence and the button stay on the
   first screen. */
@media (max-width: 24.99rem) { .hero--line { --hl-band: 12rem; } }
@media (max-width: 56.24rem) and (max-height: 50rem) { .hero--line { --hl-band: 10rem; } }
@media (max-width: 56.24rem) and (max-height: 42rem) { .hero--line { --hl-band: 7rem; } }
@media (min-width: 37.5rem) {
  .hero--line { --hl-band: 18rem; padding-block: var(--space-6) calc(max(var(--space-7), var(--hc-cue-room, 0px)) + var(--hc-breath)); }
  .hl-line { height: 4px; }
}

/* From 900px: the text at left; the field at right, centred on the rule and running off the
   right edge (62% of the screen's width, no wider than the screen is tall, so it fits short
   screens). The hero fills the screen under the header (73px) less the top of the band. */
@media (min-width: 56.25rem) {
  .hero--line { min-height: calc(clamp(36rem, calc(100svh - 4.5625rem - var(--hc-peek)), 60rem) + var(--hc-breath)); padding-block: var(--space-6) calc(max(var(--space-6), var(--hc-cue-room, 0px)) + var(--hc-breath)); }
  .hl-line { margin-block: var(--space-5); }
  .hl-field {
    left: 52%; right: auto; height: auto; width: clamp(34rem, min(62vw, 100svh), 60rem);
    overflow: visible; -webkit-mask-image: none; mask-image: none;
  }
  .hl-svg { position: static; translate: none; width: 100%; }
  .hero--line .hl-lead { max-width: 24em; }
}
@media (min-width: 80rem) { .hl-field { left: 48%; } }

@media (prefers-reduced-motion: no-preference) {
  .hl-line::before { animation: hl-draw 1.1s cubic-bezier(0.3, 0.7, 0.2, 1) both; }
  .hl-up { animation: hl-up 2.2s 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hl-down { animation: hl-down 2.2s 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  @keyframes hl-draw { from { transform: scaleX(0); } }
  /* The field starts at 35%, not 0, so a capture at the first frame is never bare. */
  @keyframes hl-up { from { transform: translateY(22px); opacity: 0.35; } }
  @keyframes hl-down { from { transform: translateY(-22px); opacity: 0.35; } }
}
@media (prefers-reduced-motion: reduce) { .hl-btn, .hl-arrow { transition: none; } }
@media (forced-colors: active) {
  .hl-line::before { forced-color-adjust: none; background: CanvasText; }
  .hl-field { display: none; }
}
@media print {
  .hero--line { min-height: 0; background: none; color: #121212; }
  .hero--line h1, .hero--line .hl-lead, .hl-btn { color: #121212; }
  .hl-field, .hero--line .hl-cue { display: none; }   /* over .hl-cue's display: flex, below */
}

/* ---------- The scroll cue ----------
   At the foot of the hero's first screen, just above the top of the band (the waiting strip of
   paper while the curtain runs, the band itself otherwise): a down chevron in a ring and "Scroll
   to Medicaid Coverage Watch", in line with the hero's text. A plain link to the band
   (#coverage-watch), so it works without JavaScript and from the keyboard; its words say where it
   goes (2.4.9). Under 22em (352px at the default text size) "Scroll to" is hidden from view, so
   at the default text size the words stay on one line; it stays in the link's name. Where the
   reader's text is larger or more widely spaced (1.4.4, 1.4.12), the words wrap (balanced) rather
   than run out of the hero, which clips its overflow.
   It takes no room of its own, so the hero at rest is laid out exactly as without it: it is
   placed (position: absolute) in the space the hero always leaves under its content (its bottom
   padding, 3rem at least), 32px tall (--hc-cue) with 8px (--hc-cue-gap) between it and the band's
   top, so at least 8px under the button. Its box is that 32px strip, and the link sits at the
   strip's foot (flex-end), so a link taller than 32px (its words on two lines or more) grows
   upward, into the hero's bottom padding, never down over the band; the box is placed by its top,
   so a paragraph spacing the reader sets (margin-bottom on p) does not move it. That padding is
   at least the cue's room (--hc-cue-room, set by home-curtain.js: the link's height and the gaps
   above and below it, 48px at the default text size, so the hero is unchanged there), so a taller
   cue never meets the button; without the script, 3rem as before. The box's end padding is 0.5rem
   rather than the gutter, so at the default text size the words fit on one line from 352px, as
   they did when they could not wrap. While the curtain runs, the band's top on the first screen
   is the strip at the screen's foot (or the band itself, where the hero's first part is capped at
   60rem and the breath shows above the band), and the cue sits just above whichever is higher;
   home-curtain.js runs the curtain only where the hero's content clears that edge by the cue's
   room too (the link's own height and the gaps above and below it: 48px at the default text
   size, more where its words wrap). Its hit area is 44px tall at least (2.5.5), 6px into the
   space above and below it.
   Text and chevron #E6EFED (--hl-ink-2): 12.9:1 on the teal (#082B29), 11.4:1 on the lightest
   part of the glow (#0B3532); the focus ring, as everywhere in the hero, white (13.4:1 at least).
   It fades out from the first pixel of scroll (.is-scrolled on .hc, from home-curtain.js) and
   back in at the top, and shows while it has keyboard focus. Under no-preference only: the fade
   takes 0.2s; the chevron nudges down three times (1.5s each, after 1.6s, so it moves for less
   than five seconds, 2.2.2) and steps down on hover; and home-curtain.js scrolls to the band
   smoothly. Hidden in print. */
.hc { --hc-cue: 2rem; --hc-cue-gap: 0.5rem; }
.hl-cue {
  position: absolute; z-index: 1; left: 0; right: 0;
  top: calc(100% - var(--hc-cue-gap) - var(--hc-cue));
  display: flex; align-items: flex-end; height: var(--hc-cue); padding-inline-end: 0.5rem;
  pointer-events: none;
}
.hl-cue-a {
  position: relative; display: inline-flex; align-items: center; gap: 0.75rem;
  min-height: var(--hc-cue); margin-inline-start: -0.5rem; padding-inline: 0.5rem;
  font-size: var(--text-small); font-weight: 600; line-height: 1.35; letter-spacing: 0.01em; text-wrap: balance;
  color: var(--hl-ink-2); text-decoration: none; pointer-events: auto;
  scroll-margin-bottom: calc(var(--hc-peek) + var(--hc-cue-gap));
}
.hl-cue-a::before { content: ""; position: absolute; inset: -0.375rem 0; }
.hl-cue-a:hover .hl-cue-t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.hl-cue-i { flex: none; display: grid; place-items: center; width: var(--hc-cue); height: var(--hc-cue); border: 2px solid currentColor; border-radius: 50%; }
.hl-cue-i svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 21.99em) {
  .hl-cue-s { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
.hc.is-scrolled .hl-cue-a:not(:focus-visible) { opacity: 0; pointer-events: none; }
@media screen and (prefers-reduced-motion: no-preference) {
  .hc.is-curtain .hl-cue { top: calc(min(100%, 100svh - 4.5625rem - var(--hc-peek)) - var(--hc-cue-gap) - var(--hc-cue)); }
  .hl-cue-a { transition: opacity 0.2s ease-out; }
  .hl-cue-i svg { animation: hl-cue-nudge 1.5s ease-in-out 1.6s 3 both; transition: translate 0.15s ease; }
  .hl-cue-a:hover .hl-cue-i svg { translate: 0 2px; }
  @keyframes hl-cue-nudge { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(4px); } }
}

/* ---------- Coverage Watch band ----------
   The homepage's one main feature: a full-width band right under the hero, sized to fit on one
   screen below the header (checked at 1440x900, 1280x720, 1024x768 and 390x844). It is the
   next panel, not more of the teal: a sheet of the site's paper (#F7F6F2, --color-band) that
   slides up over the hero's deep teal ("The curtain", below), so the opening and the band read as
   two things, the dark lab and the light page of the tracker, with no second green beside the
   first. Its top edge carries the hero's line (4px of #33A193 across the full width, 3px on
   phones); its bottom edge is a dark hairline across the full width, where the footer, on white,
   begins.
   From 900px: at left, a small label ("State-by-state implementation tracker"), the title
   "Medicaid Coverage Watch" (one line at the default text size, 28-48px), the claim, one
   sentence and the CBO number; at right, the state tile map (up to 528px, about 45% of the row)
   with a one-line key and the status date; under both, the three ways in as cards in a row.
   Under 900px: label, title, claim, the map at full width with shorter tiles, the key on two
   lines, the date, then the cards one under another. The sentence and the CBO number are left
   out there (both are on Coverage Watch), and on phones each card shows its title only, so the
   band still fits on one screen. The cards come before the map in the markup, so keyboard focus
   reaches them before the 51 tiles; they are moved below the map visually (grid areas).
   Contrast on #F7F6F2: text #121212 17.3:1, secondary #4A4A48 8.2:1, the label, the number and
   the source link in the accent #0B5D57 7.15:1. Cards: white with #121212 titles (18.7:1) and
   #4A4A48 lines (8.9:1), edged in #85847F (3.47:1 against the band); the main card in the
   accent, white title 7.73:1 and #F7F6F2 line 7.15:1. The top line is #33A193, 4.8:1 against
   the teal and 2.9:1 against the paper (decoration: the paper's own edge is 14:1 against the
   teal); the bottom hairline #121212. */
.cwb {
  --cwb-bg: #F7F6F2;
  --cwb-ink: #121212;          /* text, focus rings, the bottom hairline */
  --cwb-ink-2: #4A4A48;        /* secondary text */
  --cwb-accent: #0B5D57;       /* the label, the number, the source link */
  --cwb-line: #33A193;         /* the top edge: the hero's rule (.hero--line, --hl-rule) */
  --cwb-rule: #C9C8C2;         /* the hairline over the CBO number */
  --cwb-card: #FFFFFF;
  --cwb-card-ink: #121212;
  --cwb-card-ink-2: #4A4A48;
  --cwb-card-edge: #85847F;    /* 3.47:1 against the band, 3.75:1 against the card */
  --cwb-card-arrow: #0B5D57;
  --cwb-card-1: #0B5D57;       /* the main card */
  --cwb-card-1-ink: #FFFFFF;
  --cwb-card-1-ink-2: #F7F6F2;
  position: relative;
  background: var(--cwb-bg);
  color: var(--cwb-ink);
  border-top: 0;
  border-bottom: 1px solid var(--cwb-ink);
  padding-block: var(--space-5) var(--space-4);
}
/* On screen the band is exactly as tall as the screen under the header (100svh less 73px), its
   content centred, unless the content is taller. So the band can come to rest with its top
   73px from the top of the screen, as if under the header, with the footer below it; and,
   being no shorter than that while the hero is stuck above it, it covers the hero's content
   until the page reaches the footer ("The curtain"). */
@media screen {
  .cwb { display: flex; flex-direction: column; justify-content: center; min-height: calc(100svh - 4.5625rem); }
  .cwb > .wrap { flex: none; }
}
/* The top line, from the left edge of the screen to the right edge, always drawn: the paper's
   edge as it rises over the hero's teal ("The curtain"). */
.cwb::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--cwb-line);
}
@media (min-width: 37.5rem) { .cwb::before { height: 4px; } }
/* The footer follows the band's own bottom hairline, so it needs no top rule of its own. */
.site-footer { border-top: 0; }
/* The band's content box is a container, so the title can be sized to stay on one line. */
.cwb > .wrap { container: cwb / inline-size; }
.cwb a { color: var(--cwb-accent); }
.cwb :focus-visible { outline-color: var(--cwb-ink); }
.cwb-grid {
  display: grid; grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "eyebrow" "title" "headline" "lead" "stat" "map" "cards";
}
.cwb-grid > * { min-width: 0; }
.cwb-eyebrow { grid-area: eyebrow; font-size: var(--text-small); font-weight: 600; line-height: 1.4; letter-spacing: 0.01em; color: var(--cwb-accent); }
.cwb h2, .cwb h3 { color: inherit; }
.cwb .cwb-title { grid-area: title; margin-top: var(--space-1); font-size: 1.75rem; line-height: 1.05; letter-spacing: -0.015em; max-width: none; }
.cwb-headline { grid-area: headline; margin-top: var(--space-2); font-family: var(--font-serif); font-weight: 600; font-size: 1.125rem; line-height: 1.3; max-width: 26em; }
.cwb-lead { grid-area: lead; display: none; margin-top: var(--space-3); max-width: 34em; line-height: 1.45; }
/* The CBO number: one small paragraph, the number at 28px (from 900px only). */
.cwb-stat { grid-area: stat; display: none; margin-top: var(--space-3); padding-top: var(--space-2); border-top: 1px solid var(--cwb-rule); font-size: var(--text-small); line-height: 1.5; color: var(--cwb-ink-2); max-width: 36em; }
.cwb-num { font-size: 1.75rem; line-height: 1; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: lining-nums; color: var(--cwb-accent); }
.cwb-src { white-space: nowrap; text-underline-offset: 0.25em; }
.cwb-map { grid-area: map; margin: var(--space-3) 0 0; }
/* The ways in: cards, not underlined links. White with a hairline edge (the tracker in the
   accent), the title bold, one line on what is there, an arrow at the right; the whole card is
   the link. On hover the title underlines, the edge darkens and the arrow steps right. */
.cwb-cards { grid-area: cards; list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); margin-top: var(--space-4); }
.cwb-cards > li { display: flex; min-width: 0; }
.cwb .cwb-card {
  flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; align-content: start; column-gap: var(--space-3);
  min-height: 3rem; padding: 0.75rem 1rem; border-radius: 4px;
  background: var(--cwb-card); color: var(--cwb-card-ink); text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--cwb-card-edge);
  transition: box-shadow 0.15s ease;
}
.cwb .cwb-card--primary { background: var(--cwb-card-1); color: var(--cwb-card-1-ink); box-shadow: none; }
.cwb-card-t { grid-column: 1; font-weight: 600; line-height: 1.3; }
.cwb-card-d { grid-column: 1; display: none; margin-top: 0.125rem; text-wrap: pretty; font-size: var(--text-small); line-height: 1.4; color: var(--cwb-card-ink-2); }
.cwb-card--primary .cwb-card-d { color: var(--cwb-card-1-ink-2); }
.cwb-card-arrow { grid-column: 2; grid-row: 1 / span 2; font-size: 1.25rem; line-height: 1; color: var(--cwb-card-arrow); transition: transform 0.15s ease; }
.cwb-card--primary .cwb-card-arrow { color: var(--cwb-card-1-ink); }
.cwb .cwb-card:hover { box-shadow: inset 0 0 0 1px var(--cwb-ink); }
.cwb .cwb-card--primary:hover { box-shadow: none; }
.cwb .cwb-card:hover .cwb-card-t { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.cwb .cwb-card:hover .cwb-card-arrow { transform: translateX(3px); }
.cwb .cwb-card:focus-visible { outline: 3px solid var(--cwb-ink); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .cwb .cwb-card, .cwb-card-arrow { transition: none; } }
@media (forced-colors: active) { .cwb .cwb-card { border: 1px solid CanvasText; } }
@media (min-width: 37.5rem) {
  .cwb-card-d { display: block; }
  .cwb .cwb-title { font-size: 2.25rem; }
  .cwb-headline { font-size: 1.25rem; }
}
@media (min-width: 56.25rem) {
  .cwb { padding-block: var(--space-6) 2.5rem; }
  .cwb-grid {
    grid-template-columns: minmax(0, 1fr) min(33rem, 45%);
    grid-template-rows: repeat(4, auto) 1fr auto;
    grid-template-areas: "eyebrow map" "title map" "headline map" "lead map" "stat map" "cards cards";
    column-gap: var(--space-7);
  }
  .cwb-map { margin-top: var(--space-2); }
  /* One line in the left column from 900px at the default text size (about 30px at 900, 34px at
     1024, 43px from 1280); with larger text it wraps rather than running under the map. */
  .cwb .cwb-title { font-size: clamp(1.75rem, 3.6cqi, 3rem); }
  .cwb-headline { margin-top: var(--space-3); font-size: clamp(1.25rem, 1rem + 0.45vw, 1.5rem); line-height: 1.25; }
  .cwb-lead { display: block; font-size: var(--text-body); }
  .cwb-stat { display: block; align-self: end; }
  .cwb-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); margin-top: var(--space-4); }
  .cwb .cwb-card { padding: 0.75rem 1rem; column-gap: 0.75rem; align-items: start; }
  .cwb-card-arrow { align-self: center; }
}
@media print { .cwb { print-color-adjust: exact; -webkit-print-color-adjust: exact; } }

/* ---------- The state tile map (#home-map, in the band) ----------
   The markup in index.html is the static fallback; home-map.js updates each tile's status and
   name in place from /data/states.json. Each tile is a link to the tracker opened on that state.
   The tile colors are Coverage Watch's own (coverage-watch.css, --st-*), so the map here previews
   the tracker one click away: in effect in the accent, starting before 2027 in near-black, both
   with white labels; the waiver in grey, 1 January 2027 in light grey and non-expansion states in
   white, all three with #121212 labels and a 1px edge, because their fills are too close to the
   paper. If a --st-* color changes in coverage-watch.css, change it here too.
   Checked against the band (#F7F6F2): every label at least 7:1 on its tile, every tile at least
   3:1 against the band by its fill or its edge. */
.cwb-map {
  --hm-live: #0B5D57;   --hm-live-ink: #FFFFFF;     /* --st-live: label 7.73:1; tile 7.15:1 against the band */
  --hm-soon: #2E2D2A;   --hm-soon-ink: #FFFFFF;     /* --st-soon: label 13.77:1; tile 12.73:1 */
  --hm-waiver: #A3A29C; --hm-waiver-ink: #121212;   /* --st-waiver: label 7.32:1; tile 2.37:1, so an edge: */
  --hm-waiver-edge: #6E6D68;                        /*   4.79:1 against the band */
  --hm-2027: #C9C8C2;   --hm-2027-ink: #121212;     /* --st-2027: label 11.17:1; tile 1.55:1, so an edge: */
  --hm-2027-edge: #85847F;                          /*   3.47:1 against the band */
  --hm-none: #FFFFFF;   --hm-none-ink: #121212;     /* --st-none: label 18.73:1; tile 1.08:1, so an edge: */
  --hm-none-edge: #85847F;                          /*   3.47:1 against the band, 3.75:1 against the tile */
  --hm-ring: #121212;                               /* hover and focus rings, 17.32:1 */
  min-width: 0;
}
.hm-map { container: hm / inline-size; }
.hm-grid { list-style: none; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; }
.hm-grid > li { display: flex; min-width: 0; }
/* Tiles are a little wider than tall under 900px (4:3), square from 900px. */
.hm-t { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; min-width: 0; border-radius: 0; font-size: var(--text-small); font-weight: 600; line-height: 1; text-decoration: none; }
@media (min-width: 56.25rem) { .hm-t { aspect-ratio: 1 / 1; } }
/* Narrow phones: taller tiles, so each tile's 24px tap circle clears its neighbours' (WCAG 2.2,
   2.5.8): 5:4 under 390px, square under 360px. */
@media (max-width: 24.37rem) { .hm-t { aspect-ratio: 5 / 4; } }
@media (max-width: 22.49rem) { .hm-t { aspect-ratio: 1 / 1; } }
.hm-t > span { display: none; }
/* Each status sets its fill, label and edge once (--t-bg, --t-ink, --t-edge and the edge's width,
   --t-w), for the tiles, the key's swatches and their forced-colors rules alike. */
.hm-t--live, .hm-sw--live { --t-bg: var(--hm-live); --t-ink: var(--hm-live-ink); --t-edge: var(--hm-live); --t-w: 1px; }
.hm-t--soon, .hm-sw--soon { --t-bg: var(--hm-soon); --t-ink: var(--hm-soon-ink); --t-edge: var(--hm-soon); --t-w: 1px; }
.hm-t--waiver, .hm-sw--waiver { --t-bg: var(--hm-waiver); --t-ink: var(--hm-waiver-ink); --t-edge: var(--hm-waiver-edge); --t-w: 1px; }
.hm-t--y2027, .hm-sw--y2027 { --t-bg: var(--hm-2027); --t-ink: var(--hm-2027-ink); --t-edge: var(--hm-2027-edge); --t-w: 1px; }
.hm-t--none, .hm-sw--none { --t-bg: var(--hm-none); --t-ink: var(--hm-none-ink); --t-edge: var(--hm-none-edge); --t-w: 1px; }
.cwb .hm-t { background: var(--t-bg); color: var(--t-ink); box-shadow: inset 0 0 0 var(--t-w) var(--t-edge); }
.hm-t:hover { outline: 2px solid var(--hm-ring); outline-offset: 1px; }
.cwb .hm-t:focus-visible { position: relative; z-index: 1; outline: 3px solid var(--hm-ring); outline-offset: 2px; }
/* The focused tile's whole li goes above its neighbours too: while the scroll wave (below) is in
   effect each li is its own stacking context, so the link's z-index alone would let the next
   tiles cover the outer edge of its ring. */
.hm-grid > li:focus-within { z-index: 1; }
/* Postal-code labels on every tile once the map is 17rem wide (tiles about 20px): 3.4% of the
   map's width, between 11px and 16px (13px on a 390px phone, 16px from about 470px). */
@container hm (min-width: 17rem) {
  .hm-t > span { display: block; font-size: clamp(0.6875rem, 3.4cqi, var(--text-small)); }
}
@container hm (min-width: 28rem) {
  .hm-grid { gap: 4px; }
}
/* Under 600px the map takes the band's full width, less 4px a side. */
@media (max-width: 37.49rem) { .hm-map { margin-inline: calc(4px - var(--gutter)); } }
/* The key: five short labels on one line from 900px, on two lines on phones. */
.hm-key { list-style: none; display: flex; flex-wrap: wrap; gap: 0 var(--space-4); margin-top: var(--space-2); font-size: var(--text-small); line-height: 1.4; }
.hm-key li { display: flex; align-items: center; gap: 0.375rem; min-width: 0; white-space: nowrap; }
.hm-key li[hidden] { display: none; }
@media (min-width: 56.25rem) { .hm-key { column-gap: 0.5rem; margin-top: var(--space-3); } }
.hm-sw { flex: none; width: 0.875rem; height: 0.875rem; background: var(--t-bg); box-shadow: inset 0 0 0 var(--t-w) var(--t-edge); }
.hm-note { margin-top: 0.125rem; font-size: var(--text-small); line-height: 1.5; color: var(--cwb-ink-2); }
.hm-note [hidden] { display: none; }
/* "Skip the state map": hidden until it has keyboard focus, then shown above the map. */
.hm-skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hm-skip:focus { position: static; width: auto; height: auto; overflow: visible; clip-path: none; display: inline-block; margin-bottom: var(--space-2); font-weight: 600; }
.hm-key:focus { outline: none; }
/* Forced colors (Windows contrast themes): the map keeps the band's paper behind it, and each
   legend swatch a 2px ring of it, so tiles and swatches read as designed, from the same status
   tokens, whatever the theme's Canvas is. */
@media (forced-colors: active) {
  .hm-map, .hm-t, .hm-sw { forced-color-adjust: none; }
  .hm-map { background: var(--cwb-bg); padding: 4px; }
  .hm-sw { box-shadow: inset 0 0 0 var(--t-w) var(--t-edge), 0 0 0 2px var(--cwb-bg); }
}

/* ---------- The curtain: from the hero to the band, on scroll ----------
   The top of the band, a sheet of paper, shows at the foot of the first screen; as the page
   scrolls it waits there while the hero's content rises away and a short stretch of teal opens
   under it; then the band slides up over the hero, which stays where it is, as in a newspaper's
   scrolling features. The two share one wrapper (.hc, in index.html), which holds the curtain's
   two lengths, so both read the same values:
   --hc-peek: how much of the band shows at the foot of the first screen (48px on phones, 64px
     from 900px). The hero is that much shorter than the first screen, so without the curtain
     the band simply follows it and its top still shows there.
   --hc-breath: the stretch of teal that opens under the hero's content before the band rises
     (0 without the curtain; 8svh on phones, 16svh from 900px). With the hero's own space under
     its content, the band's edge arrives about a third of a screen below the content on a
     laptop (301px at 1440x900), less on phones (196px at 390x844).
   The curtain runs only where home-curtain.js has turned it on (.is-curtain on .hc): where
   motion is welcome and the hero's content clears the band's edge on the first screen. Without
   JavaScript, under prefers-reduced-motion, where the content does not fit (short phones, large
   text) and in print nothing sticks: the band simply follows the hero, its top line drawn, and
   nothing moves.
   - The band's top waits at the foot of the screen: .hc-peek, an empty strip of the band's
     paper, and .hc-edge, its line, which home-curtain.js puts just before the band, each sticky
     at the foot of the screen (the strip as tall as --hc-peek, the line at its top) and pulled
     up over the band's own top (margin-bottom), so once the page has scrolled through the
     breath they lie exactly over it and rise with it. The strip is under the band, the line
     over it, and the band's own line is hidden while the curtain runs: as the band's top comes
     up into the strip in the last of the wait, it shows no second line. The band
     itself never sticks, so a link to #coverage-watch, the focus of its links and anything that
     measures it find it where it is. The hero sticks at that same moment (position: sticky, at
     --hc-top from the script: the hero's top as the band starts to rise, never below the top of
     the screen), so the hand-off is one movement: the content rises, then the band does.
   - The scroll cue ("The scroll cue", above) sits just above the waiting top at rest and fades
     out from the first pixel of scroll, so the band's edge never meets it; home-curtain.js keeps
     room for it under the hero's content when it turns the curtain on.
   - Nothing readable is ever cut by the band's edge or left dimmed. home-curtain.js fades out
     the hero's sentence and button and its H1 (.is-under: opacity to 0 in 0.15s), each as the
     band's edge comes within 40px of it (further ahead while the band rises fast, so each is
     gone before the edge arrives), and back in as the edge goes down again; the rule and the dot
     field fade together 64px ahead of the edge, so the band's own line, the same teal, never runs
     beside the rule as a double line, and nothing of the field shows above the band at rest.
     Wherever the page stops, each part is either whole at its full contrast or gone. It is
     hidden by opacity alone, so the text stays in the accessibility tree and in find-in-page,
     and the button stays in the tab order; a covered button takes no clicks (pointer-events).
     When it takes keyboard focus, the hero stops sticking (:has(:focus-visible), or .is-held
     from the script for focus that is not marked focus-visible, as from a screen reader) and the
     script brings it into view and fades it back in.
   - Where the browser runs scroll-driven animations, two decorative moves ride on the page's
     scroll (scroll(root)), from the scroll at which the band starts to rise (--hc-s0, from
     home-curtain.js), so the page at rest, and while the band waits, is untouched. A shadow 4rem
     deep fades in on the teal above the band's edge (black, 55% at the edge) over the first 4rem
     of its rise, so the sheet reads as lifted even in a still; and the hero recedes: a black
     layer over its teal, under its text, rises to 30% by the time the band reaches the top of
     the screen (--hc-s1). The text is never under it, and the shadow's top 24px (at most 13%
     black) is all that can reach a part before it fades: white on the teal stays above 10:1.
   Transforms and opacity only, so nothing moves the layout. */
.hc { position: relative; --hc-peek: 3rem; --hc-breath: 0px; }
@media (min-width: 56.25rem) { .hc { --hc-peek: 4rem; } }
.hc > .cwb { z-index: 1; }
.hc-peek, .hc-edge { display: none; }
@media screen and (prefers-reduced-motion: no-preference) {
  .hc.is-curtain { --hc-breath: 8svh; }
  .hc.is-curtain > .hero--line { position: sticky; top: var(--hc-top, 0px); }
  .hc.is-curtain > .hero--line:has(:focus-visible),
  .hc.is-curtain > .hero--line.is-held { position: relative; top: auto; }
  /* The band's waiting top. Its paper (#F7F6F2, as .cwb), under the band: the band, later in
     the page at the same z-index, paints over it as its top comes up into the strip. */
  .hc.is-curtain > .hc-peek {
    display: block; position: sticky; bottom: 0; z-index: 1;
    height: var(--hc-peek); margin-bottom: calc(-1 * var(--hc-peek));
    background: #F7F6F2; pointer-events: none;
  }
  /* Its line (#33A193, as .cwb::before), over the band (z-index 2): sticky at the top of the
     strip while the band waits, then lying on the band's top, where the band's own line would
     be. The band's own line is hidden while the curtain runs, so it never shows as a second
     line rising through the strip. The line is only 3px (4px) tall, inside the band's top
     padding, so it covers nothing of the band's content. */
  .hc.is-curtain > .hc-edge {
    --hc-line: 3px;
    display: block; position: sticky; bottom: calc(var(--hc-peek) - var(--hc-line)); z-index: 2;
    height: var(--hc-line); margin-bottom: calc(-1 * var(--hc-line));
    background: #33A193; pointer-events: none;
  }
  .hc.is-curtain > .cwb::before { visibility: hidden; }
  .hc.is-curtain .hl > :is(h1, .hl-lead, .hl-actions) { transition: opacity 0.15s ease-out; }
  .hc.is-curtain .hl > .hl-line { transition: opacity 0.3s ease-out; }
  .hc.is-curtain .hl > .is-under { opacity: 0; transition-timing-function: ease-in; }
  .hc.is-curtain .hl > .hl-actions.is-under { pointer-events: none; }
}
@media screen and (min-width: 37.5rem) and (prefers-reduced-motion: no-preference) {
  .hc.is-curtain > .hc-edge { --hc-line: 4px; }
}
@media screen and (min-width: 56.25rem) and (prefers-reduced-motion: no-preference) {
  .hc.is-curtain { --hc-breath: 16svh; }
}
@supports (animation-timeline: scroll()) {
  @media screen and (prefers-reduced-motion: no-preference) {
    .hc.is-curtain > .cwb::after {
      content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 4rem; pointer-events: none;
      background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.22) 35%, rgba(0, 0, 0, 0));
      animation: hc-shade linear both; animation-timeline: scroll(root);
      animation-range: var(--hc-s0, 0px) calc(var(--hc-s0, 0px) + 4rem);
    }
    .hc.is-curtain > .hero--line::after {
      content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: #000;
      animation: hc-dim linear both; animation-timeline: scroll(root);
      animation-range: var(--hc-s0, 0px) var(--hc-s1, 100vh);
    }
  }
}
@keyframes hc-shade { from { opacity: 0; } }
@keyframes hc-dim { from { opacity: 0; } to { opacity: 0.3; } }
@media (forced-colors: active) {
  .cwb::before, .hc.is-curtain > .hc-edge { forced-color-adjust: none; background: CanvasText; }
  .hc > .cwb::after, .hc > .hero--line::after { display: none; }
}

/* ---------- The tile wave ----------
   The band's 51 state tiles grow from dots into place as they come on screen, row by row, each
   row from the left (0.35s each, after 10ms for each step of --d, the tile's row plus its
   column, set in index.html). It is timed, not tied to the scroll, so wherever the page stops,
   every tile on screen is whole within half a second. home-map.js turns it on (.hm-wave) only
   where motion is welcome and the map starts below the screen as the page opens (a map already
   in view is drawn at rest), marks each tile as it comes on screen (.is-in), and unmarks it once
   it is below the screen again, so the wave plays again on the way down. The tiles move but
   never fade. Without JavaScript, under reduced motion and in print, the tiles are simply there. */
@media screen and (prefers-reduced-motion: no-preference) {
  .hm-wave .hm-grid > li { transform: translateY(12px) scale(0.35); }
  .hm-wave .hm-grid > li.is-in { transform: none; transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--d, 0) * 10ms); }
}
