:root {
  --bg: #eef2f7;
  --bg-top: #f8fafc;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --surface-muted: rgba(241, 245, 249, 0.78);
  --ink: #172033;
  --ink-soft: #334155;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --teal: #0f766e;
  --teal-soft: rgba(15, 118, 110, 0.1);
  --amber: #b45309;
  --border: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(15, 23, 42, 0.16);
  --shadow: 0 18px 42px rgba(15, 23, 42, 0.09);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.07);
  --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-shell: 16px;
  --radius-panel: 14px;
  --radius-card: 8px;
  --radius-control: 10px;
  --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: linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(37, 99, 235, 0.16);
}

img {
  max-width: 100%;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: 3px;
}

.site-shell {
  width: 100%;
  max-width: 1540px;
  margin: 0 auto;
  padding: 18px 28px 32px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 82px;
  padding: 14px 18px;
  margin-bottom: 18px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-shell);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

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

.brand-lockup {
  gap: 12px;
}

.brand {
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.brand img {
  display: block;
  width: auto;
  height: 52px;
  filter: drop-shadow(0 10px 20px rgba(17, 45, 84, 0.12));
}

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

.brand-tag,
.brand-version,
.pill,
.mini-label,
.sidebar-label,
.eyebrow {
  letter-spacing: 0;
}

.brand-tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.12);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

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

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

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

.github-icon-button:hover {
  color: var(--accent-strong);
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.86);
  border-color: var(--border-strong);
}

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

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

.sidebar {
  position: sticky;
  top: var(--sidebar-top);
  height: var(--panel-height);
}

.sidebar-panel,
.content {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-shell);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.sidebar-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 18px;
}

.sidebar-label,
.eyebrow,
.pill,
.mini-label {
  text-transform: uppercase;
  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: 14px;
  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: 40px;
  max-height: 40px;
  padding: 8px 10px;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.42);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  transition: transform 160ms ease, background 160ms ease, border-color 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(2px);
  background: rgba(255, 255, 255, 0.74);
  border-color: var(--border);
}

.nav-link.is-active {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.16);
  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(15, 23, 42, 0.1);
}

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

.section-link {
  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.7);
  border-color: rgba(37, 99, 235, 0.16);
  transform: translateX(2px);
}

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

.content {
  min-width: 0;
  height: var(--panel-height);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 44px 56px 52px;
}

.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: 8px 0 14px;
  font-size: 3.2rem;
  line-height: 1;
  letter-spacing: 0;
  text-wrap: balance;
}

h2 {
  margin-top: 46px;
  margin-bottom: 14px;
  padding-top: 22px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 1.9rem;
  line-height: 1.12;
  letter-spacing: 0;
  scroll-margin-top: 24px;
  text-wrap: balance;
}

h3 {
  margin-top: 28px;
  margin-bottom: 10px;
  font-size: 1.16rem;
  line-height: 1.24;
  letter-spacing: 0;
  scroll-margin-top: 24px;
}

h4 {
  margin-top: 20px;
  margin-bottom: 8px;
  font-size: 1rem;
  line-height: 1.35;
  letter-spacing: 0;
  scroll-margin-top: 24px;
}

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

.content > .eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-bottom: 14px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.12);
}

.page-lead {
  margin-top: 0;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 1.06rem;
  line-height: 1.76;
  color: var(--muted);
  text-wrap: pretty;
}

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

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

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

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

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);
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-control);
  background: #1d4ed8;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.2);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.button-link:hover {
  color: #fff;
  transform: translateY(-1px);
  background: #1e40af;
  box-shadow: 0 16px 26px rgba(37, 99, 235, 0.22);
}

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

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

.pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(237, 245, 255, 0.86);
}

.hero {
  display: grid;
  gap: 18px;
  padding: 46px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 64, 175, 0.92) 58%, rgba(15, 118, 110, 0.88)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
  border: 1px solid rgba(30, 64, 175, 0.24);
  border-radius: var(--radius-shell);
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.18);
}

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

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

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

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

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

.hero .button-link-subtle {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  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: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}

.hero-panel {
  padding: 20px;
}

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

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

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

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

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

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

.feature-card:hover,
.step-card:hover,
.metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.18);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.11);
  background: rgba(255, 255, 255, 0.9);
}

.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: 16px 18px 16px 20px;
}

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

.callout-teal::before {
  background: var(--teal);
}

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

code {
  padding: 0.14rem 0.36rem;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  font-size: 0.9em;
  font-weight: 500;
}

pre {
  overflow-x: auto;
  padding: 1rem;
  border-radius: var(--radius-card);
  background: #111827;
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: #edf3ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 14px 26px rgba(15, 23, 42, 0.16);
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0;
  text-rendering: optimizeSpeed;
}

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

blockquote {
  margin-left: 0;
  padding: 14px 18px;
  border-left: 4px solid rgba(37, 99, 235, 0.34);
  border-radius: var(--radius-card);
  background: rgba(248, 250, 252, 0.82);
  box-shadow: var(--shadow-soft);
  color: var(--ink-soft);
}

table {
  display: table;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

th,
td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  line-height: 1.62;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

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

tbody tr:nth-child(odd) {
  background: rgba(248, 250, 252, 0.66);
}

tbody tr:hover {
  background: rgba(37, 99, 235, 0.05);
}

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

hr {
  border: 0;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
  margin: 34px 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;
  }
}

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

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    min-height: 0;
    padding: 16px;
  }

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

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

  .hero {
    padding: 32px 24px;
  }

  h1 {
    font-size: 2.55rem;
  }

  h2 {
    font-size: 1.62rem;
  }
}

@media (max-width: 640px) {
  .brand-lockup,
  .brand {
    flex-wrap: wrap;
  }

  .brand img {
    height: 46px;
  }

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

  .content {
    padding: 26px 18px 30px;
  }

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

  h1 {
    font-size: 2.18rem;
  }

  h2 {
    margin-top: 40px;
    padding-top: 20px;
    font-size: 1.45rem;
  }

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

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