/* Layout: bright single column. A photo hero under a navy wash, then white cards on a cool white page.
   Red, white and blue are always used together, never to mean a party. Light-only by choice. */
:root {
  --paper: #F5F7FB;      /* cool white page */
  --sheet: #FFFFFF;      /* cards */
  --ink: #14213D;        /* text, near navy */
  --graphite: #56607A;   /* secondary text */
  --rule: #DFE4EE;
  --rule-soft: #EDF0F6;
  --blue: #1F3A93;       /* primary: buttons, headers, filled ovals */
  --blue-deep: #12235E;
  --blue-soft: #EAF0FD;
  --red: #C8243A;        /* accent: main call to action, stars, flag bar */
  --red-soft: #FDECEE;
  --on-dark: #FFFFFF;
  --focus: #2563EB;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-lg: 18px; --r-md: 12px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.65 var(--font); }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 820px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--sheet); padding: 8px 12px; z-index: 20; }
.skip:focus { left: 8px; }
main { padding-block: 28px 88px; outline: none; }
main:focus, main:focus-visible { outline: none; }

h1, h2, h3, h4 { line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.3rem); font-weight: 800; }
h2 { font-size: 1.55rem; font-weight: 800; }
h3 { font-size: 1.12rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 1em; }
.lede { font-size: 1.12rem; color: var(--graphite); max-width: 38em; }
.muted { color: var(--graphite); }
.small { font-size: 0.92rem; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.panel { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 24px; }

/* header */
.flagbar { height: 5px; background: linear-gradient(90deg, var(--blue) 0 33.3%, #fff 33.3% 66.6%, var(--red) 66.6%); border-bottom: 1px solid var(--rule); }
.top { background: var(--sheet); border-bottom: 1px solid var(--rule); }
@media (min-width: 760px) { .top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; } }
.top-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; padding-block: 14px; }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; letter-spacing: -0.01em; }
.brand-oval { width: 24px; height: 14px; border-radius: 50%; border: 2px solid var(--blue); background: var(--red); box-shadow: inset 0 0 0 2px #fff; }
.place a { font-size: 0.9rem; font-weight: 600; text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: 2px 18px; font-size: 0.95rem; width: 100%; }
@media (min-width: 900px) { nav { width: auto; } }
nav a { color: var(--graphite); text-decoration: none; padding: 6px 0; font-weight: 500; }
nav a:hover { color: var(--ink); }
nav a[aria-current="page"] { color: var(--blue); font-weight: 700; box-shadow: inset 0 -2px 0 var(--red); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 1rem var(--font);
  padding: 13px 22px; border-radius: var(--r-md); border: 2px solid var(--blue); background: var(--blue); color: var(--on-dark);
  cursor: pointer; text-decoration: none; min-height: 50px; }
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.btn.red { background: var(--red); border-color: var(--red); }
.btn.red:hover { background: #A81C30; border-color: #A81C30; }
.btn.white { background: #fff; border-color: #fff; color: var(--blue); }
.btn.white:hover { background: var(--blue-soft); border-color: var(--blue-soft); }
.btn.ghost { background: transparent; color: var(--blue); }
.btn.ghost:hover { background: var(--blue-soft); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--graphite); padding-inline: 10px; }
.btn.quiet:hover { background: var(--rule-soft); }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* home hero */
.hero { position: relative; border-radius: 24px; overflow: hidden; color: #fff; min-height: 420px; display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(180deg, rgba(18,35,94,.35) 0%, rgba(18,35,94,.82) 55%, rgba(18,35,94,.95) 100%), var(--hero, none) center 30% / cover no-repeat, var(--blue-deep); }
.hero-in { padding: 40px 32px 28px; max-width: 640px; }
.stars { color: #fff; letter-spacing: .35em; font-size: .9rem; margin: 0 0 10px; opacity: .9; }
.hero h1 { color: #fff; margin-bottom: 14px; }
.hero .lede { color: rgba(255,255,255,.9); }
.hero .pick-label { color: #fff; }
.hero-note { color: rgba(255,255,255,.85); margin: 0; }
.hero-credit { position: absolute; right: 14px; top: 10px; margin: 0; font-size: .72rem; color: rgba(255,255,255,.75); }
.pickwrap { margin: 22px 0 18px; max-width: 360px; }
.pick-label { display: block; font-weight: 700; margin-bottom: 8px; }
.pick { width: 100%; font: 600 1rem var(--font); padding: 13px 16px; min-height: 52px; border-radius: var(--r-md); border: 1.5px solid var(--rule); background: #fff; color: var(--ink); }
.notice { background: var(--sheet); border: 1px solid var(--rule); border-left: 4px solid var(--red); border-radius: var(--r-md); padding: 16px 20px; margin: 24px 0 0; }
.notice p { margin: 0; }
.notyet { margin-top: 24px; }
.notyet h2 { margin-bottom: 10px; }

.promise { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-top: 36px; }
.promise > div { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 22px; border-top: 4px solid var(--blue); }
.promise > div:nth-child(2) { border-top-color: var(--red); }
.promise h3 { margin-bottom: 6px; }
.promise p { margin: 0; color: var(--graphite); font-size: .95rem; }

.history { margin-top: 64px; }
.history h2 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); margin-bottom: 12px; }
.hist-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 24px 0 28px; }
figure { margin: 0; }
.ph img { display: block; width: 100%; aspect-ratio: 4 / 3; max-width: 100%; object-fit: cover; border-radius: var(--r-lg); filter: grayscale(.15) contrast(1.05); }
figcaption { font-size: .85rem; color: var(--graphite); margin-top: 8px; line-height: 1.4; }
figcaption span { display: block; font-size: .75rem; opacity: .85; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 3px solid var(--blue-soft); }
.timeline li { position: relative; padding: 0 0 22px 26px; display: grid; gap: 2px; }
.timeline li::before { content: ""; position: absolute; left: -9px; top: 6px; width: 15px; height: 15px; border-radius: 50%; background: #fff; border: 3px solid var(--red); }
.timeline b { font-size: 1.2rem; font-weight: 800; color: var(--blue); }
.timeline span { color: var(--ink); }

.band { margin-top: 56px; display: grid; grid-template-columns: 1fr 1.2fr; background: var(--blue); color: #fff; border-radius: 24px; overflow: hidden; }
.band-ph img { display: block; width: 100%; height: 100%; max-width: 100%; object-fit: cover; min-height: 260px; }
.band-ph figcaption { display: none; }
.band-in { padding: 36px 32px; align-self: center; }
.band-in h2 { color: #fff; font-size: 1.9rem; margin-bottom: 10px; }
.band-in p { color: rgba(255,255,255,.88); }
@media (max-width: 640px) {
  .hero { min-height: 0; border-radius: 20px; }
  .hero-in { padding: 120px 20px 24px; }
  .hist-photos { grid-template-columns: 1fr; }
  .band { grid-template-columns: 1fr; }
  .band-ph img { min-height: 0; aspect-ratio: 16 / 9; height: auto; }
  .band-in { padding: 26px 22px; }
}

/* ovals */
.oval-static { width: 32px; height: 19px; border-radius: 50%; border: 2px solid var(--blue); display: inline-block; flex: none; background: #fff; }
.oval-static.filled { background: var(--blue); box-shadow: inset 0 0 0 3px #fff; }

/* quiz */
.progress { display: flex; gap: 5px; margin: 0 0 22px; }
.progress span { flex: 1; height: 5px; border-radius: 3px; background: var(--rule); }
.progress span.done { background: var(--blue); }
.progress span.now { background: var(--red); }
.qcard { padding: 28px 24px; }
.qcount { font-size: .95rem; color: var(--graphite); margin-bottom: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.qtopic { font-weight: 700; color: var(--blue); background: var(--blue-soft); padding: 2px 10px; border-radius: 6px; font-size: .88rem; }
.statement { font-size: clamp(1.4rem, 4.2vw, 1.85rem); font-weight: 700; line-height: 1.3; margin: 0 0 28px; }
fieldset { border: 0; padding: 0; margin: 0 0 28px; min-width: 0; }
fieldset.last { margin-bottom: 0; }
legend { font-weight: 700; margin-bottom: 12px; padding: 0; }
.scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.scale label { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; font-size: .82rem; line-height: 1.25; cursor: pointer; color: var(--graphite); padding: 12px 2px; border-radius: var(--r-md); }
.scale label:hover { background: var(--blue-soft); }
.scale input, .weight input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.oval { width: 46px; height: 27px; border-radius: 50%; border: 2px solid var(--blue); background: #fff; transition: background-color .12s ease; }
.scale input:checked + .oval { background: var(--blue); box-shadow: inset 0 0 0 3px #fff; }
.scale input:checked ~ .lbl { color: var(--ink); font-weight: 700; }
.scale input:focus-visible + .oval { outline: 3px solid var(--focus); outline-offset: 3px; }
.weight { display: flex; flex-wrap: wrap; gap: 10px; }
.weight label { cursor: pointer; }
.weight span { display: inline-block; padding: 10px 20px; border: 1.5px solid var(--rule); border-radius: var(--r-md); font-size: .95rem; min-height: 46px; line-height: 22px; background: #fff; }
.weight input:checked + span { border-color: var(--blue); background: var(--blue); color: #fff; font-weight: 700; }
.weight input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.quiz-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 20px; }

/* race sections */
.section-head { margin: 8px 0 28px; }
.section-head h1 { margin-bottom: 12px; }
.race { margin: 0 0 36px; scroll-margin-top: 90px; }
.race-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 12px; padding-bottom: 10px; border-bottom: 3px solid var(--blue); }
.race-head h2 { font-size: 1.35rem; }
.race-head .vf { font-size: .85rem; font-weight: 600; color: var(--red); }
.race-blurb { color: var(--graphite); font-size: .97rem; margin: 12px 0 16px; }
.race-note { background: var(--blue-soft); border-radius: var(--r-md); padding: 12px 16px; font-size: .95rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }

/* candidate card */
.cardx { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 10px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 20px; cursor: pointer; transition: border-color .12s ease, box-shadow .12s ease; min-width: 0; }
.cardx:hover { border-color: var(--blue); box-shadow: 0 6px 20px rgba(31,58,147,.10); }
.cardx:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.cardx-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cname { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; }
.mate { font-size: .9rem; color: var(--graphite); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.party { font-size: .85rem; font-weight: 600; color: var(--ink); }
.party[data-party] { cursor: help; border-bottom: 1.5px dotted var(--blue); }
.pmeta { font-size: .9rem; color: var(--graphite); }
.badge { font-size: .74rem; font-weight: 700; color: var(--red); background: var(--red-soft); border-radius: 5px; padding: 1px 8px; }
.badge.soft { color: var(--graphite); background: var(--rule-soft); }
.cbio { font-size: .93rem; color: var(--graphite); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.open { font-size: .9rem; font-weight: 700; color: var(--blue); margin-top: auto; }
.score { text-align: right; flex: none; }
.score b { display: block; font-size: 1.7rem; font-weight: 800; color: var(--blue); line-height: 1; }
.score span { font-size: .78rem; color: var(--graphite); }
.score.na span { display: block; max-width: 9em; font-size: .8rem; line-height: 1.3; }
.meter { height: 6px; border-radius: 3px; background: var(--rule-soft); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--blue); border-radius: 3px; }
.basis { font-size: .82rem; color: var(--graphite); margin: 0; }

/* profile dialog */
dialog.profile { border: 0; padding: 0; width: min(720px, 100vw - 24px); max-height: min(88vh, 900px); border-radius: 22px; color: var(--ink); background: var(--sheet); box-shadow: 0 24px 60px rgba(20,33,61,.28); overflow: hidden; }
dialog.profile[open] { display: flex; flex-direction: column; }
dialog.profile::backdrop { background: rgba(20,33,61,.45); }
.p-head { display: flex; justify-content: space-between; gap: 16px; padding: 24px 24px 18px; border-bottom: 1px solid var(--rule); background: linear-gradient(180deg, var(--blue-soft), #fff); }
.p-head h2 { font-size: 1.6rem; }
.p-race { margin: 8px 0 0; font-size: .9rem; color: var(--graphite); }
.p-x { all: unset; cursor: pointer; font-size: 1.6rem; line-height: 1; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: #fff; border: 1px solid var(--rule); flex: none; }
.p-x:focus-visible { outline: 3px solid var(--focus); }
.p-body { overflow-y: auto; padding: 8px 24px 28px; }
.p-body section { padding: 18px 0; border-bottom: 1px solid var(--rule-soft); }
.p-body section h3 { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--red); margin-bottom: 12px; }
.rec { margin: 12px 0 0; padding-left: 20px; }
.rec li { margin-bottom: 6px; }
.st { padding: 12px 0; border-top: 1px solid var(--rule-soft); }
.st:first-of-type { border-top: 0; padding-top: 0; }
.st h4 { color: var(--blue); margin-bottom: 4px; }
.st p { margin: 0; }
.you { margin-top: 8px !important; font-size: .9rem; background: var(--blue-soft); border-radius: 8px; padding: 8px 12px; }
.hold { margin-top: 8px !important; font-size: .85rem; color: var(--graphite); background: var(--rule-soft); border-radius: 8px; padding: 8px 12px; }
.missing { margin: 14px 0 0; font-size: .9rem; color: var(--graphite); background: var(--paper); border-radius: 10px; padding: 12px 14px; }
.explain { font-size: .9rem; color: var(--graphite); margin-top: -4px; }
.orec { border-left: 3px solid var(--red); padding: 2px 0 2px 14px; margin: 14px 0; }
.orec p { margin: 0 0 4px; }
.orec .meta { font-size: .9rem; color: var(--graphite); }
.none { color: var(--graphite); font-style: italic; }
.src { font-size: .86rem; color: var(--graphite); margin: 10px 0 0; }
details.sources { margin-top: 18px; }
details.sources summary { cursor: pointer; font-weight: 700; color: var(--blue); padding: 10px 0; }
details.sources ul { margin: 6px 0 0; padding-left: 20px; font-size: .88rem; }
details.sources li { margin-bottom: 6px; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  dialog.profile { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  .p-head, .p-body { padding-left: 18px; padding-right: 18px; }
}

/* glossary terms and popovers */
.term { all: unset; cursor: help; border-bottom: 1.5px dotted var(--blue); color: inherit; }
.term:hover { background: var(--blue-soft); }
.term:focus-visible { outline: 2px solid var(--focus); border-radius: 3px; }
.pop { position: fixed; z-index: 50; background: #fff; border: 1px solid var(--rule); border-radius: 14px; padding: 16px 40px 14px 16px; box-shadow: 0 16px 40px rgba(20,33,61,.2); font-size: .95rem; max-height: 60vh; overflow: auto; }
.pop.sheet { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); top: auto; }
.pop h4 { color: var(--blue); margin-bottom: 6px; }
.pop p { margin: 0 0 6px; }
.pop-x { all: unset; position: absolute; right: 10px; top: 8px; cursor: pointer; font-size: 1.3rem; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; }
.pop-x:hover { background: var(--rule-soft); }
.quick { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.quick b { display: block; font-size: .82rem; color: var(--blue); }

/* amendments */
.amd .race-head h2 { display: flex; flex-direction: column; gap: 4px; }
.amd-n { font-size: .85rem; font-weight: 700; color: var(--red); letter-spacing: 0; }
.amd-body { background: var(--sheet); border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); padding: 22px; }
.amd-sum { font-size: 1.05rem; }
.yn { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
.yn > div { border-radius: var(--r-md); padding: 16px; }
.yn .yes { background: var(--blue-soft); }
.yn .no { background: var(--paper); border: 1px solid var(--rule); }
.yn h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.yn p { margin: 0; }
.sub { margin: 18px 0 8px; }
.args { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.args ul { padding-left: 18px; margin: 0; }
.args li { margin-bottom: 12px; }
.args .who { display: block; font-size: .85rem; color: var(--graphite); }
@media (max-width: 600px) { .yn, .args { grid-template-columns: 1fr; } }

/* congress and glossary */
.links { padding-left: 20px; margin: 8px 0 12px; }
.links li { margin-bottom: 6px; }
.search { width: 100%; font: inherit; padding: 14px 16px; border: 1.5px solid var(--rule); border-radius: var(--r-md); background: #fff; color: var(--ink); min-height: 52px; margin-top: 8px; }
.search:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--blue-soft); }
#dlist { background: var(--sheet); border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); }
.dist { padding: 18px 22px; border-top: 1px solid var(--rule-soft); }
.dist:first-child { border-top: 0; }
.dist-h { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; }
.dist-h h3 { color: var(--blue); }
.dist-h p { margin: 0; font-size: .88rem; color: var(--graphite); }
.dist ul { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.dist li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.gl { display: grid; gap: 0; padding: 8px 24px; }
.g { padding: 16px 0; border-top: 1px solid var(--rule-soft); }
.g:first-child { border-top: 0; }
.g h3 { color: var(--blue); margin-bottom: 4px; }
.g p { margin: 0; }
.prose h3 { margin: 22px 0 6px; color: var(--blue); }
.prose h3:first-child { margin-top: 0; }

.foot { background: var(--sheet); border-top: 1px solid var(--rule); padding-block: 32px 48px; color: var(--graphite); font-size: .9rem; }
.foot a { color: var(--graphite); }

@media (max-width: 480px) {
  .qcard { padding: 22px 14px; }
  .scale label { font-size: .74rem; }
  .oval { width: 40px; height: 24px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* compare */
.cmp-link { font-size: .88rem; font-weight: 700; text-decoration: none; }
.cmp-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 16px; }
.cmp-tab { all: unset; cursor: pointer; white-space: nowrap; font-weight: 600; font-size: .92rem; padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--rule); background: #fff; color: var(--graphite); }
.cmp-tab[aria-selected="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.cmp-tab:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.cmp-pick { margin-bottom: 24px; }
.cmp-pick-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.cmp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 8px; margin-bottom: 18px; }
.cmp-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--rule); border-radius: var(--r-md); cursor: pointer; min-width: 0; }
.cmp-opt:hover { border-color: var(--blue); }
.cmp-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cmp-opt .box { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--blue); background: #fff; display: grid; place-items: center; }
.cmp-opt input:checked + .box { background: var(--blue); }
.cmp-opt input:checked + .box::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.cmp-opt input:focus-visible + .box { outline: 3px solid var(--focus); outline-offset: 2px; }
.cmp-opt:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.cmp-opt span:last-child { display: flex; flex-direction: column; min-width: 0; }
.cmp-opt small { color: var(--graphite); font-size: .82rem; }
.cmp-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.switch { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { width: 44px; height: 26px; border-radius: 13px; background: var(--rule); position: relative; transition: background .15s ease; flex: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s ease; }
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.cmp-scroll { overflow-x: auto; padding-bottom: 8px; }
.cmp-grid { display: grid; gap: 10px; min-width: 0; }
.cmp-head { position: sticky; left: 0; margin-bottom: 8px; }
.cmp-head .cmp-cell { background: var(--blue); color: #fff; border-color: var(--blue); }
.cmp-head small { display: block; opacity: .85; font-size: .82rem; }
.cmp-sec { font-size: 1.15rem; margin: 22px 0 6px; color: var(--red); }
.cmp-row { margin: 0 0 16px; }
.cmp-row h3 { font-size: 1rem; color: var(--blue); margin: 14px 0 8px; }
.cmp-cell { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 14px; font-size: .94rem; min-width: 0; }
.cmp-cell p { margin: 0 0 6px; }
.cmp-cell .rec { margin: 0; padding-left: 18px; }
.cmp-who { display: block; font-size: .76rem; font-weight: 700; color: var(--graphite); margin-bottom: 4px; }

/* report a mistake */
.report { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 20px; align-items: center; margin-top: 22px; padding: 16px 18px; border-radius: var(--r-md); background: var(--paper); border: 1px dashed var(--rule); }
.report p { margin: 2px 0 0; font-size: .92rem; color: var(--graphite); }
.report-act { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.report-act .small { margin: 0; }
.addr { user-select: all; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.copy { all: unset; cursor: pointer; font-size: .8rem; font-weight: 700; color: var(--blue); padding: 1px 6px; border-radius: 4px; border: 1px solid var(--rule); }
.copy:focus-visible { outline: 2px solid var(--focus); }

/* source links */
.srclink { display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; font-weight: 700; color: var(--blue); background: var(--blue-soft); border-radius: 999px; padding: 3px 11px; text-decoration: none; }
.srclink::after { content: "↗"; font-size: .8em; }
.srclink:hover { background: var(--blue); color: #fff; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
details.sources ul { list-style: none; padding-left: 0; }
details.sources li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 8px 0; border-top: 1px solid var(--rule-soft); margin: 0; }
details.sources li:first-child { border-top: 0; }

/* wider layout on large screens */
@media (min-width: 1100px) {
  .wrap { max-width: 1140px; }
  .hero-in { padding: 56px 48px 40px; max-width: 720px; }
  .hero { min-height: 480px; }
  .progress, .qcard, .quiz-nav { max-width: 780px; margin-left: auto; margin-right: auto; }
  .prose, .gl { max-width: 820px; }
  .history .lede, .section-head .lede { max-width: 42em; }
  .timeline { max-width: 820px; }
  .notice { max-width: none; }
}

/* contact form */
dialog.contact { width: min(620px, 100vw - 24px); }
.cform fieldset { margin: 18px 0 18px; }
.cform .pick-label { margin-top: 14px; }
.area { min-height: 140px; resize: vertical; line-height: 1.5; }
.hint { font-size: .86rem; color: var(--graphite); margin: 6px 0 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } }
.about-chip { background: var(--blue-soft); border-radius: 8px; padding: 8px 12px; font-size: .92rem; margin: 0 0 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.form-msg { min-height: 1.2em; margin: 14px 0 6px; font-size: .92rem; }
.form-msg.err { color: var(--red); font-weight: 600; }
.sent { padding: 24px 0; }
.sent h3 { color: var(--blue); font-size: 1.3rem; margin-bottom: 8px; }

/* countdown bar */
.clock { background: var(--blue-soft); color: var(--ink); font-size: .92rem; border-bottom: 1px solid var(--rule); }
.clock .wrap { padding-block: 9px; }
.clock.live { background: var(--red); color: #fff; border-bottom-color: var(--red); }
.clock.live b { color: #fff; }
.clock .t { font-variant-numeric: tabular-nums; }
.linkish { all: unset; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.linkish:focus-visible { outline: 2px solid var(--focus); }

.cmp-house { max-width: 360px; margin: -4px 0 18px; }
.house-list { margin-top: 24px; }
.house-list .dist.panel { margin-bottom: 20px; }

/* phone menu */
.menu-btn { display: none; }
@media (max-width: 759px) {
  .top-in { flex-wrap: nowrap; gap: 12px; position: relative; }
  .brand { margin-right: auto; white-space: nowrap; font-size: 1.05rem; }
  .place { font-size: .82rem; white-space: nowrap; }
  .menu-btn .menu-label { min-width: 2.6em; }
  .menu-btn { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; font-size: .92rem; color: var(--blue); padding: 8px 12px; border: 1.5px solid var(--rule); border-radius: 10px; min-height: 42px; }
  .menu-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
  .bars, .bars::before, .bars::after { display: block; width: 18px; height: 2px; background: var(--blue); border-radius: 2px; position: relative; transition: transform .15s ease, background-color .15s ease; }
  .bars::before, .bars::after { content: ""; position: absolute; left: 0; }
  .bars::before { top: -6px; } .bars::after { top: 6px; }
  .menu-btn[aria-expanded="true"] .bars { background: transparent; }
  .menu-btn[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }
  nav { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 30; flex-direction: column; gap: 0; background: var(--sheet); border-bottom: 1px solid var(--rule); box-shadow: 0 14px 30px rgba(20,33,61,.12); padding: 6px max(20px, env(safe-area-inset-right, 0px)) 12px max(20px, env(safe-area-inset-left, 0px)); }
  nav.open { display: flex; }
  nav a { padding: 14px 4px; font-size: 1.05rem; border-bottom: 1px solid var(--rule-soft); margin: 0; }
  nav a:last-child { border-bottom: 0; }
  nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--red); padding-left: 14px; }
  .top { position: relative; z-index: 20; }
}
@media (max-width: 400px) { .chg { display: none; } .top-in { gap: 10px; } .menu-btn { padding: 8px 10px; } }
