:root {
  --paper: #f8fafc;
  --panel: #ffffff;
  --panel-soft: #f1f5f9;
  --panel-dark: #0f172a;
  --ink: #0f172a;
  --ink-soft: #475569;
  --muted: #94a3b8;
  --line: rgba(15, 23, 42, 0.08);
  --line-light: rgba(15, 23, 42, 0.04);
  
  --accent: #0284c7;
  --accent-dark: #0369a1;
  --accent-light: #e0f2fe;
  
  --accent-sky: #0ea5e9;
  --accent-rose: #f43f5e;
  --accent-indigo: #6366f1;
  --accent-leaf: #10b981;
  --accent-teal: #14b8a6;
  --accent-green: #22c55e;
  --accent-purple: #a855f7;
  --accent-amber: #f59e0b;
  --accent-warm: #ec4899;
  
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --header-height: 72px;
  
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.2s, background-color 0.2s;
}

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

img {
  display: block;
  max-width: 100%;
  height: auto;
}

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

code {
  background: rgba(15, 23, 42, 0.05);
  border-radius: 4px;
  padding: 0.15rem 0.35rem;
  color: var(--accent-dark);
  word-break: break-word;
  font-size: 0.9em;
}

pre {
  margin: 0;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  color: #334155;
  padding: 1.25rem;
  line-height: 1.5;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.02);
}

pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  word-break: normal;
  font-size: 0.88em;
}

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

/* Site Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0 2rem;
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.9);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.brand span {
  font-size: 1.15rem;
}

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

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 1rem;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(15, 23, 42, 0.05);
  color: var(--ink);
  outline: none;
}

.site-nav a.active {
  background: var(--accent-light);
  color: var(--accent-dark);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  padding: 0;
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s, background 0.2s;
}

/* Split Hero Section */
.hero {
  background: radial-gradient(circle at 80% 20%, rgba(2, 132, 199, 0.08) 0%, transparent 60%), var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 5rem 0;
  overflow: hidden;
}

.hero-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.8rem, 5.5vw, 4.2rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #0f172a 20%, #0369a1 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-copy {
  margin: 1.5rem 0 0;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.25rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0 1.75rem;
  color: var(--ink);
  background: var(--panel-soft);
  font-weight: 600;
  font-size: 0.96rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.button:hover,
.button:focus-visible {
  background: rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
  outline: none;
}

.button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: linear-gradient(135deg, #38bdf8, #0369a1);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.35);
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.glow-effect {
  position: absolute;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.15) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.window-mockup {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: var(--shadow-xl), 0 0 40px rgba(2, 132, 199, 0.03);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.window-mockup:hover {
  transform: translateY(-6px);
}

.window-header {
  height: 38px;
  background: #f1f5f9;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 0.5rem;
}

.window-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.window-dot.red { background: #f87171; }
.window-dot.yellow { background: #fbbf24; }
.window-dot.green { background: #34d399; }

.window-title {
  font-size: 0.75rem;
  color: var(--ink-soft);
  font-weight: 500;
  margin-left: 0.88rem;
  font-family: monospace;
}

.window-body img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* Two-column Container layout on Desktop */
.docs-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 4rem 2rem;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3.5rem;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
  height: calc(100vh - var(--header-height) - 4rem);
  overflow-y: auto;
  padding-right: 0.5rem;
}

.docs-sidebar::-webkit-scrollbar {
  width: 4px;
}

.docs-sidebar::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.08);
  border-radius: 2px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  padding: 0.625rem 0.88rem;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.sidebar-link:hover {
  color: var(--accent);
  background: var(--panel-soft);
}

.sidebar-link.active {
  color: var(--accent-dark);
  background: var(--accent-light);
}

.docs-content {
  min-width: 0;
}

/* Section Header Typography */
.docs-section {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--line);
}

.docs-section:first-of-type {
  padding-top: 0;
}

.docs-section:last-of-type {
  border-bottom: none;
}

.docs-section-tinted {
  background: var(--panel-soft);
  border: 1px solid var(--line) !important;
  border-radius: var(--radius);
  padding: 3rem !important;
  margin: 3.5rem 0;
}

.section-heading {
  margin-bottom: 3rem;
}

.section-heading h2 {
  margin: 0.5rem 0 0;
  color: var(--ink);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  line-height: 1.15;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.section-heading p:not(.eyebrow) {
  max-width: 800px;
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.6;
}

/* Bento Ecosystem Layout */
.bento-grid-ecosystem {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.bento-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.bento-card.highlight {
  grid-column: span 2;
  background: linear-gradient(135deg, #ffffff 60%, rgba(2, 132, 199, 0.03) 100%);
  border-color: rgba(2, 132, 199, 0.15);
}

.bento-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.bento-card h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.bento-card p {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), 0 0 24px rgba(2, 132, 199, 0.05);
  border-color: rgba(2, 132, 199, 0.3);
}

.icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-wrapper.accent-sky { background: rgba(14, 165, 233, 0.1); color: var(--accent-sky); }
.icon-wrapper.accent-rose { background: rgba(244, 63, 94, 0.1); color: var(--accent-rose); }
.icon-wrapper.accent-leaf { background: rgba(16, 185, 129, 0.1); color: var(--accent-leaf); }
.icon-wrapper.accent-indigo { background: rgba(99, 102, 241, 0.1); color: var(--accent-indigo); }
.icon-wrapper.accent-teal { background: rgba(20, 184, 166, 0.1); color: var(--accent-teal); }
.icon-wrapper.accent-green { background: rgba(34, 197, 94, 0.1); color: var(--accent-green); }
.icon-wrapper.accent-purple { background: rgba(168, 85, 247, 0.1); color: var(--accent-purple); }
.icon-wrapper.accent-amber { background: rgba(245, 158, 11, 0.1); color: var(--accent-amber); }

/* Gallery layout */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: rgba(2, 132, 199, 0.25);
}

.gallery-img-container {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-bottom: 1px solid var(--line);
}

.gallery-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

.gallery-item figcaption {
  padding: 0.88rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--panel-soft);
  text-align: center;
}

/* Bento Features Grid */
.bento-grid-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.feature-card h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.feature-card p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.feature-card.highlight-cyan {
  grid-column: span 2;
  background: linear-gradient(135deg, #ffffff 60%, rgba(14, 165, 233, 0.03) 100%);
  border-color: rgba(14, 165, 233, 0.15);
}

.feature-card.highlight-teal {
  grid-column: span 2;
  background: linear-gradient(135deg, #ffffff 60%, rgba(20, 184, 166, 0.03) 100%);
  border-color: rgba(20, 184, 166, 0.15);
}

.feature-card.highlight-warm {
  grid-column: span 2;
  background: linear-gradient(135deg, #ffffff 60%, rgba(245, 158, 11, 0.03) 100%);
  border-color: rgba(245, 158, 11, 0.15);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), 0 0 24px rgba(2, 132, 199, 0.05);
  border-color: rgba(2, 132, 199, 0.3);
}

/* System Architecture Diagram */
.architecture-flow-container {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 3rem;
  box-shadow: var(--shadow);
  margin-bottom: 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.flow-tier {
  width: 100%;
  display: flex;
  justify-content: center;
}

.flow-card-node {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  text-align: center;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow);
  position: relative;
}

.flow-card-node.uilayer {
  background: linear-gradient(135deg, #ffffff 0%, rgba(14, 165, 233, 0.03) 100%);
  border-color: rgba(14, 165, 233, 0.2);
}

.flow-card-node.corelayer {
  background: linear-gradient(135deg, #ffffff 0%, rgba(99, 102, 241, 0.03) 100%);
  border-color: rgba(99, 102, 241, 0.2);
}

.node-tag {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel-dark);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 2px 10px;
  border-radius: 99px;
}

.flow-card-node h4 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink);
}

.flow-card-node p {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

.flow-connector-vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0.5rem 0;
}

.connector-line {
  width: 2px;
  height: 24px;
  background: linear-gradient(180deg, var(--accent-sky), var(--accent-indigo));
}

.connector-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--accent-indigo);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.75rem;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 99px;
  margin: 2px 0;
}

.flow-split-container {
  width: 100%;
  max-width: 600px;
  height: 48px;
  margin: 0.25rem 0;
}

.flow-split-svg {
  width: 100%;
  height: 100%;
}

.flow-sub-tier {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  width: 100%;
  margin-top: 0.5rem;
}

.flow-card-node.subtier {
  padding: 1.25rem;
  border-radius: var(--radius);
  text-align: center;
  max-width: none;
}

.flow-card-node.subtier h5 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
}

.flow-card-node.subtier.local {
  background: linear-gradient(135deg, #ffffff 0%, rgba(20, 184, 166, 0.03) 100%);
  border-color: rgba(20, 184, 166, 0.2);
}
.flow-card-node.subtier.cloud {
  background: linear-gradient(135deg, #ffffff 0%, rgba(168, 85, 247, 0.03) 100%);
  border-color: rgba(168, 85, 247, 0.2);
}
.flow-card-node.subtier.devices {
  background: linear-gradient(135deg, #ffffff 0%, rgba(244, 63, 94, 0.03) 100%);
  border-color: rgba(244, 63, 94, 0.2);
}

/* Technical Details Grid */
.bento-grid-technical {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.technical-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.technical-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
}

.technical-card p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.technical-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(2, 132, 199, 0.25);
}

/* Workflow Timeline Stepper */
.workflow-timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline-line {
  position: absolute;
  left: 25px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-sky), var(--accent-indigo));
  opacity: 0.25;
}

.timeline-step {
  position: relative;
  display: flex;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.timeline-step:last-child {
  margin-bottom: 0;
}

.timeline-badge {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--accent);
  color: var(--accent);
  font-weight: 800;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(2, 132, 199, 0.15);
  z-index: 1;
  transition: all 0.3s ease;
}

.timeline-step:hover .timeline-badge {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 0 20px rgba(2, 132, 199, 0.4);
}

.timeline-content {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  width: 100%;
}

.timeline-step:hover .timeline-content {
  transform: translateX(4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(2, 132, 199, 0.25);
}

.timeline-content h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
}

.timeline-content p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* Callout Box */
.callout {
  margin-bottom: 3rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(2, 132, 199, 0.25);
  background: linear-gradient(120deg, rgba(2, 132, 199, 0.04), rgba(244, 63, 94, 0.04)), rgba(255, 255, 255, 0.8);
  display: flex;
  gap: 1.25rem;
}

.callout-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: rgba(2, 132, 199, 0.1);
  color: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.callout-body h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
}

.callout-body p {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* Self Hosting Split Setup Rows */
.setup-steps-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin-bottom: 4rem;
}

.setup-step-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}

.setup-step-desc {
  display: flex;
  flex-direction: column;
}

.step-num {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-sky);
  letter-spacing: 0.1em;
  background: var(--accent-light);
  padding: 3px 10px;
  border-radius: 99px;
  width: fit-content;
  margin-bottom: 0.75rem;
}

.setup-step-desc h3 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.setup-step-desc p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.setup-step-terminal {
  border-radius: var(--radius);
  background: var(--panel-dark);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.terminal-bar {
  height: 38px;
  background: #1e293b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 0.4rem;
}

.terminal-title {
  color: var(--muted);
  font-size: 0.75rem;
  font-family: monospace;
  margin-left: 0.75rem;
}

.setup-step-terminal pre {
  margin: 0;
  border: none;
  background: transparent;
  padding: 1.25rem;
  box-shadow: none;
}

.setup-step-terminal code {
  color: #38bdf8;
  font-size: 0.82rem;
}

/* Reference Bento Grid */
.reference-bento-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.reference-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.reference-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(2, 132, 199, 0.25);
}

.ref-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--line-light);
  padding-bottom: 0.75rem;
}

.ref-card-header h4 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 850;
  color: var(--ink);
}

.reference-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.reference-card li {
  margin: 0.65rem 0;
  font-size: 0.94rem;
  color: var(--ink-soft);
  line-height: 1.5;
  padding-left: 1.25rem;
  position: relative;
}

.reference-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
}

.reference-card strong {
  color: var(--ink);
}

/* Security Bento Grid */
.security-grid-bento {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.security-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.security-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(2, 132, 199, 0.25);
}

.card-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.security-card h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
}

.security-card p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* Local Development Split & Mock Terminal */
.developer-layout-split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 3rem;
  align-items: start;
}

.developer-info-col {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.dev-info-block h3 {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.5rem;
}

.prereqs-list,
.repo-list {
  padding-left: 1.25rem;
  margin: 0;
}

.prereqs-list li,
.repo-list li {
  margin: 0.5rem 0;
  font-size: 0.94rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.developer-terminal-col {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
}

.mock-terminal {
  background: var(--panel-dark);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mock-terminal .terminal-header {
  height: 38px;
  background: #1e293b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 0.5rem;
}

.mock-terminal .terminal-body {
  padding: 1.5rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.8rem;
  line-height: 1.6;
  color: #f8fafc;
  min-height: 280px;
  overflow-y: auto;
}

.terminal-line {
  display: flex;
  align-items: center;
  color: #38bdf8;
  margin-top: 1rem;
}

.terminal-line:first-child {
  margin-top: 0;
}

.terminal-line .prompt {
  color: #f43f5e;
  margin-right: 0.75rem;
  user-select: none;
  font-weight: bold;
}

.terminal-text {
  color: #94a3b8;
  padding-left: 1.25rem;
  margin-top: 0.25rem;
  word-break: break-all;
}

/* Markdown page wrapper (For other generated documentation files like Appwrite VM Runbook) */
.markdown-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

.markdown-page > h1:first-child {
  margin-top: 0;
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.markdown-page h2 {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 1.85rem;
  letter-spacing: -0.01em;
}

.markdown-page h3 {
  margin-top: 2.25rem;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.markdown-page p,
.markdown-page li {
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.65;
}

.markdown-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: var(--panel);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.04);
}

.markdown-page th,
.markdown-page td {
  border: 1px solid var(--line);
  padding: 1rem;
  text-align: left;
  vertical-align: top;
}

.markdown-page th {
  background: rgba(15, 23, 42, 0.03);
  font-weight: 600;
}

/* Site Footer */
.site-footer {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 3rem 2rem 4rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
}

.site-footer img {
  border-radius: 8px;
}

/* Responsive Breakpoints */
@media (max-width: 1023px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  
  .hero-content {
    align-items: center;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-visual {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
  }

  .docs-container {
    grid-template-columns: 1fr;
    padding: 2.5rem 1.5rem;
    gap: 0;
  }

  .docs-sidebar {
    display: none;
  }

  .docs-section {
    padding: 3.5rem 0;
  }
  
  .site-header {
    padding: 0 1.5rem;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-height) 0 auto 0;
    display: none;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
  }

  body.nav-open .site-nav {
    display: grid;
  }

  /* Animate hamburger menu */
  body.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  body.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }
  body.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .site-nav a {
    border-radius: 8px;
    padding: 0.75rem 1rem;
  }
}

@media (max-width: 820px) {
  .setup-step-row {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  .bento-grid-ecosystem {
    grid-template-columns: 1fr;
  }
  .bento-card.highlight {
    grid-column: span 1;
  }

  .bento-grid-features {
    grid-template-columns: repeat(2, 1fr);
  }
  .feature-card.highlight-cyan,
  .feature-card.highlight-teal,
  .feature-card.highlight-warm {
    grid-column: span 2;
  }

  .developer-layout-split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .developer-terminal-col {
    position: static;
  }
}

@media (max-width: 767px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .bento-grid-features {
    grid-template-columns: 1fr;
  }
  
  .feature-card.highlight-cyan,
  .feature-card.highlight-teal,
  .feature-card.highlight-warm {
    grid-column: span 1;
  }

  .reference-bento-grid {
    grid-template-columns: 1fr;
  }

  .security-grid-bento {
    grid-template-columns: 1fr;
  }

  .timeline-step {
    gap: 1rem;
  }
  .timeline-badge {
    width: 42px;
    height: 42px;
    font-size: 0.95rem;
  }
  .timeline-line {
    left: 20px;
  }
}

@media (max-width: 520px) {
  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  
  .button {
    width: 100%;
  }
  
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 3rem 1.5rem;
  }
}
