@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/geist-latin.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --bg: #ffffff;
  --fg: #0a0a0a;
  --muted: #525252;
  --faint: #8a8a8a;
  --border: #e5e5e5;
  --surface: #fafafa;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Geist", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--fg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--fg);
  text-underline-offset: 3px;
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

/* Global header: same lockup, width, rhythm and navigation as the homepage. */
.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  width: min(100% - 2rem, 72rem);
  height: 4rem;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  text-decoration: none;
}

.brand img {
  display: block;
  width: auto;
  height: 3rem;
  object-fit: contain;
  object-position: left center;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.topnav a {
  color: var(--muted);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.15s ease;
}

.topnav a:hover,
.topnav a:focus-visible {
  color: var(--fg);
}

.console-link {
  display: inline-flex;
  min-height: 2.75rem;
  flex-shrink: 0;
  align-items: center;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 500;
  padding-inline: 1rem;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.console-link:hover,
.console-link:focus-visible {
  opacity: 0.8;
}

/* Reference content: Docs density and hierarchy on the main-site shell. */
.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 780px);
  max-width: 1200px;
  margin: 0 auto;
}

.hero {
  grid-column: 2;
  padding: 36px 48px 28px;
  border-bottom: 1px solid var(--border);
}

.language-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.language-nav a {
  display: inline-flex;
  min-width: 2.75rem;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  padding-inline: 0.65rem;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.language-nav a:hover,
.language-nav a:focus-visible,
.language-nav a[aria-current="page"] {
  background: var(--surface);
  color: var(--fg);
}

.language-nav a[aria-current="page"] {
  font-weight: 600;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  line-height: 1.5;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--fg);
  font-weight: 600;
}

h1 {
  margin: 0 0 18px;
  font-size: 1.875rem;
  letter-spacing: -0.02em;
  line-height: 1.18;
}

h2 {
  margin: 0 0 12px;
  font-size: 1.3125rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}

.lede {
  max-width: 65ch;
  margin: 0;
  color: #262626;
  font-size: 0.9375rem;
  line-height: 1.75;
}

.source-note {
  max-width: 65ch;
  margin: 20px 0 0;
  padding: 10px 16px;
  border-left: 2px solid var(--fg);
  border-radius: 0 8px 8px 0;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.65;
}

.source-note strong {
  display: block;
  margin-bottom: 2px;
  color: var(--fg);
  font-weight: 600;
}

.contents {
  position: sticky;
  grid-column: 1;
  grid-row: 1 / span 2;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  padding: 36px 16px 48px 24px;
  border-right: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8125rem;
}

.contents strong {
  display: block;
  margin-bottom: 10px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.contents ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.contents li {
  margin: 1px 0;
}

.contents a {
  display: block;
  border-radius: 6px;
  color: var(--muted);
  padding: 5px 10px;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.contents a:hover,
.contents a:focus-visible {
  background: var(--surface);
  color: var(--fg);
  transform: translateX(2px);
}

.article {
  grid-column: 2;
  min-width: 0;
  padding: 0 48px 80px;
  color: #262626;
  font-size: 0.9375rem;
  line-height: 1.75;
}

@media (max-width: 900px) {
  .topnav {
    display: none;
  }

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

  .hero,
  .article {
    grid-column: 1;
  }

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

  .contents {
    display: none;
  }

  .article {
    padding: 0 24px 64px;
  }

}

@media (max-width: 600px) {
  .header-inner {
    width: calc(100% - 2rem);
  }

  .brand img {
    height: 2.5rem;
  }

  .console-link {
    min-height: 2.5rem;
    font-size: 0.6875rem;
    padding-inline: 0.85rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}
