:root {
  --bg: #f6f7f9;
  --band: #eef1f6;
  --card: #ffffff;
  --text: #1c2430;
  --muted: #566173;
  --accent: #1f5eff;
  --accent-text: #ffffff;
  --border: #d5dae2;
  --error: #b3261e;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161c;
    --band: #171d26;
    --card: #1b212a;
    --text: #e8ecf2;
    --muted: #a3aebd;
    --accent: #6b97ff;
    --accent-text: #0b1020;
    --border: #2d3644;
    --error: #ff8a80;
  }
}
html.hc {
  --bg: #000;
  --band: #000;
  --card: #000;
  --text: #fff;
  --muted: #fff;
  --accent: #ffe600;
  --accent-text: #000;
  --border: #fff;
  --error: #ff9a9a;
}
html[data-size="1"] { font-size: 112.5%; }
html[data-size="2"] { font-size: 125%; }
html[data-size="3"] { font-size: 150%; }
html.ul a { text-decoration: underline; }

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
}
img { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
main:focus { outline: none; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.section { padding-top: 40px; padding-bottom: 40px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead { font-size: 1.125rem; color: var(--muted); margin-top: 0; }
h1 { font-size: 2.1rem; line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 1.5rem; line-height: 1.3; margin: 0 0 12px; }
h3 { font-size: 1.125rem; margin: 0 0 6px; }

.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  background: var(--accent);
  color: var(--accent-text);
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { top: 8px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
  text-decoration: none;
}
.site-nav { margin-inline-start: auto; }
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}
.site-nav a:hover { background: var(--band); }
.site-nav a[aria-current="page"] { font-weight: 700; box-shadow: inset 0 -3px 0 var(--accent); border-radius: 0; }
.a11y-btn, .nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
  font: inherit;
  font-size: .9rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.a11y-btn:hover, .nav-toggle:hover { background: var(--band); }
.nav-toggle { display: none; }
.a11y-panel { background: var(--band); border-top: 1px solid var(--border); }
.a11y-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 12px; padding-bottom: 12px; }
.a11y-group { display: inline-flex; align-items: center; gap: 8px; }
.a11y-label { font-weight: 600; font-size: .9rem; }
.a11y-panel button {
  margin: 0;
  padding: 8px 14px;
  font: inherit;
  font-size: .9rem;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.a11y-panel button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.a11y-link { font-size: .9rem; margin-inline-start: auto; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 40px;
  align-items: start;
  padding-top: 48px;
  padding-bottom: 48px;
}
.ticks { list-style: none; padding: 0; margin: 20px 0 0; }
.ticks li { padding-inline-start: 28px; position: relative; margin: 8px 0; }
.ticks li::before {
  content: "";
  position: absolute;
  inset-inline-start: 4px;
  top: .45em;
  width: 7px;
  height: 12px;
  border: solid var(--accent);
  border-width: 0 3px 3px 0;
  transform: rotate(40deg);
}

/* Cards and forms */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.form-card { margin: 0 0 16px; }
.form-card h2 { font-size: 1.25rem; }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
textarea, input, select {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}
textarea { resize: vertical; }
.btn, button.btn {
  display: inline-block;
  margin-top: 16px;
  padding: 11px 22px;
  font: inherit;
  font-weight: 600;
  color: var(--accent-text);
  background: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}
.btn.secondary { color: var(--text); background: transparent; border-color: var(--border); margin-inline-start: 8px; }
.btn:disabled { opacity: .6; cursor: default; }
.error { color: var(--error); font-weight: 600; }
.note { color: var(--muted); font-size: .9rem; }

/* Sections */
.band { background: var(--band); padding: 40px 0; }
.band .container > h2, .band .narrow > h2 { margin-bottom: 16px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps li {
  counter-increment: step;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.steps li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--accent-text);
  background: var(--accent);
  border-radius: 50%;
}
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.cols { columns: 2; padding-inline-start: 20px; }
.cols li { margin-bottom: 6px; }
.article-card h3 a { color: var(--text); text-decoration: none; }
.article-card h3 a:hover { color: var(--accent); text-decoration: underline; }
.article-card p { margin: 6px 0; }

details { border: 1px solid var(--border); border-radius: 10px; background: var(--card); padding: 12px 16px; margin: 10px 0; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 8px 0 0; color: var(--muted); }

/* Articles and legal text */
.prose { max-width: 760px; }
.prose h1 { margin-bottom: 8px; }
.prose h2 { margin-top: 32px; }
.prose p, .prose li { font-size: 1.0625rem; }
.prose li { margin: 6px 0; }
.prose code, code { background: var(--band); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.crumbs { margin: 0 0 12px; }
.cta { margin-top: 40px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--card); padding: 32px 0 24px; margin-top: 24px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px 20px; flex-wrap: wrap; }
.site-footer .small { margin-top: 20px; }

/* Responsive */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 28px; }
  .grid-3, .steps { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .cols { columns: 1; }
  h1 { font-size: 1.7rem; }
  .nav-toggle { display: inline-flex; margin-inline-start: auto; }
  .site-nav { display: none; width: 100%; margin: 0; order: 5; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; }
  .a11y-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .a11y-link { margin-inline-start: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
