/* ==========================================================================
   D2R Mobile Guide — Modern Independent Handbook Stylesheet
   Direction: Mintlify proportions + Starlight navigation patterns
   ========================================================================== */

/* --- Font Face --- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/InterVariable.woff2') format('woff2');
}

/* --- Theme Tokens --- */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Light Theme (Default: warm paper + white surfaces + antique gold) */
  --bg: #fafaf8;
  --bg-subtle: #f3f3ef;
  --surface: #ffffff;
  --surface-card: #ffffff;
  --surface-elevated: #f4f4f0;
  --ink: #202327;
  --ink-secondary: #4a4f56;
  --muted: #656a72;
  --border: #e4e5e0;
  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-medium: rgba(0, 0, 0, 0.12);
  
  /* Brand Antique Gold */
  --accent: #946a27;
  --accent-hover: #7b561e;
  --accent-tint: rgba(148, 106, 39, 0.08);
  --accent-border: #e5d2ae;
  --accent-glow: rgba(148, 106, 39, 0.15);

  /* Status Colors (for device compatibility facts) */
  --status-green-bg: #e6f7ec;
  --status-green-ink: #1f883d;
  --status-green-border: #a8dfb7;

  --status-amber-bg: #fdf6e6;
  --status-amber-ink: #9a6700;
  --status-amber-border: #f2d48c;

  --status-blue-bg: #eef5fd;
  --status-blue-ink: #1b63c7;
  --status-blue-border: #b4d5fc;

  --status-red-bg: #fdebee;
  --status-red-ink: #cf222e;
  --status-red-border: #f8b4bb;

  --status-neutral-bg: #f0f1f3;
  --status-neutral-ink: #57606a;
  --status-neutral-border: #d0d7de;

  /* Shadows & Radius */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  /* Header & Shell */
  --header-height: 60px;
  --sidebar-width: 270px;
  --toc-width: 230px;
  --content-max-ch: 75ch;
  --shell-width: 90%;
}

/* Dark Theme (Charcoal + elevated cards + light antique gold) */
html.dark,
[data-theme="dark"] {
  --bg: #151719;
  --bg-subtle: #191c1f;
  --surface: #1d2023;
  --surface-card: #1d2023;
  --surface-elevated: #24282c;
  --ink: #e6e8ea;
  --ink-secondary: #b6bbc0;
  --muted: #9ba1a6;
  --border: #2b2f33;
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.14);

  --accent: #dcb976;
  --accent-hover: #ebd39f;
  --accent-tint: rgba(220, 185, 118, 0.12);
  --accent-border: #5a4929;
  --accent-glow: rgba(220, 185, 118, 0.18);

  --status-green-bg: #132c1c;
  --status-green-ink: #3fb950;
  --status-green-border: #245834;

  --status-amber-bg: #2e2107;
  --status-amber-ink: #d29922;
  --status-amber-border: #5c430e;

  --status-blue-bg: #12243d;
  --status-blue-ink: #58a6ff;
  --status-blue-border: #1f487e;

  --status-red-bg: #2c1214;
  --status-red-ink: #f85149;
  --status-red-border: #5e2226;

  --status-neutral-bg: #21262d;
  --status-neutral-ink: #8b949e;
  --status-neutral-border: #30363d;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 28px -5px rgba(0, 0, 0, 0.6);
}

/* --- Global Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.15s ease, color 0.15s ease;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 1920px) {
  :root {
    --shell-width: 85%;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, select {
  font: inherit;
}

/* Visible keyboard focus outline */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --- Layout Container --- */
.site-container {
  width: var(--shell-width);
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Header / Topbar --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background-color: rgba(250, 250, 248, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

html.dark .site-header,
[data-theme="dark"] .site-header {
  background-color: rgba(21, 23, 25, 0.88);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand-emblem {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.brand-subtitle {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background-color: var(--accent-tint);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  margin-left: 4px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Quick Search Trigger */
.search-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  color: var(--muted);
  font-size: 0.88rem;
  cursor: pointer;
  min-height: 38px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

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

.search-shortcut {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 4px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--muted);
}

/* Icon Buttons (Theme toggle, mobile hamburger) */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
}

.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

@media (max-width: 1023px) {
  .mobile-menu-btn {
    display: inline-flex;
  }
  .search-shortcut {
    display: none;
  }
}

@media (max-width: 640px) {
  .site-container {
    width: 94%;
  }
  .brand-subtitle {
    display: none;
  }
  .brand-pill {
    display: none;
  }
  .search-trigger {
    padding: 0;
    width: 36px;
    height: 36px;
    min-height: 36px;
    justify-content: center;
  }
  .search-trigger span {
    display: none;
  }
  .icon-btn {
    width: 36px;
    height: 36px;
  }
  .header-actions {
    gap: 6px;
  }
}

/* --- Layout Shell (Sidebar + Main + TOC) --- */
.layout-shell {
  display: flex;
  flex: 1;
  padding-top: 24px;
  padding-bottom: 64px;
  gap: 36px;
}

/* Left Handbook Navigation Sidebar */
.docs-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--header-height) + 24px);
  height: calc(100vh - var(--header-height) - 48px);
  overflow-y: auto;
  padding-right: 16px;
}

.sidebar-category {
  margin-bottom: 24px;
}

.sidebar-category-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 8px;
  padding-left: 10px;
}

.sidebar-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--ink-secondary);
  transition: all 0.12s ease;
}

.sidebar-nav-link:hover {
  background-color: var(--surface);
  color: var(--ink);
}

.sidebar-nav-link.active {
  background-color: var(--surface);
  color: var(--accent);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--accent);
  padding-left: 9px;
}

.nav-chip {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.nav-chip.experimental {
  background-color: var(--status-amber-bg);
  color: var(--status-amber-ink);
  border: 1px solid var(--status-amber-border);
}

.nav-chip.new {
  background-color: var(--status-green-bg);
  color: var(--status-green-ink);
  border: 1px solid var(--status-green-border);
}

/* Main Content Area */
.main-content {
  flex: 1;
  min-width: 0; /* Prevents overflow blowout */
  max-width: 100%;
}

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

/* Right TOC Column */
.docs-toc {
  width: var(--toc-width);
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--header-height) + 24px);
  height: calc(100vh - var(--header-height) - 48px);
  overflow-y: auto;
  padding-left: 16px;
  border-left: 1px solid var(--border-subtle);
  display: block;
}

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

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
}

.toc-item-h3 {
  padding-left: 14px;
}

.toc-link {
  color: var(--muted);
  line-height: 1.4;
  display: block;
  transition: color 0.12s ease;
}

.toc-link:hover,
.toc-link.active {
  color: var(--accent);
}

/* Responsive Hide for Sidebar / TOC */
@media (max-width: 1279px) {
  .docs-toc {
    display: none;
  }
}

@media (max-width: 1023px) {
  .docs-sidebar {
    display: none;
  }
  .layout-shell {
    padding-top: 16px;
  }
}

/* --- Hero Section (Homepage Editorial Asymmetry) --- */
.hero-section {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: center;
  gap: 40px;
  padding: 44px 0 56px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

@media (max-width: 900px) {
  .hero-section {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 24px 0 40px 0;
  }
}

.hero-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background-color: var(--accent-tint);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 18px;
}

.hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--ink-secondary);
  margin-bottom: 28px;
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}

/* Pill CTA Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  min-height: 44px; /* 44px touch target */
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--ink);
  color: var(--bg);
  border: 1px solid transparent;
}

html.dark .btn-primary,
[data-theme="dark"] .btn-primary {
  background-color: var(--accent);
  color: #151719;
}

.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
}

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

.hero-disclaimer-note {
  font-size: 0.84rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Original Hero Waypoint Emblem Visual */
.hero-visual-card {
  background: radial-gradient(circle at center, var(--accent-tint) 0%, transparent 70%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-waypoint-svg {
  width: 100%;
  max-width: 320px;
  height: auto;
}

/* --- Section Heading Styles --- */
.section-header {
  margin-bottom: 24px;
}

.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 6px;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section-desc {
  font-size: 0.98rem;
  color: var(--muted);
  margin-top: 4px;
}

/* --- Platform Routes Grid --- */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.platform-card {
  background-color: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.platform-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-card);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background-color: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.card-title {
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 8px;
}

.card-summary {
  font-size: 0.92rem;
  color: var(--ink-secondary);
  line-height: 1.55;
  margin-bottom: 16px;
  flex: 1;
}

.card-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: var(--muted);
}

.card-features li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-features li svg {
  color: var(--accent);
  flex-shrink: 0;
}

.card-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

/* --- Compatibility Selector Widget --- */
.selector-box {
  background-color: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 48px;
  box-shadow: var(--shadow-sm);
}

.selector-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 28px;
  align-items: center;
}

@media (max-width: 800px) {
  .selector-grid {
    grid-template-columns: 1fr;
  }
}

.selector-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.selector-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}

.selector-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--bg);
  color: var(--ink);
  font-size: 0.95rem;
  cursor: pointer;
  min-height: 44px;
}

.selector-result {
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  width: fit-content;
  margin-bottom: 10px;
}

.status-badge.supported {
  background-color: var(--status-green-bg);
  color: var(--status-green-ink);
  border: 1px solid var(--status-green-border);
}

.status-badge.extra-step {
  background-color: var(--status-amber-bg);
  color: var(--status-amber-ink);
  border: 1px solid var(--status-amber-border);
}

.status-badge.experimental {
  background-color: var(--status-blue-bg);
  color: var(--status-blue-ink);
  border: 1px solid var(--status-blue-border);
}

.status-badge.unsupported {
  background-color: var(--status-red-bg);
  color: var(--status-red-ink);
  border: 1px solid var(--status-red-border);
}

.status-badge.unverified {
  background-color: var(--status-neutral-bg);
  color: var(--status-neutral-ink);
  border: 1px solid var(--status-neutral-border);
}

.status-note {
  font-size: 0.92rem;
  color: var(--ink-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

/* --- Callout Box (Notice / Warning / Info) --- */
.callout {
  border-left: 4px solid var(--accent);
  background-color: var(--bg-subtle);
  padding: 16px 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 24px 0;
  font-size: 0.95rem;
}

.callout.callout-legal {
  border-left-color: var(--accent);
  background-color: var(--accent-tint);
}

.callout-title {
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

/* --- Article / Guide Typography --- */
.article-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.article-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 14px;
}

.article-summary-lead {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--ink-secondary);
  margin-bottom: 16px;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.82rem;
  color: var(--muted);
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Article Markdown Content */
.prose {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.75;
}

.prose h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 40px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--ink);
}

.prose h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-top: 28px;
  margin-bottom: 12px;
  color: var(--ink);
}

.prose p {
  margin-bottom: 18px;
}

.prose ul, .prose ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

.prose li {
  margin-bottom: 8px;
}

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

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a:hover {
  color: var(--accent-hover);
}

.prose code:not(pre code) {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 4px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--ink);
}

/* Code Blocks */
.code-block-wrapper {
  position: relative;
  margin: 22px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--surface-elevated);
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  background-color: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--muted);
}

.code-copy-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.12s ease;
}

.code-copy-btn:hover {
  color: var(--ink);
}

.prose pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.5;
  background-color: transparent;
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.prose th {
  background-color: var(--bg-subtle);
  font-weight: 600;
  color: var(--ink);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.prose td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--ink-secondary);
}

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

.prose tr:hover td {
  background-color: var(--surface);
}

/* FAQ Details Native Accordions */
.faq-section {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.faq-item {
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: var(--surface-card);
  overflow: hidden;
}

.faq-question {
  padding: 14px 18px;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.faq-chevron {
  transition: transform 0.2s ease;
  color: var(--muted);
}

details[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 18px 16px 18px;
  font-size: 0.94rem;
  color: var(--ink-secondary);
  line-height: 1.6;
}

/* Sources Card */
.sources-card {
  margin-top: 40px;
  padding: 20px 24px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.sources-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 12px;
}

.sources-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
}

.sources-list li a {
  color: var(--accent);
  text-decoration: underline;
}

/* Prev / Next Page Navigation */
.page-nav-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.page-nav-card {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--surface-card);
  transition: border-color 0.15s ease;
}

.page-nav-card:hover {
  border-color: var(--accent);
}

.page-nav-card.next {
  text-align: right;
  grid-column: 2;
}

.page-nav-direction {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.page-nav-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

/* --- Search Dialog (Cmd+K) --- */
.search-dialog {
  border: none;
  background: transparent;
  padding: 0;
  margin: auto;
  max-width: 620px;
  width: 90%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: visible;
}

.search-dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
}

.search-dialog-inner {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.search-box-header {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1.05rem;
  color: var(--ink);
  outline: none;
}

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

.search-filter-pills {
  display: flex;
  gap: 6px;
  padding: 10px 18px;
  background-color: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.filter-pill {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.filter-pill.active {
  background-color: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.search-results-list {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-result-item {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: background-color 0.1s ease;
}

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

.search-result-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-result-snippet {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

.search-result-snippet mark {
  background-color: var(--accent-tint);
  color: var(--accent);
  font-weight: 600;
  padding: 0 2px;
  border-radius: 2px;
}

.search-empty {
  padding: 36px 20px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

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

/* --- Mobile Drawer Navigation --- */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.mobile-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(85%, 320px);
  background-color: var(--bg);
  border-right: 1px solid var(--border);
  z-index: 101;
  transform: translateX(-100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 20px;
}

.mobile-drawer.open {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* --- Launch acceptance refinements --- */
.skip-link { position: fixed; top: 8px; left: 12px; padding: 10px 16px; background: var(--surface); border: 2px solid var(--accent); border-radius: 8px; z-index: 1000; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.platform-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.platform-card { position: relative; }
.card-link { min-height: 44px; }
#search-dialog [data-search-close] { min-width: 44px; min-height: 44px; }
.docs-toc .toc-item-h2 > .toc-link { font-weight: 550; }
.docs-toc .toc-item-h3 > .toc-link { font-size: .8rem; }
@media (max-width: 640px) {
  .platform-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .hero-visual-card { display: none; }
  .hero { padding-top: 20px; padding-bottom: 20px; }
  .hero-subtitle { margin-bottom: 18px; }
  .hero-actions { gap: 8px; margin-bottom: 16px; }
  .hero-actions .btn { min-height: 44px; }
  .section-header { margin-top: 30px; }
  .selector-box { padding: 20px; }
  .footer-nav { gap: 10px 18px; }
  .header-actions { gap: 2px; }
  .header-actions .search-trigger, .header-actions .icon-btn { width: 44px; height: 44px; min-height: 44px; padding: 0; }
  .brand-title { font-size: 1rem; }
}

/* --- Footer --- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background-color: var(--surface);
  padding: 36px 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  max-width: 480px;
}

.footer-brand p {
  margin-top: 6px;
  line-height: 1.55;
  font-size: 0.84rem;
}

.footer-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-nav a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 18px;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
