:root {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface-soft: #f0f0f2;
  --text: #151517;
  --muted: #686870;
  --line: #e4e4e8;
  --dark: #111113;
  --accent: #6b30eb;
  --danger-soft: #fff3d7;
  --radius: 26px;
  --shadow: 0 22px 60px rgb(17 17 19 / 8%);
  --container: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 999;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff;
}

.skip-link:focus {
  transform: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgb(228 228 232 / 80%);
  background: rgb(247 247 248 / 86%);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 1.18rem;
  font-weight: 900;
  letter-spacing: -.04em;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  background: var(--dark);
  color: #fff;
  font-size: .95rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav a {
  padding: 9px 11px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: .84rem;
  font-weight: 720;
}

.nav a:hover,
.nav a:focus-visible {
  background: #fff;
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--dark);
  border-radius: 999px;
  background: var(--dark);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: .86rem;
}

.button.secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--text);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.draft-bar {
  padding: 9px 16px;
  background: #2a2300;
  color: #ffe98c;
  text-align: center;
  font-size: .78rem;
  font-weight: 800;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 48px;
}

.hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -130px;
  top: -200px;
  border-radius: 50%;
  background: rgb(107 48 235 / 28%);
  filter: blur(4px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(255 255 255 / 72%);
  color: var(--muted);
  font-size: .76rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.hero h1 {
  max-width: 920px;
  margin: 22px 0 18px;
  font-size: clamp(2.55rem, 6vw, 5.9rem);
  line-height: .98;
  letter-spacing: -.065em;
}

.hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.18rem);
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.meta-pill {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: .8rem;
}

.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding-bottom: 84px;
}

.toc {
  position: sticky;
  top: 104px;
  max-height: calc(100vh - 124px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgb(255 255 255 / 82%);
  box-shadow: 0 14px 40px rgb(17 17 19 / 5%);
}

.toc strong {
  display: block;
  margin-bottom: 10px;
  font-size: .82rem;
}

.toc a {
  display: block;
  padding: 7px 9px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: .78rem;
  line-height: 1.3;
}

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

.article {
  min-width: 0;
  padding: clamp(24px, 4vw, 56px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.article-section {
  scroll-margin-top: 110px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
}

.article-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.article h2 {
  margin: 0 0 18px;
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: -.035em;
}

.article h3 {
  margin: 24px 0 10px;
  font-size: 1.05rem;
}

.article p {
  margin: 0 0 15px;
  color: #38383e;
}

.article ul,
.article ol {
  margin: 12px 0 18px;
  padding-left: 22px;
  color: #38383e;
}

.article li {
  margin: 8px 0;
}

.note {
  margin: 22px 0;
  padding: 18px 20px;
  border: 1px solid #eed77f;
  border-radius: 18px;
  background: #fff9dd;
}

.note strong {
  display: block;
  margin-bottom: 5px;
}

.table-wrap {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: .88rem;
}

th {
  background: var(--surface-soft);
}

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

.article-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .8rem;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 0 0 84px;
}

.hub-card {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
  text-decoration: none;
  box-shadow: 0 12px 34px rgb(17 17 19 / 5%);
  transition: transform .2s ease, box-shadow .2s ease;
}

.hub-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.hub-card .number {
  color: #b4b4bb;
  font-weight: 900;
}

.hub-card h2 {
  font-size: 1.4rem;
  letter-spacing: -.04em;
}

.hub-card p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

.contact-strip {
  margin-top: 34px;
  padding: 24px;
  border-radius: 24px;
  background: var(--dark);
  color: #fff;
}

.contact-strip p {
  color: rgb(255 255 255 / 66%);
}

.site-footer {
  padding: 54px 0 30px;
  background: var(--dark);
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 32px;
}

.site-footer p,
.site-footer a {
  color: rgb(255 255 255 / 60%);
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
}

.footer-links {
  display: grid;
  gap: 7px;
}

.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid rgb(255 255 255 / 10%);
  font-size: .78rem;
  color: rgb(255 255 255 / 45%);
}

@media (max-width: 1050px) {

  .nav,
  .header-actions .secondary {
    display: none;
  }

  .menu-button {
    display: inline-grid;
    place-items: center;
  }

  .nav.open {
    position: fixed;
    inset: 84px 20px auto;
    display: grid;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow);
  }

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

  .toc {
    position: static;
    max-height: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toc strong {
    grid-column: 1 / -1;
  }

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

@media (max-width: 680px) {
  .container {
    width: min(calc(100% - 24px), var(--container));
  }

  .hero {
    padding-top: 48px;
  }

  .header-actions .button {
    display: none;
  }

  .article {
    padding: 22px;
    border-radius: 24px;
  }

  .article-section {
    padding: 28px 0;
  }

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

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

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

  .draft-bar {
    font-size: .7rem;
  }
}

@media print {

  .site-header,
  .draft-bar,
  .toc,
  .site-footer,
  .button,
  .menu-button {
    display: none !important;
  }

  body {
    background: #fff;
    font-size: 11pt;
  }

  .hero {
    padding: 0 0 18px;
  }

  .hero h1 {
    font-size: 30pt;
  }

  .layout {
    display: block;
    padding: 0;
  }

  .article {
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .article-section {
    break-inside: avoid;
  }

  a {
    text-decoration: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}