:root {
  --primary: #0066cc;
  --primary-hover: #004499;
  --bg-body: #ffffff;
  --bg-surface: #ffffff;
  --bg-secondary: #f5f5f7;
  --text-main: #1d1d1f;
  --text-muted: #86868b;
  --border-color: #d2d2d7;
  --header-bg: rgba(255, 255, 255, 0.8);
  --code-bg: #1d1d1f;
  --nav-height: 0px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-body);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  letter-spacing: -0.022em;
  line-height: 1.47059;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.site-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 2rem;
}

.header-content,
.layout {
  margin: 0 auto;
  max-width: 1200px;
}

.brand-link {
  align-items: center;
  display: inline-flex;
  margin-bottom: 3rem;
  text-decoration: none;
}

.brand-logo {
  display: block;
  height: 24px;
  object-fit: contain;
  object-position: left center;
  width: 180px;
}

.eyebrow,
.section-kicker,
.version-label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.breadcrumbs {
  align-items: center;
  color: var(--text-muted);
  display: flex;
  font-size: 14px;
  gap: 0.55rem;
  margin-bottom: 0.6rem;
}

.breadcrumbs a {
  color: var(--text-main);
  text-decoration: none;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus-visible {
  color: var(--primary);
  text-decoration: underline;
}

.site-header h1 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 0.4rem 0 0.7rem;
}

.main-nav {
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

.tabs-wrapper {
  display: flex;
  margin: 0 auto;
  max-width: 1200px;
  overflow-x: auto;
  padding: 0 1rem;
  scrollbar-width: none;
}

.tabs-wrapper::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  border-bottom: 2px solid transparent;
  color: var(--text-main);
  display: inline-block;
  font-size: 14px;
  opacity: 0.8;
  padding: 0.8rem 1.2rem;
  text-decoration: none;
  transition: opacity 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.tab-btn:hover,
.tab-btn:focus-visible {
  opacity: 1;
}

.tab-btn[data-state="active"] {
  border-bottom-color: var(--text-main);
  font-weight: 600;
  opacity: 1;
}

.layout {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
  padding: 3rem 2rem 5rem;
}

.content-section {
  scroll-margin-top: calc(var(--nav-height) + 1.5rem);
}

.content-section + .content-section {
  margin-top: 5rem;
}

.content h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.007em;
  line-height: 1.14286;
  margin: 0.6rem 0 1rem;
}

.content h3 {
  font-size: 21px;
  font-weight: 600;
  margin: 1.5rem 0 0.7rem;
}

.content p {
  font-size: 17px;
  margin-bottom: 1.2rem;
}

.notice,
.demo-box,
.version-panel {
  background: var(--bg-secondary);
  border-radius: 12px;
  margin: 1.5rem 0;
  padding: 1.5rem;
}

.notice {
  display: grid;
  gap: 0.35rem;
}

.notice span {
  color: var(--text-muted);
}

.document-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.5rem;
}

.document-card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
}

.document-card p {
  color: var(--text-muted);
  font-size: 15px;
  min-height: 4.5rem;
}

.document-card a {
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.document-card a:hover,
.document-card a:focus-visible {
  color: var(--primary-hover);
  text-decoration: underline;
}

.flow-list {
  display: grid;
  gap: 1rem;
  list-style-position: inside;
  margin: 1.5rem 0;
}

.flow-list li {
  font-size: 17px;
  padding-left: 0.3rem;
}

.version-panel {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.version-panel strong {
  display: block;
  font-size: 15px;
  margin-top: 0.35rem;
}

pre {
  background: var(--code-bg);
  border-radius: 12px;
  color: var(--bg-secondary);
  margin-bottom: 2rem;
  overflow-x: auto;
  padding: 1.5rem;
}

pre code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  line-height: 1.5;
}

.toc {
  display: none;
}

.toc h4 {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
}

.toc-section a {
  color: var(--text-muted);
  display: block;
  font-size: 14px;
  padding: 0.4rem 0;
  text-decoration: none;
}

.toc-section a:hover,
.toc-section a:focus-visible,
.toc-section.active a {
  color: var(--primary);
}

.toc-section.active a {
  font-weight: 600;
}

.site-footer {
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 13px;
  padding: 1.5rem 2rem;
  text-align: center;
}

@media (min-width: 850px) {
  .layout {
    gap: 5rem;
    grid-template-columns: 1fr 240px;
  }

  .toc {
    display: block;
    position: sticky;
    top: calc(var(--nav-height) + 2rem);
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 1.5rem;
  }

  .brand-link {
    margin-bottom: 2rem;
  }

  .site-header h1 {
    font-size: 34px;
  }

  .layout {
    padding: 2rem 1.25rem 4rem;
  }

  .document-grid,
  .version-panel {
    grid-template-columns: 1fr;
  }

  .document-card p {
    min-height: 0;
  }
}

@media print {
  .main-nav,
  .toc,
  .brand-link,
  .site-footer {
    display: none !important;
  }

  .site-header {
    background: var(--bg-body);
    padding: 0 0 1rem;
  }

  .layout {
    display: block;
    padding: 0;
  }

  .content-section + .content-section {
    margin-top: 2rem;
  }
}
