:root {
  --bg: #f3f6fb;
  --bg-strong: #fbfdff;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.95);
  --surface-muted: rgba(244, 248, 252, 0.88);
  --ink: #162033;
  --ink-soft: #2b3851;
  --muted: #5d6b85;
  --accent: #1f6feb;
  --accent-strong: #0f4fb8;
  --accent-soft: rgba(31, 111, 235, 0.12);
  --teal: #159b97;
  --teal-soft: rgba(21, 155, 151, 0.12);
  --warm: #f59f43;
  --border: rgba(22, 32, 51, 0.08);
  --border-strong: rgba(22, 32, 51, 0.16);
  --shadow: 0 28px 70px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 16px 32px rgba(15, 23, 42, 0.08);
  --display: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", ui-monospace, monospace;
  --radius-lg: 30px;
  --radius-md: 22px;
  --radius-sm: 14px;
  --topbar-offset: 18px;
  --topbar-height: 96px;
  --header-sidebar-gap: 18px;
  --page-bottom-gap: 24px;
  --sidebar-top: 18px;
  --panel-height: calc(100vh - var(--sidebar-top) - var(--page-bottom-gap));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(31, 111, 235, 0.16), transparent 28%),
    radial-gradient(circle at 86% 10%, rgba(21, 155, 151, 0.12), transparent 32%),
    linear-gradient(180deg, #fbfcfe 0%, var(--bg) 52%, #edf2f8 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(31, 111, 235, 0.18);
}

img {
  max-width: 100%;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(31, 111, 235, 0.24);
  outline-offset: 3px;
}

.page-glow {
  position: fixed;
  width: 32rem;
  height: 32rem;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.24;
  pointer-events: none;
  z-index: 0;
}

.page-glow-a {
  top: -10rem;
  right: -8rem;
  background: rgba(31, 111, 235, 0.28);
}

.page-glow-b {
  bottom: -11rem;
  left: -9rem;
  background: rgba(21, 155, 151, 0.2);
}

.site-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1540px;
  margin: 0 auto;
  padding: 24px clamp(18px, 2.8vw, 40px) 36px;
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: var(--topbar-height);
  padding: 18px 24px;
  margin-bottom: var(--header-sidebar-gap);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(24px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand img {
  display: block;
  width: auto;
  height: 58px;
  filter: drop-shadow(0 12px 26px rgba(17, 45, 84, 0.14));
}

.brand-tag,
h1,
h2,
h3,
h4 {
  font-family: var(--display);
}

.brand-tag {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(31, 111, 235, 0.12), rgba(21, 155, 151, 0.12));
  border: 1px solid rgba(31, 111, 235, 0.12);
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-version {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(22, 32, 51, 0.1);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.github-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

.github-icon-button:hover {
  color: var(--accent-strong);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.98);
  border-color: var(--border-strong);
  box-shadow: 0 20px 34px rgba(15, 23, 42, 0.12);
}

.github-icon-button svg {
  display: block;
  width: 22px;
  height: 22px;
}

.topbar-note {
  color: var(--muted);
  font-size: 0.94rem;
}

.site-body {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: var(--sidebar-top);
  display: grid;
  gap: 16px;
  height: var(--panel-height);
  align-self: start;
}

.sidebar-panel,
.content {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.sidebar-panel::before,
.content::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sidebar-panel::before {
  background:
    radial-gradient(circle at top right, rgba(31, 111, 235, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 28%);
}

.content::before {
  top: 0;
  right: 0;
  left: 0;
  bottom: auto;
  background:
    linear-gradient(90deg, rgba(31, 111, 235, 0.14), rgba(21, 155, 151, 0.1), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), transparent 18%);
  height: 140px;
}

.sidebar-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  min-height: 0;
  padding: 22px;
}

.sidebar-panel > *,
.content > * {
  position: relative;
  z-index: 1;
}

.sidebar-label,
.eyebrow,
.pill,
.mini-label {
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.72rem;
  font-weight: 700;
}

.sidebar-label,
.mini-label,
.eyebrow {
  color: var(--accent-strong);
}

.sidebar-label {
  margin: 0;
}

.site-nav {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  gap: 6px;
  align-content: start;
  grid-auto-rows: max-content;
  margin-top: 16px;
  padding-right: 4px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  counter-reset: nav-item;
}

.nav-item {
  display: grid;
  gap: 4px;
  align-content: start;
}

.nav-link {
  counter-increment: nav-item;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  max-height: 42px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.4);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

.nav-link span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-link::before {
  content: counter(nav-item, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
}

.nav-link:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.88);
  border-color: var(--border);
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.08);
}

.nav-link.is-active {
  background: linear-gradient(135deg, rgba(31, 111, 235, 0.14), rgba(21, 155, 151, 0.1));
  border-color: rgba(31, 111, 235, 0.16);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
  color: var(--accent-strong);
  font-weight: 600;
}

.nav-link.is-active::before {
  color: var(--accent-strong);
}

.nav-subsections {
  display: grid;
  gap: 4px;
  align-content: start;
  margin: -1px 0 2px 32px;
  padding-left: 9px;
  border-left: 1px solid rgba(22, 32, 51, 0.1);
}

.section-nav {
  display: grid;
  gap: 4px;
  align-content: start;
}

.section-link {
  position: relative;
  display: block;
  max-height: 30px;
  padding: 5px 8px 5px 10px;
  border-left: 2px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.28;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition:
    color 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.section-link:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(31, 111, 235, 0.14);
  transform: translateX(2px);
}

.section-link.is-active {
  color: var(--accent-strong);
  background: rgba(31, 111, 235, 0.08);
  border-color: var(--accent);
  font-weight: 600;
}

.section-link.level-h3 {
  margin-left: 8px;
  padding-left: 14px;
  font-size: 0.8rem;
}

.section-link.level-h4 {
  margin-left: 14px;
  padding-left: 14px;
  font-size: 0.76rem;
}

.sidebar-note p {
  margin: 10px 0 14px;
  color: var(--muted);
}

.content {
  min-width: 0;
  height: var(--panel-height);
  overflow-x: hidden;
  overflow-y: auto;
  padding: clamp(34px, 5vw, 56px) clamp(22px, 4.2vw, 72px) clamp(34px, 4.8vw, 60px);
}

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

.content > h1,
.content > h2,
.content > h3,
.content > h4,
.content > p,
.content > ul,
.content > ol,
.content > blockquote,
.content > .page-lead,
.content > .callout {
  max-width: 82ch;
}

.content > pre,
.content > table,
.content > .card-grid,
.content > .feature-grid,
.content > .metric-grid,
.content > .hero {
  max-width: none;
}

h1 {
  margin: 10px 0 14px;
  font-size: clamp(2.7rem, 4.4vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

h2 {
  margin-top: 54px;
  margin-bottom: 16px;
  padding-top: 26px;
  border-top: 1px solid rgba(22, 32, 51, 0.08);
  font-size: clamp(1.55rem, 2.2vw, 2.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  scroll-margin-top: 40px;
  text-wrap: balance;
}

h3 {
  margin-top: 30px;
  margin-bottom: 12px;
  font-size: 1.18rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  scroll-margin-top: 40px;
}

h4 {
  margin-top: 22px;
  margin-bottom: 10px;
  font-size: 1rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
  scroll-margin-top: 40px;
}

.content > h2:first-of-type {
  margin-top: 30px;
}

.content > .eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-bottom: 16px;
  padding: 0 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(31, 111, 235, 0.1), rgba(21, 155, 151, 0.08));
  border: 1px solid rgba(31, 111, 235, 0.1);
}

.page-lead {
  margin-top: 0;
  margin-bottom: 26px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(22, 32, 51, 0.08);
  font-size: 1.08rem;
  line-height: 1.82;
  color: var(--muted);
  text-wrap: pretty;
}

p,
li {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink-soft);
}

p,
ul,
ol,
table,
pre,
blockquote,
.callout,
.card-grid,
.feature-grid,
.hero,
.steps,
.metric-grid {
  margin-top: 18px;
  margin-bottom: 18px;
}

ul,
ol {
  padding-left: 1.3rem;
}

li + li {
  margin-top: 0.45rem;
}

strong {
  color: var(--ink);
}

a {
  color: var(--accent-strong);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
  transition: color 160ms ease;
}

a:hover {
  color: var(--ink);
}

.text-link,
.ghost-link {
  font-weight: 600;
  text-decoration: none;
}

.ghost-link {
  color: var(--muted);
}

.ghost-link:hover {
  color: var(--ink);
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #103a78, var(--accent));
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 18px 28px rgba(31, 111, 235, 0.22);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.button-link:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 22px 34px rgba(31, 111, 235, 0.24);
}

.button-link-subtle {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--ink);
  box-shadow: none;
}

.button-link-subtle:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(237, 245, 255, 0.84);
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: clamp(30px, 5vw, 54px);
  background:
    linear-gradient(135deg, rgba(12, 32, 63, 0.98), rgba(18, 83, 142, 0.94) 52%, rgba(19, 133, 136, 0.9)),
    linear-gradient(140deg, rgba(255, 255, 255, 0.06), transparent 52%);
  border: 1px solid rgba(14, 49, 96, 0.26);
  border-radius: 28px;
  box-shadow: 0 28px 60px rgba(13, 33, 61, 0.22);
}

.hero::before {
  content: "";
  position: absolute;
  top: -90px;
  right: -48px;
  width: 250px;
  height: 250px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 70%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.06), transparent 44%),
    radial-gradient(circle at bottom right, rgba(245, 159, 67, 0.16), transparent 28%);
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero h1 {
  max-width: 12ch;
  margin-top: 14px;
  margin-bottom: 16px;
  color: #fff;
}

.hero p {
  max-width: 64ch;
  color: rgba(236, 245, 255, 0.84);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero .button-link {
  background: #fff;
  color: #103560;
  box-shadow: none;
}

.hero .button-link:hover {
  color: #103560;
  background: #f7fbff;
}

.hero .button-link-subtle {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.hero .button-link-subtle:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.hero-panel,
.callout,
.feature-card,
.step-card,
.metric-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 253, 0.92));
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
}

.hero-panel {
  padding: 22px;
}

.stack-list,
.steps {
  padding-left: 20px;
}

.stack-list li,
.steps li {
  margin-bottom: 10px;
}

.card-grid,
.feature-grid,
.metric-grid {
  display: grid;
  gap: 18px;
}

.card-grid,
.feature-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.feature-card,
.metric-card,
.step-card {
  position: relative;
  padding: 22px;
  color: inherit;
  text-decoration: none;
  transition:
    transform 170ms ease,
    border-color 170ms ease,
    box-shadow 170ms ease,
    background 170ms ease;
}

.feature-card::before,
.metric-card::before,
.step-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  right: 22px;
  height: 1px;
  background: linear-gradient(90deg, rgba(31, 111, 235, 0.2), rgba(21, 155, 151, 0));
}

.feature-card:hover,
.step-card:hover,
.metric-card:hover {
  transform: translateY(-4px);
  border-color: rgba(31, 111, 235, 0.16);
  box-shadow: 0 24px 40px rgba(15, 23, 42, 0.12);
}

.feature-card h3,
.metric-card h3,
.step-card h3 {
  margin-top: 6px;
  margin-bottom: 10px;
}

.feature-card p,
.metric-card p,
.step-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.callout {
  position: relative;
  padding: 18px 20px 18px 24px;
}

.callout::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--teal));
}

.callout strong {
  color: var(--ink);
}

.callout-accent,
.callout-teal {
  border-left: 0;
}

.callout-teal::before {
  background: linear-gradient(180deg, var(--teal), #68c5c1);
}

code,
pre {
  font-family: var(--mono);
}

code {
  padding: 0.16rem 0.42rem;
  border-radius: 8px;
  background: rgba(16, 69, 138, 0.08);
  border: 1px solid rgba(16, 69, 138, 0.12);
  color: #11458a;
  font-size: 0.9em;
  font-weight: 500;
}

pre {
  position: relative;
  overflow-x: auto;
  padding: 3.1rem 1.2rem 1.2rem;
  border-radius: 22px;
  background: linear-gradient(180deg, #0f172a, #12203b);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: #edf3ff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 22px 40px rgba(15, 23, 42, 0.2);
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0;
  text-rendering: optimizeSpeed;
}

pre::before {
  content: "";
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  background: #ff7b72;
  box-shadow:
    1.15rem 0 0 #ffbd2e,
    2.3rem 0 0 #29c840;
}

pre code {
  padding: 0;
  background: transparent;
  border: 0;
  color: inherit;
  font-size: inherit;
  font-weight: 400;
}

blockquote {
  margin-left: 0;
  padding: 16px 20px 16px 24px;
  border-left: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(239, 246, 252, 0.88));
  border: 1px solid rgba(31, 111, 235, 0.08);
  box-shadow: var(--shadow-soft);
  color: var(--ink-soft);
}

table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  line-height: 1.68;
  border-bottom: 1px solid rgba(22, 32, 51, 0.08);
}

th {
  background: rgba(31, 111, 235, 0.06);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

tbody tr:nth-child(odd) {
  background: rgba(245, 249, 253, 0.62);
}

tbody tr:hover {
  background: rgba(31, 111, 235, 0.05);
}

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

hr {
  border: 0;
  border-top: 1px solid rgba(22, 32, 51, 0.1);
  margin: 36px 0;
}

.site-footer {
  padding: 8px 0 0;
}

.site-footer p {
  font-size: 0.92rem;
  color: var(--muted);
}

@media (max-width: 1120px) {
  .site-body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    top: auto;
    height: auto;
  }

  .sidebar-panel {
    height: auto;
  }

  .content {
    height: auto;
    overflow: visible;
  }

  .site-nav {
    overflow: visible;
    padding-right: 0;
  }

  .nav-subsections {
    margin-left: 36px;
  }

  .nav-link {
    min-width: 0;
  }
}

@media (max-width: 820px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    min-height: 0;
    padding: 18px 20px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .content {
    padding: 30px 22px 32px;
  }

  .hero {
    padding: 28px 24px;
  }
}

@media (max-width: 640px) {
  .site-shell {
    padding: 16px;
  }

  .topbar {
    border-radius: 20px;
  }

  .brand-lockup {
    flex-wrap: wrap;
  }

  .brand {
    flex-wrap: wrap;
  }

  .brand img {
    height: 48px;
  }

  .brand-tag {
    font-size: 0.74rem;
  }

  .content {
    padding: 26px 18px 28px;
    border-radius: 24px;
  }

  .nav-subsections {
    margin-left: 28px;
    padding-left: 10px;
  }

  h1 {
    font-size: clamp(2.1rem, 11vw, 2.9rem);
  }

  h2 {
    margin-top: 46px;
    padding-top: 22px;
    font-size: 1.48rem;
  }

  .page-lead {
    padding-bottom: 22px;
  }

  .nav-link {
    min-width: 170px;
  }

  pre {
    padding: 2.9rem 1rem 1rem;
    border-radius: 18px;
  }
}
