:root {
  --navy: #061d33;
  --navy-2: #0b2d48;
  --teal: #27b89d;
  --teal-bright: #58d6bd;
  --mint: #dff7f0;
  --paper: #f4f6f2;
  --white: #ffffff;
  --ink: #071d2e;
  --muted: #677883;
  --orange: #ff7b57;
  --line: rgba(7, 29, 46, 0.14);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, a { font: inherit; }
a { color: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 64px;
  padding: 0 max(22px, calc((100vw - 1380px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--white);
  background: rgba(6, 29, 51, 0.96);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.wordmark { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; font: 800 11px var(--mono); letter-spacing: 0.16em; }
.signal-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 6px rgba(39, 184, 157, 0.15); }
.topbar-actions { display: flex; gap: 8px; }
.topbar button { min-height: 38px; padding: 0 14px; color: var(--white); border: 1px solid rgba(255, 255, 255, 0.26); border-radius: 999px; background: transparent; cursor: pointer; font: 700 10px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.topbar button:hover, .topbar button:focus-visible { color: var(--navy); background: var(--teal); border-color: var(--teal); outline: none; }

.document-menu { position: fixed; inset: 64px 0 auto; z-index: 45; padding: 18px max(22px, calc((100vw - 1380px) / 2)); display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--navy); transform: translateY(-120%); transition: transform 0.24s ease; box-shadow: 0 24px 60px rgba(6, 29, 51, 0.22); }
.document-menu.open { transform: translateY(0); }
.document-menu a { padding: 18px; display: flex; align-items: baseline; gap: 13px; color: var(--white); background: rgba(255, 255, 255, 0.06); text-decoration: none; font-weight: 760; }
.document-menu a span { color: var(--teal); font: 700 9px var(--mono); }
.document-menu a:hover, .document-menu a:focus-visible, .document-menu a[aria-current="page"] { color: var(--navy); background: var(--teal); outline: none; }
.document-menu a:hover span, .document-menu a:focus-visible span, .document-menu a[aria-current="page"] span { color: var(--navy); }

main { width: min(1380px, 100%); margin: 0 auto; display: grid; grid-template-columns: 72px minmax(0, 1fr); }
.section-rail { position: sticky; top: 64px; height: calc(100vh - 64px); padding: 32px 0; border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.section-rail a { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); text-decoration: none; font: 700 9px var(--mono); transition: 0.18s ease; }
.section-rail a:hover, .section-rail a:focus-visible, .section-rail a.active { color: var(--navy); background: var(--teal); outline: none; }

article { min-width: 0; overflow: hidden; }
.document-hero { min-height: 540px; padding: clamp(58px, 8vw, 110px) clamp(28px, 7vw, 96px) 48px; color: var(--white); background: var(--navy); display: flex; flex-direction: column; justify-content: flex-end; position: relative; overflow: hidden; }
.document-hero::after { content: ""; position: absolute; width: 440px; height: 440px; right: -190px; top: -170px; border: 1px solid rgba(88, 214, 189, 0.28); border-radius: 50%; box-shadow: 0 0 0 64px rgba(39, 184, 157, 0.035), 0 0 0 130px rgba(39, 184, 157, 0.025); }
.hero-index { position: relative; z-index: 1; margin-bottom: 30px; color: var(--teal-bright); font: 800 11px var(--mono); letter-spacing: 0.18em; text-transform: uppercase; }
.document-hero h1 { position: relative; z-index: 1; max-width: 1000px; margin: 0; font-size: clamp(54px, 8vw, 122px); line-height: 0.86; letter-spacing: -0.07em; text-transform: uppercase; }
.document-hero > p { position: relative; z-index: 1; max-width: 760px; margin: 34px 0 46px; color: rgba(255, 255, 255, 0.65); font-size: clamp(18px, 2vw, 26px); line-height: 1.35; }
.hero-meta { position: relative; z-index: 1; padding-top: 18px; display: flex; flex-wrap: wrap; gap: 11px 26px; border-top: 1px solid rgba(255, 255, 255, 0.15); color: rgba(255, 255, 255, 0.56); font: 700 9px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }

.document-content { background: var(--paper); }
.document-section { display: grid; grid-template-columns: 120px minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.section-number { padding: 58px 28px; color: var(--teal); border-right: 1px solid var(--line); font: 800 12px var(--mono); letter-spacing: 0.08em; }
.section-body { min-width: 0; max-width: 1020px; padding: 54px clamp(28px, 6vw, 80px) 68px; }
.section-body h2 { max-width: 820px; margin: 0 0 32px; font-size: clamp(34px, 4.8vw, 64px); line-height: 0.96; letter-spacing: -0.055em; }
.section-body h3 { margin: 48px 0 16px; font-size: clamp(20px, 2.4vw, 30px); line-height: 1.08; letter-spacing: -0.035em; }
.section-body p { max-width: 820px; margin: 0 0 22px; color: #304555; font-size: clamp(16px, 1.55vw, 19px); line-height: 1.65; }
.section-body strong { color: var(--ink); }
.section-body code { padding: 0.12em 0.38em; border-radius: 4px; color: var(--navy); background: var(--mint); font-family: var(--mono); font-size: 0.88em; }
.section-body ul, .section-body ol { max-width: 840px; margin: 12px 0 30px; padding: 0; list-style: none; counter-reset: ordered; }
.section-body li { position: relative; min-height: 30px; margin: 0; padding: 10px 0 10px 36px; color: #304555; border-bottom: 1px solid rgba(7, 29, 46, 0.08); font-size: clamp(15px, 1.45vw, 18px); line-height: 1.5; }
.section-body ul:not(.checklist) li::before { content: ""; position: absolute; left: 2px; top: 20px; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.section-body ol li { counter-increment: ordered; }
.section-body ol li::before { content: counter(ordered, decimal-leading-zero); position: absolute; left: 0; top: 13px; color: var(--teal); font: 800 10px var(--mono); }
.checklist li { padding-left: 40px; display: flex; gap: 12px; }
.check { position: absolute; left: 0; top: 13px; width: 20px; height: 20px; border: 1.5px solid var(--teal); border-radius: 4px; background: var(--white); }
.check.checked::after { content: "✓"; position: absolute; inset: -2px 0 0; display: grid; place-items: center; color: var(--navy); font-weight: 900; }
.callout { max-width: 900px !important; margin: 32px 0 !important; padding: 24px 28px !important; color: var(--navy) !important; background: var(--mint); border-left: 5px solid var(--teal); font-weight: 650; }

.table-wrap { max-width: 100%; margin: 30px 0 38px; overflow-x: auto; border: 1px solid var(--line); background: var(--white); box-shadow: 0 14px 42px rgba(6, 29, 51, 0.05); -webkit-overflow-scrolling: touch; }
table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 14px; line-height: 1.45; }
th { padding: 16px 18px; color: var(--white); background: var(--navy); text-align: left; font: 800 9px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
td { padding: 16px 18px; color: #304555; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: rgba(223, 247, 240, 0.38); }
td:first-child { color: var(--ink); font-weight: 720; }

.document-pagination { display: grid; grid-template-columns: 1fr 1fr; background: var(--navy); }
.document-pagination > span, .document-pagination a { min-height: 180px; padding: 34px clamp(24px, 5vw, 64px); display: flex; flex-direction: column; justify-content: flex-end; color: var(--white); text-decoration: none; border-right: 1px solid rgba(255, 255, 255, 0.14); transition: background 0.18s ease, color 0.18s ease; }
.document-pagination a:last-child { border-right: 0; text-align: right; align-items: flex-end; }
.document-pagination a:hover, .document-pagination a:focus-visible { color: var(--navy); background: var(--teal); outline: none; }
.document-pagination small { margin-bottom: 12px; color: var(--teal-bright); font: 800 9px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.document-pagination a:hover small, .document-pagination a:focus-visible small { color: var(--navy); }
.document-pagination strong { max-width: 430px; font-size: clamp(24px, 3vw, 38px); line-height: 1; letter-spacing: -0.04em; }

@media (max-width: 760px) {
  .topbar { min-height: 58px; padding: 0 16px; }
  .print-button { display: none; }
  .document-menu { inset: 58px 0 auto; padding: 10px 16px 16px; grid-template-columns: 1fr; max-height: calc(100vh - 58px); overflow-y: auto; }
  .document-menu a { padding: 14px 16px; }
  main { display: block; }
  .section-rail { display: none; }
  .document-hero { min-height: 510px; padding: 76px 24px 34px; }
  .document-hero h1 { font-size: clamp(52px, 16vw, 78px); }
  .document-hero > p { margin: 28px 0 38px; font-size: 18px; }
  .hero-meta { display: grid; gap: 8px; }
  .document-section { display: block; }
  .section-number { padding: 32px 24px 0; border: 0; }
  .section-body { padding: 18px 24px 48px; }
  .section-body h2 { margin-bottom: 26px; font-size: 38px; }
  .section-body h3 { margin-top: 38px; }
  .section-body p { font-size: 16px; line-height: 1.6; }
  .section-body li { font-size: 15px; }
  .callout { padding: 20px !important; }
  .table-wrap { width: calc(100vw - 48px); }
  .table-wrap::after { content: "Swipe table →"; position: sticky; left: 0; display: block; width: max-content; padding: 8px 12px; color: var(--muted); font: 700 9px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
  .document-pagination { grid-template-columns: 1fr; }
  .document-pagination > span { display: none; }
  .document-pagination a { min-height: 140px; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
  .document-pagination a:last-child { text-align: left; align-items: flex-start; }
}

@media print {
  .topbar, .document-menu, .section-rail, .document-pagination { display: none !important; }
  main { display: block; width: 100%; }
  .document-hero { min-height: 38vh; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .document-section { break-inside: avoid; }
  .section-body { max-width: none; }
  .table-wrap { overflow: visible; box-shadow: none; }
  table { min-width: 0; }
}

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