:root {
  /* Tier 1 — primitives (token source file for this site) */
  --pr-slate-50: #f8fafc;
  --pr-slate-200: #e2e8f0;
  --pr-slate-300: #cbd5e1;
  --pr-slate-400: #94a3b8;
  --pr-slate-500: #64748b;
  --pr-slate-600: #475569;
  --pr-slate-700: #334155;
  --pr-slate-800: #1e293b;
  --pr-slate-900: #0f172a;
  --pr-blue-50: #eff6ff;
  --pr-blue-100: #dbeafe;
  --pr-blue-400: #60a5fa;
  --pr-blue-600: #1d4ed8;
  --pr-blue-700: #1e40af;
  --pr-white: #ffffff;
  --pr-emerald-50: #ecfdf5;
  --pr-emerald-700: #047857;
  --pr-amber-50: #fffbeb;
  --pr-amber-200: #fde68a;
  --pr-amber-800: #92400e;
  --pr-rose-700: #be123c;
  --pr-gray-100: #f4f6f9;
  --pr-gray-150: #f1f5f9;

  /* Tier 2 — semantic tokens */
  --bg: var(--pr-gray-100);
  --surface: var(--pr-white);
  --surface-elevated: var(--pr-white);
  --text: var(--pr-slate-900);
  --text-secondary: var(--pr-slate-700);
  --muted: var(--pr-slate-500);
  --border: var(--pr-slate-200);
  --border-strong: var(--pr-slate-300);
  --accent: var(--pr-blue-600);
  --accent-hover: var(--pr-blue-700);
  --accent-soft: var(--pr-blue-50);
  --accent-muted: var(--pr-blue-100);
  --sidebar-bg: var(--pr-slate-900);
  --sidebar-text: var(--pr-slate-400);
  --sidebar-text-active: var(--pr-white);
  --sidebar-accent: var(--pr-blue-400);
  --sidebar-label: var(--sidebar-text);
  --success-bg: var(--pr-emerald-50);
  --success-text: var(--pr-emerald-700);
  --note-bg: var(--pr-amber-50);
  --note-border: var(--pr-amber-200);
  --note-text: var(--pr-amber-800);
  --code-bg: var(--pr-gray-150);
  --code-block-bg: var(--pr-slate-800);
  --code-block-fg: var(--pr-slate-200);
  --code-inline-fg: var(--pr-rose-700);
  --table-header-bg: var(--pr-slate-50);
  --on-inverse: var(--pr-white);
  --on-inverse-muted: var(--pr-slate-200);
  --focus-ring: var(--accent);
  --hero-gradient-start: var(--pr-white);
  --hero-gradient-mid: var(--pr-slate-50);
  --hero-gradient-end: var(--pr-blue-50);
  --overlay-light: rgba(255, 255, 255, 0.06);
  --overlay-accent: rgba(96, 165, 250, 0.12);
  --overlay-accent-strong: rgba(96, 165, 250, 0.15);
  --shadow-color: rgba(15, 23, 42, 0.05);
  --shadow-color-md: rgba(15, 23, 42, 0.06);

  /* Motion tokens */
  --duration-fast: 100ms;
  --duration-base: 180ms;
  --ease-out-momentum: cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --nav-width: 16.5rem;
  --content-max: 48rem;
  --radius: 12px;
  --shadow-sm: 0 1px 2px var(--shadow-color);
  --shadow-md: 0 4px 12px var(--shadow-color-md);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;
  --target-min: 2.75rem;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Skip link — HIG-A11Y-006 */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0.75rem;
  z-index: 100;
  padding: 0.625rem 1rem;
  background: var(--accent);
  color: var(--on-inverse);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border-radius: 0 0 8px 8px;
}

.skip-link:focus {
  top: 0;
}

:focus {
  outline: none;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.layout {
  display: grid;
  grid-template-columns: var(--nav-width) 1fr;
  min-height: 100vh;
}

/* Sidebar */
nav.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 1.5rem 1rem 2rem;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
}

nav.sidebar .brand {
  display: flex;
  align-items: center;
  min-height: var(--target-min);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.35;
  color: var(--sidebar-text-active);
  text-decoration: none;
  padding: 0 0.5rem;
  margin-bottom: 0.15rem;
}

nav.sidebar .brand:hover {
  text-decoration: none;
}

nav.sidebar .version-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sidebar-accent);
  background: var(--overlay-accent);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin: 0 0.5rem 1.25rem;
}

nav.sidebar .nav-group {
  margin-bottom: 1.35rem;
}

nav.sidebar .nav-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sidebar-label);
  padding: 0 0.5rem;
  margin-bottom: 0.4rem;
}

nav.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

nav.sidebar li {
  margin: 0.05rem 0;
}

nav.sidebar a {
  display: flex;
  align-items: center;
  min-height: var(--target-min);
  padding: 0.5rem;
  border-radius: 6px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.4;
  transition: background var(--duration-base) var(--ease-out-momentum),
    color var(--duration-base) var(--ease-out-momentum);
}

nav.sidebar a:hover {
  background: var(--overlay-light);
  color: var(--sidebar-text-active);
  text-decoration: none;
}

nav.sidebar a.active {
  background: var(--overlay-accent-strong);
  color: var(--sidebar-accent);
}

nav.sidebar .nav-divider {
  height: 1px;
  background: var(--overlay-light);
  margin: 1rem 0.5rem;
}

nav.sidebar .github-link {
  display: flex;
  align-items: center;
  min-height: var(--target-min);
  margin-top: 1rem;
  padding: 0.5rem;
  font-size: 0.8125rem;
  color: var(--sidebar-text);
  text-decoration: none;
}

nav.sidebar .github-link:hover {
  color: var(--sidebar-accent);
}

/* Main content */
main {
  padding: 0 2.5rem 4rem;
  max-width: calc(var(--content-max) + 5rem);
}

/* Hero */
.hero {
  margin: 0 -2.5rem 2.5rem;
  padding: 3.25rem 2.5rem 2.75rem;
  background: linear-gradient(
    165deg,
    var(--hero-gradient-start) 0%,
    var(--hero-gradient-mid) 45%,
    var(--hero-gradient-end) 100%
  );
  border-bottom: 1px solid var(--border);
}

.hero-eyebrow {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.85rem;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 2.875rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin: 0 0 1rem;
  max-width: 22ch;
}

.hero .lead {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 42rem;
  margin: 0 0 1.75rem;
}

.hero-differentiator {
  max-width: 42rem;
  margin: 0 0 1.75rem;
  padding: 1.375rem 1.5rem;
  background: var(--sidebar-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.differentiator-lead {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--on-inverse);
  margin: 0 0 1rem;
  line-height: 1.45;
}

.not-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.not-list li {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--on-inverse-muted);
  background: var(--overlay-light);
  border: 1px solid var(--overlay-light);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin: 0;
}

.not-list li::before {
  content: "✕ ";
  color: var(--pr-slate-400);
  font-weight: 700;
}

.differentiator-core {
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--on-inverse-muted);
  margin: 0;
}

.differentiator-core strong {
  color: var(--sidebar-accent);
}

.hero-proposition {
  margin: 0 0 1.25rem;
  max-width: 42rem;
}

.proposition-line {
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
}

.proposition-line em {
  font-style: normal;
  font-weight: 700;
}

.proposition-accent {
  color: var(--accent);
  margin-top: 0.15rem;
}

.hero-sub {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 42rem;
  margin: 0 0 1.5rem;
}

.hero-ai-note {
  padding: 1rem 1.125rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent-muted);
  border-radius: var(--radius);
  color: var(--text-secondary);
}

.hero-ai-note strong {
  color: var(--accent);
}

.pillar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
  max-width: 42rem;
}

.pillar-tags span {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  padding: 0.625rem 1.125rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background var(--duration-base) var(--ease-out-momentum),
    border-color var(--duration-base) var(--ease-out-momentum),
    color var(--duration-base) var(--ease-out-momentum);
}

.btn-primary {
  background: var(--accent);
  color: var(--on-inverse);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--on-inverse);
  text-decoration: none;
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--surface);
  color: var(--accent);
}

/* Stats row */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.125rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 0.25rem;
  line-height: 1.35;
}

/* Prominent sections */
.section-prominent {
  background: var(--surface);
  margin-left: -2.5rem;
  margin-right: -2.5rem;
  padding: 2.5rem 2.5rem 2.75rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-prominent h2 {
  font-size: clamp(1.75rem, 3vw, 2.125rem);
}

.why-close {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text);
  margin-top: 1.5rem;
}

/* Comparison grid */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 1.75rem 0 2rem;
  max-width: var(--content-max);
}

.comparison-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  padding: 1rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.comparison-item-highlight {
  background: var(--accent-soft);
  border-color: var(--accent-muted);
}

.comparison-source {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text);
}

.comparison-arrow {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1;
}

.comparison-result {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.comparison-item-highlight .comparison-source {
  color: var(--accent);
}

.comparison-item-highlight .comparison-result {
  color: var(--text);
  font-weight: 600;
}

/* Stack diagram */
.stack-diagram {
  max-width: 28rem;
  margin: 1.25rem 0 2rem;
}

.stack-layer {
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
}

.stack-layer-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-inverse);
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

.stack-layer-muted {
  background: transparent;
  border-style: dashed;
  color: var(--muted);
  font-size: 0.8125rem;
}

.stack-connector {
  width: 2px;
  height: 0.75rem;
  background: var(--border-strong);
  margin: 0 auto;
}

/* Three levels */
.levels-section {
  container-type: inline-size;
  max-width: var(--content-max);
}

.levels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@container (max-width: 40rem) {
  .levels-grid {
    grid-template-columns: 1fr;
  }
}

.level-card {
  display: flex;
  flex-direction: column;
  padding: 1.375rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration-base) var(--ease-out-momentum),
    border-color var(--duration-base) var(--ease-out-momentum),
    transform var(--duration-base) var(--ease-out-momentum);
}

.level-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  .level-card:hover {
    transform: none;
  }
}

.level-tier {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.level-stat {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.level-card p {
  font-size: 0.875rem;
  margin: 0 0 0.75rem;
  flex: 1;
}

.level-doc {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
}

/* Pipeline */
.pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 1.25rem 0 1.75rem;
  padding: 1.125rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: var(--content-max);
  box-shadow: var(--shadow-sm);
}

.pipeline-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.pipeline-item:not(:first-child)::before {
  content: "→";
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 400;
}

.pipeline-step {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.pipeline-step-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-inverse);
}

/* Layer strip */
.layer-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0 1.25rem;
  max-width: var(--content-max);
}

.layer-chip {
  flex: 1 1 auto;
  min-width: 3.5rem;
  text-align: center;
  padding: 0.5rem 0.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.layer-chip-accent {
  background: var(--accent-soft);
  border-color: var(--accent-muted);
  color: var(--accent);
}

.layers-expand {
  max-width: var(--content-max);
  margin-top: 0.5rem;
}

.layers-expand summary {
  font-size: 0.9375rem;
}

.layers-expand .layer-grid {
  margin-top: 1rem;
}

/* Start here */
.start-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: var(--content-max);
}

.start-card {
  display: flex;
  flex-direction: column;
  padding: 1.375rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration-base) var(--ease-out-momentum),
    border-color var(--duration-base) var(--ease-out-momentum);
}

.start-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.start-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
  color: var(--text);
}

.start-card p {
  font-size: 0.875rem;
  margin: 0 0 0.75rem;
  flex: 1;
}

.start-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
}

/* Journey landmarks */
.journey-landmark {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 4rem -2.5rem 2.5rem;
  padding: 1.125rem 2.5rem;
  background: var(--sidebar-bg);
  scroll-margin-top: 1.5rem;
}

.journey-num {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  background: var(--overlay-accent-strong);
  color: var(--sidebar-accent);
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 50%;
}

.journey-title {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-inverse);
}

/* Layer architecture diagram */
.layer-architecture {
  max-width: 28rem;
  margin: 1.5rem 0 2rem;
  padding: 1.5rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.arch-root {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--on-inverse);
  background: var(--accent);
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
}

.arch-connector {
  width: 2px;
  height: 0.875rem;
  background: var(--border-strong);
}

.arch-connector-wide {
  height: 1rem;
}

.arch-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  width: 100%;
  max-width: 22rem;
  position: relative;
}

.arch-split::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 3rem);
  height: 2px;
  background: var(--border-strong);
}

.arch-branch {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.arch-node {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  white-space: nowrap;
}

.arch-node-scope,
.arch-node-governance {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: none;
  padding: 0.25rem 0;
}

.arch-node-l0 {
  background: var(--note-bg);
  border-color: var(--note-border);
  color: var(--note-text);
}

.arch-node-l1-9 {
  background: var(--accent-soft);
  border-color: var(--accent-muted);
  color: var(--accent);
}

.arch-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.arch-layer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
}

.arch-layer-chip {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
}

.arch-layer-chip-accent {
  background: var(--accent-soft);
  border-color: var(--accent-muted);
  color: var(--accent);
}

/* Section structure */
.section-block {
  margin-bottom: 3.5rem;
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 3rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-divider::before,
.section-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

section h2 {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
  scroll-margin-top: 1.5rem;
}

section .section-intro {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: var(--content-max);
  margin: 0 0 1.5rem;
}

section h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 1.75rem 0 0.65rem;
  color: var(--text);
}

section p {
  margin: 0 0 1rem;
  max-width: var(--content-max);
  color: var(--text-secondary);
}

section ul,
section ol {
  max-width: var(--content-max);
  padding-left: 1.35rem;
  color: var(--text-secondary);
}

section li {
  margin: 0.35rem 0;
}

section li strong {
  color: var(--text);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration-base) var(--ease-out-momentum),
    border-color var(--duration-base) var(--ease-out-momentum);
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.card h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.card p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
}

.card a {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

/* Checklist */
.checklist {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: grid;
  gap: 0.5rem;
  max-width: var(--content-max);
}

.checklist li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0;
  font-size: 0.9375rem;
}

.checklist li::before {
  content: "";
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.1rem;
  background: var(--success-bg);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23047857'%3E%3Cpath d='M12.736 3.97a.733.733 0 0 1 1.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 0 1-1.065.02L3.217 8.384a.757.757 0 0 1 0-1.06.733.733 0 0 1 1.047 0l3.052 3.093 5.4-6.425z'/%3E%3C/svg%3E");
  background-size: 0.7rem;
  background-repeat: no-repeat;
  background-position: center;
}

/* Layer cards */
.layer-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: var(--content-max);
}

.layer-row {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  padding: 1rem 1.125rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.layer-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 8px;
}

.layer-row h3 {
  margin: 0 0 0.2rem;
  font-size: 0.9375rem;
}

.layer-row .technical {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0;
}

.layer-row .plain {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0.35rem 0 0;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
  max-width: var(--content-max);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

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

th {
  background: var(--table-header-bg);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

tr:last-child td {
  border-bottom: none;
}

td a {
  font-weight: 500;
}

.technical {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Code */
pre {
  background: var(--code-block-bg);
  color: var(--code-block-fg);
  border-radius: var(--radius);
  padding: 1.125rem 1.25rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  margin: 1rem 0;
  max-width: var(--content-max);
}

code {
  font-family: var(--mono);
  font-size: 0.84em;
  background: var(--code-bg);
  color: var(--code-inline-fg);
  padding: 0.1em 0.4em;
  border-radius: 4px;
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* Flow diagram */
.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  margin: 1rem 0;
  padding: 0;
  max-width: var(--content-max);
}

.flow-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.flow-item:not(:first-child)::before {
  content: "→";
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 400;
}

.flow-step {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Steps */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
  max-width: var(--content-max);
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1.35rem 2.75rem;
  margin: 0;
  border-left: 2px solid var(--border);
  margin-left: 0.85rem;
  color: var(--text-secondary);
}

.steps li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: -0.85rem;
  top: 0;
  width: 1.65rem;
  height: 1.65rem;
  background: var(--accent);
  color: var(--on-inverse);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--bg);
}

.steps li strong {
  color: var(--text);
}

.step-meta {
  display: block;
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* Details / FAQ */
details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.875rem 1.125rem;
  margin: 0.5rem 0;
  max-width: var(--content-max);
}

details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
  list-style: none;
  min-height: var(--target-min);
  display: flex;
  align-items: center;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::before {
  content: "+";
  display: inline-block;
  width: 1.25rem;
  color: var(--accent);
  font-weight: 700;
}

details[open] summary::before {
  content: "−";
}

details[open] summary {
  margin-bottom: 0.5rem;
}

details p {
  margin: 0;
  font-size: 0.9375rem;
}

/* Two column */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  max-width: var(--content-max);
}

@media (max-width: 640px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

/* Footer */
footer.site-footer {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  max-width: var(--content-max);
}

footer.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-bottom: 1rem;
}

footer.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

footer.site-footer a:hover {
  text-decoration: underline;
}

footer.site-footer p {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
}

/* Responsive */
@media (max-width: 900px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .comparison-grid {
    grid-template-columns: repeat(2, 1fr);
  }

}

@media (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
  }

  nav.sidebar {
    position: static;
    height: auto;
    padding: 1rem;
  }

  main {
    padding: 0 1.25rem 3rem;
  }

  .hero {
    margin: 0 -1.25rem 2rem;
    padding: 2rem 1.25rem;
  }

  .section-prominent {
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    padding: 2rem 1.25rem;
  }

  .journey-landmark {
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    padding: 1rem 1.25rem;
  }

  .arch-split {
    gap: 1.25rem;
    max-width: 100%;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .start-grid {
    grid-template-columns: 1fr;
  }

  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .comparison-item {
    flex-direction: row;
    justify-content: center;
    text-align: left;
    gap: 0.65rem;
  }

  .pipeline,
  .flow {
    justify-content: center;
  }

  .levels-grid {
    grid-template-columns: 1fr;
  }
}
