/* ===== Documentation Styles ===== */
/* Palette duplicated from src/style.css — docs use prose layout, not app layout */

:root {
  --bg-page: #f4f5f7;
  --bg-card: #ffffff;
  --bg-inset: #eef0f4;
  --border: #dce0e8;
  --border-light: #e8ecf1;
  --text: #1a1d23;
  --text-secondary: #4a5060;
  --text-muted: #7c8496;
  --text-dim: #9aa2b1;
  --accent: #4a9fa1;
  --accent-soft: #ecf7f7;
  --accent-text: #357678;
  --green: #16a34a;
  --green-soft: #ecfdf3;
  --green-text: #15803d;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --gap-sm: 0.5rem;
  --gap-md: 0.75rem;
  --gap-lg: 1rem;
  --r-sm: 0.5rem;
  --r-md: 0.625rem;
  --r-lg: 0.875rem;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.05);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-page);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }

/* ===== Nav Bar ===== */

.docs-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}
.docs-nav-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 1.5rem;
  flex-wrap: wrap;
}
.docs-nav-logo {
  height: 1.5rem;
  width: auto;
  vertical-align: middle;
  margin-right: 0.4rem;
}
.docs-nav-title {
  font-weight: 700;
  font-size: 1.125rem;
  background: linear-gradient(135deg, #4a9fa1, #357678);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}
.docs-nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.docs-nav a:hover { color: var(--accent); }
.docs-nav a.active {
  color: var(--accent-text);
  border-bottom-color: var(--accent);
}

/* ===== Layout ===== */

.docs-layout {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: 2.5rem;
  align-items: start;
}
.docs-content {
  max-width: 48rem;
  min-width: 0;
}
.docs-content-full {
  max-width: 48rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ===== Sidebar TOC ===== */

.docs-sidebar {
  position: sticky;
  top: 4.5rem;
  max-height: calc(100vh - 5rem);
  overflow-y: auto;
  background: var(--bg-card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  padding: 1rem;
}
.docs-sidebar h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}
.docs-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.docs-sidebar li { margin-bottom: 0.25rem; }
.docs-sidebar a {
  display: block;
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--r-sm);
  transition: background 0.15s, color 0.15s;
}
.docs-sidebar a:hover {
  background: var(--bg-inset);
  color: var(--text);
}
.docs-sidebar a.active {
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 600;
}

/* Mobile sidebar toggle */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  line-height: 1;
}

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

.docs-content h1, .docs-content-full h1 {
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}
.docs-content h2, .docs-content-full h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-light);
}
.docs-content h3, .docs-content-full h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: var(--text);
}
.docs-content p, .docs-content-full p {
  margin: 0 0 1rem;
  color: var(--text-secondary);
}
.docs-content ul, .docs-content ol,
.docs-content-full ul, .docs-content-full ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}
.docs-content li, .docs-content-full li {
  margin-bottom: 0.4rem;
}
.docs-content strong, .docs-content-full strong { color: var(--text); }
.docs-content code, .docs-content-full code {
  background: var(--bg-inset);
  padding: 0.15em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
}

.subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin: 0 0 2rem;
}

/* ===== Steps (Quick Start) ===== */

.step {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  margin-bottom: 2.5rem;
  align-items: start;
}
.step-number {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-content h3 {
  margin: 0.25rem 0 0.5rem;
  font-size: 1.125rem;
}
.step-content p {
  margin: 0 0 0.75rem;
  color: var(--text-secondary);
}

/* ===== Screenshot Placeholder ===== */

.screenshot-placeholder {
  border: 2px dashed var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-inset);
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.875rem;
  margin: 1rem 0;
}
.screenshot-placeholder::before {
  content: "\1F4F7";
  display: block;
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

/* ===== Doc Screenshots ===== */

.doc-screenshot {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  margin: 1rem 0;
}

/* ===== Callouts ===== */

.callout {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 1rem 1.25rem;
  margin: 1rem 0 1.5rem;
  font-size: 0.9375rem;
}
.callout p { margin: 0; color: var(--text-secondary); }
.callout strong { color: var(--text); }
.callout-tip {
  border-left-color: var(--green);
  background: var(--green-soft);
}
.callout-note {
  border-left-color: var(--amber);
  background: var(--amber-soft);
}

/* ===== Tables ===== */

.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.875rem;
}
.docs-table th {
  text-align: left;
  padding: 0.625rem 0.75rem;
  background: var(--bg-inset);
  border-bottom: 2px solid var(--border);
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.docs-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
}
.docs-table tr:last-child td { border-bottom: none; }
.docs-table td.sub-row {
  font-size: 0.8em;
  color: var(--text-muted);
  padding-top: 0.2rem;
  border-bottom: 1px solid var(--border-light);
}
.docs-table code {
  background: var(--bg-inset);
  padding: 0.1em 0.35em;
  border-radius: 0.2rem;
  font-size: 0.8125rem;
}

/* ===== What Next / CTA Section ===== */

.next-section {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  padding: 1.5rem 2rem;
  margin-top: 3rem;
  box-shadow: var(--shadow-sm);
}
.next-section h2 {
  border-bottom: none;
  margin: 0 0 0.75rem;
  padding-bottom: 0;
  font-size: 1.25rem;
}
.next-section ul {
  margin: 0;
  padding-left: 1.25rem;
}
.next-section li { margin-bottom: 0.35rem; }
.next-section a {
  color: var(--accent-text);
  font-weight: 500;
}

/* ===== Footer ===== */

.docs-footer {
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 3rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.8125rem;
}
.docs-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  margin: 0 0.75rem;
}
.docs-footer a:hover { color: var(--accent); }

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

@media (max-width: 768px) {
  .docs-layout {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 0;
  }
  .docs-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 150;
    max-height: 100vh;
    border-radius: 0;
    padding: 1.5rem;
    overflow-y: auto;
  }
  .docs-sidebar.open { display: block; }
  .sidebar-toggle { display: flex; align-items: center; justify-content: center; }
  .docs-content-full { padding: 1rem; }
  .docs-nav-inner { gap: 0.75rem; padding: 0.5rem 1rem; }
  .docs-content h1, .docs-content-full h1 { font-size: 1.5rem; }
  .docs-content h2, .docs-content-full h2 { font-size: 1.25rem; }
  .step { grid-template-columns: 2.5rem 1fr; gap: 0.75rem; }
  .step-number { width: 2.25rem; height: 2.25rem; font-size: 1rem; }
  .docs-table { font-size: 0.8125rem; }
  .docs-table th, .docs-table td { padding: 0.4rem 0.5rem; }
}
