:root {
  color-scheme: light;
  --page: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --accent: #1d4ed8;
  --accent-soft: #eff6ff;
  --accent-ink: #1e40af;
  --pill-bg: #eff6ff;
  --pill-ink: #1d4ed8;
  --pill-border: #bfdbfe;
  --card-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  --sans: "Inter", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --radius: 12px;
  --max: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #0b1220;
    --surface: #111827;
    --ink: #e2e8f0;
    --muted: #94a3b8;
    --line: #1f2937;
    --accent: #60a5fa;
    --accent-soft: #0f1b33;
    --accent-ink: #93c5fd;
    --pill-bg: #0f1b33;
    --pill-ink: #93c5fd;
    --pill-border: #1e3a5f;
    --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  }
}

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

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

::selection {
  background: #dbeafe;
  color: #0f172a;
}

@media (prefers-color-scheme: dark) {
  ::selection {
    background: #1e3a5f;
    color: #e2e8f0;
  }
}

.skip {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip:focus {
  position: fixed;
  z-index: 20;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  padding: 0.6rem 0.9rem;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  box-shadow: var(--card-shadow);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.subnav-row {
  padding-top: 0;
  padding-bottom: 0.7rem;
  justify-content: flex-start;
}

@media (min-width: 900px) {
  .subnav-row {
    justify-content: flex-end;
    margin-top: -0.45rem;
  }
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.wordmark:hover .wordmark-text,
.wordmark:focus-visible .wordmark-text {
  color: var(--accent-ink);
}

.mark {
  width: 32px;
  height: 32px;
  flex: none;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  justify-content: flex-end;
}

.nav-item {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}

a.nav-item {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

a.nav-item:hover,
a.nav-item:focus-visible,
a.nav-item[aria-current="page"] {
  color: var(--accent-ink);
}

.nav-item em {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-left: 0.25rem;
  opacity: 0.85;
}

.main {
  width: min(100%, 48rem);
  margin: 0 auto;
  padding: 2rem 1.25rem 1rem;
  flex: 1;
}

.main.narrow {
  width: min(100%, 40rem);
}

.narrow .topic-grid {
  margin-top: 1.25rem;
}

.hero {
  margin-bottom: 1.75rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.35rem 0.75rem;
  background: var(--pill-bg);
  color: var(--pill-ink);
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.status-pill::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

h1 {
  margin: 1rem 0 0.75rem;
  font-size: clamp(1.85rem, 4.5vw, 2.65rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.lead {
  margin: 0;
  max-width: 34em;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1.45;
  font-weight: 450;
}

.prose {
  margin: 0 0 2.25rem;
}

.prose p,
.narrow p {
  margin: 0 0 1.05rem;
  text-wrap: pretty;
}

.prose p:last-child,
.narrow p:last-child {
  margin-bottom: 0;
}

.prose h2,
.prose h3 {
  scroll-margin-top: 1rem;
}

.prose h2 {
  margin-top: 2.1rem;
  font-size: 1.35rem;
}

.prose h3 {
  margin: 1.45rem 0 0.4rem;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.prose ul,
.prose ol {
  margin: 0 0 1.05rem;
  padding-left: 1.25rem;
}

.prose li {
  margin: 0.4rem 0;
  text-wrap: pretty;
}

.prose a {
  color: var(--accent-ink);
  font-weight: 650;
  text-underline-offset: 0.15em;
}

.prose a:hover,
.prose a:focus-visible {
  text-decoration-thickness: 2px;
}

.section-head {
  margin-bottom: 1.15rem;
}

h2 {
  margin: 0 0 0.55rem;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.means {
  margin: 0;
  color: var(--muted);
}

.means a,
.coming-next a {
  color: var(--accent-ink);
  font-weight: 650;
  text-underline-offset: 0.15em;
}

.topic-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .topic-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.topic-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem 1.15rem;
  box-shadow: var(--card-shadow);
}

.topic-label {
  margin: 0 0 0.4rem;
  color: var(--accent-ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.topic-copy {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.5;
}

.topic-title {
  margin: 0 0 0.35rem;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

a.topic-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.topic-card:hover,
a.topic-card:focus-visible {
  border-color: var(--pill-border);
}

a.topic-card:hover .topic-title,
a.topic-card:focus-visible .topic-title {
  color: var(--accent-ink);
}

.coming-next {
  margin: 2rem 0 0;
  padding: 1.2rem 1.25rem;
  background: var(--accent-soft);
  border: 1px solid var(--pill-border);
  border-radius: var(--radius);
}

.coming-next h2 {
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
}

.coming-next p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.site-footer {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.site-footer p {
  margin: 0;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.footer-nav a,
.footer-note a {
  color: var(--accent-ink);
  font-weight: 650;
  text-decoration: none;
}

.footer-nav a:hover,
.footer-nav a:focus-visible,
.footer-note a:hover,
.footer-note a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.back {
  color: var(--accent-ink);
  font-weight: 650;
  text-decoration: none;
}

.back:hover,
.back:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

@media (min-width: 800px) {
  .main {
    padding: 2.75rem 1.5rem 1.5rem;
  }

  .topbar-inner {
    padding: 0.95rem 1.5rem;
  }
}

@media (max-width: 720px) {
  .topbar-inner {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .top-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 0.15rem 0.9rem;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .topbar,
  .topic-card,
  .coming-next {
    box-shadow: none;
    background: #fff;
  }

  .site-footer,
  .means,
  .lead,
  .nav-item,
  .updated,
  .flag,
  .crumbs {
    color: #000;
  }

  .note,
  .vendor,
  .toc,
  a.topic-card,
  .checklist li {
    box-shadow: none;
    background: #fff;
  }
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.45rem;
  align-items: center;
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.crumbs a {
  color: var(--accent-ink);
  font-weight: 650;
  text-decoration: none;
}

.crumbs a:hover,
.crumbs a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.updated {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.block {
  margin-top: 2.25rem;
}

.toc {
  margin: 0 0 1.75rem;
  padding: 0.95rem 1.1rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}

.toc p {
  margin: 0 0 0.35rem;
  color: var(--accent-ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.toc ol {
  margin: 0;
  padding-left: 1.2rem;
}

.toc li {
  margin: 0.2rem 0;
}

.toc a {
  color: var(--accent-ink);
  font-weight: 650;
  text-decoration: none;
}

.toc a:hover,
.toc a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.note {
  margin: 0 0 1.5rem;
  padding: 1.2rem 1.25rem;
  background: var(--accent-soft);
  border: 1px solid var(--pill-border);
  border-radius: var(--radius);
}

.prose .note h2,
.note h2 {
  margin-top: 0;
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
}

.prose ul.checklist,
.prose ul.topic-grid {
  list-style: none;
  padding-left: 0;
}

.note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.note p + p {
  margin-top: 0.7rem;
}

.vendor {
  margin: 0 0 0.85rem;
  padding: 1.05rem 1.1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}

.vendor h3 {
  margin-top: 0;
}

.vendor p:last-child {
  margin-bottom: 0;
}

.flag {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.checklist {
  list-style: none;
  margin: 0 0 1.05rem;
  padding: 0;
}

.checklist li {
  position: relative;
  margin: 0 0 0.55rem;
  padding: 0.75rem 0.95rem 0.8rem 2.3rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0.9rem;
  top: 0.95rem;
  width: 0.75rem;
  height: 0.75rem;
  border: 2px solid var(--accent);
  border-radius: 3px;
}

.illustration {
  margin: 0 0 1.05rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink);
}

.illustration p {
  margin: 0;
}

.illustration p + p {
  margin-top: 0.7rem;
}

.prose code {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
  font-size: 0.88em;
  background: var(--accent-soft);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.prose .table-wrap table {
  width: 100%;
  min-width: 36rem;
  margin: 0;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

.prose th {
  color: var(--accent-ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--accent-soft);
}

.prose tr:last-child td {
  border-bottom: 0;
}
