:root {
  --bg: #f8f9fc;
  --bg-soft: #eef1f7;
  --surface: #ffffff;
  --border: #dde3ee;
  --border-strong: #c5cfe0;
  --text: #141820;
  --text-soft: #4a5568;
  --text-muted: #7a8699;
  --accent: #1e4d7a;
  --accent-soft: #e4edf6;
  --accent-ink: #153a5c;
  --highlight: #fde9c8;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(20, 30, 50, 0.05);
  --shadow-md: 0 6px 24px -10px rgba(20, 30, 50, 0.14);
  --max-width: 1100px;
  --font-sans:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-serif:
    "Newsreader", "Source Serif Pro", "Iowan Old Style", "Apple Garamond",
    Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1117;
    --bg-soft: #151a24;
    --surface: #1a2030;
    --border: #2a3344;
    --border-strong: #3a465c;
    --text: #eef2f8;
    --text-soft: #b8c4d4;
    --text-muted: #7d8da3;
    --accent: #7eb3e8;
    --accent-soft: #1a2a3d;
    --accent-ink: #b8d4f0;
    --highlight: #3d3420;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  z-index: 100;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}

.brand-name {
  font-size: 17px;
}

.header-nav a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
}
.header-nav a:hover {
  color: var(--text);
  background: var(--bg-soft);
}

.hero {
  padding: 72px 0 40px;
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: 999px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  font-weight: 500;
}

.lede {
  max-width: 62ch;
  font-size: 1.125rem;
  color: var(--text-soft);
  margin: 0 0 24px;
}

.lede strong {
  color: var(--text);
  font-weight: 600;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}
.meta strong {
  color: var(--text-soft);
  font-weight: 500;
}
.meta .dot {
  color: var(--border-strong);
}

.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 56px;
  padding: 56px 0 80px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 88px;
  align-self: start;
  font-size: 14px;
  padding-right: 8px;
  border-right: 1px solid var(--border);
}

.toc-title {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: section;
}

.toc li {
  counter-increment: section;
  margin: 0;
}

.toc a {
  display: block;
  padding: 6px 8px 6px 28px;
  position: relative;
  color: var(--text-soft);
  text-decoration: none;
  border-radius: var(--radius-sm);
  line-height: 1.4;
  transition: color 0.15s ease, background 0.15s ease;
}

.toc a::before {
  content: counter(section, decimal-leading-zero);
  position: absolute;
  left: 8px;
  top: 6px;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
}

.toc a:hover {
  color: var(--text);
  background: var(--bg-soft);
}

.content {
  min-width: 0;
}

.content section {
  padding: 28px 0;
  border-top: 1px solid var(--border);
}
.content section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.content h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.65rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  scroll-margin-top: 90px;
}

.content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 24px 0 8px;
  letter-spacing: -0.005em;
}

.content p {
  margin: 0 0 14px;
  color: var(--text-soft);
  max-width: 70ch;
}

.content p strong,
.content li strong {
  color: var(--text);
  font-weight: 600;
}

.content a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.content a:hover {
  color: var(--accent);
}

.content ul {
  margin: 0 0 16px;
  padding-left: 22px;
  color: var(--text-soft);
  max-width: 70ch;
}
.content ul li {
  margin-bottom: 6px;
}
.content ul li::marker {
  color: var(--accent);
}

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
}

.callout-title {
  font-family: var(--font-sans) !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-ink);
  margin: 0 0 14px !important;
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  color: var(--text-soft);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #000));
  box-shadow: inset 0 0 0 2px var(--surface);
}

.check-list li::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 8px;
  height: 4px;
  border-left: 1.6px solid #fff;
  border-bottom: 1.6px solid #fff;
  transform: rotate(-45deg);
}

.contact-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px !important;
  margin-top: 8px;
}

.contact-card h2 {
  margin-top: 0 !important;
}

.contact-line {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 14px 0 0 !important;
  padding: 14px 0 0;
  border-top: 1px dashed var(--border-strong);
}

.contact-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-line a {
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  transition: border-color 0.15s ease;
}
.contact-line a:hover {
  border-bottom-color: var(--accent);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-inner p {
  margin: 0;
}

.footer-meta {
  font-style: italic;
}

@media (max-width: 860px) {
  .hero {
    padding-top: 48px;
  }
  .layout {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 32px;
  }
  .toc {
    position: static;
    border-right: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    background: var(--surface);
  }
  .toc ol {
    columns: 2;
    column-gap: 12px;
  }
  .toc a {
    padding-left: 32px;
  }
  .content h2 {
    font-size: 1.4rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 18px;
  }
  .toc ol {
    columns: 1;
  }
  .header-nav {
    display: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .toc,
  .skip-link {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .layout {
    grid-template-columns: 1fr;
    padding: 0;
  }
  .content section {
    break-inside: avoid;
  }
}
