:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #111111;
  --muted: #6b6b6b;
  --line: #e3e3e3;
  --accent: #0445af;
  --accent-10: rgba(4, 69, 175, 0.1);
  --accent-30: rgba(4, 69, 175, 0.3);
  --accent-60: rgba(4, 69, 175, 0.6);
  --error: #af0404;
  --error-10: #f7e6e6;
  --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); }
.col { max-width: 760px; margin: 0 auto; padding: 0 24px; }
a { color: var(--accent); text-underline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.25; }
p { margin: 0 0 12px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Welcome screen */
.welcome { min-height: 88vh; display: flex; align-items: center; padding: 48px 0; }
.welcome h1 { font-size: clamp(28px, 5vw, 40px); }
.intro { font-size: 20px; line-height: 1.4; color: var(--muted); margin: 16px 0 0; }
.go { display: flex; align-items: center; gap: 14px; margin-top: 28px; }
.hint { font-size: 12px; color: var(--ink); }
.fine { font-size: 14px; color: var(--muted); margin: 36px 0 0; }

/* The button */
.ok {
  background: var(--accent); color: #fff; border: 0; border-radius: 4px; cursor: pointer;
  font-size: 20px; font-weight: 700; line-height: 1; min-height: 40px; padding: 0 16px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
}
.ok:hover { background: #0a55c9; }
.ok[disabled] { opacity: .6; cursor: default; }

/* Page sections */
main { padding-bottom: 48px; }
main h2 { font-size: 24px; }
.lead { font-size: 18px; color: var(--muted); margin: 8px 0 0; }
.block { margin-top: 88px; }
.about h3 { font-size: 18px; margin: 28px 0 6px; }
.about p { color: var(--muted); }
.cite { font-size: 14px; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 20px 24px; align-items: flex-end; margin-top: 36px; }
.field { display: flex; flex-direction: column; gap: 2px; }
.field.grow { flex: 1 1 220px; }
label, legend { font-size: 14px; color: var(--muted); }
.filters input[type=search], .filters select {
  border: 0; border-bottom: 1px solid var(--accent-30); border-radius: 0; background: transparent;
  color: var(--accent); font-size: 20px; padding: 6px 0; height: 42px; width: 100%; outline: none;
  -webkit-appearance: none; appearance: none;
}
.filters select {
  padding-right: 22px; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230445af' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 2px center;
}
.filters input[type=search]::placeholder { color: var(--accent-30); }
.filters input[type=search]:focus, .filters select:focus { border-bottom: 2px solid var(--accent); }
.toggles { border: 0; padding: 0; margin: 0; flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toggles legend { float: left; margin-right: 6px; padding: 0; }
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-block; font-size: 16px; color: var(--accent); background: var(--accent-10);
  border-radius: 4px; padding: 5px 10px; box-shadow: 0 0 0 1px var(--accent-60) inset;
}
.chip:hover span { background: var(--accent-30); }
.chip input:checked + span { box-shadow: 0 0 0 2px var(--accent) inset; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.legend { color: var(--muted); font-size: 14px; margin: 20px 0 0; }
.legend strong { color: var(--ink); font-weight: 400; }
.count { color: var(--muted); font-size: 14px; margin: 36px 0 0; }
.empty { color: var(--muted); padding: 40px 0; }

/* Program rows */
.row { border-top: 1px solid var(--line); padding: 36px 0 40px; }
.list .row:first-child { margin-top: 12px; }
.row h3 { font-size: 24px; }
.place { color: var(--muted); margin: 4px 0 0; }
.official { display: inline-block; margin-top: 6px; }
.flag { margin: 14px 0 0; color: var(--ink); }
.note { margin: 14px 0 0; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 20px; margin: 24px 0 0; }
.facts dt { font-size: 14px; color: var(--muted); }
.facts dd { margin: 0; font-size: 18px; }
.facts dd small { display: block; font-size: 14px; color: var(--muted); }
.facts dd.na { color: var(--muted); }

.vote { margin-top: 26px; }
.ask { font-size: 15px; margin: 0 0 8px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer;
  background: var(--accent-10); color: var(--accent); border: 0; border-radius: 4px;
  box-shadow: 0 0 0 1px var(--accent-60) inset; font-size: 20px; line-height: 1.3;
  min-height: 40px; padding: 4px 12px 4px 10px;
}
.vote .choice { min-width: 64px; min-height: 30px; font-size: 15px; padding: 2px 10px; }
.choice:hover { background: var(--accent-30); }
.choice[disabled] { cursor: default; }
.choice[aria-pressed=true], .choice[aria-checked=true] { box-shadow: 0 0 0 2px var(--accent) inset; }
.choice .tick { margin-left: auto; padding-left: 14px; visibility: hidden; }
.choice[aria-pressed=true] .tick, .choice[aria-checked=true] .tick { visibility: visible; }
.key {
  flex: none; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; background: #fff; border: 1px solid var(--accent-60); border-radius: 2px;
}
.choice[aria-checked=true] .key { background: var(--accent); color: #fff; border-color: var(--accent); }
.msg { font-size: 14px; margin: 12px 0 0; min-height: 0; }
.msg:empty { display: none; }
.msg.err { color: var(--error); }
.meta { font-size: 14px; color: var(--muted); margin: 14px 0 0; }

/* Recent updates */
.changes { list-style: none; margin: 16px 0 0; padding: 0; }
.changes li { padding: 14px 0; border-top: 1px solid var(--line); }
.changes time { display: block; color: var(--muted); font-size: 14px; }

.foot { border-top: 1px solid var(--line); padding: 20px 0 36px; color: var(--muted); font-size: 14px; }

/* Full-screen question flow */
.flow { position: fixed; inset: 0; z-index: 50; background: #fff; display: flex; flex-direction: column; }
.flow-progress { height: 4px; background: var(--accent-10); flex: none; }
.flow-progress div { height: 100%; width: 0; background: var(--accent); transition: width .4s ease; }
.flow-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 20px 0; flex: none; }
.flow-context { font-size: 14px; color: var(--muted); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-close { background: none; border: 0; cursor: pointer; font-size: 28px; line-height: 1; padding: 2px 8px; color: var(--ink); }
.flow-stage { flex: 1; overflow-y: auto; display: flex; padding: 24px; }
.q { width: 100%; max-width: 720px; margin: auto; animation: q-in .35s ease both; outline: none; }
.q-head { display: flex; gap: 10px; align-items: baseline; }
.q-num { flex: none; color: var(--accent); font-size: 16px; white-space: nowrap; }
.q-title { font-size: 24px; margin: 0; font-weight: 400; }
.q-desc { font-size: 20px; color: var(--muted); margin: 8px 0 0; }
.q-body { margin-top: 32px; }
.q-input {
  display: block; width: 100%; border: 0; border-bottom: 1px solid var(--accent-30); border-radius: 0; outline: none;
  background: transparent; color: var(--accent); font-size: 30px; line-height: 1.3; padding: 0 0 8px; resize: none;
}
.q-input::placeholder { color: var(--accent-30); }
.q-input:focus { border-bottom: 2px solid var(--accent); padding-bottom: 7px; }
.q-sub { font-size: 12px; margin: 10px 0 0; }
.q-choices { display: inline-grid; gap: 8px; max-width: 100%; }
.q-choices .choice { width: 100%; }
.q-choices .choice.blink { animation: blink .25s linear 2; }
.q-pick { font-size: 14px; margin: 0 0 10px; }
.q-err { display: inline-block; background: var(--error-10); color: var(--error); border-radius: 3px; font-size: 14px; padding: 4px 12px; margin: 14px 0 0; }
.q-err:empty { display: none; }
.q-actions { display: flex; align-items: center; gap: 14px; margin-top: 20px; }
.q-done .q-title { font-size: 30px; }
.flow-nav { position: absolute; right: 24px; bottom: 24px; display: flex; gap: 1px; }
.flow-nav button { width: 36px; height: 32px; background: var(--accent); color: #fff; border: 0; cursor: pointer; font-size: 14px; }
.flow-nav button:first-child { border-radius: 4px 0 0 4px; }
.flow-nav button:last-child { border-radius: 0 4px 4px 0; }
.flow-nav button[disabled] { opacity: .5; cursor: default; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@keyframes q-in { from { opacity: 0; transform: translateY(48px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: .2; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .q, .q-choices .choice.blink { animation: none; }
  .flow-progress div { transition: none; }
}

@media (max-width: 600px) {
  .col { padding: 0 20px; }
  .welcome { min-height: 84vh; }
  .intro, .q-desc { font-size: 18px; }
  .hint, .key { display: none; }
  .choice { padding-left: 12px; }
  .vote .choice { min-height: 38px; padding: 2px 14px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .row h3, .q-title { font-size: 20px; }
  .q-input { font-size: 24px; }
  .q-done .q-title { font-size: 24px; }
  .block { margin-top: 64px; }
  .flow-stage { padding: 16px 20px 72px; }
}

/* Blue gradient background (replaces the white page) */
:root {
  --ink: #ffffff;
  --muted: rgba(255, 255, 255, 0.82);
  --line: rgba(255, 255, 255, 0.28);
  --accent: #ffffff;
  --accent-10: rgba(255, 255, 255, 0.14);
  --accent-30: rgba(255, 255, 255, 0.4);
  --accent-60: rgba(255, 255, 255, 0.65);
  --on-accent: #0b3a9e;
  --error: #b3261e;
  --error-10: #ffffff;
  --page: linear-gradient(115deg, #2f93d6 0%, #1672c6 32%, #0c50b2 62%, #0a2390 100%);
}
body { background: #0c50b2; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--page); }
.flow { background: var(--page); }
.ok, .flow-nav button { color: var(--on-accent); }
.ok:hover { background: #e3ecff; }
.chip:hover span, .choice:hover { background: rgba(255, 255, 255, 0.26); }
.chip input:checked + span { background: rgba(255, 255, 255, 0.3); }
.key { background: transparent; }
.choice[aria-checked=true] .key { color: var(--on-accent); }
.filters input[type=search]::placeholder, .q-input::placeholder { color: rgba(255, 255, 255, 0.55); }
.filters select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23ffffff' stroke-width='2'/%3E%3C/svg%3E"); }
.filters select option { color: #111111; background: #ffffff; }
.msg.err:not(:empty) { display: inline-block; background: #ffffff; color: var(--error); border-radius: 3px; padding: 4px 12px; }

/* No "press Enter" note beside the buttons (the Enter key still works) */
.hint { display: none; }

/* "Is a program missing?" sits between the welcome text and the list */
.welcome { min-height: 0; padding: 96px 0 56px; }
#suggest { margin-top: 0; }
#programs { margin-top: 72px; scroll-margin-top: 24px; }
@media (max-width: 600px) {
  .welcome { padding: 56px 0 40px; }
}

/* Fixes after the full test: readability, touch screens, keyboard, high-contrast mode */
:root {
  --muted: rgba(255, 255, 255, 0.92);
  --accent-30: rgba(255, 255, 255, 0.6);
  --accent-60: rgba(255, 255, 255, 0.85);
}
.filters input[type=search]::placeholder, .q-input::placeholder { color: rgba(255, 255, 255, 0.75); }
.filters input[type=search]::-webkit-search-cancel-button { filter: brightness(0) invert(1); cursor: pointer; }
.filters .field { gap: 6px; }
.filters input[type=search]:focus { border-bottom: 3px solid #ffffff; }
.filters select:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }
.chip input:checked + span::before { content: "\2713\00a0"; }
[tabindex="-1"]:focus { outline: none; }
@media (max-height: 700px) {
  .flow-stage { padding-bottom: 72px; }
}
@media (max-width: 600px) {
  .q-sub { display: none; }
}
@media (pointer: coarse) {
  .vote .choices { gap: 12px; }
  .vote .choice { min-height: 44px; min-width: 76px; padding: 4px 14px; }
  .chip span { padding: 10px 12px; }
  .ok { min-height: 44px; }
  .official { padding: 10px 0; }
  .flow-close { min-width: 44px; min-height: 44px; }
  .flow-nav button { width: 44px; height: 44px; }
}
@media (forced-colors: active) {
  body::before { display: none; }
  .flow { background: Canvas; }
  .chip span, .choice, .ok, .flow-nav button { border: 1px solid ButtonText; }
  .chip input:checked + span, .choice[aria-pressed=true], .choice[aria-checked=true] { border-width: 3px; }
}

/* Map of the United States: beside the text on wide screens, under the welcome text on narrow ones */
.page { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.page .col { max-width: none; margin: 0; padding: 0; }
.foot .col { max-width: 1180px; }
.filters .field.grow { flex-basis: 140px; }
.filters select { max-width: 200px; text-overflow: ellipsis; }
.map-box { max-width: 520px; margin: 0 0 48px; }
.map-box[hidden] { display: none; }
.map svg { display: block; width: 100%; height: auto; }
.st { fill: rgba(255, 255, 255, 0.16); stroke: rgba(10, 35, 144, 0.6); stroke-width: 1.5; stroke-linejoin: round; }
.st.has { fill: rgba(255, 255, 255, 0.9); cursor: pointer; }
.st.has:hover { fill: #ffffff; }
.st.sel, .st.sel:hover { fill: #ffd866; }
.hit { fill: transparent; cursor: pointer; }
.map-note { font-size: 14px; color: var(--muted); margin: 12px 0 0; min-height: 21px; }
.map-note button { font: inherit; color: #ffffff; background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
@media (min-width: 1100px) {
  .page { display: grid; grid-template-columns: minmax(0, 1fr) 400px; column-gap: 56px; align-items: start; }
  .page > .welcome { grid-column: 1; grid-row: 1; }
  .page > main { grid-column: 1; grid-row: 2; }
  .map-box { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 24px; margin: 100px 0 0; }
}
@media (forced-colors: active) {
  .st { stroke: CanvasText; fill: Canvas; }
  .st.has { fill: Highlight; }
}

/* More contrast between elements: bold headings and values, one warm accent, coloured status dots */
:root { --warm: #ffd866; --warm-hover: #ffe491; --fresh: #8ff0b8; --navy: #0a2a7a; }
h1, main h2 { font-weight: 700; letter-spacing: -0.01em; }
.row h3 { font-weight: 700; }
.about h3, .q-title { font-weight: 600; }
.intro strong, .lead strong, .fine strong, .legend strong, .count strong { font-weight: 700; color: #ffffff; }
a { text-decoration-color: var(--warm); text-decoration-thickness: 2px; }
.ok { background: var(--warm); color: var(--navy); }
.ok:hover { background: var(--warm-hover); }
.facts dd { font-weight: 700; }
.facts dd small { font-weight: 400; }
.facts dd.na { font-weight: 400; }
.facts dd.req::before, .facts dd.free::before, .flag::before {
  content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: 0.06em; background: var(--warm);
}
.facts dd.free::before { background: var(--fresh); }
.flag { font-weight: 700; }
.note { font-weight: 600; }
.chip input:checked + span, .choice[aria-pressed=true], .choice[aria-checked=true] {
  background: var(--warm); color: var(--navy); font-weight: 700; box-shadow: none;
}
.chip:hover input:checked + span, .choice[aria-pressed=true]:hover, .choice[aria-checked=true]:hover { background: var(--warm-hover); }
.choice[aria-checked=true] .key { background: var(--navy); border-color: var(--navy); color: #ffffff; }
.flow-progress div { background: var(--warm); }
.q-num { font-weight: 700; }
.changes time { font-weight: 700; color: #ffffff; }
@media (forced-colors: active) {
  .facts dd.req::before, .facts dd.free::before, .flag::before { background: CanvasText; }
}

/* Titles in the accent colour */
h1, main h2, .row h3 { color: var(--warm); }

/* Email alerts for one entry */
.alert { margin-top: 16px; }
.alert .choice { min-height: 30px; font-size: 15px; padding: 2px 10px; }
.alert-on { font-size: 14px; margin: 0; }
@media (max-width: 600px) {
  .alert .choice { min-height: 38px; padding: 4px 14px; }
}
@media (pointer: coarse) {
  .alert .choice { min-height: 44px; padding: 4px 14px; }
}

/* Map states can be reached and selected with the keyboard */
.st.has:focus { outline: none; }
.st.has:focus-visible { outline: 3px solid #ffffff; outline-offset: 2px; stroke: #0a2390; stroke-width: 4; }
.map-note button[hidden] { display: none; }
@media (forced-colors: active) {
  .st.has:focus-visible { outline-color: Highlight; }
}

/* Visit statistics: the question at the bottom of the page, and the line in the footer */
.stats-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #0a2a7a; color: #ffffff;
  padding: 14px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 24px;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.25);
}
.stats-bar p { margin: 0; font-size: 15px; max-width: 640px; }
.stats-actions { display: flex; gap: 10px; }
.stats-bar .ok { font-size: 16px; min-height: 36px; min-width: 64px; }
body.stats-open { padding-bottom: 120px; }
.foot button {
  font: inherit; color: #ffffff; background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--warm); text-decoration-thickness: 2px; text-underline-offset: 2px;
}
@media (pointer: coarse) {
  .stats-bar .ok { min-height: 44px; min-width: 76px; }
  .foot button { padding: 10px 0; }
}
@media (forced-colors: active) {
  .stats-bar { border-top: 1px solid CanvasText; }
}

/* Reader reviews of one entry */
.reviews { margin-top: 26px; }
.reviews .choice { min-height: 30px; font-size: 15px; padding: 2px 10px; }
.tags { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.tags li { font-size: 14px; font-weight: 700; color: var(--navy); background: var(--fresh); border-radius: 4px; padding: 3px 9px; }
.quotes { list-style: none; margin: 0 0 12px; padding: 0; }
.quotes li { margin: 0 0 8px; padding-left: 12px; border-left: 3px solid var(--warm); overflow-wrap: anywhere; }
.quotes small { color: var(--muted); font-size: 14px; white-space: nowrap; }
.reviews .more { font: inherit; font-size: 15px; color: #ffffff; background: none; border: 0; padding: 0; margin: 0 0 12px; display: block; cursor: pointer; text-decoration: underline; text-decoration-color: var(--warm); text-decoration-thickness: 2px; text-underline-offset: 2px; }
.review-on { font-size: 14px; margin: 0; }
@media (max-width: 600px) {
  .reviews .choice { min-height: 38px; padding: 4px 14px; }
}
@media (pointer: coarse) {
  .reviews .choice { min-height: 44px; padding: 4px 14px; }
  .reviews .more { padding: 10px 0; }
}
@media (forced-colors: active) {
  .tags li { border: 1px solid CanvasText; }
}

/* Typeface: Avenir (built into Apple devices); other systems use their standard sans-serif */
:root { --font: "Avenir Next", Avenir, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; }

/* One email-alert sign-up, under "Suggest a program" */
#alert-all { margin-top: 20px; }
#alert-all .choice { font-size: 16px; min-height: 36px; padding: 4px 12px; }
@media (pointer: coarse) {
  #alert-all .choice { min-height: 44px; padding: 4px 14px; }
}

/* The email box for alerts, under "Suggest a program" */
#alert-all { margin-top: 28px; }
.alert-form label { display: block; font-size: 16px; color: #ffffff; margin: 0 0 4px; }
.alert-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.alert-row input {
  flex: 1 1 240px; max-width: 380px; min-width: 0; height: 42px; padding: 6px 0; font-size: 20px; color: #ffffff;
  background: transparent; border: 0; border-bottom: 1px solid var(--accent-30); border-radius: 0; outline: none;
}
.alert-row input::placeholder { color: rgba(255, 255, 255, 0.75); }
.alert-row input:focus { border-bottom: 3px solid #ffffff; }
.alert-row .ok { font-size: 16px; min-height: 40px; }
.alert-fine { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
@media (pointer: coarse) {
  .alert-row .ok { min-height: 44px; }
}
@media (forced-colors: active) {
  .alert-row input { border-bottom: 1px solid CanvasText; }
}
