/* ==========================================================================
   isitreal Documentation Website — Calm Readable Discovery Design System
   ========================================================================== */

:root {
  /* Default Theme: Calm Dark Slate */
  --bg-primary: #0b0f19;
  --bg-secondary: #0f172a;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-code: #111827;
  --bg-code-header: #1f2937;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-code: #e2e8f0;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(16, 185, 129, 0.45);
  --border-focus: #34d399;

  --accent-emerald: #10b981;
  --accent-emerald-dim: rgba(16, 185, 129, 0.12);
  --accent-emerald-hover: #059669;
  --accent-emerald-light: #34d399;

  --accent-amber: #f59e0b;
  --accent-amber-dim: rgba(245, 158, 11, 0.12);
  --accent-rose: #f43f5e;
  --accent-rose-dim: rgba(244, 63, 94, 0.12);
  --accent-sky: #38bdf8;

  --nav-bg: rgba(11, 15, 25, 0.75);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.35), 0 2px 4px -2px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);

  --font-prose: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-code: 'JetBrains Mono', "Fira Code", monospace;

  --max-width: 1380px;
  --prose-width: 780px;
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 1);
  --bg-code: #0f172a;
  --bg-code-header: #1e293b;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-code: #f8fafc;

  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-active: rgba(16, 185, 129, 0.6);
  --border-focus: #059669;

  --nav-bg: rgba(248, 250, 252, 0.82);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
}

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

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  font-family: var(--font-prose);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  line-height: 1.7;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* ==========================================================================
   Top Navigation (Glassmorphic)
   ========================================================================== */

.top-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background-color: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.nav-container {
  max-width: var(--max-width);
  height: 4.25rem;
  margin: 0 auto;
  padding: 0 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-logo {
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.brand-link:hover .brand-logo {
  transform: rotate(-6deg) scale(1.05);
}

.brand-version {
  font-size: 0.72rem;
  font-family: var(--font-code);
  color: var(--accent-emerald-light);
  background-color: var(--accent-emerald-dim);
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.93rem;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link-highlight {
  color: var(--accent-emerald-light);
}

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

.search-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-prose);
  font-size: 0.84rem;
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-btn:hover {
  border-color: var(--border-active);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.kbd-shortcut {
  font-family: var(--font-code);
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 0.25rem;
  padding: 0.1rem 0.35rem;
  color: var(--text-muted);
}

.theme-toggle-btn, .mobile-menu-btn, .github-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.5rem;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover, .mobile-menu-btn:hover, .github-link:hover {
  border-color: var(--border-active);
  color: var(--text-primary);
  background: var(--accent-emerald-dim);
}

.icon-moon { display: none; }
.icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: block; }
[data-theme="light"] .icon-sun { display: none; }

.mobile-menu-btn {
  display: none;
}

/* ==========================================================================
   Mobile Drawer
   ========================================================================== */

.mobile-drawer {
  position: fixed;
  top: 4.25rem;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.25rem 1.75rem;
  z-index: 49;
  display: none;
  box-shadow: var(--shadow-lg);
}

.mobile-drawer.open {
  display: block;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05rem;
  padding: 0.4rem 0;
}

.mobile-link-accent {
  color: var(--accent-emerald-light);
  font-weight: 600;
}

/* ==========================================================================
   Page Layout & Desktop Scrollspy Grid
   ========================================================================== */

.page-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.75rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 3.5rem;
}

.main-content {
  min-width: 0;
  padding-bottom: 6rem;
}

/* Right Sidebar TOC */
.toc-sidebar {
  display: block;
  padding-top: 3.5rem;
}

.toc-sticky-container {
  position: sticky;
  top: 6.5rem;
}

.toc-heading {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  font-weight: 700;
}

.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-left: 2px solid var(--border-subtle);
  padding-left: 1rem;
}

.toc-link {
  text-decoration: none;
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  line-height: 1.4;
}

.toc-link:hover, .toc-link.active {
  color: var(--accent-emerald-light);
  font-weight: 600;
}

.toc-cta-box {
  margin-top: 2.5rem;
  padding: 1.15rem;
  border-radius: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.toc-cta-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.toc-cta-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.toc-cta-link {
  font-size: 0.82rem;
  color: var(--accent-emerald-light);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

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

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  position: relative;
  padding: 5rem 0 4.5rem;
  overflow: hidden;
}

.hero-background-glow {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 650px;
  height: 380px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.16) 0%, rgba(5, 150, 105, 0) 70%);
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background-color: var(--accent-emerald-dim);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--accent-emerald-light);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.hero-title {
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  margin-bottom: 1.4rem;
}

.highlight-gradient {
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 730px;
  margin-bottom: 2.25rem;
}

.hero-subtitle code {
  font-family: var(--font-code);
  font-size: 0.95em;
  color: var(--accent-emerald-light);
  background: var(--accent-emerald-dim);
  padding: 0.15rem 0.4rem;
  border-radius: 0.3rem;
}

/* Quick Copy Command Pill */
.hero-command-bar {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  padding: 0.55rem 0.8rem 0.55rem 1.15rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2.5rem;
  min-width: 380px;
}

.command-input-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.command-prompt {
  color: var(--accent-emerald);
  font-weight: 700;
  font-family: var(--font-code);
}

.command-text {
  font-family: var(--font-code);
  color: var(--text-primary);
  font-size: 0.95rem;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: var(--accent-emerald-dim);
  border-color: var(--border-active);
  color: var(--text-primary);
}

/* Hero CTAs */
.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.35rem;
  border-radius: 0.65rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--accent-emerald);
  color: #ffffff;
  box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.35);
}

.btn-primary:hover {
  background-color: var(--accent-emerald-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-card);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-active);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

.btn-outline:hover {
  border-color: var(--border-active);
  color: var(--text-primary);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}

/* Hero Metrics */
.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-value {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-code);
}

.metric-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Documentation Sections & Typography
   ========================================================================== */

.docs-section {
  padding-top: 4.5rem;
  max-width: var(--prose-width);
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-emerald-light);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

.title-code {
  font-family: var(--font-code);
  color: var(--accent-emerald-light);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Architecture Cards */
.architecture-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.75rem;
}

.arch-card {
  padding: 1.75rem;
  border-radius: 1rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.arch-card:hover {
  transform: translateY(-2px);
}

.arch-danger {
  border-color: rgba(244, 63, 94, 0.35);
}

.arch-protected {
  border-color: rgba(16, 185, 129, 0.4);
}

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

.arch-icon {
  font-size: 1.4rem;
}

.arch-card-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.arch-step-list {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.arch-step-list li {
  font-size: 0.93rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.arch-step-list li strong {
  color: var(--text-primary);
}

.arch-step-list code {
  font-family: var(--font-code);
  font-size: 0.88em;
  background: var(--bg-secondary);
  padding: 0.15rem 0.35rem;
  border-radius: 0.25rem;
}

/* ==========================================================================
   Interactive Discovery / Sandbox Section
   ========================================================================== */

.sandbox-section {
  max-width: 1000px; /* Wider container for sandbox */
}

.sandbox-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.sandbox-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-secondary);
}

.sandbox-tab-btn {
  padding: 1rem 1.75rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sandbox-tab-btn:hover {
  color: var(--text-primary);
}

.sandbox-tab-btn.active {
  color: var(--accent-emerald-light);
  border-bottom-color: var(--accent-emerald-light);
  background-color: var(--bg-card);
}

.sandbox-tab-content {
  display: none;
  padding: 2rem;
}

.sandbox-tab-content.active {
  display: block;
}

.sandbox-input-row {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 1.75rem;
}

.sandbox-input-wrapper {
  display: flex;
  gap: 0.75rem;
}

.sandbox-input {
  flex: 1;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 0.65rem;
  padding: 0.75rem 1rem;
  font-family: var(--font-code);
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease;
}

.sandbox-input:focus {
  border-color: var(--border-focus);
}

.sandbox-examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.examples-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.example-pill {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-code);
  font-size: 0.78rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.example-pill:hover,
.example-pill.active {
  border-color: var(--border-active);
  color: var(--text-primary);
  background-color: var(--accent-emerald-dim);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.pill-danger:hover,
.pill-danger.active {
  border-color: rgba(244, 63, 94, 0.6);
  color: #fda4af;
  background-color: var(--accent-rose-dim);
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.25);
}

.pill-warn:hover,
.pill-warn.active {
  border-color: rgba(245, 158, 11, 0.6);
  color: #fde047;
  background-color: var(--accent-amber-dim);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}

/* Simulation Result View */
.sandbox-result-container {
  background-color: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: 0.85rem;
  padding: 1.75rem;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.result-package-name {
  font-size: 1.35rem;
  font-weight: 700;
  font-family: var(--font-code);
  color: var(--text-primary);
}

.risk-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-code);
  text-transform: uppercase;
}

.risk-low {
  background-color: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.risk-high {
  background-color: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

.risk-unknown {
  background-color: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.result-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.detail-item {
  display: flex;
  flex-direction: column;
}

.detail-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.detail-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-code);
}

.reasons-box {
  background-color: var(--bg-secondary);
  border-left: 3px solid var(--accent-emerald);
  padding: 1rem 1.25rem;
  border-radius: 0 0.5rem 0.5rem 0;
  margin-bottom: 1.25rem;
}

.reasons-box.box-danger {
  border-left-color: var(--accent-rose);
}

.reasons-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
}

.reasons-list {
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.suggestions-pill-group {
  margin-top: 1rem;
}

.suggestions-pill-group span {
  font-size: 0.85rem;
  color: var(--accent-amber);
  font-weight: 600;
  margin-right: 0.65rem;
}

/* Scanner Tab Grid */
.scanner-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

.scanner-editor {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.editor-title {
  font-family: var(--font-code);
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.btn-text {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
}

.btn-text:hover {
  color: var(--text-primary);
}

.scanner-textarea {
  background-color: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  padding: 1rem;
  font-family: var(--font-code);
  font-size: 0.88rem;
  color: var(--text-code);
  outline: none;
  resize: vertical;
  line-height: 1.5;
}

.scanner-textarea:focus {
  border-color: var(--border-focus);
}

.scanner-output {
  overflow-x: auto;
}

/* Table styling */
.scan-results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.scan-results-table th {
  background-color: var(--bg-code-header);
  color: var(--text-secondary);
  font-weight: 600;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.scan-results-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

.scan-results-table tr:hover {
  background-color: var(--bg-card-hover);
}

/* ==========================================================================
   Documentation Cards & Code Blocks
   ========================================================================== */

.docs-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1.1rem;
  padding: 2.25rem;
  margin-top: 1.5rem;
}

.docs-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.docs-card h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.docs-card p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.docs-card code {
  font-family: var(--font-code);
  font-size: 0.88em;
  background-color: var(--bg-secondary);
  color: var(--accent-emerald-light);
  padding: 0.15rem 0.45rem;
  border-radius: 0.35rem;
  border: 1px solid var(--border-subtle);
}

.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2.25rem; }

/* Code Block Wrapper */
.code-block-wrapper {
  background-color: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  overflow: hidden;
  margin: 1.25rem 0;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-code-header);
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.code-lang {
  font-family: var(--font-code);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.code-block-wrapper pre {
  padding: 1.25rem;
  overflow-x: auto;
}

.code-block-wrapper pre code {
  font-family: var(--font-code);
  font-size: 0.88rem;
  color: var(--text-code);
  background: transparent;
  padding: 0;
  border: none;
  line-height: 1.6;
}

/* Feature List */
.feature-list {
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: var(--text-secondary);
  margin: 1rem 0;
}

.feature-list li strong {
  color: var(--text-primary);
  font-family: var(--font-code);
}

/* Alert Box */
.alert-box {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-radius: 0.85rem;
  background-color: var(--bg-secondary);
  border-left: 4px solid var(--accent-emerald);
}

.alert-tip {
  border-left-color: var(--accent-amber);
}

.alert-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.alert-content {
  font-size: 0.93rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.alert-content strong {
  color: var(--text-primary);
}

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

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

.api-table th {
  background-color: var(--bg-code-header);
  color: var(--text-secondary);
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  font-weight: 600;
}

.api-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  vertical-align: top;
}

.api-table td code {
  color: var(--accent-emerald-light);
  font-weight: 600;
}

/* Risk Cards Grid */
.risk-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1.75rem;
}

.risk-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
}

.risk-tier-badge {
  align-self: flex-start;
  padding: 0.25rem 0.65rem;
  border-radius: 0.35rem;
  font-family: var(--font-code);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 1.1rem;
}

.risk-card h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
}

.risk-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.risk-card ul {
  padding-left: 1.25rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.risk-card ul li strong {
  color: var(--text-primary);
}

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

.site-footer {
  margin-top: 6rem;
  padding: 3rem 0;
  border-top: 1px solid var(--border-subtle);
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.05rem;
}

.footer-copy {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.footer-links a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent-emerald-light);
}

/* ==========================================================================
   Search Modal (Cmd+K)
   ========================================================================== */

.search-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}

.search-modal-backdrop.open {
  display: flex;
}

.search-modal-box {
  width: 100%;
  max-width: 620px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

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

.search-modal-icon {
  color: var(--text-muted);
}

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

.modal-close-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 0.35rem;
  cursor: pointer;
}

.search-results-list {
  max-height: 380px;
  overflow-y: auto;
  padding: 0.75rem;
}

.search-result-item {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1rem;
  border-radius: 0.65rem;
  text-decoration: none;
  transition: background-color 0.15s ease;
  margin-bottom: 0.35rem;
}

.search-result-item:hover, .search-result-item.selected {
  background-color: var(--bg-card-hover);
}

.result-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.result-snippet {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.search-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.search-modal-footer kbd {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  font-family: var(--font-code);
  color: var(--text-secondary);
}

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

@media (max-width: 1024px) {
  .page-layout {
    grid-template-columns: 1fr;
  }
  .toc-sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav-links, .search-text, .kbd-shortcut {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }
  .hero-command-bar {
    min-width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .copy-command-btn {
    align-self: flex-end;
  }
  .architecture-grid {
    grid-template-columns: 1fr;
  }
  .hero-metrics {
    gap: 1.5rem;
  }
}
