/* API Documentation Styles */

/* CSS Variables */
:root {
  --text-primary: #1e293b;
  --text-muted: #64748b;
  --bg-secondary: #f8f9fa;
}

:root.dark,
:root[data-theme="dark"] {
  --text-primary: #e5e5e5;
  --text-muted: #a0a0a0;
  --bg-secondary: #2a2a2a;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #fafafa;
}

/* ===========================================
   Floating Table of Contents
   =========================================== */

.floating-toc {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  opacity: 0;
  transform: translateY(16px) scale(0.9);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-toc.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.floating-toc-btn {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3), 0 8px 24px rgba(102, 126, 234, 0.2);
  transition: all 0.2s;
}

.floating-toc-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4), 0 12px 32px rgba(102, 126, 234, 0.25);
}

.floating-toc-btn:active {
  transform: translateY(0);
}

.floating-toc.expanded .floating-toc-btn {
  border-radius: 14px 14px 0 0;
}

.floating-toc-icon {
  width: 22px;
  height: 22px;
}

.floating-toc-menu {
  position: absolute;
  bottom: 100%;
  right: 0;
  width: 280px;
  max-height: 0;
  overflow: hidden;
  background: white;
  border-radius: 14px 14px 0 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 16px 48px rgba(0, 0, 0, 0.12);
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-toc.expanded .floating-toc-menu {
  max-height: 400px;
  overflow-y: auto;
}

.floating-toc-menu::before {
  content: "Jump to section";
  display: block;
  padding: 14px 16px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  border-bottom: 1px solid #f0f0f0;
  position: sticky;
  top: 0;
  background: white;
}

.floating-toc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  text-decoration: none;
  transition: background 0.15s;
}

.floating-toc-item:hover {
  background: rgba(102, 126, 234, 0.06);
}

.floating-toc-item:last-child {
  padding-bottom: 14px;
}

.floating-toc-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 11px;
  font-weight: 600;
  border-radius: 7px;
  flex-shrink: 0;
}

.floating-toc-text {
  font-size: 13px;
  color: #374151;
  line-height: 1.35;
  flex: 1;
  min-width: 0;
}

.floating-toc-item:hover .floating-toc-text {
  color: #1a1a1a;
}

.floating-toc-menu::-webkit-scrollbar {
  width: 6px;
}

.floating-toc-menu::-webkit-scrollbar-track {
  background: transparent;
}

.floating-toc-menu::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

/* Dark mode for floating TOC */
:root.dark .floating-toc-menu,
:root[data-theme="dark"] .floating-toc-menu {
  background: #242424;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 16px 48px rgba(0, 0, 0, 0.4);
}

:root.dark .floating-toc-menu::before,
:root[data-theme="dark"] .floating-toc-menu::before {
  color: #888;
  border-bottom-color: #333;
  background: #242424;
}

:root.dark .floating-toc-item:hover,
:root[data-theme="dark"] .floating-toc-item:hover {
  background: rgba(102, 126, 234, 0.15);
}

:root.dark .floating-toc-text,
:root[data-theme="dark"] .floating-toc-text {
  color: #d4d4d4;
}

:root.dark .floating-toc-item:hover .floating-toc-text,
:root[data-theme="dark"] .floating-toc-item:hover .floating-toc-text {
  color: #f0f0f0;
}

:root.dark .floating-toc-menu::-webkit-scrollbar-thumb,
:root[data-theme="dark"] .floating-toc-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
}

/* Responsive - hide on very small screens */
@media (max-width: 480px) {
  .floating-toc {
    bottom: 16px;
    right: 16px;
  }

  .floating-toc-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .floating-toc.expanded .floating-toc-btn {
    border-radius: 12px 12px 0 0;
  }

  .floating-toc-menu {
    width: calc(100vw - 32px);
    border-radius: 12px 12px 0 12px;
  }
}

/* Site Navigation (logged-out) */
.site-nav {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 1rem 2rem;
}

.site-nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo .logo-icon {
  width: 28px;
  height: 28px;
}

.site-nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.15s;
  position: relative;
  padding-bottom: 2px;
}

.site-nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: white;
  transition: width 0.25s ease;
}

.site-nav-link:hover::after {
  width: 100%;
}

.site-nav-link:hover,
.site-nav-link-active {
  color: white;
}

.site-nav-link-active::after {
  width: 100%;
}

.site-nav-btn {
  background: white;
  color: #667eea;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.site-nav-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

:root.dark .site-nav-btn,
:root[data-theme="dark"] .site-nav-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

:root.dark .site-nav-btn:hover,
:root[data-theme="dark"] .site-nav-btn:hover {
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Theme Toggle in Site Nav */
.theme-toggle-wrapper {
  position: relative;
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  transition: background 0.15s;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.theme-icon-sun {
  display: block;
}

.theme-icon-moon {
  display: none;
}

:root.dark .theme-icon-sun,
:root[data-theme="dark"] .theme-icon-sun {
  display: none;
}

:root.dark .theme-icon-moon,
:root[data-theme="dark"] .theme-icon-moon {
  display: block;
}

.theme-popover {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  min-width: 140px;
  padding: 0.375rem;
  z-index: 1000;
  display: none;
}

.theme-popover.open {
  display: block;
}

.theme-popover-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.5rem 0.625rem;
  background: none;
  border: none;
  border-radius: 5px;
  font-size: 0.875rem;
  color: #37352f;
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
  font-family: inherit;
}

.theme-popover-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

.theme-popover-item.active {
  color: #529cca;
}

.theme-radio {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(55, 53, 47, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.theme-popover-item.active .theme-radio {
  border-color: #529cca;
}

.theme-radio::after {
  content: "";
  width: 6px;
  height: 6px;
  background: #529cca;
  border-radius: 50%;
  display: none;
}

.theme-popover-item.active .theme-radio::after {
  display: block;
}

.theme-label {
  font-weight: 500;
}

/* Dark mode theme popover */
:root.dark .theme-popover,
:root[data-theme="dark"] .theme-popover {
  background: #2d2d2d;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

:root.dark .theme-popover-item,
:root[data-theme="dark"] .theme-popover-item {
  color: #ebebeb;
}

:root.dark .theme-popover-item:hover,
:root[data-theme="dark"] .theme-popover-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

:root.dark .theme-radio,
:root[data-theme="dark"] .theme-radio {
  border-color: rgba(255, 255, 255, 0.2);
}

/* ========================================
   Dark Mode - Docs Page Content
   ======================================== */

/* Page background */
:root.dark,
:root[data-theme="dark"] {
  background-color: #1a1a1a;
}

:root.dark body,
:root[data-theme="dark"] body {
  background-color: #1a1a1a;
  color: #e5e5e5;
}

/* Site nav in dark mode */
:root.dark .site-nav,
:root[data-theme="dark"] .site-nav {
  background: linear-gradient(135deg, #2d2d2d 0%, #1f1f1f 100%);
}

/* App nav (authenticated) in dark mode */
:root.dark .app-nav,
:root[data-theme="dark"] .app-nav {
  background: linear-gradient(135deg, #4a5699 0%, #5a3b7d 100%);
}

:root.dark .app-nav .user-dropdown,
:root[data-theme="dark"] .app-nav .user-dropdown {
  background: #2d2d2d;
}

:root.dark .app-nav .user-dropdown-header,
:root[data-theme="dark"] .app-nav .user-dropdown-header {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

:root.dark .app-nav .user-dropdown-email,
:root.dark .app-nav .user-dropdown-item,
:root[data-theme="dark"] .app-nav .user-dropdown-email,
:root[data-theme="dark"] .app-nav .user-dropdown-item {
  color: #ebebeb;
}

:root.dark .app-nav .user-dropdown-item:hover,
:root[data-theme="dark"] .app-nav .user-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Docs wrapper and container */
:root.dark .docs-wrapper,
:root[data-theme="dark"] .docs-wrapper {
  background-color: #1a1a1a;
}

/* Sidebar */
:root.dark .docs-sidebar,
:root[data-theme="dark"] .docs-sidebar {
  background: #1f1f1f;
  border-right-color: #333;
}

:root.dark .docs-nav-home,
:root[data-theme="dark"] .docs-nav-home {
  color: #e5e5e5;
}

:root.dark .docs-nav-home:hover,
:root.dark .docs-nav-home.active,
:root[data-theme="dark"] .docs-nav-home:hover,
:root[data-theme="dark"] .docs-nav-home.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

:root.dark .docs-nav-section,
:root[data-theme="dark"] .docs-nav-section {
  color: #888;
}

:root.dark .docs-nav-link,
:root[data-theme="dark"] .docs-nav-link {
  color: #b0b0b0;
}

:root.dark .docs-nav-link:hover,
:root.dark .docs-nav-link.active,
:root[data-theme="dark"] .docs-nav-link:hover,
:root[data-theme="dark"] .docs-nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

:root.dark .docs-nav li a,
:root[data-theme="dark"] .docs-nav li a {
  color: #b0b0b0;
}

:root.dark .docs-nav li a:hover,
:root[data-theme="dark"] .docs-nav li a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

:root.dark .docs-nav li a.active,
:root[data-theme="dark"] .docs-nav li a.active {
  color: #8b9cf7;
  background: rgba(139, 156, 247, 0.12);
  border-left-color: #8b9cf7;
}

/* Main content area */
:root.dark .docs-content,
:root[data-theme="dark"] .docs-content {
  background: #1a1a1a;
}

/* Markdown content */
:root.dark .markdown-content,
:root[data-theme="dark"] .markdown-content {
  color: #d4d4d4;
}

:root.dark .markdown-content h1,
:root.dark .markdown-content h2,
:root.dark .markdown-content h3,
:root.dark .markdown-content h4,
:root[data-theme="dark"] .markdown-content h1,
:root[data-theme="dark"] .markdown-content h2,
:root[data-theme="dark"] .markdown-content h3,
:root[data-theme="dark"] .markdown-content h4 {
  color: #f0f0f0;
}

:root.dark .markdown-content h1 + p,
:root[data-theme="dark"] .markdown-content h1 + p {
  color: #b0b0b0;
}

:root.dark .markdown-content p,
:root.dark .markdown-content li,
:root[data-theme="dark"] .markdown-content p,
:root[data-theme="dark"] .markdown-content li {
  color: #d4d4d4;
}

:root.dark .markdown-content h2,
:root[data-theme="dark"] .markdown-content h2 {
  border-bottom-color: #333;
}

:root.dark .markdown-content a,
:root[data-theme="dark"] .markdown-content a {
  color: #6db3f2;
}

:root.dark .markdown-content a:hover,
:root[data-theme="dark"] .markdown-content a:hover {
  color: #8ec5f6;
}

:root.dark .markdown-content code,
:root[data-theme="dark"] .markdown-content code {
  background: #2d2d2d;
  color: #e06c75;
}

:root.dark .markdown-content pre,
:root[data-theme="dark"] .markdown-content pre {
  background: #1e1e1e;
  border-color: #333;
}

:root.dark .markdown-content pre code,
:root[data-theme="dark"] .markdown-content pre code {
  background: transparent;
  color: #d4d4d4;
}

:root.dark .markdown-content blockquote,
:root[data-theme="dark"] .markdown-content blockquote {
  border-left-color: #444;
  color: #999;
  background: #222;
}

:root.dark .markdown-content table th,
:root[data-theme="dark"] .markdown-content table th {
  background: #2d2d2d;
  border-color: #444;
  color: #e5e5e5;
}

:root.dark .markdown-content table td,
:root[data-theme="dark"] .markdown-content table td {
  border-color: #333;
  color: #d4d4d4;
}

:root.dark .markdown-content table tr:nth-child(even),
:root[data-theme="dark"] .markdown-content table tr:nth-child(even) {
  background: #222;
}

:root.dark .markdown-content tbody tr:hover,
:root[data-theme="dark"] .markdown-content tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

:root.dark .markdown-content hr,
:root[data-theme="dark"] .markdown-content hr {
  border-color: #333;
}

/* Feature cards */
:root.dark .feature-card,
:root[data-theme="dark"] .feature-card {
  background: #242424;
  border-color: #333;
}

:root.dark .feature-card h3,
:root[data-theme="dark"] .feature-card h3 {
  color: #f0f0f0;
}

:root.dark .feature-card p,
:root[data-theme="dark"] .feature-card p {
  color: #b0b0b0;
}

/* Idea cards */
:root.dark .idea-card,
:root[data-theme="dark"] .idea-card {
  background: #242424;
  border-color: #333;
}

:root.dark .idea-card h4,
:root[data-theme="dark"] .idea-card h4 {
  color: #f0f0f0;
}

:root.dark .idea-card p,
:root[data-theme="dark"] .idea-card p {
  color: #b0b0b0;
}

/* Endpoint sections */
:root.dark .endpoint-section,
:root[data-theme="dark"] .endpoint-section {
  border-color: #333;
}

:root.dark .endpoint-header,
:root[data-theme="dark"] .endpoint-header {
  background: #242424;
}

:root.dark .endpoint-title,
:root[data-theme="dark"] .endpoint-title {
  color: #f0f0f0;
}

:root.dark .endpoint-description,
:root[data-theme="dark"] .endpoint-description {
  color: #b0b0b0;
}

/* Code example groups */
:root.dark .code-example-group,
:root[data-theme="dark"] .code-example-group {
  background: #1e1e1e;
  border-color: #333;
}

:root.dark .lang-switcher,
:root[data-theme="dark"] .lang-switcher {
  background: #2d2d2d;
  border-bottom-color: #333;
}

:root.dark .lang-switcher button,
:root[data-theme="dark"] .lang-switcher button {
  color: #999;
}

:root.dark .lang-switcher button.active,
:root.dark .lang-switcher button:hover,
:root[data-theme="dark"] .lang-switcher button.active,
:root[data-theme="dark"] .lang-switcher button:hover {
  color: #fff;
}

/* Response sections */
:root.dark .response-section,
:root[data-theme="dark"] .response-section {
  background: #242424;
  border-color: #333;
}

:root.dark .response-section summary,
:root[data-theme="dark"] .response-section summary {
  color: #e5e5e5;
}

/* Parameter tables */
:root.dark .param-table th,
:root[data-theme="dark"] .param-table th {
  background: #2d2d2d;
  color: #e5e5e5;
}

:root.dark .param-table td,
:root[data-theme="dark"] .param-table td {
  border-color: #333;
  color: #d4d4d4;
}

:root.dark .param-name,
:root[data-theme="dark"] .param-name {
  color: #e06c75;
}

:root.dark .param-type,
:root[data-theme="dark"] .param-type {
  color: #98c379;
}

/* Copy button */
:root.dark .copy-btn,
:root[data-theme="dark"] .copy-btn {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
}

:root.dark .copy-btn:hover,
:root[data-theme="dark"] .copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Lead/intro text in dark mode */
:root.dark .lead,
:root.dark .section-desc,
:root[data-theme="dark"] .lead,
:root[data-theme="dark"] .section-desc {
  color: #b0b0b0;
}

:root.dark .dev-welcome .lead,
:root.dark .oss-hero .lead,
:root.dark .oss-repo-hero .lead,
:root[data-theme="dark"] .dev-welcome .lead,
:root[data-theme="dark"] .oss-hero .lead,
:root[data-theme="dark"] .oss-repo-hero .lead {
  color: #b0b0b0;
}

/* OSS cards in dark mode */
:root.dark .oss-card,
:root[data-theme="dark"] .oss-card {
  background: #242424;
  border-color: #333;
}

:root.dark .oss-card:hover,
:root[data-theme="dark"] .oss-card:hover {
  border-color: #667eea;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

:root.dark .oss-card-featured,
:root[data-theme="dark"] .oss-card-featured {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
  border-color: rgba(102, 126, 234, 0.4);
}

:root.dark .oss-card-featured:hover,
:root[data-theme="dark"] .oss-card-featured:hover {
  border-color: #667eea;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

:root.dark .oss-card-title,
:root[data-theme="dark"] .oss-card-title {
  color: #f0f0f0;
}

:root.dark .oss-card-desc,
:root[data-theme="dark"] .oss-card-desc {
  color: #b0b0b0;
}

:root.dark .oss-card-cta,
:root[data-theme="dark"] .oss-card-cta {
  color: #6db3f2;
}

:root.dark .oss-card-lang,
:root[data-theme="dark"] .oss-card-lang {
  background: #333;
  color: #999;
}

:root.dark .oss-feature,
:root[data-theme="dark"] .oss-feature {
  background: #333;
  color: #b0b0b0;
}

:root.dark .oss-contribute,
:root[data-theme="dark"] .oss-contribute {
  background: #1e1e1e;
}

:root.dark .oss-contribute h2,
:root[data-theme="dark"] .oss-contribute h2 {
  color: #e5e5e5;
}

:root.dark .oss-contribute p,
:root[data-theme="dark"] .oss-contribute p {
  color: #b0b0b0;
}

:root.dark .github-org-link,
:root[data-theme="dark"] .github-org-link {
  background: #2d2d2d;
  border-color: #4d4d4d;
  color: #e5e5e5;
}

:root.dark .github-org-link:hover,
:root[data-theme="dark"] .github-org-link:hover {
  background: #f0f0f0;
  border-color: #f0f0f0;
  color: #24292e;
}

:root.dark .oss-card-icon-muted,
:root[data-theme="dark"] .oss-card-icon-muted {
  background: #333;
  color: #666;
}

:root.dark .oss-tag,
:root[data-theme="dark"] .oss-tag {
  background: rgba(255, 255, 255, 0.1);
  color: #d4d4d4;
}

:root.dark .feature-item,
:root[data-theme="dark"] .feature-item {
  background: #2a2a2a;
  border-color: #404040;
}

:root.dark .feature-item h3,
:root[data-theme="dark"] .feature-item h3 {
  color: #f0f0f0;
}

:root.dark .feature-item p,
:root[data-theme="dark"] .feature-item p {
  color: #b0b0b0;
}

:root.dark .feature-item code,
:root[data-theme="dark"] .feature-item code {
  background: #3d3d3d;
  color: #e5e5e5;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-size: 0.85em;
}

:root.dark .arch-layer,
:root[data-theme="dark"] .arch-layer {
  background: #2a2a2a;
  border-color: #404040;
}

:root.dark .arch-label,
:root[data-theme="dark"] .arch-label {
  color: #a0a0a0;
}

:root.dark .arch-items span,
:root[data-theme="dark"] .arch-items span {
  background: rgba(255, 255, 255, 0.1);
  color: #d4d4d4;
}

:root.dark .architecture-diagram,
:root[data-theme="dark"] .architecture-diagram {
  background: #1e1e1e;
}

:root.dark .arch-arrow,
:root[data-theme="dark"] .arch-arrow {
  color: #666;
}

:root.dark .oss-repo-hero h1,
:root[data-theme="dark"] .oss-repo-hero h1 {
  color: #f0f0f0;
}

:root.dark .oss-repo-icon,
:root[data-theme="dark"] .oss-repo-icon {
  background: #2a2a2a;
  border-color: #404040;
}

:root.dark .oss-section h2,
:root[data-theme="dark"] .oss-section h2 {
  color: #f0f0f0;
}

:root.dark .oss-section p,
:root[data-theme="dark"] .oss-section p {
  color: #b0b0b0;
}

:root.dark .oss-section a,
:root[data-theme="dark"] .oss-section a {
  color: #8b9cf7;
}

:root.dark .oss-repo-github,
:root[data-theme="dark"] .oss-repo-github {
  background: #333;
  border-color: #404040;
  color: #d4d4d4;
}

:root.dark .oss-repo-github:hover,
:root[data-theme="dark"] .oss-repo-github:hover {
  background: #404040;
  color: #fff;
}

/* Footer in dark mode */
:root.dark .landing-footer,
:root[data-theme="dark"] .landing-footer {
  background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
}

/* App Navigation styles are now in _app_nav_styles.html partial */

/* Main Layout */
.docs-container {
  display: flex;
  min-height: calc(100vh - 56px);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

/* Sidebar */
.docs-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #e5e5e5;
  padding: 1.5rem 0;
}

.docs-nav {
  position: sticky;
  top: 1.5rem;
}

.docs-nav-home {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.5rem;
  color: #666;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}

.docs-nav-home svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.docs-nav-home:hover {
  color: #1a1a1a;
}

.docs-nav-home:hover svg {
  opacity: 1;
}

.docs-nav-home.active {
  color: #1a1a1a;
  background: #f5f5f5;
}

.docs-nav-home.active svg {
  opacity: 1;
}

.docs-nav-section {
  margin-top: 1.5rem;
}

.docs-nav-section h3 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 1.5rem;
  margin-bottom: 0.5rem;
  color: #999;
  font-weight: 600;
}

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

.docs-nav li {
  margin: 0;
}

.docs-nav li a {
  display: block;
  padding: 0.4rem 1.5rem;
  color: #666;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.15s;
  border-left: 2px solid transparent;
}

.docs-nav li a:hover {
  color: #1a1a1a;
  background: #fafafa;
}

.docs-nav li a.active {
  color: #3182ce;
  background: #f0f7ff;
  border-left-color: #3182ce;
  font-weight: 500;
}

/* Main Content */
.docs-content {
  flex: 1;
  min-width: 0;
  max-width: 800px;
  padding: 2rem 3rem;
  background: #fff;
}

/* Markdown Content */
.markdown-content {
  line-height: 1.7;
  color: #333;
}

.markdown-content h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
  letter-spacing: -0.02em;
}

.markdown-content h1 + p {
  color: #666;
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.markdown-content h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
  color: #1a1a1a;
}

.markdown-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}

.markdown-content h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;
  color: #333;
}

.markdown-content p {
  margin-bottom: 1rem;
}

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

.markdown-content li {
  margin-bottom: 0.35rem;
}

.markdown-content li p {
  margin-bottom: 0.35rem;
}

.markdown-content a {
  color: #3182ce;
  text-decoration: none;
}

.markdown-content a:hover {
  text-decoration: underline;
}

/* Inline Code */
.markdown-content code {
  font-family: "SF Mono", "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 0.85em;
}

.markdown-content p code,
.markdown-content li code,
.markdown-content td code {
  background: #f5f5f5;
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  color: #c7254e;
}

/* Code Blocks */
.markdown-content pre {
  background: #1e1e1e;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.markdown-content pre code {
  background: none;
  padding: 0;
  color: #d4d4d4;
  font-size: 0.8rem;
  line-height: 1.5;
}

/* Language Switcher for Code Examples */
.code-example-group {
  margin-bottom: 1.5rem;
}

.code-example-group pre {
  margin-bottom: 0;
  border-radius: 0 0 8px 8px;
}

.lang-switcher {
  display: flex;
  gap: 2px;
  background: #2d2d2d;
  padding: 4px;
  border-radius: 8px 8px 0 0;
}

.lang-switcher button {
  flex: 1;
  padding: 0.4rem 0.75rem;
  border: none;
  background: transparent;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #888;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.lang-switcher button:hover {
  color: #ccc;
}

.lang-switcher button.active {
  background: #1e1e1e;
  color: #fff;
}

.lang-switcher .other-dropdown-container {
  position: relative;
  flex: 1;
}

.lang-switcher .other-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
}

.lang-switcher .dropdown-arrow {
  width: 10px;
  height: 10px;
  transition: transform 0.15s;
}

.lang-switcher .dropdown-arrow.open {
  transform: rotate(180deg);
}

.lang-switcher .other-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #2d2d2d;
  border-radius: 0 0 6px 6px;
  padding: 4px;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: none;
}

.lang-switcher .other-dropdown.open {
  display: block;
}

.lang-switcher .other-dropdown button {
  width: 100%;
  text-align: center;
}

.code-example-group > [data-lang] {
  display: none;
}

.code-example-group > [data-lang].active {
  display: block;
}

.code-example-group .codehilite {
  margin-bottom: 0;
}

.code-example-group .codehilite pre {
  border-radius: 0 0 8px 8px;
}

/* Tables */
.markdown-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.markdown-content th,
.markdown-content td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.markdown-content th {
  background: #fafafa;
  font-weight: 600;
  color: #333;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.markdown-content tr:last-child td {
  border-bottom: none;
}

.markdown-content tbody tr:hover {
  background: #fafafa;
}

/* Blockquotes */
.markdown-content blockquote {
  border-left: 3px solid #3182ce;
  padding: 0.5rem 1rem;
  margin: 0 0 1rem 0;
  background: #f8fafc;
  border-radius: 0 6px 6px 0;
}

.markdown-content blockquote.warning {
  border-left-color: #dc3545;
  background: #fff5f5;
}

.markdown-content blockquote p:last-child {
  margin-bottom: 0;
}

/* Horizontal Rules */
.markdown-content hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 2.5rem 0;
}

/* Sample Request/Response labels */
.markdown-content .response-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.markdown-content .sample-response,
.markdown-content .response-line {
  display: flex;
  align-items: center;
  font-weight: 600;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}

.markdown-content .sample-response .status-pill,
.markdown-content .response-line .status-pill {
  margin-left: 0;
}

.markdown-content .status-pill {
  font-family: "SF Mono", "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  background: #e8f5e9;
  color: #2e7d32;
}

.markdown-content .status-pill.success {
  background: #e8f5e9;
  color: #2e7d32;
}

.markdown-content .status-pill.created {
  background: #e3f2fd;
  color: #1565c0;
}

.markdown-content .status-pill.no-content {
  background: #f5f5f5;
  color: #616161;
}

.markdown-content .status-pill.error {
  background: #ffebee;
  color: #c62828;
}

.markdown-content .response-desc {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.markdown-content .response-desc-inline {
  font-weight: 400;
  color: #666;
  margin-left: 0.5rem;
}

/* Endpoint Info Tables - Compact Display */
.markdown-content table.endpoint-info {
  margin-bottom: 1rem;
  background: #fafafa;
  border-radius: 6px;
}

.markdown-content table.endpoint-info th {
  width: 120px;
  background: transparent;
  border-bottom: 1px solid #eee;
}

.markdown-content table.endpoint-info td {
  border-bottom: 1px solid #eee;
}

/* Developer Portal Home */
.dev-welcome {
  line-height: 1.7;
  color: #333;
}

.dev-welcome h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
  letter-spacing: -0.03em;
}

.dev-welcome .lead {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 2rem;
}

.github-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #24292e;
  border-radius: 8px;
  color: white;
  text-decoration: none;
  margin-bottom: 2rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.github-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.github-card-icon {
  flex-shrink: 0;
  opacity: 0.9;
}

.github-card-content {
  flex: 1;
}

.github-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.github-card-desc {
  font-size: 0.85rem;
  opacity: 0.75;
}

.github-card-arrow {
  font-size: 1.25rem;
  opacity: 0.5;
  transition: transform 0.2s, opacity 0.2s;
}

.github-card:hover .github-card-arrow {
  transform: translateX(3px);
  opacity: 0.8;
}

.capability-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
}

.capability-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.capability-section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}

.capability-section p {
  margin-bottom: 0.75rem;
  color: #555;
}

.capability-section ul {
  margin-bottom: 0.75rem;
  padding-left: 1.25rem;
}

.capability-section li {
  margin-bottom: 0.35rem;
  color: #555;
}

.capability-section pre {
  background: #1e1e1e;
  border-radius: 6px;
  padding: 0.875rem 1rem;
  overflow-x: auto;
  margin-bottom: 0.75rem;
}

.capability-section pre code {
  color: #d4d4d4;
  font-family: "SF Mono", "Monaco", "Menlo", monospace;
  font-size: 0.8rem;
}

.cta-link {
  display: inline-block;
  color: #3182ce;
  font-weight: 500;
  text-decoration: none;
  font-size: 0.9rem;
}

.cta-link:hover {
  text-decoration: underline;
}

.quick-links {
  list-style: none;
  padding: 0;
}

.quick-links li {
  padding: 0.4rem 0;
  border-bottom: 1px solid #eee;
}

.quick-links li:last-child {
  border-bottom: none;
}

.quick-links a {
  color: #3182ce;
  font-weight: 500;
  text-decoration: none;
  font-size: 0.9rem;
}

.quick-links a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
  .docs-container {
    flex-direction: column;
  }

  .docs-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e5e5e5;
    padding: 1rem 0;
  }

  .docs-nav {
    position: static;
  }

  .docs-nav-section {
    margin-top: 1rem;
  }

  .docs-content {
    max-width: 100%;
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .site-nav {
    padding: 0.75rem 1rem;
  }

  .site-nav-actions {
    gap: 0.75rem;
  }

  .hide-mobile {
    display: none;
  }

  .site-nav-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 640px) {
  .site-nav,
  .app-nav-brand,
  .app-nav-main {
    padding: 0.75rem;
  }

  .markdown-content h1 {
    font-size: 1.5rem;
  }

  .markdown-content h2 {
    font-size: 1.15rem;
  }

  .markdown-content pre {
    padding: 0.75rem;
    border-radius: 6px;
  }

  .markdown-content table {
    font-size: 0.8rem;
  }

  .markdown-content th,
  .markdown-content td {
    padding: 0.5rem;
  }
}

/* ===========================================
   OSS Landing & Repo Pages
   =========================================== */

/* OSS Landing Page */
.oss-landing {
  line-height: 1.7;
  color: #333;
}

.oss-hero {
  margin-bottom: 3rem;
}

.oss-hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #1a1a1a;
  letter-spacing: -0.03em;
}

.oss-hero .lead {
  font-size: 1.15rem;
  color: #555;
  max-width: 600px;
}

/* Featured Repo Section */
.oss-featured {
  position: relative;
  margin-bottom: 3rem;
}

.oss-badge {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
}

/* OSS Cards */
.oss-card {
  display: block;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.oss-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
  transform: translateY(-2px);
}

.oss-card-featured {
  background: linear-gradient(135deg, #fafbff 0%, #f5f3ff 100%);
  border: 2px solid #c7d2fe;
  padding: 2rem;
}

.oss-card-featured:hover {
  border-color: #a5b4fc;
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
}

.oss-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.oss-card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  color: white;
}

.oss-card-icon svg {
  width: 24px;
  height: 24px;
}

.oss-card-icon-fire {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.oss-card-icon-img {
  background: transparent;
  padding: 0;
}

.oss-card-icon-img img {
  width: 48px;
  height: 48px;
}

.oss-card-icon-muted {
  background: #e5e7eb;
  color: #9ca3af;
}

.oss-card-meta {
  display: flex;
  gap: 0.5rem;
}

.oss-card-lang {
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
  background: #f3f4f6;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.oss-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 0.5rem 0;
}

.oss-card-featured .oss-card-title {
  font-size: 1.5rem;
}

.oss-card-desc {
  color: #555;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.oss-card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.oss-feature {
  font-size: 0.75rem;
  font-weight: 500;
  color: #6366f1;
  background: #eef2ff;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.oss-card-cta {
  font-size: 0.9rem;
  font-weight: 600;
  color: #6366f1;
}

.oss-card-coming-soon {
  opacity: 0.7;
  cursor: default;
}

.oss-card-coming-soon:hover {
  transform: none;
  box-shadow: none;
  border-color: #e5e7eb;
}

/* Libraries Grid */
.oss-libraries {
  margin-bottom: 3rem;
}

.oss-libraries h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}

.section-desc {
  color: #666;
  margin-bottom: 1.5rem;
}

.oss-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* Contribute Section */
.oss-contribute {
  padding: 2rem;
  background: #f9fafb;
  border-radius: 12px;
  text-align: center;
}

.oss-contribute h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}

.oss-contribute p {
  color: #555;
  margin-bottom: 1.25rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.github-org-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #333;
  font-weight: 600;
  text-decoration: none;
  padding: 0.6rem 1.25rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.2s;
}

.github-org-link:hover {
  background: #24292e;
  color: white;
  border-color: #24292e;
}

/* ===========================================
   Individual Repo Pages
   =========================================== */

.oss-repo-page {
  line-height: 1.7;
  color: #333;
}

.oss-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 2rem;
}

.oss-breadcrumb a {
  color: #6366f1;
  text-decoration: none;
}

.oss-breadcrumb a:hover {
  text-decoration: underline;
}

.oss-breadcrumb .separator {
  color: #ccc;
}

.oss-repo-hero {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
}

.oss-repo-hero-content {
  flex: 1;
}

.oss-repo-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  color: white;
  flex-shrink: 0;
}

.oss-repo-icon svg {
  width: 26px;
  height: 26px;
}

.oss-repo-icon-fire {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.oss-repo-icon-img {
  background: transparent;
  padding: 0;
  width: auto;
  height: auto;
}

.oss-repo-icon-img img {
  width: 52px;
  height: 52px;
}

.oss-repo-hero h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 0.35rem 0;
  letter-spacing: -0.02em;
}

.oss-repo-hero .lead {
  font-size: 0.95rem;
  color: #6b7280;
  margin: 0 0 0.75rem 0;
  line-height: 1.5;
}

.oss-repo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.oss-tag {
  font-size: 0.7rem;
  font-weight: 500;
  color: #6b7280;
  background: #f3f4f6;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.oss-repo-github {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #24292e;
  border-radius: 6px;
  color: white;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.15s;
  flex-shrink: 0;
  align-self: flex-start;
}

.oss-repo-github:hover {
  background: #1a1d21;
  transform: translateY(-1px);
}

.oss-repo-github svg {
  width: 16px;
  height: 16px;
  opacity: 0.9;
}

/* Prominent GitHub Card */
.github-card-prominent {
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}

.github-card-prominent .github-card-icon svg {
  width: 28px;
  height: 28px;
}

/* OSS Sections */
.oss-section {
  margin-bottom: 3rem;
}

.oss-section h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 1rem;
}

.oss-section p {
  color: #555;
  margin-bottom: 1rem;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.feature-item {
  padding: 1.25rem;
  background: #fafafa;
  border-radius: 10px;
  border: 1px solid #eee;
}

.feature-item h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}

.feature-item p {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

/* Code Blocks in OSS pages */
.code-block {
  margin: 1.25rem 0;
}

.code-block pre {
  background: #1e1e1e;
  border-radius: 8px;
  padding: 1.25rem;
  overflow-x: auto;
}

.code-block code {
  font-family: "SF Mono", "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 0.85rem;
  color: #e5e5e5;
}

.code-block-small pre {
  padding: 0.75rem 1rem;
}

/* Highlight Box */
.highlight-box {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-left: 4px solid #f59e0b;
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
  color: #92400e;
}

:root.dark .highlight-box,
:root[data-theme="dark"] .highlight-box {
  background: linear-gradient(135deg, #422006 0%, #78350f 100%);
  border-left-color: #d97706;
  color: #fef3c7;
}

/* Architecture Diagram */
.architecture-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 12px;
}

.arch-layer {
  width: 100%;
  max-width: 400px;
  padding: 1rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.arch-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.arch-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.arch-items span {
  font-size: 0.8rem;
  font-weight: 500;
  color: #374151;
  background: #f3f4f6;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.arch-arrow {
  font-size: 0.8rem;
  color: #9ca3af;
  padding: 0.25rem 0;
}

/* FAQ Section */
.oss-faq {
  background: #f9fafb;
  padding: 2rem;
  border-radius: 12px;
}

.faq-item {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.faq-item summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: #1a1a1a;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  color: #9ca3af;
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  padding: 0 1.25rem 1rem;
  margin: 0;
  color: #555;
  line-height: 1.6;
}

.faq-item a {
  color: #6366f1;
}

/* Unfurled FAQ Items */
.faq-item-open {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 1rem;
  padding: 1.25rem 1.5rem;
}

.faq-item-open h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 0.75rem 0;
}

.faq-item-open p {
  margin: 0 0 0.75rem 0;
  color: #555;
  line-height: 1.65;
}

.faq-item-open p:last-child {
  margin-bottom: 0;
}

.faq-item-open a {
  color: #6366f1;
}

/* Performance Table */
.perf-table {
  margin: 1.5rem 0;
  overflow-x: auto;
}

.perf-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.perf-table th,
.perf-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.perf-table th {
  background: #f9fafb;
  font-weight: 600;
  color: #374151;
}

.perf-table tr.highlight td {
  background: #f0fdf4;
  font-weight: 600;
}

.perf-note {
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
}

/* Use Case List */
.use-case-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.use-case-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
  color: #555;
}

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

.use-case-list strong {
  color: #1a1a1a;
}

/* Dark Mode - Performance Table */
:root.dark .perf-table th,
:root[data-theme="dark"] .perf-table th {
  background: #2d2d2d;
  color: #e5e5e5;
}

:root.dark .perf-table th,
:root.dark .perf-table td,
:root[data-theme="dark"] .perf-table th,
:root[data-theme="dark"] .perf-table td {
  border-color: #3d3d3d;
}

:root.dark .perf-table td,
:root[data-theme="dark"] .perf-table td {
  color: #b0b0b0;
}

:root.dark .perf-table tr.highlight td,
:root[data-theme="dark"] .perf-table tr.highlight td {
  background: #1a3a2a;
  color: #86efac;
}

:root.dark .perf-note,
:root[data-theme="dark"] .perf-note {
  color: #999;
}

/* Dark Mode - FAQ Section */
:root.dark .oss-faq,
:root[data-theme="dark"] .oss-faq {
  background: #1e1e1e;
}

:root.dark .faq-item,
:root[data-theme="dark"] .faq-item {
  background: #2d2d2d;
  border-color: #3d3d3d;
}

:root.dark .faq-item summary,
:root[data-theme="dark"] .faq-item summary {
  color: #e5e5e5;
}

:root.dark .faq-item summary::after,
:root[data-theme="dark"] .faq-item summary::after {
  color: #888;
}

:root.dark .faq-item p,
:root[data-theme="dark"] .faq-item p {
  color: #b0b0b0;
}

:root.dark .faq-item a,
:root[data-theme="dark"] .faq-item a {
  color: #a5b4fc;
}

:root.dark .faq-item-open,
:root[data-theme="dark"] .faq-item-open {
  background: #2d2d2d;
  border-color: #3d3d3d;
}

:root.dark .faq-item-open h3,
:root[data-theme="dark"] .faq-item-open h3 {
  color: #e5e5e5;
}

:root.dark .faq-item-open p,
:root[data-theme="dark"] .faq-item-open p {
  color: #b0b0b0;
}

:root.dark .faq-item-open a,
:root[data-theme="dark"] .faq-item-open a {
  color: #a5b4fc;
}

/* Dark Mode - Use Case List */
:root.dark .use-case-list li,
:root[data-theme="dark"] .use-case-list li {
  border-color: #3d3d3d;
  color: #b0b0b0;
}

:root.dark .use-case-list strong,
:root[data-theme="dark"] .use-case-list strong {
  color: #e5e5e5;
}

/* Dark Mode - CTA Section */
:root.dark .oss-cta-section,
:root[data-theme="dark"] .oss-cta-section {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
}

:root.dark .oss-cta-section h2,
:root[data-theme="dark"] .oss-cta-section h2 {
  color: #e5e5e5;
}

:root.dark .oss-cta-section p,
:root[data-theme="dark"] .oss-cta-section p {
  color: #b0b0b0;
}

:root.dark .btn-secondary,
:root[data-theme="dark"] .btn-secondary {
  background: #2d2d2d;
  color: #e5e5e5;
  border-color: #4d4d4d;
}

:root.dark .btn-secondary:hover,
:root[data-theme="dark"] .btn-secondary:hover {
  background: #3d3d3d;
  border-color: #6d6d6d;
}

/* CTA Section */
.oss-cta-section {
  text-align: center;
  padding: 2rem;
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border-radius: 12px;
}

.oss-cta-section h2 {
  margin-bottom: 0.5rem;
}

.oss-cta-section p {
  margin-bottom: 1.5rem;
}

.oss-cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s;
}

.btn-primary {
  background: #24292e;
  color: white;
}

.btn-primary:hover {
  background: #1a1d21;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  background: white;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

/* Responsive */
@media (max-width: 640px) {
  .oss-hero h1 {
    font-size: 1.75rem;
  }

  .oss-repo-hero {
    flex-direction: column;
    gap: 1rem;
  }

  .oss-repo-hero h1 {
    font-size: 1.5rem;
  }

  .oss-repo-github {
    align-self: flex-start;
  }

  .oss-card-featured {
    padding: 1.5rem;
  }

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

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

  .oss-cta-buttons {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }
}
