:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", sans-serif;
  color: #17233b;
  background: #fff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --ink: #17233b;
  --muted: #64728a;
  --line: #e7ebf2;
  --blue: #355fc0;
  --blue-dark: #24458f;
  --blue-pale: #f0f4ff;
  --mono: "Cascadia Code", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  min-width: 320px;
  margin: 0;
}

a {
  color: var(--blue);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--blue-dark);
}

button,
input {
  font: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid #8eafff;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  transform: translateY(-160%);
  border-radius: 0.5rem;
  background: var(--ink);
  color: #fff;
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  height: 4.25rem;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(1.5rem, calc((100vw - 1200px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 94%);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-weight: 750;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  border-radius: 0.55rem;
  background: var(--blue);
  color: white;
  font-size: 0.95rem;
}

.topbar-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.topbar-links a {
  color: #53617a;
  text-decoration: none;
}

.topbar-links a:hover {
  color: var(--blue);
}

.menu-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 1rem;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.menu-icon {
  position: relative;
}

.menu-icon::before,
.menu-icon::after {
  position: absolute;
  left: 0;
  content: "";
}

.menu-icon::before {
  top: -0.32rem;
}

.menu-icon::after {
  top: 0.32rem;
}

.layout {
  display: grid;
  width: min(100% - 3rem, 1200px);
  grid-template-columns: 220px minmax(0, 760px);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: start;
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 5rem;
  display: flex;
  min-height: calc(100vh - 4.25rem);
  flex-direction: column;
  padding: 2rem 0 1.25rem;
}

.sidebar-label,
.eyebrow {
  margin: 0;
  color: #71809a;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.14em;
}

.sidebar-label {
  margin: 0 0 1rem 0.7rem;
}

.search-box {
  display: flex;
  height: 2.6rem;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
  padding: 0 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  color: #8a96a9;
}

.search-box svg {
  width: 1rem;
  flex: 0 0 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.6;
}

.search-box input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-size: 0.78rem;
}

.search-box input::placeholder {
  color: #8995a8;
}

kbd {
  display: inline-flex;
  min-width: 1.5rem;
  min-height: 1.5rem;
  align-items: center;
  justify-content: center;
  padding: 0.1rem 0.35rem;
  border: 1px solid #dfe4ec;
  border-radius: 0.35rem;
  background: #f8f9fb;
  color: #53617a;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
}

.search-box kbd {
  min-width: 1.25rem;
  min-height: 1.25rem;
}

.sidebar nav {
  display: grid;
  gap: 0.2rem;
}

.nav-link {
  padding: 0.62rem 0.7rem;
  border-radius: 0.5rem;
  color: #59677e;
  font-size: 0.83rem;
  text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
  background: var(--blue-pale);
  color: var(--blue-dark);
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding: 1rem 0.7rem 0;
  border-top: 1px solid var(--line);
  color: #748198;
  font-size: 0.7rem;
}

.status-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #41aa7a;
  box-shadow: 0 0 0 3px #41aa7a1f;
}

main {
  min-width: 0;
  padding: 2rem 0 4rem;
}

.breadcrumbs {
  display: flex;
  gap: 0.6rem;
  color: #8a96a9;
  font-size: 0.78rem;
}

.breadcrumbs a {
  color: #59677e;
  text-decoration: none;
}

.hero {
  padding: 3.25rem 0 2.75rem;
}

.hero .eyebrow {
  color: var(--blue);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 680px;
  margin: 1.1rem 0 0;
  font-size: clamp(2.6rem, 7vw, 4.7rem);
  letter-spacing: -0.075em;
  line-height: 0.98;
}

.hero-copy {
  max-width: 600px;
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.8rem;
}

.button {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.65rem;
  font-size: 0.85rem;
  font-weight: 650;
  text-decoration: none;
  transition: background 140ms ease, transform 140ms ease;
}

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

.button-primary {
  background: var(--blue);
  color: white;
}

.button-primary:hover {
  background: var(--blue-dark);
  color: white;
}

.button-secondary {
  border-color: var(--line);
  background: #fff;
  color: #42516a;
}

.button-secondary:hover {
  background: #f8f9fc;
  color: var(--ink);
}

.feature-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 1.75rem;
  margin-top: 2.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  color: #68768e;
  font-size: 0.75rem;
}

.feature-strip > div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feature-icon {
  color: var(--blue);
  font-size: 1.1rem;
}

.feature-strip kbd {
  min-width: 1.25rem;
  min-height: 1.25rem;
  font-size: 0.64rem;
}

.doc-section {
  padding: 2.4rem 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 5.2rem;
}

.section-heading {
  margin-bottom: 1.7rem;
}

.section-heading h2 {
  margin: 0.7rem 0 0;
  font-size: clamp(1.45rem, 4vw, 2rem);
  letter-spacing: -0.045em;
  line-height: 1.2;
}

.section-heading > p:last-child {
  max-width: 640px;
  margin: 0.6rem 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.doc-section h3 {
  margin: 1.7rem 0 0.45rem;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.doc-section > p,
.doc-section li {
  color: #59677e;
  font-size: 0.92rem;
  line-height: 1.75;
}

.doc-section > p {
  margin: 0.65rem 0 1rem;
}

code {
  font-family: var(--mono);
  font-size: 0.87em;
}

.doc-section > p code,
.detail-list code,
td code,
details code {
  padding: 0.15rem 0.35rem;
  border: 1px solid #e8ebf1;
  border-radius: 0.35rem;
  background: #f7f8fb;
  color: #34445f;
  white-space: nowrap;
}

.code-card {
  overflow: hidden;
  margin: 1.2rem 0;
  border: 1px solid #25334b;
  border-radius: 0.85rem;
  background: #17243a;
  box-shadow: 0 0.8rem 2rem #17243a12;
}

.code-header {
  display: flex;
  min-height: 2.7rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.85rem;
  border-bottom: 1px solid #ffffff17;
  color: #b7c5dd;
  font-size: 0.72rem;
}

.copy-button {
  padding: 0.3rem 0.6rem;
  border: 1px solid #ffffff30;
  border-radius: 0.4rem;
  background: transparent;
  color: #e4ecfa;
  font-size: 0.7rem;
  cursor: pointer;
}

.copy-button:hover {
  background: #ffffff12;
}

pre {
  overflow-x: auto;
  margin: 0;
  padding: 1.1rem 1rem 1.25rem;
  color: #e4ecfa;
  font: 0.8rem/1.8 var(--mono);
  tab-size: 2;
}

.callout {
  display: flex;
  gap: 0.8rem;
  margin: 1.5rem 0;
  padding: 1rem;
  border: 1px solid #dfe8ff;
  border-radius: 0.75rem;
  background: #f6f8ff;
}

.callout-icon {
  display: grid;
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 1.25rem;
  place-items: center;
  border-radius: 50%;
  background: #dce6ff;
  color: var(--blue-dark);
  font-size: 0.75rem;
  font-weight: 800;
}

.callout p {
  margin: 0;
  color: #4c5c78;
  font-size: 0.82rem;
  line-height: 1.65;
}

.callout-warm {
  border-color: #f0e5c9;
  background: #fffaf0;
}

.callout-warm .callout-icon {
  background: #f5e9c9;
  color: #86651b;
}

.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.82rem;
}

th,
td {
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--line);
}

th {
  background: #f8f9fc;
  color: #66748b;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

td {
  color: #53617a;
  line-height: 1.55;
}

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

.required {
  color: #a64e47;
  font-size: 0.75rem;
  font-weight: 650;
}

.detail-list {
  display: grid;
  gap: 0.55rem;
  margin: 1.3rem 0;
  padding-left: 1.2rem;
}

.detail-list li::marker {
  color: #8ba1d9;
}

.shortcut-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

.shortcut-list > div {
  display: flex;
  min-height: 3.25rem;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--line);
  color: #53617a;
  font-size: 0.82rem;
}

.shortcut-list > div:last-child {
  border-bottom: 0;
}

.shortcut-list > div > span:first-child {
  margin-right: auto;
}

.shortcut-hint {
  color: #8793a7;
  font-size: 0.75rem;
}

details {
  border-top: 1px solid var(--line);
}

details:last-of-type {
  border-bottom: 1px solid var(--line);
}

summary {
  padding: 1rem 0.1rem;
  color: #34445f;
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;
}

details p {
  margin: -0.2rem 0 1rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.7;
}

.page-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  font-weight: 600;
}

.page-footer a {
  text-decoration: none;
}

.copy-status,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@media (max-width: 820px) {
  .layout {
    width: min(100% - 2.5rem, 720px);
    display: block;
  }

  .sidebar {
    position: fixed;
    z-index: 4;
    top: 4.25rem;
    bottom: 0;
    left: 0;
    width: min(18rem, 86vw);
    min-height: 0;
    padding: 1.5rem 1.25rem;
    transform: translateX(-105%);
    border-right: 1px solid var(--line);
    background: white;
    box-shadow: 0 1rem 2rem #17233b18;
    transition: transform 180ms ease;
  }

  body.menu-open .sidebar {
    transform: translateX(0);
  }

  .menu-toggle {
    display: flex;
  }
}

@media (max-width: 520px) {
  .topbar {
    height: 3.8rem;
    padding: 0 1rem;
  }

  .layout {
    width: calc(100% - 2rem);
  }

  main {
    padding-top: 1.4rem;
  }

  .sidebar {
    top: 3.8rem;
  }

  .hero {
    padding: 2.5rem 0 2rem;
  }

  .hero-copy {
    font-size: 1rem;
  }

  .feature-strip {
    display: grid;
    gap: 0.8rem;
  }

  .doc-section {
    padding: 2rem 0;
  }

  th,
  td {
    padding: 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
