
:root {
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 10px;
  --radius-small: 6px;
  --width: 1040px;
  --brand-primary: #0256b8;
  --brand-secondary: #b85f02;
  --brand-accent: #02b864;
}

html[data-mode="light"] {
  color-scheme: light;
  --page-bg: #f8fafc;
  --panel-bg: #ffffff;
  --panel-bg-soft: rgba(15, 23, 42, 0.04);
  --panel-bg-hover: rgba(15, 23, 42, 0.08);
  --code-bg: #f1f5f9;
  --text: #111827;
  --text-muted: #475569;
  --text-subtle: #64748b;
  --primary: #0256b8;
  --primary-hover: #01458f;
  --primary-contrast: #ffffff;
  --link: #0256b8;
  --secondary: #b85f02;
  --accent: #027a42;
  --border: rgba(15, 23, 42, 0.14);
  --border-muted: rgba(15, 23, 42, 0.08);
  --shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
  --focus-ring: 0 0 0 3px rgba(2, 86, 184, 0.3);
  --hero-bg: linear-gradient(135deg, rgba(2, 86, 184, 0.09) 0%, rgba(184, 95, 2, 0.07) 100%);
  --notice-bg: rgba(184, 95, 2, 0.08);
  --notice-border: rgba(184, 95, 2, 0.35);
  --ok: #027a42;
  --bad: #b42318;
}

html[data-mode="dark"] {
  color-scheme: dark;
  --page-bg: #0b1120;
  --panel-bg: #111827;
  --panel-bg-soft: rgba(255, 255, 255, 0.04);
  --panel-bg-hover: rgba(255, 255, 255, 0.08);
  --code-bg: #0f172a;
  --text: #f9fafb;
  --text-muted: #cbd5e1;
  --text-subtle: #94a3b8;
  /* The brand blue fails WCAG AA on these backgrounds; this one passes. */
  --primary: #5aa7ff;
  --primary-hover: #8cc2ff;
  --primary-contrast: #06111f;
  --link: #5aa7ff;
  --secondary: #f0a14f;
  --accent: #3ddc97;
  --border: rgba(148, 163, 184, 0.26);
  --border-muted: rgba(148, 163, 184, 0.14);
  --shadow: 0 14px 32px rgba(0, 0, 0, 0.34);
  --focus-ring: 0 0 0 3px rgba(90, 167, 255, 0.4);
  --hero-bg: linear-gradient(135deg, rgba(90, 167, 255, 0.1) 0%, rgba(240, 161, 79, 0.07) 100%);
  --notice-bg: rgba(240, 161, 79, 0.08);
  --notice-border: rgba(240, 161, 79, 0.35);
  --ok: #3ddc97;
  --bad: #ff8a80;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--primary); color: var(--primary-contrast); }

a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-small); }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; letter-spacing: -0.01em; color: var(--text); }
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; }
h2 { font-size: 1.5rem; font-weight: 700; margin-top: 2.2em; }
h3 { font-size: 1.1rem; font-weight: 650; margin-top: 1.6em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.4em; }
li { margin: 0.3em 0; }
li::marker { color: var(--text-subtle); }
strong { font-weight: 650; }
hr { border: 0; border-top: 1px solid var(--border-muted); margin: 2.5em 0; }

code {
  font: 0.9em var(--mono);
  background: var(--code-bg);
  border: 1px solid var(--border-muted);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}
pre {
  font: 0.88rem/1.6 var(--mono);
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1em 1.2em;
  overflow-x: auto;
  margin: 0 0 1.2em;
}
pre code { background: none; border: 0; padding: 0; font-size: inherit; }

table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.55em 0.8em; border-bottom: 1px solid var(--border-muted); vertical-align: top; }
th { font-weight: 650; color: var(--text-muted); border-bottom-color: var(--border); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: var(--panel-bg); padding: 0.4em 0.8em; z-index: 10; }

.wrap { max-width: var(--width); margin: 0 auto; padding: 0 16px; }

/* == Header ================================================================ */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--page-bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-muted);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--text); text-decoration: none; font-size: 1.05rem; }
.logo:hover { text-decoration: none; }
.logo svg { flex: none; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  color: var(--text-muted); text-decoration: none; font-size: 0.93rem; font-weight: 550;
  padding: 6px 10px; border-radius: var(--radius-small);
}
.nav a:hover { background: var(--panel-bg-hover); color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); background: var(--panel-bg-soft); }

.mode-toggle {
  appearance: none; -webkit-appearance: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex: none;
  background: var(--panel-bg); color: var(--text-muted);
  border: 1px solid var(--border); border-radius: var(--radius-small);
  cursor: pointer; font: inherit; padding: 0;
}
.mode-toggle:hover { color: var(--text); background: var(--panel-bg-hover); }
.mode-toggle svg { width: 18px; height: 18px; }
html[data-mode="light"] .mode-toggle .moon, html[data-mode="dark"] .mode-toggle .sun { display: none; }

@media (max-width: 720px) {
  .site-header .wrap { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .nav { order: 3; width: 100%; margin-left: -10px; }
  .mode-toggle { margin-left: auto; }
}

/* == Content =============================================================== */
main { padding: 48px 0 72px; }
.prose { max-width: 760px; }
.lead { font-size: 1.15rem; color: var(--text-muted); max-width: 680px; }
.muted { color: var(--text-muted); }
.small { font-size: 0.9rem; }

.hero { background: var(--hero-bg); border-bottom: 1px solid var(--border-muted); padding: 72px 0 64px; }
.hero h1 span { color: var(--primary); }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--secondary); margin-bottom: 14px; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.button {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 0.97rem var(--font); text-decoration: none;
  padding: 11px 18px; border-radius: var(--radius-small);
  border: 1px solid transparent; cursor: pointer;
}
.button:hover { text-decoration: none; }
.button.primary { background: var(--primary); color: var(--primary-contrast); }
.button.primary:hover { background: var(--primary-hover); }
.button.ghost { background: var(--panel-bg); color: var(--text); border-color: var(--border); }
.button.ghost:hover { background: var(--panel-bg-hover); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; margin-top: 28px; }
.card {
  background: var(--panel-bg); border: 1px solid var(--border-muted); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; font-size: 1.02rem; }
.card p { color: var(--text-muted); margin: 0; font-size: 0.95rem; }
.card .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 2px; }

.notice {
  background: var(--notice-bg); border: 1px solid var(--notice-border); border-radius: var(--radius);
  padding: 14px 18px; margin: 0 0 1.4em; color: var(--text);
}
.notice strong { color: var(--secondary); }
.hero-notice { max-width: 680px; margin-top: 28px; }
.hero-notice .notice { margin: 0; }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding-left: 44px; margin: 0 0 1.4em; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary); color: var(--primary-contrast); font-weight: 700; font-size: 0.9rem;
}

details { border: 1px solid var(--border-muted); border-radius: var(--radius); background: var(--panel-bg); margin: 0 0 10px; }
summary { cursor: pointer; padding: 12px 16px; font-weight: 600; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; display: inline-block; width: 1.2em; color: var(--primary); font-weight: 700; }
details[open] summary::before { content: "\2212"; }
details > :not(summary) { padding: 0 16px; }

.result { text-align: center; padding: 40px 0; }
.result .icon { width: 56px; height: 56px; margin: 0 auto 18px; }
.result .actions { justify-content: center; }
.result .ok { color: var(--ok); }
.result .bad { color: var(--bad); }

/* == Footer ================================================================ */
.site-footer { border-top: 1px solid var(--border-muted); padding: 28px 0 40px; color: var(--text-subtle); font-size: 0.9rem; }
.site-footer .wrap { display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between; }
.site-footer a { color: var(--text-muted); }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }

@media (prefers-reduced-motion: no-preference) {
  .button, .nav a, .mode-toggle { transition: background-color 0.15s, color 0.15s; }
}
