:root {
  --ink-950: #0b1320;
  --ink-900: #121b2b;
  --ink-800: #1b2a41;
  --ink-700: #2b3b56;
  --slate-500: #5f6f88;
  --slate-300: #9eabc0;
  --paper-50: #f7f9fc;
  --paper-100: #eef3f9;
  --white: #ffffff;
  --accent-700: #0f766e;
  --accent-600: #0ea5a3;
  --accent-100: #ccfbf1;
  --line: #d7e1ef;
  --ok: #065f46;
  --warn: #92400e;
  --risk: #991b1b;
  --radius: 14px;
  --shadow-soft: 0 12px 28px rgba(17, 29, 45, 0.08);
  --shadow-light: 0 6px 14px rgba(17, 29, 45, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at 10% 0%, #dbeafe 0%, transparent 38%),
    radial-gradient(circle at 90% 12%, #ccfbf1 0%, transparent 36%),
    linear-gradient(180deg, #f8fbff 0%, #eef3f9 100%);
  color: var(--ink-900);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  line-height: 1.65;
  min-height: 100vh;
}

a {
  color: var(--accent-700);
  text-decoration: none;
}

a:hover {
  color: var(--accent-600);
}

a[href*="github.com"] {
  align-items: center;
  display: inline-flex;
  gap: 0.35rem;
}

a[href*="github.com"]::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 0C3.58 0 0 3.58 0 8a8.013 8.013 0 0 0 5.47 7.59c.4.08.55-.17.55-.38 0-.19-.01-.82-.01-1.49C4 14.09 3.48 13.2 3.32 12.76c-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.5-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82A7.49 7.49 0 0 1 8 3.8c.68 0 1.37.09 2.01.27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8Z'/%3E%3C/svg%3E") no-repeat center / contain;
  background-color: currentColor;
  content: "";
  height: 0.86rem;
  opacity: 0.9;
  width: 0.86rem;
}

.container {
  margin: 0 auto;
  max-width: 1140px;
  padding: 0 1.2rem;
}

header {
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

nav {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 72px;
}

.logo {
  align-items: center;
  color: var(--ink-950);
  display: inline-flex;
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: 1.16rem;
  font-weight: 700;
  gap: 0.55rem;
  letter-spacing: 0.04em;
}

.logo-mark {
  background: linear-gradient(135deg, #0f766e 0%, #0e7490 45%, #1e3a8a 100%);
  clip-path: polygon(0 28%, 10% 8%, 38% 8%, 50% 18%, 62% 8%, 90% 8%, 100% 28%, 100% 72%, 90% 92%, 62% 92%, 50% 82%, 38% 92%, 10% 92%, 0 72%);
  display: inline-flex;
  height: 17px;
  position: relative;
  z-index: 1;
  width: 28px;
}

.logo-mark::before {
  background: var(--ink-700);
  border-radius: 2px;
  content: "";
  height: 2px;
  left: -16px;
  position: absolute;
  top: 2px;
  width: 24px;
  z-index: -1;
  box-shadow: 0 5px 0 var(--ink-700), 0 10px 0 var(--ink-700);
}

.logo-mark::after {
  background: var(--accent-600);
  border-radius: 2px;
  content: "";
  height: 2px;
  position: absolute;
  right: -16px;
  top: 1px;
  width: 24px;
  z-index: -1;
  box-shadow: 0 3px 0 var(--accent-600), 0 6px 0 var(--accent-600), 0 9px 0 var(--accent-600),
    0 12px 0 var(--accent-600);
}

.nav-links {
  display: flex;
  gap: 1.1rem;
  list-style: none;
}

.nav-links a {
  border-radius: 9px;
  color: var(--ink-700);
  font-size: 0.93rem;
  font-weight: 600;
  padding: 0.42rem 0.7rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-links a:hover {
  background: var(--paper-100);
  color: var(--ink-900);
}

.site-search {
  max-width: 290px;
  position: relative;
  width: 100%;
}

.site-search input {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-900);
  font-size: 0.86rem;
  outline: none;
  padding: 0.5rem 0.72rem;
  width: 100%;
}

.site-search input:focus {
  border-color: #99b7dc;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.12);
}

.search-count {
  color: var(--slate-500);
  display: inline-flex;
  font-size: 0.72rem;
  margin-top: 0.2rem;
}

.search-results {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: var(--shadow-soft);
  list-style: none;
  margin-top: 0.28rem;
  max-height: 320px;
  overflow-y: auto;
  padding: 0.35rem;
  position: absolute;
  right: 0;
  width: 100%;
  z-index: 40;
}

.search-result-item a {
  border-radius: 8px;
  color: var(--ink-900);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.48rem 0.52rem;
}

.search-result-item a:hover {
  background: var(--paper-100);
}

.search-result-item strong {
  font-size: 0.82rem;
}

.search-result-item span,
.search-result-empty {
  color: var(--slate-500);
  font-size: 0.76rem;
}

.search-result-empty {
  padding: 0.48rem 0.52rem;
}

.search-page-count {
  color: var(--ink-700);
  font-size: 0.94rem;
  font-weight: 600;
  margin-top: 0.8rem;
}

.search-page-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: 280px minmax(0, 1fr);
}

.search-page-help {
  align-self: start;
  position: sticky;
  top: 88px;
}

.search-page-help h2,
.search-page-empty h2 {
  color: var(--ink-900);
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.search-page-help ul {
  margin-left: 1rem;
}

.search-page-help li + li {
  margin-top: 0.42rem;
}

.search-page-results {
  display: grid;
  gap: 0.9rem;
  list-style: none;
}

.search-page-item h3 {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: 1.06rem;
  margin-bottom: 0.35rem;
}

.search-page-item p + p {
  margin-top: 0.65rem;
}

.search-page-meta {
  color: var(--slate-500);
  font-size: 0.84rem;
}

.sr-only {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

main {
  padding: 2.2rem 0 4rem;
}

section {
  margin-top: 2.4rem;
}

main > .container > section:not(.hero) {
  contain-intrinsic-size: 1px 520px;
  content-visibility: auto;
}

.hero {
  background: linear-gradient(130deg, #ffffff 0%, #f4f8ff 55%, #ecfeff 100%);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  padding: 2.3rem;
  position: relative;
}

.hero::after {
  background: linear-gradient(120deg, transparent 0%, rgba(14, 165, 163, 0.1) 52%, transparent 100%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.hero-inner {
  max-width: 760px;
  position: relative;
  z-index: 1;
}

.breadcrumbs {
  margin-bottom: 1rem;
}

.breadcrumbs ol {
  align-items: center;
  color: var(--slate-500);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.8rem;
  gap: 0.4rem;
  list-style: none;
}

.breadcrumbs li {
  align-items: center;
  display: inline-flex;
  gap: 0.4rem;
}

.breadcrumbs li + li::before {
  color: var(--slate-300);
  content: "/";
  margin-right: 0.05rem;
}

.breadcrumbs a {
  color: var(--ink-700);
  font-weight: 600;
}

.breadcrumbs .current {
  color: var(--slate-500);
}

.status-pill {
  background: var(--accent-100);
  border: 1px solid #99f6e4;
  border-radius: 999px;
  color: var(--accent-700);
  display: inline-flex;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
  padding: 0.28rem 0.7rem;
}

h1 {
  color: var(--ink-950);
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1.15;
  margin-bottom: 0.7rem;
}

.lede {
  color: var(--ink-800);
  font-size: 1.08rem;
  margin-bottom: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.72rem;
  margin-top: 1.1rem;
}

.btn {
  border-radius: 11px;
  display: inline-flex;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.65rem 1.05rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--ink-900);
  box-shadow: var(--shadow-light);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--ink-800);
  color: var(--white);
}

.btn-secondary {
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink-800);
}

.btn-secondary:hover {
  background: var(--paper-100);
  color: var(--ink-900);
}

.grid {
  display: grid;
  gap: 1rem;
}

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

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

.card {
  animation: rise 0.48s ease both;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-light);
  padding: 1.15rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.card:hover {
  border-color: #bfd0e7;
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.card:nth-child(2) {
  animation-delay: 0.05s;
}

.card:nth-child(3) {
  animation-delay: 0.1s;
}

.card h3 {
  color: var(--ink-900);
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.card-title-link {
  color: inherit;
}

.card-title-link:hover {
  color: var(--accent-700);
}

.card p,
.card li {
  color: var(--ink-800);
  font-size: 0.94rem;
}

.card ul {
  list-style: none;
  margin-top: 0.45rem;
}

.card ul li {
  margin-top: 0.34rem;
  padding-left: 0.95rem;
  position: relative;
}

.card ul li::before {
  color: var(--accent-700);
  content: "•";
  left: 0;
  position: absolute;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.card-actions a {
  font-size: 0.85rem;
  font-weight: 700;
}

.section-title {
  color: var(--ink-950);
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: 1.45rem;
  margin-bottom: 0.65rem;
}

.section-subtitle {
  color: var(--slate-500);
  margin-bottom: 1rem;
  max-width: 760px;
}

.status-row {
  align-items: center;
  display: flex;
  gap: 0.55rem;
  margin-top: 0.6rem;
}

.state-chip {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 0.45rem;
  padding: 0.15rem 0.55rem;
}

.state-chip.pending {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.state-chip.live {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.dot {
  border-radius: 999px;
  display: inline-flex;
  height: 10px;
  width: 10px;
}

.dot.ok {
  background: var(--ok);
}

.dot.warn {
  background: var(--warn);
}

.dot.risk {
  background: var(--risk);
}

.code-box {
  background: #0f172a;
  border-radius: 12px;
  color: #e2e8f0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  overflow-x: auto;
  padding: 0.95rem;
}

.code-box[data-code-language] {
  padding-top: 2rem;
  position: relative;
}

.code-box[data-code-language]::before {
  color: #93c5fd;
  content: attr(data-code-language);
  font-size: 0.72rem;
  font-weight: 700;
  left: 0.95rem;
  letter-spacing: 0.05em;
  position: absolute;
  text-transform: uppercase;
  top: 0.7rem;
}

.repo-list a {
  display: inline-flex;
  font-weight: 600;
  margin-top: 0.4rem;
}

footer {
  border-top: 1px solid var(--line);
  color: var(--slate-500);
  font-size: 0.88rem;
  margin-top: 3.5rem;
  padding: 1.4rem 0 2.4rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.api-hero .status-pill {
  margin-bottom: 0.75rem;
}

.api-layout .card h4 {
  color: var(--ink-900);
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.callout {
  background: #f0fdfb;
  border: 1px solid #99f6e4;
  border-radius: 11px;
  color: #134e4a;
  font-size: 0.92rem;
  margin-top: 0.8rem;
  padding: 0.8rem;
}

.topic-bridge {
  margin-top: 1rem;
}

.topic-bridge .card h3 {
  margin-bottom: 0.4rem;
}

.topic-bridge .card ul {
  margin-top: 0.55rem;
}

.docs-shell {
  display: grid;
  gap: 1rem;
  grid-template-columns: 240px minmax(0, 1fr);
}

.docs-side {
  align-self: start;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem;
  position: sticky;
  top: 88px;
}

.docs-side h2 {
  color: var(--ink-900);
  font-size: 0.86rem;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
}

.docs-side-note {
  color: var(--ink-700);
  font-size: 0.83rem;
  line-height: 1.5;
  margin-bottom: 0.9rem;
}

.docs-side-group + .docs-side-group {
  margin-top: 1rem;
}

.docs-side-group h3 {
  color: var(--ink-700);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.42rem;
  text-transform: uppercase;
}

.docs-side ul {
  list-style: none;
}

.docs-side li + li {
  margin-top: 0.32rem;
}

.docs-side a {
  border-radius: 7px;
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.28rem 0.4rem;
}

.docs-side a:hover {
  background: var(--paper-100);
}

.docs-side a.current {
  background: rgba(11, 93, 176, 0.1);
  color: var(--accent-700);
}

.page-nav {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.code-example-stack {
  grid-template-columns: 1fr;
}

.docs-main > .page-nav {
  margin-top: 1.2rem;
}

.page-toc-shell {
  margin-top: 1.2rem;
}

.page-toc-card {
  padding: 1rem 1.1rem 1.05rem;
}

.page-toc-head h2 {
  color: var(--ink-900);
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: 1.08rem;
  margin: 0;
}

.page-toc-kicker {
  color: var(--slate-500);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
  text-transform: uppercase;
}

.page-toc-intro {
  color: var(--ink-700);
  font-size: 0.9rem;
  margin-top: 0.35rem;
}

.page-toc-list {
  display: grid;
  gap: 0.38rem;
  list-style: none;
  margin-top: 0.9rem;
  padding: 0;
}

.page-toc-item a {
  border-left: 2px solid transparent;
  border-radius: 8px;
  color: var(--ink-800);
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.3rem 0.55rem;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.page-toc-item.level-3 a {
  color: var(--ink-700);
  font-size: 0.88rem;
  padding-left: 1.15rem;
}

.page-toc-item a:hover {
  background: var(--paper-100);
  color: var(--ink-950);
}

.page-toc-item a.current {
  background: rgba(11, 93, 176, 0.08);
  border-color: var(--accent-700);
  color: var(--accent-700);
}

.page-nav-link {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-light);
  color: var(--ink-900);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-height: 100%;
  padding: 1rem 1.1rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.page-nav-link:hover {
  border-color: #bfd0e7;
  box-shadow: var(--shadow-soft);
  color: var(--ink-950);
  transform: translateY(-1px);
}

.page-nav-link.next {
  text-align: right;
}

.page-nav-eyebrow {
  color: var(--slate-500);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.page-nav-label {
  color: var(--ink-900);
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: 1rem;
}

.docs-main {
  min-width: 0;
}

.docs-main h2[id],
.docs-main h3[id],
.docs-main h4[id] {
  scroll-margin-top: 110px;
}

.docs-main section {
  margin-top: 1.4rem;
}

.docs-main section:not(.docs-hero) {
  contain-intrinsic-size: 1px 520px;
  content-visibility: auto;
}

.docs-hero {
  margin-top: 0;
}

.spec-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.spec-source {
  color: var(--ink-700);
  font-size: 0.9rem;
  margin-top: 0.95rem;
}

.spec-prose > :first-child {
  margin-top: 0;
}

.spec-prose h2,
.spec-prose h3,
.spec-prose h4 {
  color: var(--ink-900);
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  line-height: 1.2;
  margin-top: 1.5rem;
}

.spec-prose p,
.spec-prose li,
.spec-prose blockquote {
  color: var(--ink-800);
}

.spec-prose ul,
.spec-prose ol {
  margin-left: 1.2rem;
}

.spec-prose li + li {
  margin-top: 0.28rem;
}

.spec-prose code {
  background: rgba(11, 93, 176, 0.08);
  border-radius: 0.35rem;
  font-size: 0.92em;
  padding: 0.08rem 0.32rem;
}

.spec-prose pre {
  background: #0f1b2d;
  border-radius: 12px;
  color: #e5eef9;
  margin: 1rem 0;
  overflow-x: auto;
  padding: 1rem;
}

.spec-prose pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.spec-prose blockquote {
  border-left: 3px solid rgba(11, 93, 176, 0.28);
  margin: 1rem 0;
  padding-left: 1rem;
}

.spec-prose table {
  border-collapse: collapse;
  margin: 1.1rem 0;
  width: 100%;
}

.spec-prose th,
.spec-prose td {
  border: 1px solid var(--line);
  padding: 0.65rem 0.8rem;
  text-align: left;
  vertical-align: top;
}

.spec-prose th {
  background: #f8fbff;
  color: var(--ink-900);
}

.spec-index-grid .card {
  height: 100%;
}

.spec-index-grid h3 a {
  color: inherit;
}

.spec-index-grid h3 a:hover {
  color: var(--accent-700);
}

.table-card {
  overflow-x: auto;
  padding: 0;
}

.data-table {
  border-collapse: collapse;
  min-width: 640px;
  width: 100%;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.72rem 0.9rem;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: #f8fbff;
  color: var(--ink-900);
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.data-table td {
  color: var(--ink-800);
  font-size: 0.9rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .grid.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.7rem;
    padding: 0.85rem 0;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 0.55rem;
  }

  .site-search {
    max-width: 100%;
  }

  .hero {
    padding: 1.35rem;
  }

  .grid.cols-2,
  .grid.cols-3 {
    grid-template-columns: 1fr;
  }

  .docs-shell {
    grid-template-columns: 1fr;
  }

  .docs-side {
    position: static;
  }

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

  .search-page-help {
    position: static;
  }

  .page-nav {
    grid-template-columns: 1fr;
  }

  .page-nav-link.next {
    text-align: left;
  }

  .page-toc-item.level-3 a {
    padding-left: 0.85rem;
  }

  .data-table {
    min-width: 0;
  }
}
