/* Styles for the generated docs and blog pages (see scripts/build-content.mjs). */
@font-face {
  font-family: Manrope;
  src: url("/assets/manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
:root {
  --paper: #f7f4ed;
  --paper-deep: #eeeae0;
  --ink: #152b42;
  --muted: #5c666c;
  --cobalt: #2236cc;
  --cobalt-deep: #14206f;
  --peach: #f6c59c;
  --cream: #fbf3e4;
  --amber: #f4b740;
  --line: #dcded5;
  --code: #efebe0;
  --sans: Manrope, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  --gutter: clamp(16px, 4.3vw, 56px);
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 88px;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
}
img,
svg {
  max-width: 100%;
}
h1,
h2,
h3,
p {
  margin: 0;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: 3px;
}
::selection {
  background: var(--amber);
  color: var(--cobalt-deep);
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  z-index: 100;
  left: 16px;
  top: 12px;
  padding: 10px 16px;
  background: var(--paper);
  border-radius: 8px;
  transform: translateY(-200%);
}
.skip-link:focus {
  transform: none;
}

/* ---- Header ---- */
.sp-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  padding: 0 var(--gutter);
  background: var(--cobalt);
  color: var(--cream);
}
.sp-brand {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  text-decoration: none;
}
.sp-dot {
  color: var(--amber);
}
.sp-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 32px);
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.sp-nav a {
  text-decoration: none;
  opacity: 0.85;
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
}
.sp-nav a:hover,
.sp-nav a[aria-current] {
  opacity: 1;
}
.sp-nav a[aria-current] {
  border-bottom-color: var(--peach);
}
.sp-header a:focus-visible {
  outline-color: var(--cream);
}
.sp-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--peach);
  color: var(--cobalt-deep);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.sp-pill:hover {
  background: var(--cream);
}

/* ---- Shared bits ---- */
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cobalt);
}
.eyebrow-light {
  color: var(--peach);
}
.lede {
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.65;
  color: var(--muted);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid transparent;
}
.btn-solid {
  background: var(--cobalt);
  color: var(--cream);
}
.btn-solid:hover {
  background: var(--cobalt-deep);
}
.btn-ghost {
  border-color: var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}
.btn-peach {
  background: var(--peach);
  color: var(--cobalt-deep);
}
.btn-peach:hover {
  background: var(--cream);
}
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--muted);
}
.crumbs a {
  text-decoration: none;
}
.crumbs a:hover {
  color: var(--cobalt);
  text-decoration: underline;
}
.doc-search input,
.blog-search input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}
.doc-empty {
  padding: 24px 0;
  color: var(--muted);
}
.post-meta {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.post-cat {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cobalt);
}
.post-no {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

/* ---- Prose (docs and posts) ---- */
.prose {
  min-width: 0;
  font-size: 17px;
  line-height: 1.75;
}
.prose h1 {
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin-bottom: 20px;
}
.prose h2 {
  margin: 2.2em 0 0.6em;
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.prose h3 {
  margin: 1.8em 0 0.5em;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 800;
}
.prose h1 + p {
  font-size: 19px;
  color: var(--muted);
}
.prose .anchor {
  text-decoration: none;
}
.prose .anchor:hover::after {
  content: " #";
  color: var(--cobalt);
}
.prose p,
.prose ul,
.prose ol,
.prose .table-wrap,
.prose pre,
.prose blockquote {
  margin: 0 0 1.1em;
}
.prose ul,
.prose ol {
  padding-left: 1.4em;
}
.prose li {
  margin: 0.3em 0;
}
.prose a {
  color: var(--cobalt);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.prose a:hover {
  color: var(--cobalt-deep);
}
.prose code {
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: var(--code);
  font-family: var(--mono);
  font-size: 0.88em;
  overflow-wrap: anywhere;
}
.prose pre {
  overflow-x: auto;
  padding: 16px 18px;
  border-radius: 14px;
  background: #0f1630;
  color: #dfe5ff;
  font-size: 14px;
  line-height: 1.65;
}
.prose pre code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
  overflow-wrap: normal;
}
.prose blockquote {
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--peach);
  color: var(--muted);
}
.prose hr {
  margin: 2em 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}
.prose th,
.prose td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.prose th {
  background: var(--paper-deep);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.prose tr:last-child td {
  border-bottom: 0;
}
.prose img {
  height: auto;
  border-radius: 12px;
}

/* ---- Docs ---- */
.docs-home {
  width: min(1200px, calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  padding: 64px 0 80px;
}
.docs-hero {
  display: grid;
  gap: 18px;
  max-width: 760px;
  margin-bottom: 56px;
}
.docs-hero h1,
.blog-hero h1 {
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 800;
}
.docs-start {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 6px 0 10px;
}
.doc-search-wide {
  max-width: 460px;
}
.doc-group {
  margin-bottom: 52px;
}
.doc-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 18px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.doc-group-head h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.doc-group-head p {
  color: var(--muted);
  font-size: 15px;
}
.doc-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.doc-cards a {
  display: grid;
  gap: 6px;
  height: 100%;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  text-decoration: none;
}
.doc-cards a:hover {
  border-color: var(--cobalt);
  box-shadow: 0 8px 24px rgba(34, 54, 204, 0.1);
}
.doc-cards strong {
  font-size: 16px;
  letter-spacing: -0.01em;
}
.doc-cards span {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}
.docs-foot {
  color: var(--muted);
}
.docs-foot a {
  color: var(--cobalt);
}

.doc-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 220px;
  gap: 0 48px;
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.doc-side {
  min-width: 0;
}
.doc-nav-mobile {
  position: sticky;
  top: 68px;
  max-height: calc(100vh - 68px);
  overflow-y: auto;
  padding: 28px 0 40px;
}
.doc-nav-mobile > summary {
  display: none;
}
.doc-nav-group h2 {
  margin: 22px 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.doc-nav-group ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.doc-nav-group a {
  display: block;
  padding: 6px 10px;
  margin-left: -10px;
  border-radius: 8px;
  font-size: 14.5px;
  text-decoration: none;
  color: var(--ink);
}
.doc-nav-group a:hover {
  background: var(--paper-deep);
}
.doc-nav-group a[aria-current] {
  background: color-mix(in srgb, var(--cobalt) 10%, #fff);
  color: var(--cobalt);
  font-weight: 800;
}
.doc-main {
  padding: 40px 0 72px;
}
.doc-edit {
  margin-top: 40px;
  font-size: 14px;
}
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 36px;
}
.pager a {
  display: grid;
  gap: 2px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  color: var(--ink);
}
.pager a:hover {
  border-color: var(--cobalt);
}
.pager .next {
  text-align: right;
}
.pager small {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.pager span {
  font-weight: 800;
}
.doc-aside {
  min-width: 0;
}
.doc-toc {
  position: sticky;
  top: 96px;
  padding: 40px 0;
  font-size: 13.5px;
}
.doc-toc h2,
.post-toc h2 {
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.doc-toc ul,
.post-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--line);
}
.doc-toc a,
.post-toc a {
  display: block;
  padding: 5px 0 5px 14px;
  text-decoration: none;
  color: var(--muted);
  line-height: 1.4;
}
.doc-toc a:hover,
.post-toc a:hover {
  color: var(--cobalt);
}

/* ---- Blog ---- */
.blog-home,
.post {
  width: min(1200px, calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
}
.blog-home {
  padding: 64px 0 88px;
}
.blog-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 32px 64px;
  align-items: end;
  padding-bottom: 44px;
}
.blog-hero h1 {
  margin-top: 16px;
  font-size: clamp(38px, 6vw, 76px);
}
.blog-hero-side {
  display: grid;
  gap: 20px;
}
.tabs-bar {
  position: sticky;
  top: 68px;
  z-index: 20;
  margin: 0;
  padding: 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab {
  flex: none;
  padding: 16px 14px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.tab:hover {
  color: var(--ink);
}
.tab[aria-pressed="true"] {
  color: var(--cobalt);
  border-bottom-color: var(--cobalt);
}
.featured {
  margin: 32px 0 0;
  padding: clamp(32px, 6vw, 72px);
  border-radius: 28px;
  background: var(--cobalt-deep);
  color: var(--cream);
}
.featured-inner {
  display: grid;
  justify-items: start;
  gap: 18px;
  max-width: 820px;
}
.featured h2 {
  font-size: clamp(30px, 4.6vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 800;
}
.featured p {
  font-size: 18px;
  line-height: 1.6;
  color: #cfd5f5;
}
.post-meta-light {
  color: #9aa6e6;
}
.section-head {
  display: grid;
  gap: 8px;
  margin: 64px 0 24px;
}
.section-head h2 {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 800;
}
.count {
  margin-left: 6px;
  font-size: 0.5em;
  letter-spacing: 0;
  color: var(--muted);
  vertical-align: middle;
}
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.post-card a {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  padding: 26px 24px 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  text-decoration: none;
}
.post-card a:hover {
  border-color: var(--cobalt);
  box-shadow: 0 10px 28px rgba(34, 54, 204, 0.1);
}
.post-card .post-no {
  position: absolute;
  top: 24px;
  right: 24px;
}
.post-card h3 {
  font-size: 21px;
  line-height: 1.22;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.post-card p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
}
.post-card .post-meta {
  margin-top: auto;
  padding-top: 6px;
}
.post-go {
  font-size: 13px;
  font-weight: 800;
  color: var(--cobalt);
}
.library-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.library-list a {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.library-list a:hover strong {
  color: var(--cobalt);
}
.lib-main {
  display: grid;
  gap: 6px;
}
.lib-main strong {
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.lib-desc {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
  max-width: 62ch;
}
.library-list .post-meta {
  white-space: nowrap;
  padding-top: 2px;
}

/* ---- Post ---- */
.post {
  padding: 48px 0 88px;
}
.post-head {
  display: grid;
  gap: 16px;
  max-width: 880px;
  padding-bottom: 36px;
}
.post-head h1 {
  font-size: clamp(34px, 5.4vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 800;
}
.post-head .crumbs {
  margin-bottom: 4px;
}
.post-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 36px;
  margin: 12px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.post-facts dt {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.post-facts dd {
  margin: 2px 0 0;
  font-weight: 700;
}
.post-body-wrap {
  display: grid;
  grid-template-columns: 240px minmax(0, 720px);
  gap: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.post-toc {
  position: sticky;
  top: 96px;
  align-self: start;
  padding-top: 24px;
  font-size: 14px;
}
.post-body-wrap .prose {
  padding-top: 16px;
}
.post-cta {
  display: grid;
  justify-items: start;
  gap: 14px;
  margin-top: 48px;
  padding: 26px 28px;
  border-radius: 20px;
  background: var(--cobalt);
  color: var(--cream);
}
.post-cta p {
  margin: 0;
}
.post-cta .btn {
  color: var(--cobalt-deep);
  background: var(--peach);
  text-decoration: none;
}
.post-cta .btn:hover {
  color: var(--cobalt-deep);
  background: var(--cream);
}
.related {
  margin-top: 72px;
}
.related h2 {
  margin-bottom: 20px;
  font-size: 28px;
  letter-spacing: -0.03em;
  font-weight: 800;
}

/* ---- Footer ---- */
.sp-footer {
  background: var(--cobalt-deep);
  color: #cfd5f5;
  font-size: 14px;
}
.sp-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px 48px;
  width: min(1200px, calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  padding: 36px 0;
}
.sp-footer p {
  max-width: 62ch;
  line-height: 1.65;
}
.sp-footer strong {
  color: var(--cream);
}
.sp-footer a {
  color: var(--peach);
}
.sp-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}
.sp-footer nav a {
  text-decoration: none;
  font-weight: 700;
}

/* ---- Responsive ---- */
@media (max-width: 1180px) {
  .doc-layout {
    grid-template-columns: 250px minmax(0, 1fr);
  }
  .doc-aside {
    display: none;
  }
}
@media (max-width: 960px) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .blog-hero {
    grid-template-columns: 1fr;
  }
  .post-body-wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .post-toc {
    position: static;
    padding: 20px 0 0;
  }
  .post-toc ul {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    border: 0;
  }
  .post-toc a {
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
  }
}
@media (max-width: 820px) {
  .doc-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .doc-nav-mobile {
    position: static;
    max-height: none;
    margin: 16px 0 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
  }
  .doc-nav-mobile > summary {
    display: block;
    padding: 14px 18px;
    font-weight: 800;
    cursor: pointer;
  }
  .doc-nav-body {
    padding: 0 18px 18px;
  }
  .doc-main {
    padding-top: 28px;
  }
}
@media (max-width: 640px) {
  .post-grid {
    grid-template-columns: 1fr;
  }
  .library-list a {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .library-list .post-no {
    display: none;
  }
  .sp-header {
    gap: 12px;
    min-height: 60px;
  }
  .sp-brand {
    font-size: 24px;
  }
  .sp-nav {
    gap: 12px;
    font-size: 11px;
  }
  .sp-gh {
    display: none;
  }
  .sp-pill {
    padding: 9px 13px;
    font-size: 11px;
  }
  .doc-nav-mobile,
  .tabs-bar {
    top: 60px;
  }
  .docs-home,
  .blog-home {
    padding-top: 40px;
  }
  .prose {
    font-size: 16px;
  }
  .pager {
    grid-template-columns: 1fr;
  }
  .pager .next {
    text-align: left;
  }
}
@media (max-width: 400px) {
  .sp-brand {
    font-size: 21px;
  }
  .sp-pill {
    display: none;
  }
  .sp-nav {
    margin-left: auto;
  }
}
