/* Body text is 1rem on a 125% root, so 20px at a typical browser default.
   Atkinson Hyperlegible is a low-vision typeface from the Braille Institute. */

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fffaf3;
  --ink: #1c140e;
  --ink-soft: #3f342b;
  --paper: #ffffff;
  --band: #f3e6d0;
  --link: #08448a;
  --visited: #6d1d55;
  --signal: #8e1c11;
  --signal-bright: #d23a28;
  --focus: #08448a;
  --header-bg: #1c140e;
  --header-fg: #fffaf3;
  --stop-bg: #fde7e1;
  --stop-ink: #5c100c;
  --warn-bg: #fff1cc;
  --warn-ink: #3f2c00;
  --ok-bg: #e3f3e8;
  --ok-ink: #0d3320;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #14120f;
  --ink: #fffaf3;
  --ink-soft: #f0e6d6;
  --paper: #221f1b;
  --band: #2a241c;
  --link: #ffd27a;
  --visited: #f0b7dd;
  --signal: #ffb4a8;
  --signal-bright: #d23a28;
  --focus: #ffd27a;
  --header-bg: #fffaf3;
  --header-fg: #1c140e;
  --stop-bg: #3d1410;
  --stop-ink: #ffe8e2;
  --warn-bg: #3a2e10;
  --warn-ink: #fff3d0;
  --ok-bg: #123224;
  --ok-ink: #d9f5e4;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 125%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible", "Verdana", "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, li, figcaption, blockquote {
  text-wrap: pretty;
}

h1, h2, h3 {
  line-height: 1.2;
  text-wrap: balance;
  font-weight: 700;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin: 0 0 0.6rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); margin: 2rem 0 0.6rem; }
h3 { font-size: 1.35rem; margin: 1.4rem 0 0.4rem; }

p, li, a, figcaption, dd { overflow-wrap: break-word; }
p, ul, ol, figure, blockquote, table { margin: 0 0 1rem; }
ul, ol { padding-left: 1.4rem; }
li + li { margin-top: 0.35rem; }
li::marker { color: var(--signal); }
.staff-card li::marker { color: currentColor; }
dt { margin-top: 0.45rem; }
dd { margin: 0 0 0.85rem; }

a {
  color: var(--link);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.16em;
}

a:visited { color: var(--visited); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

img, svg { max-width: 100%; height: auto; }

button, input, select, textarea { font: inherit; color: inherit; }

.skip {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  transform: translateY(-200%);
  background: var(--bg);
  color: var(--ink);
  padding: 0.7rem 1rem;
  z-index: 5;
  font-weight: 700;
}

.skip:focus { transform: none; }

.wrap {
  width: min(100% - 2.5rem, 72rem);
  margin-inline: auto;
}

.site-header {
  background: var(--header-bg);
  color: var(--header-fg);
  --focus: #ffd27a;
}

[data-theme="dark"] .site-header { --focus: #08448a; }

.header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.9rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--header-fg);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.15;
  min-width: 0;
  flex: 1 1 12rem;
}

.brand:visited { color: var(--header-fg); }

.mark { width: 3rem; height: 3rem; flex: none; display: block; }
.mark .paper { fill: currentColor; }
.mark .cut { fill: var(--header-bg); }
.mark .hot { fill: var(--signal-bright); }

.header-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.theme-toggle,
.nav-toggle {
  display: none;
  min-height: 3rem;
  padding: 0.45rem 0.85rem;
  background: var(--header-fg);
  color: var(--header-bg);
  border: 3px solid var(--header-fg);
  font-weight: 700;
  cursor: pointer;
}

.js .theme-toggle,
.js .nav-toggle { display: inline-flex; align-items: center; }

@media (min-width: 64rem) {
  .js .nav-toggle { display: none; }
}

.theme-toggle:hover,
.nav-toggle:hover,
.theme-toggle:focus-visible,
.nav-toggle:focus-visible {
  background: transparent;
  color: var(--header-fg);
}

.when-dark { display: none; }
[data-theme="dark"] .when-light { display: none; }
[data-theme="dark"] .when-dark { display: inline; }

.square-rule {
  display: flex;
  gap: 0.45rem;
  overflow: hidden;
  padding: 0 0 0.85rem;
}

.square-rule span {
  width: 0.72rem;
  height: 0.72rem;
  background: var(--header-fg);
  flex: none;
}

.square-rule span:nth-child(4n) { background: var(--signal-bright); }

#site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0 0 1rem;
}

#site-nav li,
.footer-nav li {
  margin: 0;
}

#site-nav a {
  color: var(--header-fg);
  font-weight: 700;
}

#site-nav a:visited { color: var(--header-fg); }

#site-nav a[aria-current="page"] { text-decoration-thickness: 3px; }

@media (max-width: 63.99rem) {
  .js #site-nav.nav-closed { display: none; }
  #site-nav a {
    display: block;
    padding: 0.7rem 0;
    font-size: 1.15rem;
    border-top: 2px solid var(--header-fg);
  }
}

@media (min-width: 64rem) {
  #site-nav ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 1.25rem;
    padding-bottom: 1.1rem;
  }
  #site-nav a {
    display: inline-block;
    line-height: 1.2;
    padding: 0.2rem 0 0.28rem;
    text-decoration: none;
    border-bottom: 3px solid transparent;
  }
  #site-nav a[aria-current="page"] {
    border-bottom-color: var(--header-fg);
    text-decoration: none;
  }
}

main { padding: 1.6rem 0 3rem; }

.kicker {
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.lede {
  font-size: 1.25rem;
  max-width: 38rem;
}

.hero {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2rem;
}

@media (min-width: 60rem) {
  .hero { grid-template-columns: 1.25fr 0.75fr; }
}

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.2rem 0 0; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.65rem 1.1rem;
  background: var(--ink);
  color: var(--bg);
  border: 3px solid var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.button:visited { color: var(--bg); }

.button:hover,
.button:focus-visible {
  background: transparent;
  color: var(--ink);
}

.button-secondary { background: transparent; color: var(--ink); }
.button-secondary:visited { color: var(--ink); }
.button-secondary:hover,
.button-secondary:focus-visible { background: var(--ink); color: var(--bg); }

.hero-panel {
  background: var(--ink);
  color: var(--bg);
  padding: 1.25rem;
  --header-bg: var(--ink);
  color: var(--bg);
}

.hero-panel .mark {
  width: 7.5rem;
  height: 7.5rem;
  color: var(--bg);
  margin-bottom: 0.8rem;
}

.hero-panel p { margin: 0; font-weight: 700; font-size: 1.15rem; }

.measure { max-width: 40rem; }
.measure-wide { max-width: 46rem; }

.band {
  background: var(--band);
  padding: 0.4rem 1.15rem 1.3rem;
  margin: 2rem 0;
}

.cards {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 48rem) {
  .cards { grid-template-columns: 1fr 1fr; }
}

.card {
  background: var(--paper);
  color: var(--ink);
  border: 3px solid var(--ink);
  padding: 1rem 1.05rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.card p { margin: 0; flex: 1; }
.card a { font-weight: 700; }

.card-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6rem;
  min-height: 2.2rem;
  padding: 0 0.4rem;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  margin: 0 0 0.4rem;
}

.record { list-style: none; padding: 0; margin: 1rem 0 0; }
.record li {
  border-top: 3px solid var(--ink);
  padding: 0.9rem 0;
}
.record li:last-child { border-bottom: 3px solid var(--ink); }
.record h3 { margin-top: 0; }
.dateline { font-weight: 700; margin: 0 0 0.3rem; }

blockquote {
  margin: 1.1rem 0;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 0.45rem solid var(--signal);
  font-size: 1.3rem;
  line-height: 1.35;
}

blockquote p { margin: 0; }
blockquote footer { margin-top: 0.55rem; font-size: 1rem; font-weight: 700; }

.table-hint { font-weight: 700; }
.table-wrap { overflow-x: auto; margin-bottom: 1rem; max-width: 100%; }
table { width: 100%; min-width: 36rem; border-collapse: collapse; }
caption {
  text-align: left;
  font-weight: 700;
  margin-bottom: 0.5rem;
  caption-side: top;
}
th, td {
  border: 2px solid var(--ink);
  padding: 0.7rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
th { background: var(--ink); color: var(--bg); }

.url-lesson {
  background: var(--paper);
  border: 3px solid var(--ink);
  padding: 1rem;
}
.url-line {
  font-weight: 700;
  overflow-wrap: anywhere;
  padding: 0.55rem 0.7rem;
  background: var(--band);
}
.url-host { text-decoration: underline; text-decoration-thickness: 3px; }
.url-bad { background: var(--stop-bg); color: var(--stop-ink); }

.callout {
  border: 3px solid var(--ink);
  background: var(--paper);
  padding: 1rem 1.1rem;
  margin: 1rem 0;
}
.callout > :last-child { margin-bottom: 0; }
.callout-stop { background: var(--stop-bg); color: var(--stop-ink); border-color: var(--signal); }
.callout-warn { background: var(--warn-bg); color: var(--warn-ink); }
.callout-ok { background: var(--ok-bg); color: var(--ok-ink); }
.callout a { color: inherit; }

.steps { padding-left: 1.4rem; }
.steps li { margin-top: 0.7rem; }

.on-page {
  background: var(--paper);
  border: 3px solid var(--ink);
  padding: 0.9rem 1rem 1rem;
  margin: 1rem 0 1.5rem;
}
.on-page ol { margin: 0.4rem 0 0; }

.staff-card {
  background: var(--ink);
  color: var(--bg);
  padding: 1.1rem 1.2rem;
  margin: 1rem 0;
}
.staff-card h2, .staff-card h3 { margin-top: 0; }
.staff-card a { color: var(--bg); }

.source-list { padding: 0; list-style: none; }
.source-list li {
  border-top: 2px solid var(--ink);
  padding: 0.85rem 0;
}
.source-list a { overflow-wrap: anywhere; font-weight: 700; }
.source-list p { margin: 0.3rem 0 0; }

details {
  border-top: 3px solid var(--ink);
  padding: 0.2rem 0;
}
details:last-of-type { border-bottom: 3px solid var(--ink); }
summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.2rem;
  padding: 0.85rem 0;
}
summary:focus-visible { outline-offset: 2px; }
details p, details ul { max-width: 42rem; }

.check-layout { display: grid; gap: 1.25rem; }
@media (min-width: 64rem) {
  .check-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.8fr);
    align-items: start;
  }
  .verdict-slot { position: sticky; top: 1rem; }
}

fieldset {
  border: 3px solid var(--ink);
  margin: 0 0 1rem;
  padding: 0.8rem 0.9rem 1rem;
  min-width: 0;
}
legend { font-weight: 700; font-size: 1.25rem; padding: 0 0.3rem; }
.help { margin-top: 0.2rem; color: var(--ink-soft); }

.choice {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-top: 0.6rem;
  padding: 0.8rem 0.85rem;
  border: 3px solid var(--ink);
  background: var(--paper);
  cursor: pointer;
}
.choice input {
  appearance: none;
  width: 1.45rem;
  height: 1.45rem;
  margin: 0.2rem 0 0;
  flex: none;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  display: grid;
  place-items: center;
}
.choice input::before {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: transparent;
}
.choice:has(input:checked) input {
  border-color: var(--bg);
  background: var(--bg);
}
.choice:has(input:checked) input::before {
  background: var(--ink);
}
.choice:has(input:checked) {
  background: var(--ink);
  color: var(--bg);
}
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }

.check-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.check-actions button,
.verdict-slot {
  border: 3px solid var(--ink);
}
.check-actions button {
  min-height: 3.25rem;
  padding: 0.55rem 1rem;
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}
.check-actions button:hover,
.check-actions button:focus-visible {
  background: var(--ink);
  color: var(--bg);
}

.verdict-slot {
  background: var(--paper);
  padding: 1rem 1.05rem;
}
.verdict-slot h2 { margin-top: 0; }
.verdict-slot :last-child { margin-bottom: 0; }

.mobile-status {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  background: var(--ink);
  color: var(--bg);
  padding: 0.7rem 1rem;
  border-top: 4px solid var(--signal-bright);
  gap: 0.35rem 1rem;
}
.mobile-status p { margin: 0; font-weight: 700; }
.mobile-status a { color: var(--bg); font-weight: 700; }

@media (max-width: 63.99rem) {
  .js .mobile-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .js .page-check { padding-bottom: 6.5rem; scroll-padding-bottom: 6.5rem; }
}

.site-footer {
  background: var(--header-bg);
  color: var(--header-fg);
  padding: 1.4rem 0 1.8rem;
  --focus: #ffd27a;
}
[data-theme="dark"] .site-footer { --focus: #08448a; }
.site-footer a { color: var(--header-fg); font-weight: 700; }
.site-footer a:visited { color: var(--header-fg); }
.footer-nav { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; }
.footer-note { max-width: 44rem; font-size: 1.05rem; }

@media (prefers-contrast: more) {
  a { text-decoration-thickness: 3px; }
  .card, .choice, .callout, fieldset, .button { border-width: 4px; }
}

@media (forced-colors: active) {
  .choice input { border: 3px solid ButtonText; background: ButtonFace; }
  .choice:has(input:checked) input::before { background: ButtonText; }
}

@media print {
  .site-header, .site-footer, .theme-toggle, .nav-toggle, .mobile-status, .skip, .actions { display: none !important; }
  body, .hero-panel, .staff-card { background: #fff !important; color: #000 !important; }
  a { color: #000 !important; }
  .hero-panel, .staff-card { border: 2px solid #000; }
}
