/* ==========================================================================
   Patterned Designs Docs Theme
   Clean, registry-inspired documentation styling
   ========================================================================== */

:root {
  /* Primary Brand (Teal) */
  --primary: #0f6e82;
  --primary-hover: #1fa2b8;
  --primary-light: #178ca3;

  /* Backgrounds */
  --bg-gradient-start: #e6f6f9;
  --bg-gradient-end: #cfecef;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f0fafb;
  --bg-code: #f8fafc;

  /* Text */
  --text-primary: #0f172a;
  --text-secondary: #4b5563;
  --text-muted: #64748b;

  /* Borders & Shadows */
  --border: #e5e7eb;
  --border-hover: #0f6e82;
  --shadow: rgba(15, 110, 130, 0.08);
  --shadow-hover: rgba(15, 110, 130, 0.15);

  /* Layout */
  --sidebar-width: 280px;
  --content-max-width: 800px;
  --content-with-toc-max-width: 1200px;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: 1.75rem; margin-bottom: 1rem; }
h2 { font-size: 1.375rem; margin: 2rem 0 1rem; }
h3 { font-size: 1.125rem; margin: 1.5rem 0 0.75rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

code {
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  font-size: 0.875em;
}

/* Inline code */
p code, li code, td code {
  padding: 0.125rem 0.375rem;
  background: var(--bg-surface-alt);
  border-radius: 4px;
  color: var(--primary);
}

/* ==========================================================================
   Layout - Sidebar + Content
   ========================================================================== */

.layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
}

.sidebar-logo-title {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
}

.sidebar-logo-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 1.5rem;
}

.nav-section-title {
  padding: 0.5rem 1.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.nav-list {
  list-style: none;
}

.nav-item a {
  display: block;
  padding: 0.5rem 1.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.nav-item a:hover {
  color: var(--primary);
  background: var(--bg-surface-alt);
}

.nav-item a.active {
  color: var(--primary);
  background: rgba(15, 110, 130, 0.08);
  font-weight: 500;
}

/* Tree Navigation */
.nav-tree {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-tree-category,
.nav-tree-namespace {
  margin-bottom: 0.25rem;
}

.nav-tree-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 1.5rem;
  background: none;
  border: none;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
  transition: color 0.15s ease;
}

.nav-tree-toggle:hover {
  color: var(--primary);
}

.nav-tree-toggle svg {
  width: 12px;
  height: 12px;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.nav-tree-category.expanded .nav-tree-toggle svg,
.nav-tree-namespace.expanded .nav-tree-toggle svg,
.nav-tree-docs.expanded .nav-tree-toggle svg {
  transform: rotate(90deg);
}

/* Documentation nav items use same nav-tree-pages structure */
.nav-tree-docs .nav-tree-pages {
  display: none;
}

.nav-tree-docs.expanded .nav-tree-pages {
  display: block;
}

/* Docs section pages have less nesting, so adjust padding */
.nav-tree-docs .nav-tree-page a {
  padding-left: 2rem;
}

.nav-tree-modules {
  list-style: none;
  padding: 0;
  margin: 0;
  display: none;
}

.nav-tree-category.expanded .nav-tree-modules,
.nav-tree-namespace.expanded .nav-tree-modules {
  display: block;
}

.nav-tree-module {
  margin-bottom: 0.125rem;
}

.nav-tree-module-row {
  display: flex;
  align-items: center;
}

.nav-tree-module-link {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex: 1;
  padding: 0.375rem 0.5rem 0.375rem 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.15s ease;
}

.nav-tree-module-link:hover {
  color: var(--primary);
  background: var(--bg-surface-alt);
}

.nav-tree-module-link.active {
  color: var(--primary);
  background: rgba(15, 110, 130, 0.08);
}

.nav-tree-module-link .module-icon {
  width: 14px;
  height: 14px;
  color: var(--primary);
  opacity: 0.6;
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}

.nav-tree-module-link:hover .module-icon,
.nav-tree-module.expanded .nav-tree-module-link .module-icon,
.nav-tree-module-link.active .module-icon {
  opacity: 1;
}

.nav-tree-module-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  margin-right: 0.5rem;
  background: none;
  border: none;
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-tree-module-toggle:hover {
  color: var(--primary);
  background: var(--bg-surface-alt);
}

.nav-tree-module-toggle .toggle-chevron {
  width: 12px;
  height: 12px;
  transition: transform 0.15s ease;
}

.nav-tree-module.expanded .nav-tree-module-toggle .toggle-chevron {
  transform: rotate(90deg);
}

.nav-tree-pages {
  list-style: none;
  padding: 0;
  margin: 0;
  display: none;
}

.nav-tree-module.expanded .nav-tree-pages {
  display: block;
}

.nav-tree-page a {
  display: block;
  padding: 0.375rem 1.5rem 0.375rem 3rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.15s ease;
}

.nav-tree-page a:hover {
  color: var(--primary);
  background: var(--bg-surface-alt);
}

.nav-tree-page a.active {
  color: var(--primary);
  background: rgba(15, 110, 130, 0.08);
  font-weight: 500;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.sidebar-footer a:hover {
  color: var(--primary);
}

/* Main Content Area */
.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  margin-top: 56px;
  padding: 2rem 3rem;
  min-height: calc(100vh - 56px);
}

.content {
  max-width: var(--content-max-width);
}

/* Allow content to be wider when using TOC layout */
.content:has(.content-with-toc) {
  max-width: none;
}

/* ==========================================================================
   Module Header
   ========================================================================== */

.module-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.module-badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  margin-bottom: 0.75rem;
  background: rgba(15, 110, 130, 0.1);
  color: var(--primary);
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.module-title {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.module-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.module-description {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Module Metadata Grid */
.module-meta-grid {
  display: flex;
  gap: 1.5rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.module-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.module-meta-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.module-meta-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.module-meta-value.mono {
  font-family: 'JetBrains Mono', monospace;
}

.module-meta-value .version-badge {
  margin-left: 0.5rem;
}

/* Version Dropdown */
.version-dropdown {
  position: relative;
}

.version-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.version-dropdown-trigger:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.version-dropdown-value {
  font-family: 'JetBrains Mono', monospace;
}

.version-badge {
  padding: 0.125rem 0.375rem;
  background: rgba(15, 110, 130, 0.1);
  color: var(--primary);
  border-radius: 4px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
}

.version-dropdown-chevron {
  transition: transform 0.15s ease;
}

.version-dropdown[data-open="true"] .version-dropdown-chevron {
  transform: rotate(180deg);
}

.version-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 200px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px var(--shadow-hover);
  list-style: none;
  padding: 0.25rem;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.15s ease;
}

.version-dropdown[data-open="true"] .version-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.version-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-primary);
  transition: background 0.1s ease;
}

.version-dropdown-item:hover {
  background: var(--bg-surface-alt);
  color: var(--text-primary);
}

.version-dropdown-item.active {
  background: rgba(15, 110, 130, 0.08);
  color: var(--primary);
}

.version-dropdown-item .version-number {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
}

.version-dropdown-item .release-date {
  margin-left: auto;
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* Version Advisory Banner */
.version-advisory {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: #92400e;
}

.version-advisory svg {
  flex-shrink: 0;
  color: #f59e0b;
}

.version-advisory a {
  color: #92400e;
  font-weight: 500;
  text-decoration: underline;
}

.version-advisory a:hover {
  color: #78350f;
}

/* Module Title Row */
.module-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Module Header Top - title left, version dropdown right */
.module-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.module-header-top .module-title {
  margin-bottom: 0;
}

/* ==========================================================================
   Code Blocks
   ========================================================================== */

.code-block {
  position: relative;
  margin: 1rem 0 1.5rem;
}

.code-block pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
}

.code-block code {
  color: var(--primary);
  font-size: 0.875rem;
  line-height: 1.6;
}

.code-block .copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.375rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  transition: all 0.15s ease;
}

.code-block:hover .copy-btn {
  opacity: 1;
}

.code-block .copy-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.code-block .copy-btn.copied {
  color: #10b981;
  border-color: #10b981;
}

/* ==========================================================================
   Install Snippet
   ========================================================================== */

.install-snippet {
  margin-bottom: 2rem;
}

.install-snippet-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   Section Headers
   ========================================================================== */

.section {
  margin-bottom: 2.5rem;
}

.section-required h2 {
  color: var(--primary);
}

.section-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* ==========================================================================
   Parameter Cards (Inputs/Outputs)
   ========================================================================== */

.param-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.param-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-surface);
}

.param-card.param-required {
  border-color: rgba(15, 110, 130, 0.3);
}

.param-card.param-card-required {
  border-left: 2px solid var(--primary);
}

.param-header {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.75rem 1rem;
  background: var(--bg-surface-alt);
  border-bottom: 1px solid var(--border);
}

.param-card.param-required .param-header {
  background: rgba(15, 110, 130, 0.04);
  border-bottom-color: rgba(15, 110, 130, 0.15);
}

.param-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.param-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.param-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.param-type {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.param-default {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.param-default code {
  font-size: 0.6875rem;
  padding: 0.125rem 0.375rem;
  background: var(--bg-surface);
  border-radius: 4px;
}

.param-body {
  padding: 0.75rem 1rem;
}

.param-description {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

.badge-required {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background: var(--primary);
  color: white;
  border-radius: 4px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
}

.param-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.param-detail-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--text-muted);
  border-radius: 4px;
  transition: all 0.15s ease;
}

.param-detail-link:hover {
  color: var(--primary);
  background: rgba(15, 110, 130, 0.08);
}

.param-example {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.param-example-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.param-example-code {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.param-example-code code {
  flex: 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  color: var(--primary);
  background: none;
  padding: 0;
}

.copy-btn-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.copy-btn-inline:hover {
  color: var(--primary);
  background: rgba(15, 110, 130, 0.08);
}

.copy-btn-inline.copied {
  color: #10b981;
}

/* ==========================================================================
   Input Detail Page
   ========================================================================== */

.input-page {
  max-width: var(--content-max-width);
}

.input-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.input-header-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.input-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  margin: 0;
}

.input-meta-grid {
  display: flex;
  gap: 1.5rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.input-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.input-meta-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.input-meta-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.input-meta-value.mono {
  font-family: 'JetBrains Mono', monospace;
}

.input-description {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Breadcrumb */
.breadcrumb {
  margin-bottom: 1.5rem;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.8125rem;
}

.breadcrumb-list li {
  display: flex;
  align-items: center;
}

.breadcrumb-list li:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
  color: var(--text-muted);
}

.breadcrumb-list a {
  color: var(--text-secondary);
}

.breadcrumb-list a:hover {
  color: var(--primary);
}

.breadcrumb-list li[aria-current="page"] {
  color: var(--text-primary);
  font-weight: 500;
}

/* Related Inputs */
.related-input-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
}

/* ==========================================================================
   Output Detail Page
   ========================================================================== */

.output-page {
  max-width: var(--content-max-width);
}

.output-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.output-header-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.output-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  margin: 0;
}

.output-meta-grid {
  display: flex;
  gap: 1.5rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.output-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.output-meta-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.output-meta-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.output-meta-value.mono {
  font-family: 'JetBrains Mono', monospace;
}

.output-description {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Related Output Names */
.related-output-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  color: var(--primary);
}

.related-output-name:hover {
  text-decoration: underline;
}

.badge-required-small {
  padding: 0.0625rem 0.25rem;
  background: var(--primary);
  color: white;
  border-radius: 3px;
  font-size: 0.5625rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-left: 0.375rem;
}

/* ==========================================================================
   Examples Page - Runnable Example Links
   ========================================================================== */

.section-intro {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.section-intro code {
  background: var(--bg-code);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-size: 0.8125rem;
}

.example-link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.example-link {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.example-link:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(15, 110, 130, 0.1);
}

.example-link-name {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--primary);
}

.example-link-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Examples Page Layout */
.examples-page .page-header {
  margin-bottom: 1.5rem;
}

.examples-intro {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0;
}

.examples-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step-counter;
}

.examples-steps li {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.examples-steps li:last-child {
  border-bottom: none;
}

.examples-steps li strong {
  color: var(--text-primary);
}

.examples-steps li code {
  display: inline-block;
  background: var(--bg-code);
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  color: var(--primary);
  border: 1px solid var(--border);
}

.examples-list {
  margin-top: 1rem;
}

.examples-list h2 {
  font-size: 1.125rem;
  margin: 1.5rem 0 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.examples-list h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.examples-list p {
  margin-bottom: 0.75rem;
}

.examples-list pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  margin: 0.5rem 0 1.5rem;
}

.examples-list pre code {
  color: var(--primary);
  font-size: 0.8125rem;
  line-height: 1.6;
  background: none;
  padding: 0;
}

.examples-source {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.examples-source-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.examples-source-links {
  display: flex;
  gap: 0.5rem;
}

.examples-source-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.examples-source-icon:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(15, 110, 130, 0.1);
}

.examples-source-icon svg {
  width: 18px;
  height: 18px;
}

/* Example Cards (individual examples with source links) */
.example-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.example-card:last-child {
  margin-bottom: 0;
}

.example-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.example-card-header h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}

.example-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem 0;
}

.example-source-links {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.example-source-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.example-source-icon:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-surface);
}

.example-source-icon svg {
  width: 14px;
  height: 14px;
}

.example-card-content pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.875rem 1rem;
  overflow-x: auto;
  margin: 0;
}

.example-card-content pre code {
  color: var(--primary);
  font-size: 0.8125rem;
  line-height: 1.6;
  background: none;
  padding: 0;
}

.example-card-content p {
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.example-card-content p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Use Cases Page
   ========================================================================== */

.use-cases-page .page-header {
  margin-bottom: 1.5rem;
}

.use-case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.use-case-card {
  display: block;
  padding: 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
}

.use-case-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px var(--shadow-hover);
  color: inherit;
}

.use-case-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(15, 110, 130, 0.08);
  border-radius: 8px;
  color: var(--primary);
  margin-bottom: 0.875rem;
}

.use-case-card:hover .use-case-card-icon {
  background: var(--primary);
  color: white;
}

.use-case-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
}

.use-case-card p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.use-case-benefits {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.use-case-benefits li {
  font-size: 0.6875rem;
  padding: 0.25rem 0.5rem;
  background: var(--bg-surface-alt);
  border-radius: 4px;
  color: var(--text-secondary);
}

/* Use Case Detail Page */
.use-case-detail .page-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.benefit-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.benefit-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  background: var(--bg-surface-alt);
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.benefit-list li::before {
  content: "✓";
  color: var(--primary);
  font-weight: 600;
  flex-shrink: 0;
}

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

.related-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.related-list li:last-child {
  border-bottom: none;
}

.related-list a {
  font-size: 0.875rem;
}

/* ==========================================================================
   Prose Content (Markdown)
   ========================================================================== */

.prose h2 {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.prose h2:first-child {
  padding-top: 0;
  border-top: none;
}

.prose ul, .prose ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.375rem;
  color: var(--text-secondary);
}

.prose pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
}

.prose pre code {
  color: var(--primary);
  font-size: 0.875rem;
  line-height: 1.6;
  background: none;
  padding: 0;
}

/* When pre is wrapped in code-block by JS for copy button */
.prose .code-block {
  margin: 1rem 0 1.5rem;
}

.prose .code-block pre {
  margin: 0;
}

.prose strong {
  font-weight: 600;
  color: var(--text-primary);
}

/* ==========================================================================
   Related Resources
   ========================================================================== */

.related-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related-list {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.related-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.related-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ==========================================================================
   Landing Page
   ========================================================================== */

.landing-hero {
  text-align: center;
  padding: 3rem 0;
}

.landing-hero h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.landing-hero .subtitle {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  margin: 0;
}

.intent-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.intent-card {
  display: block;
  padding: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
}

.intent-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px var(--shadow-hover);
  color: inherit;
}

.intent-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  background: rgba(15, 110, 130, 0.08);
  border-radius: 10px;
  color: var(--primary);
  margin-bottom: 1rem;
}

.intent-card:hover .intent-card-icon {
  background: var(--primary);
  color: white;
}

.intent-card h2 {
  font-size: 1.0625rem;
  margin-bottom: 0.375rem;
}

.intent-card p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.module-card {
  display: block;
  padding: 1rem;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
}

.module-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px var(--shadow-hover);
  color: inherit;
}

.module-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.module-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: rgba(15, 110, 130, 0.08);
  border-radius: 6px;
  color: var(--primary);
}

.module-card:hover .module-card-icon {
  background: var(--primary);
  color: white;
}

.module-card-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.module-card:hover .module-card-name {
  color: var(--primary);
}

.module-card-description {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 0.75rem;
}

.module-card-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* Registry CTA */
.registry-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.registry-cta h3 {
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}

.registry-cta p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

.registry-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: transparent;
  border: 1px solid var(--primary);
  border-radius: 6px;
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.registry-cta-link:hover {
  background: var(--primary);
  color: white;
}

/* ==========================================================================
   Page TOC (Right Sidebar)
   ========================================================================== */

.page-toc {
  position: sticky;
  top: 2rem;
  width: 200px;
  flex-shrink: 0;
  align-self: flex-start;
  padding-left: 2rem;
  border-left: 1px solid var(--border);
  margin-left: 2rem;
}

.page-toc-header {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.page-toc-nav {
  margin-bottom: 1.5rem;
}

.page-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-toc-list li {
  margin-bottom: 0.375rem;
}

.page-toc-link {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color 0.15s ease;
}

.page-toc-link:hover {
  color: var(--primary);
}

.page-toc-link.active {
  color: var(--primary);
  font-weight: 500;
}

.page-toc-section {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.page-toc-section-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.page-toc-link-page {
  color: var(--text-muted);
}

.page-toc-link-page:hover {
  color: var(--primary);
}

/* Content wrapper for 3-column layout */
.content-with-toc {
  display: flex;
  gap: 0;
  max-width: var(--content-with-toc-max-width);
}

.content-main {
  flex: 1;
  min-width: 0;
}

/* ==========================================================================
   Search Header
   ========================================================================== */

.search-header {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: 56px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  z-index: 150;
}

.search-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.875rem;
  width: 100%;
  max-width: 600px;
  transition: border-color 0.15s ease;
}

.search-trigger:hover {
  border-color: var(--primary);
}

.search-trigger svg {
  flex-shrink: 0;
}

.search-trigger kbd {
  margin-left: auto;
  padding: 0.125rem 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.6875rem;
  font-family: inherit;
}

/* ==========================================================================
   Search Modal
   ========================================================================== */

.search-modal[hidden] {
  display: none;
}

.search-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}

.search-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.search-modal-content {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 1rem;
  background: var(--bg-surface);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.search-modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.search-modal-header svg {
  flex-shrink: 0;
  color: var(--text-muted);
}

.search-modal-header input {
  flex: 1;
  border: none;
  background: none;
  font-size: 1rem;
  color: var(--text-primary);
  outline: none;
}

.search-modal-header input::placeholder {
  color: var(--text-muted);
}

.search-modal-header kbd {
  padding: 0.25rem 0.5rem;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-family: inherit;
}

.search-modal-results {
  max-height: 400px;
  overflow-y: auto;
}

.search-result {
  display: block;
  padding: 0.75rem 1rem;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.1s ease;
}

.search-result:last-child {
  border-bottom: none;
}

.search-result:hover,
.search-result.selected {
  background: var(--bg-surface-alt);
}

.search-result-name {
  font-weight: 500;
  color: var(--text-primary);
}

.search-result-namespace {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

.search-modal-footer {
  display: flex;
  gap: 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-surface-alt);
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.search-modal-footer kbd {
  padding: 0.125rem 0.375rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 0.625rem;
  font-family: inherit;
}

.search-no-results {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1200px) {
  .page-toc {
    display: none;
  }
}

@media (max-width: 900px) {
  :root {
    --sidebar-width: 0px;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .main {
    margin-left: 0;
    padding: 1.5rem;
  }

  .search-header {
    left: 0;
  }

  .search-trigger {
    max-width: none;
  }
}

@media (max-width: 600px) {
  .main {
    padding: 1rem;
  }

  .intent-cards {
    grid-template-columns: 1fr;
  }

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

  .param-header {
    padding: 0.625rem 0.75rem;
  }

  .param-body {
    padding: 0.625rem 0.75rem;
  }
}

/* ==========================================================================
   Changelog Page
   ========================================================================== */

.changelog-page .page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.changelog-page .page-header h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.changelog-page .page-description {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Breadcrumb for changelog and other pages */
.breadcrumb ol {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  font-size: 0.8125rem;
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb li[aria-current="page"] {
  color: var(--text-primary);
  font-weight: 500;
}

/* Changelog Timeline */
.changelog-timeline {
  position: relative;
}

.changelog-entry {
  position: relative;
  padding: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 1rem;
}

.changelog-entry-latest {
  border-color: rgba(15, 110, 130, 0.3);
  box-shadow: 0 2px 8px var(--shadow);
}

.changelog-version-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.changelog-version-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.changelog-version-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.changelog-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.changelog-content {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Changelog Change Sections */
.changelog-changes {
  margin-bottom: 1rem;
}

.changelog-section {
  margin-bottom: 1rem;
}

.changelog-section h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
}

.changelog-added h4 {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.changelog-changed h4 {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.changelog-deprecated h4 {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

.changelog-removed h4 {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.changelog-fixed h4 {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

.changelog-security h4 {
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
}

.changelog-section ul {
  list-style: none;
  padding: 0;
  margin: 0 0 0 0.5rem;
}

.changelog-section li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 0.25rem 0;
  padding-left: 1rem;
  position: relative;
}

.changelog-section li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

/* Changelog Summary (when no detailed changes) */
.changelog-summary {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.changelog-summary-item {
  font-size: 0.8125rem;
}

.changelog-summary-label {
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.changelog-summary-value {
  font-weight: 600;
  color: var(--text-primary);
}

/* Changelog Verification */
.changelog-verification {
  margin-bottom: 1rem;
}

.verification-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.changelog-actions {
  margin-top: 0.75rem;
}

.changelog-view-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--primary);
}

.changelog-view-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Attestations Section
   ========================================================================== */

.attestation-section {
  margin-top: 2rem;
  padding: 1.25rem;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.attestation-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.attestation-header svg {
  color: #059669;
}

.attestation-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.attestation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.attestation-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.attestation-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.attestation-value {
  font-size: 0.8125rem;
  color: var(--text-primary);
}

.attestation-value.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  word-break: break-all;
}

.attestation-value a {
  color: var(--primary);
}

.attestation-value a:hover {
  text-decoration: underline;
}

/* Checksum display */
.checksum-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-top: 0.375rem;
}

.checksum-display code {
  flex: 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  color: var(--primary);
  word-break: break-all;
}

/* ==========================================================================
   Module Title Group & Verified Badge
   ========================================================================== */

.module-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  white-space: nowrap;
}

.verified-badge svg {
  width: 14px;
  height: 14px;
  stroke: white;
}

/* ==========================================================================
   Stripe-Style Parameters
   ========================================================================== */

.stripe-params {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-surface);
  overflow: hidden;
}

.stripe-param {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.stripe-param:last-child {
  border-bottom: none;
}

.stripe-param:hover {
  background: var(--bg-surface-alt);
}

.stripe-param-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.375rem;
  flex-wrap: wrap;
}

.stripe-param-name {
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
}

.stripe-param-name:hover {
  color: var(--primary);
}

.stripe-param-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
}

.stripe-param-type {
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.stripe-param-required-label {
  color: #dc2626;
  font-weight: 500;
}

.stripe-param-optional-label {
  color: var(--text-muted);
}

.stripe-param-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.stripe-param-details {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.stripe-param-details code {
  font-size: 0.75rem;
  padding: 0.125rem 0.375rem;
  background: var(--bg-code);
  border-radius: 4px;
}

.stripe-param-default,
.stripe-param-example {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Required param highlight */
.stripe-param-required {
  border-left: 3px solid #dc2626;
  padding-left: calc(1.25rem - 3px);
}

/* ==========================================================================
   TOC Section Labels and Sublists
   ========================================================================== */

.page-toc-section-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.page-toc-sublist {
  list-style: none;
  margin: 0 0 0.75rem 0;
  padding: 0;
}

.page-toc-sublist li {
  margin: 0;
}

.page-toc-sublist .page-toc-link {
  font-size: 0.8125rem;
  padding: 0.25rem 0;
}

/* ==========================================================================
   Expandable Navigation Subpages (for Inputs)
   ========================================================================== */

.nav-tree-page-expandable {
  position: relative;
}

.nav-tree-page-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-tree-page-row a {
  flex: 1;
}

.nav-tree-expand-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  margin-right: 0.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 4px;
  color: var(--text-muted);
  transition: background 0.15s ease, color 0.15s ease, transform 0.2s ease;
}

.nav-tree-expand-btn:hover {
  background: var(--bg-surface-alt);
  color: var(--primary);
}

.nav-tree-expand-btn svg {
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
}

.nav-tree-page-expandable.expanded .nav-tree-expand-btn svg {
  transform: rotate(90deg);
}

.nav-tree-subpages {
  list-style: none;
  margin: 0.25rem 0 0 0;
  padding: 0;
  margin-left: 3.25rem;
  border-left: 1px solid var(--border);
}

.nav-tree-subpages[hidden] {
  display: none;
}

.nav-tree-subpage {
  margin: 0;
}

.nav-tree-subpage a {
  display: block;
  padding: 0.25rem 0.5rem 0.25rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-tree-subpage a:hover {
  color: var(--primary);
  background: var(--bg-surface-alt);
}

.nav-tree-subpage a.active {
  color: var(--primary);
  font-weight: 500;
}

/* ========================================
   Docs Section Styles
   ======================================== */

.docs-page {
  max-width: 100%;
}

.docs-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.docs-card {
  display: block;
  padding: 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.docs-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(15, 110, 130, 0.1);
}

.docs-card-title {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.docs-card-description {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Docs Navigation Footer (Prev/Next) */
.docs-nav-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.docs-nav-prev,
.docs-nav-next {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.15s ease;
  max-width: 45%;
}

.docs-nav-prev:hover,
.docs-nav-next:hover {
  border-color: var(--primary);
}

.docs-nav-next {
  text-align: right;
  margin-left: auto;
}

.docs-nav-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.docs-nav-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary);
}

/* Navigation Section Header */
.nav-section-header {
  padding: 0.75rem 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  margin-top: 0.5rem;
}

/* =============================================================================
   404 Error Page
   ============================================================================= */

.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 2rem;
}

.error-content {
  max-width: 480px;
}

.error-code {
  font-size: 6rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin: 0 0 0.5rem 0;
}

.error-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
}

.error-message {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0 0 2rem 0;
}

.error-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.error-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}

.error-btn-primary {
  background: var(--primary);
  color: white;
}

.error-btn-primary:hover {
  background: var(--primary-dark);
}

.error-btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.error-btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

