/* Source Sans 3, self-hosted so visiting this site does not contact any other server. SIL Open Font License: see fonts/OFL.txt */
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/source-sans-3-latin-700-normal.woff2") format("woff2"); }

:root { --navy: #0f2c4c; --blue: #1d5fa8; --blue-soft: #eef4fb; --line: #d6dbe1; --edge: #c3cbd3; --bg: #f4f6f8; --text: #1b1f24; --muted: #55606c; --red: #b3261e; }
* { box-sizing: border-box; }
/* Accessibility helpers */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 10; background: #fff; color: var(--navy); font-weight: 700; padding: 10px 14px; border-radius: 6px; }
.skip-link:focus { top: 8px; outline: 3px solid #ffbe2e; }
main:focus, #out h2:focus { outline: none; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
body { margin: 0; font: 17px/1.5 "Source Sans 3", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; color: var(--text); background: var(--bg); }
.wrap, main { max-width: 720px; margin: 0 auto; padding: 0 16px; }
main { padding-top: 22px; padding-bottom: 40px; }

/* Top bar and page tabs */
.topbar { background: var(--navy); color: #fff; font-weight: 600; font-size: .95rem; letter-spacing: .02em; padding: 14px 0; }
.nav { background: #fff; border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; padding: 0 8px; }
.nav a { flex: 1; text-align: center; padding: 13px 4px 10px; min-height: 44px; font-size: .9rem; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; }
.nav a[aria-current=page] { color: var(--navy); border-bottom-color: var(--blue); }
.nav a:hover { color: var(--navy); }

/* Headings */
h1 { font-size: 1.75rem; line-height: 1.18; margin: 0 0 .4em; color: var(--navy); font-weight: 700; }
h2 { font-size: 1.4rem; line-height: 1.25; color: var(--navy); margin: 1.7em 0 .4em; }
h3 { font-size: 1.15rem; line-height: 1.3; color: var(--navy); margin: 0 0 .4em; }
h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1.1em 0 .3em; }
header p { margin: 0 0 .6em; }
.safe { font-size: .92rem; color: var(--muted); border-left: 4px solid var(--blue); padding: 4px 0 4px 12px; margin-top: 14px; }

/* The questions: numbered cards with big tappable answers */
form { counter-reset: q; }
fieldset { counter-increment: q; border: 1px solid var(--line); border-radius: 12px; margin: 14px 0 0; padding: 16px 16px 12px; background: #fff; min-width: 0; }
fieldset::after { content: ""; display: block; clear: both; }
legend { float: left; width: 100%; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; line-height: 1.3; color: var(--navy); padding: 0 0 4px; margin: 0; }
legend::before { content: counter(q); flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .9rem; display: flex; align-items: center; justify-content: center; }
legend + * { clear: both; }
fieldset p { margin: 14px 0 0; font-weight: 700; font-size: .92rem; color: var(--muted); }
fieldset label { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; margin: 8px 0 0; background: #fff; border: 1px solid var(--edge); border-radius: 8px; cursor: pointer; line-height: 1.35; }
fieldset label:has(input:checked) { background: var(--blue-soft); border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
fieldset label:has(input:focus-visible) { outline: 3px solid #ffbe2e; outline-offset: 2px; }
fieldset label:has(input[type=number]) { display: block; min-height: 0; padding: 0; margin: 14px 0 0; background: none; border: 0; box-shadow: none; font-weight: 600; font-size: 1rem; cursor: default; }
label[hidden], [hidden] { display: none !important; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; flex: 0 0 auto; margin: 0; accent-color: var(--blue); }
input[type=number] { display: block; width: 100%; min-height: 52px; font: inherit; font-size: 16px; font-weight: 400; padding: 10px 14px; margin-top: 6px; border: 1px solid #8f9aa5; border-radius: 8px; background: #fff; color: var(--text); }
input:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #ffbe2e; outline-offset: 2px; }
button { font: inherit; font-weight: 700; font-size: 1.1rem; min-height: 56px; padding: 14px 22px; border: 0; border-radius: 8px; background: var(--blue); color: #fff; cursor: pointer; margin-top: 10px; }
button:hover { background: var(--navy); }
form button { width: 100%; margin-top: 20px; }

/* Cards, alerts, callouts */
article, .help { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: 8px; padding: 16px; margin: 14px 0 0; }
article > :first-child, .help > :first-child { margin-top: 0; }
.urgent { background: #fdf0ef; border: 1px solid #e3a7a2; border-left: 6px solid var(--red); border-radius: 8px; padding: 16px; margin: 16px 0 0; }
.urgent h3, .urgent h2 { color: #8a1c15; font-size: 1.2rem; margin: 0 0 .4em; }
.flags { background: #fff9e8; border: 1px solid #ecd48a; border-left: 6px solid #8a6a00; border-radius: 8px; padding: 14px 16px; margin: 16px 0 0; }
.warn { color: var(--red); font-weight: 700; }
.likely { font-size: .92rem; padding: 7px 12px; border-radius: 3px; margin: .3em 0 .6em; }
.likely.likely { background: #e7f4ea; border-left: 4px solid #2e7d32; }
.likely.maybe { background: #eef1f4; border-left: 4px solid #8a96a3; }
.src { font-size: .8rem; color: var(--muted); }
.src a, footer a, main a { color: var(--blue); }
ul, ol { padding-left: 1.25em; margin: .3em 0; }
li { margin: .4em 0; }

/* "Denied" page: one tap to open each reason */
details.reason { background: #fff; border: 1px solid var(--line); border-radius: 8px; margin: 10px 0 0; }
details.reason summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; padding: 12px 16px; font-weight: 700; font-size: 1.05rem; line-height: 1.3; color: var(--navy); cursor: pointer; }
details.reason summary::-webkit-details-marker { display: none; }
details.reason summary::after { content: "+"; flex: 0 0 auto; font-size: 1.6rem; line-height: 1; color: var(--blue); }
details.reason[open] summary::after { content: "\2212"; }
details.reason .body { padding: 0 16px 14px; }

footer { border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: .85rem; padding: 18px 0 28px; }

@media (max-width: 480px) {
  body { font-size: 16px; }
  main, .wrap { padding-left: 12px; padding-right: 12px; }
  .nav .wrap { padding: 0 4px; }
  h1 { font-size: 1.55rem; }
  fieldset { padding: 14px 12px 10px; }
  article, .urgent, .flags, .callout, .help { padding: 14px; }
}
@media print {
  .topbar, .nav, form, header .safe, button, footer, .skip-link { display: none !important; }
  body { background: #fff; font-size: 12.5px; }
  article, .urgent, .flags, .help, details.reason { break-inside: avoid; }
  details.reason:not([open]) > .body { display: block; }
}
