/* first-screen.css — the answer-first opening used by the per-page first-screen plans (2026-09-29).
   One component, eight pages (accessibility, women-ontario, women-bc, manitoba-indigenous, agriculture, disability,
   british-columbia, easiest). Each page sets its own colours through the --c-* tokens on its hero element
   (class "c-first"); nothing here is page-specific.

   Accessible by construction (axe 0 + 62 scripted checks on the first two pages):
   · headings for structure: h2 "Which one are you?" > h3 per door; the LINK text is the action, never the door title
   · the whole card is clickable through ONE link's ::after, so a card never holds two tab stops
   · focus ring on the card (:focus-within), borders that survive Windows high-contrast (forced-colors)
   · sentence-case labels at 1.1rem (spaced capitals are the hardest text for dyslexic and low-vision readers)
   · list cells wrap under the WCAG 1.4.12 text-spacing override
   ⚠ `.c-first` must be on the hero container: `.c-first .c-which` (0,2,0) has to beat each page's `.xx-hero h2` (0,1,1). */

.c-first { --c-ink: #1a1714; --c-ink2: #57534e; --c-accent: #a8431f; --c-btn: #a8431f; --c-link: #1f3a2e; --c-label: #8a3a1c;
  --c-ok: #047857; --c-line: #e5e0d8; --c-soft: #faf7f2; --c-focus: #fff; }

/* no orphaned "(2026)" on its own line (visual review 2026-09-29) */
.c-first h1 { text-wrap: balance; }
.c-first .c-which { font-family: inherit; font-size: 1.1rem; line-height: 1.35; font-weight: 600; letter-spacing: 0; text-transform: none;
  color: #fff; margin: 28px 0 10px; }
.c-first .c-answer { background: rgba(255, 255, 255, .10); border-left: 3px solid rgba(255, 255, 255, .45); border-radius: 0 8px 8px 0;
  padding: 16px 20px; margin: 18px 0 6px; color: rgba(255, 255, 255, .92); line-height: 1.6; font-size: 1.02rem; }
.c-first .c-answer p { margin: 0; }
.c-first .c-answer p + p { margin-top: 12px; }
.c-first .c-answer strong { color: #fff; }
.c-first .c-answer a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.c-first .c-meta { color: rgba(255, 255, 255, .88); font-size: .88rem; margin: 8px 0 0; }
.c-first .c-meta a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.c-doors, .c-cards { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
/* two or three open cards always fill the row (two in a three-column grid left an empty third, visual review 2026-09-29) */
.c-cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.c-doors.c-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.c-door, .c-card { position: relative; display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid transparent;
  border-radius: 12px; padding: 16px 18px; color: var(--c-ink); box-shadow: 0 2px 10px rgba(0, 0, 0, .14); text-align: left; }
.c-door h3, .c-card h3 { margin: 0; font-size: 1.08rem; line-height: 1.3; font-weight: 600; color: var(--c-ink); }
.c-door p, .c-card p { margin: 0; font-size: .93rem; line-height: 1.5; color: var(--c-ink2); }
.c-door .c-go { margin-top: auto; padding-top: 8px; font-weight: 700; font-size: .93rem; color: var(--c-accent); text-decoration: underline; text-underline-offset: 3px; }
.c-door .c-go::after, .c-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
/* a door that names programmes has several links: no whole-card target there, so a near-miss cannot open the wrong page
   (independent review 2026-09-29); the action link keeps its own focus outline */
.c-door:has(p a) .c-go::after { display: none; }
.c-door .c-go:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; border-radius: 3px; }
/* a door may name programmes with their own links: they sit above the card-wide link */
.c-door p a { position: relative; z-index: 1; color: var(--c-link); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.c-door:not(:has(p a)):hover, .c-card:hover { box-shadow: 0 4px 18px rgba(0, 0, 0, .2); }
.c-door:focus-within, .c-card:focus-within { outline: 3px solid var(--c-focus); outline-offset: 3px; }
.c-door a:focus-visible, .c-card a:focus-visible { outline: none; }
.c-door p a:focus-visible { outline: 2px solid var(--c-link); outline-offset: 2px; border-radius: 2px; }
.c-card .c-t { order: -1; font-size: .82rem; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--c-ok); } /* sentence case, no tracking (review 2026-09-29) */
.c-card h3 a { color: var(--c-link); text-decoration: underline; text-underline-offset: 3px; }
.c-card .c-a { font-weight: 700; color: var(--c-ink); }
.c-card .c-st { font-size: .82rem; font-weight: 700; color: var(--c-ink2); }

.c-open { max-width: 868px; margin: 0 auto; padding: 40px 24px 8px; scroll-margin-top: 96px; }
.c-open h2 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 8px; color: var(--c-ink); }
.c-sub { color: var(--c-ink2); margin: 0 0 18px; max-width: 760px; line-height: 1.55; }
.c-grp { margin: 0 0 18px; scroll-margin-top: 96px; }
.c-grp h3 { font-size: 1rem; font-weight: 700; letter-spacing: 0; color: var(--c-label); margin: 0 0 6px; }
.c-gn { font-weight: 400; }
.c-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--c-line); }
.c-rows li { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr) minmax(0, 1.4fr); gap: 4px 16px; padding: 12px 2px;
  border-bottom: 1px solid var(--c-line); font-size: .95rem; line-height: 1.45; }
.c-rows li > * { min-width: 0; overflow-wrap: anywhere; }
.c-rows a { font-weight: 700; color: var(--c-link); text-decoration: underline; text-underline-offset: 3px; }
.c-rows a:focus-visible, .c-btn:focus-visible { outline: 3px solid var(--c-link); outline-offset: 2px; border-radius: 3px; }
.c-amt { font-weight: 700; color: var(--c-ink); }
.c-cov { color: var(--c-ink2); }
.c-vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.c-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; background: var(--c-soft); border: 1px solid var(--c-line);
  border-radius: 12px; padding: 18px 20px; margin: 8px 0 26px; }
.c-cta p { margin: 0; flex: 1 1 320px; line-height: 1.55; color: var(--c-ink); }
.c-btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: 10px; background: var(--c-btn);
  color: #fff !important; font-weight: 700; text-decoration: none; }

/* tablet: three doors at ~220px each were cramped and uneven (visual review 2026-09-29): one column, four-door pages two */
@media (max-width: 900px) { .c-doors { grid-template-columns: 1fr; } .c-doors.c-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .c-doors, .c-doors.c-4, .c-cards { grid-template-columns: 1fr; }
  .c-rows li { grid-template-columns: minmax(0, 1fr) minmax(0, 40%); }
  .c-amt { text-align: right; }
  .c-cov { grid-column: 1 / -1; }
  .c-open { padding: 32px 16px 4px; }
}
@media (forced-colors: active) {
  .c-door, .c-card, .c-cta { border-color: CanvasText; }
  .c-door:focus-within, .c-card:focus-within { outline-color: Highlight; }
}
