:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --text: #111827;
  --muted: #5b6474;
  --accent: #2356d8;
  --accent-soft: #e7eeff;
  --border: #dde3f0;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 16px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.2rem;

  --sidebar-width: 280px;
  --sidebar-radius: 0 22px 22px 0;
  --sidebar-bg: linear-gradient(165deg, #0f172a 0%, #1b2742 55%, #223153 100%);
  --sidebar-divider: rgba(221, 227, 240, 0.16);
  --sidebar-text: #ecf1ff;
  --sidebar-muted: rgba(236, 241, 255, 0.8);
  --sidebar-item-hover: rgba(255, 255, 255, 0.08);
  --sidebar-item-active: rgba(53, 118, 255, 0.2);
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  padding: 0;
  font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.docs-layout {
  position: relative;
  min-height: 100vh;
}

/* Sidebar styles */
.doc-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--sidebar-bg);
  border-radius: var(--sidebar-radius);
  box-shadow: 12px 0 28px rgba(7, 14, 29, 0.22);
  z-index: 200;
}

.sidebar-logo {
  padding: 2rem 1.4rem 1.7rem;
  text-align: center;
  border-bottom: 1px solid var(--sidebar-divider);
}

.sidebar-logo img {
  width: min(165px, 100%);
  height: auto;
  display: inline-block;
  object-fit: contain;
}

.sidebar-nav {
  display: grid;
  padding: 0.4rem 0.8rem 1.2rem;
  overflow-y: auto;
}

.sidebar-nav a {
  color: var(--sidebar-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.72rem 0.8rem;
  border-bottom: 1px solid var(--sidebar-divider);
  transition: background-color 160ms ease, color 160ms ease, font-weight 160ms ease;
}

.sidebar-nav a:hover {
  background: var(--sidebar-item-hover);
  color: var(--sidebar-text);
}

.sidebar-nav a.active {
  background: var(--sidebar-item-active);
  color: #fff;
  font-weight: 600;
}

.sidebar-nav a:focus-visible,
.sidebar-toggle:focus-visible,
.faq-trigger:focus-visible {
  outline: 2px solid #8fb2ff;
  outline-offset: 2px;
}

.sidebar-toggle {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 250;
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: #16213a;
  color: #eef3ff;
  border-radius: 10px;
  width: 42px;
  height: 42px;
  font-size: 1.2rem;
  cursor: pointer;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 17, 32, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 180;
}

.page-content {
  margin-left: var(--sidebar-width);
  height: 100vh;
  overflow-y: auto;
  padding: var(--space-4) min(4vw, 3rem) 4rem;
}

.page-content-inner {
  width: min(1100px, 100%);
  margin: 0 auto;
}

.doc-section { scroll-margin-top: 36px; margin-bottom: 3rem; }
.eyebrow { color: var(--accent); font-weight: 600; margin-bottom: 0.2rem; }
h1, h2, h3 { line-height: 1.25; margin-top: 0; }
h1 { font-size: clamp(1.8rem, 2.8vw, 2.5rem); margin-bottom: 0.8rem; }
h2 { font-size: clamp(1.4rem, 2.1vw, 1.9rem); margin-bottom: 0.8rem; }
.lead { color: var(--muted); font-size: 1.05rem; max-width: 80ch; }
.section-intro { color: var(--muted); }

.card-grid {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-2);
}
.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-up { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card,
.content-block,
.placeholder-shot,
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card {
  padding: var(--space-3);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 30px rgba(17, 24, 39, 0.12); }

.step-card span {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.content-block { padding: var(--space-3); }
.content-block ul,
.content-block ol { margin: 0; padding-left: 1.1rem; }

.placeholder-shot {
  margin: var(--space-3) 0 0;
  padding: var(--space-2);
}
.placeholder-shot img {
  width: 100%;
  max-height: 540px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.placeholder-shot figcaption { margin-top: 0.5rem; color: var(--muted); font-size: 0.92rem; }

.image-placeholder {
  width: 100%;
  min-height: 240px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: linear-gradient(135deg, #f3f5fb, #eceff8);
  color: var(--muted);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
  font-weight: 600;
}

.accordion { display: grid; gap: 0.8rem; }
.faq-item { overflow: hidden; }
.faq-trigger {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 1rem 1.1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 250ms ease;
  padding: 0 1.1rem;
}
.faq-content p { margin-top: 0; }
.faq-content.open { max-height: 180px; padding-bottom: 1rem; }

@media (max-width: 1100px) {
  .three-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .sidebar-toggle { display: inline-grid; place-items: center; }

  .doc-sidebar {
    transform: translateX(-103%);
    transition: transform 220ms ease;
    border-radius: 0 18px 18px 0;
  }

  body.sidebar-open .doc-sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .page-content {
    margin-left: 0;
    height: auto;
    min-height: 100vh;
    overflow-y: visible;
    padding: 4.6rem 1rem 3rem;
  }

  .two-up,
  .three-up { grid-template-columns: 1fr; }
}
