.content-page {
  width: min(1320px, calc(100% - 40px));
  margin: 34px auto 72px;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: clamp(32px, 4vw, 56px);
  align-items: start;
  padding: clamp(34px, 4vw, 52px);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 18px 52px rgba(24, 24, 27, .075);
}

.page-hero > * { min-width: 0; }

.page-eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.page-hero h1 {
  margin: 0 0 16px;
  max-width: 820px;
  font-size: clamp(40px, 4.6vw, 64px);
  line-height: .98;
  letter-spacing: -.052em;
  text-wrap: balance;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.68;
}

.page-code {
  align-self: center;
  width: 100%;
  margin: 0;
  min-height: 0;
  height: auto;
  padding: 20px 22px;
  overflow: auto;
  border: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
  border-radius: 14px;
  background: var(--code);
  color: var(--code-text);
  box-shadow: 0 14px 34px rgba(24,24,27,.12);
  font-size: 13px;
  line-height: 1.65;
}

.page-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.page-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.page-card h2,
.page-section h2 {
  margin: 0 0 9px;
  font-size: 19px;
  letter-spacing: -.02em;
}

.page-card p,
.page-section p,
.page-section li {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.68;
}

.page-section {
  padding: 34px 2px;
  border-bottom: 1px solid var(--border);
}

.page-section h3 {
  margin: 24px 0 8px;
  font-size: 14px;
}

.page-section ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.doc-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.doc-link {
  display: block;
  min-width: 0;
  padding: 16px 17px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.doc-link:hover {
  border-color: var(--border-strong);
  background: var(--surface-subtle);
}

.doc-link strong {
  display: block;
  margin-bottom: 5px;
  font-size: 13.5px;
}

.doc-link span {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.help-step {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 13px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.help-step:first-of-type { border-top: 0; }

.help-step b {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--soft);
  font-size: 11px;
}

.help-step p { margin: 3px 0 0; }

.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 2px 0;
  color: var(--muted);
  font-size: 11px;
}

.page-footer a { text-decoration: none; }
.page-footer a:hover { color: var(--text); }

.manuscript-body {
  max-width: 780px;
  margin: 42px auto 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
}
.manuscript-kicker {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.manuscript-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
}
.manuscript-toc a {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-decoration: none;
}
.manuscript-toc a:hover,
.manuscript-toc a:focus-visible {
  color: var(--text);
  border-color: var(--border-strong, var(--text));
}
.manuscript-body h2 {
  margin: 36px 0 12px;
  font-size: 22px;
  letter-spacing: -.03em;
}
.manuscript-body p,
.manuscript-body li {
  color: color-mix(in srgb, var(--text) 92%, var(--muted));
}
.manuscript-body blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--border-strong, var(--border));
  background: var(--surface);
  border-radius: 0 12px 12px 0;
}
.manuscript-claim {
  margin: 0 0 28px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 88%, var(--muted));
  color: color-mix(in srgb, var(--text) 88%, var(--muted));
  font-size: 14px;
  line-height: 1.55;
}
.manuscript-claim strong {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.manuscript-body pre.manuscript-code {
  margin: 18px 0;
  padding: 16px 18px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre;
}
.manuscript-body ol {
  padding-left: 22px;
}
.manuscript-figure {
  margin: 28px 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}
.manuscript-figure svg {
  display: block;
  width: 100%;
  height: auto;
  color: var(--text);
  font: 700 13px ui-sans-serif, system-ui, sans-serif;
}
.manuscript-figure figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.manuscript-table-wrap {
  margin: 22px 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.manuscript-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.manuscript-table-wrap caption {
  caption-side: top;
  padding: 12px 14px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.manuscript-table-wrap th,
.manuscript-table-wrap td {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.manuscript-table-wrap th {
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.manuscript-table-wrap code {
  font-size: 12px;
}

@media (max-width: 1100px) {
  .content-page { width: min(1040px, calc(100% - 32px)); }
  .page-hero { grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: 28px; }
  .doc-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .page-hero { grid-template-columns: 1fr; gap: 22px; }
  .page-code { max-width: 720px; }
  .page-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .content-page {
    width: calc(100% - 20px);
    margin-top: 16px;
  }
  .page-hero {
    padding: 26px 20px;
    border-radius: 16px;
  }
  .page-hero h1 {
    font-size: clamp(36px, 12vw, 48px);
    letter-spacing: -.045em;
  }
  .page-hero p { font-size: 14px; }
  .page-code { padding: 16px; font-size: 12px; }
  .doc-links { grid-template-columns: 1fr; }
  .page-section { padding-block: 28px; }
  .page-footer { flex-direction: column; }
}

@media print {
  .site-tabs,
  .page-hero pre.page-code,
  .manuscript-toc {
    display: none !important;
  }
  .content-page {
    width: auto;
    margin: 0;
  }
  .page-hero,
  .manuscript-figure,
  .manuscript-table-wrap,
  .manuscript-claim {
    break-inside: avoid;
    box-shadow: none;
  }
}
