:root {
  --bg: #fbfaf7;
  --panel: #ffffff;
  --text: #172033;
  --muted: #4b5874;
  --brand: #214e8a;
  --brand-2: #0f766e;
  --accent: #f4c95d;
  --border: #d7dde8;
  --focus: #ffbf47;
  --shadow: 0 12px 30px rgba(23, 32, 51, 0.10);
  --radius: 18px;
  --max: 1120px;
  --font-size: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Atkinson Hyperlegible, Arial, Helvetica, sans-serif;
  font-size: var(--font-size);
  line-height: 1.65;
}
body.large-text { --font-size: 21px; }
body.extra-large-text { --font-size: 24px; }
body.high-contrast { --bg: #000; --panel: #111; --text: #fff; --muted: #f2f2f2; --brand: #8fd3ff; --brand-2: #9fffdc; --accent: #ffdd00; --border: #fff; --shadow: none; }
body.greyscale { filter: grayscale(100%); }
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }

.skip-link {
  position: absolute; left: 1rem; top: -5rem; z-index: 1000;
  background: var(--accent); color: #000; padding: .75rem 1rem; border-radius: .5rem;
}
.skip-link:focus { top: 1rem; outline: 3px solid #000; }

header.site-header { background: var(--panel); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.header-inner { max-width: var(--max); margin: 0 auto; padding: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.logo { color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: .6rem; }
.logo-mark { width: 34px; height: 34px; border-radius: 12px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); display: inline-block; }
nav ul { list-style: none; display: flex; gap: .4rem; padding: 0; margin: 0; flex-wrap: wrap; }
nav a { color: var(--text); text-decoration: none; padding: .55rem .8rem; border-radius: 999px; font-weight: 700; }
nav a[aria-current="page"], nav a:hover { background: #e8f0fb; color: #123d72; }
body.high-contrast nav a[aria-current="page"], body.high-contrast nav a:hover { background: #fff; color: #000; }

main { max-width: var(--max); margin: 0 auto; padding: 1.25rem; }
.hero { padding: clamp(2rem, 6vw, 5rem) 0; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 2rem; align-items: center; }
.eyebrow { color: var(--brand-2); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; }
h1, h2, h3 { line-height: 1.18; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 4.5rem); margin: .3rem 0 1rem; }
h2 { font-size: clamp(1.65rem, 3vw, 2.4rem); margin-top: 2.5rem; }
h3 { font-size: 1.25rem; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 72ch; }
.card, .hero-card, .notice { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; }
.hero-card { border-top: 8px solid var(--accent); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card h3 { margin-top: 0; }
ul.checks { padding-left: 1.1rem; }
ul.checks li { margin: .45rem 0; }

.button-row { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.2rem; }
.button { display: inline-block; background: var(--brand); color: #fff; padding: .8rem 1rem; border-radius: 12px; text-decoration: none; font-weight: 800; border: 2px solid transparent; }
.button.secondary { background: var(--panel); color: var(--brand); border-color: var(--brand); }
.button:hover { transform: translateY(-1px); }
body.high-contrast .button { background: #fff; color: #000; border-color: #fff; }
body.high-contrast .button.secondary { background: #000; color: #fff; border-color: #fff; }

.accessibility-panel { margin: 1rem 0 2rem; background: #eef7f6; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
body.high-contrast .accessibility-panel { background: #111; }
.controls { display: flex; flex-wrap: wrap; gap: .65rem; }
.controls button { font: inherit; font-weight: 800; padding: .65rem .8rem; border-radius: 10px; border: 2px solid var(--brand); background: var(--panel); color: var(--brand); cursor: pointer; }
.controls button[aria-pressed="true"] { background: var(--brand); color: #fff; }
:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }

.page-title { padding: 2rem 0 1rem; border-bottom: 1px solid var(--border); margin-bottom: 1.25rem; }
.breadcrumb { font-size: .95rem; color: var(--muted); }
.breadcrumb a { color: var(--brand); }
.external::after { content: " ↗"; }
footer { margin-top: 3rem; border-top: 1px solid var(--border); background: var(--panel); }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 1.25rem; color: var(--muted); font-size: .95rem; }

@media (max-width: 820px) {
  .hero, .grid, .grid.two { grid-template-columns: 1fr; }
  header.site-header { position: static; }
  nav ul { width: 100%; }
  nav a { display: block; }
}
