/* raycast-t3 — Local-First Static Site Stylesheet
   System fonts only · Dark/Light adaptive · Zero external resources */

:root {
  color-scheme: dark;
  --bg: #070b14;
  --bg-elevated: #0d1426;
  --bg-surface: #121c33;
  --bg-surface-hover: #182542;
  --bg-code: #090f1d;
  --bg-glass: rgba(7, 11, 20, 0.82);

  --ink: #f8f5ee;
  --ink-secondary: #cbd5e1;
  --ink-muted: #94a3b8;

  --accent: #3b82f6;
  --accent-strong: #2563eb;
  --accent-bright: #60a5fa;
  --accent-soft: rgba(37, 99, 235, 0.16);
  --accent-border: rgba(96, 165, 250, 0.36);

  --ivory: #f8f5ee;
  --success: #34d399;
  --success-soft: rgba(16, 185, 129, 0.14);
  --success-border: rgba(52, 211, 153, 0.34);

  --warn: #fbbf24;
  --warn-soft: rgba(245, 158, 11, 0.12);
  --warn-border: rgba(251, 191, 36, 0.32);

  --border: rgba(148, 163, 184, 0.18);
  --border-strong: rgba(148, 163, 184, 0.3);

  --shadow-lg: 0 24px 60px rgba(2, 6, 23, 0.56);
  --shadow-md: 0 12px 32px rgba(2, 6, 23, 0.36);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Liberation Sans", "Nimbus Sans", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Liberation Mono", "Noto Sans Mono", Menlo, Consolas, monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --max-w: 1120px;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f8f6f0;
    --bg-elevated: #ffffff;
    --bg-surface: #f1eee5;
    --bg-surface-hover: #e7e2d5;
    --bg-code: #0d1426;
    --bg-glass: rgba(248, 246, 240, 0.88);

    --ink: #0b1120;
    --ink-secondary: #334155;
    --ink-muted: #55647a;

    --accent: #2563eb;
    --accent-strong: #1d4ed8;
    --accent-bright: #1d4ed8;
    --accent-soft: rgba(37, 99, 235, 0.1);
    --accent-border: rgba(37, 99, 235, 0.32);

    --success: #047857;
    --success-soft: rgba(5, 150, 105, 0.1);
    --success-border: rgba(5, 150, 105, 0.3);

    --warn: #b45309;
    --warn-soft: rgba(217, 119, 6, 0.1);
    --warn-border: rgba(217, 119, 6, 0.3);

    --border: rgba(15, 23, 42, 0.12);
    --border-strong: rgba(15, 23, 42, 0.22);

    --shadow-lg: 0 24px 56px rgba(15, 23, 42, 0.1);
    --shadow-md: 0 10px 26px rgba(15, 23, 42, 0.06);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f8f6f0;
  --bg-elevated: #ffffff;
  --bg-surface: #f1eee5;
  --bg-surface-hover: #e7e2d5;
  --bg-code: #0d1426;
  --bg-glass: rgba(248, 246, 240, 0.88);

  --ink: #0b1120;
  --ink-secondary: #334155;
  --ink-muted: #55647a;

  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-bright: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --accent-border: rgba(37, 99, 235, 0.32);

  --success: #047857;
  --success-soft: rgba(5, 150, 105, 0.1);
  --success-border: rgba(5, 150, 105, 0.3);

  --warn: #b45309;
  --warn-soft: rgba(217, 119, 6, 0.1);
  --warn-border: rgba(217, 119, 6, 0.3);

  --border: rgba(15, 23, 42, 0.12);
  --border-strong: rgba(15, 23, 42, 0.22);

  --shadow-lg: 0 24px 56px rgba(15, 23, 42, 0.1);
  --shadow-md: 0 10px 26px rgba(15, 23, 42, 0.06);
}

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

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

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

a {
  color: var(--accent-bright);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

code,
kbd,
pre {
  font-family: var(--font-mono);
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5em;
  padding: 2px 6px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
}

.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;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent-strong);
  color: #ffffff;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-link:hover {
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links a {
  color: var(--ink-secondary);
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--ink);
  text-decoration: none;
}

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

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--ink-secondary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.theme-toggle:hover {
  background: var(--bg-surface);
  border-color: var(--border-strong);
  color: var(--ink);
}

.theme-icon {
  width: 15px;
  height: 15px;
  flex: none;
}

/* Hero */
.hero {
  position: relative;
  padding: 72px 0 56px;
  background:
    radial-gradient(ellipse 68% 55% at 50% -8%, rgba(37, 99, 235, 0.2), transparent 72%);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.hero-icon-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.hero-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-secondary);
  letter-spacing: 0.01em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.1rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--ink);
}

.hero-accent {
  color: var(--accent-bright);
}

.disclaimer-banner {
  margin: 22px 0 0;
  padding: 10px 16px;
  max-width: 680px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--ink-secondary);
  font-size: 0.9rem;
  line-height: 1.45;
  font-weight: 500;
}

.disclaimer-label {
  display: inline-block;
  margin-right: 6px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-bright);
}

.hero-lead {
  margin: 20px 0 0;
  max-width: 640px;
  font-size: 1.12rem;
  color: var(--ink-secondary);
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 11px;
  font-family: var(--font-sans);
  font-size: 0.96rem;
  font-weight: 650;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-strong);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  background: var(--accent);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-surface);
}

.btn-sm {
  padding: 7px 12px;
  font-size: 0.84rem;
  border-radius: 8px;
}

.hero-facts {
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.fact-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* Sections */
.section {
  padding: 72px 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: 76px;
}

.section-tight-top {
  padding-top: 28px;
  border-top: none;
}

.section-head {
  max-width: 720px;
  margin-bottom: 36px;
}

.section-kicker {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-bright);
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3.2vw, 2.35rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
}

.section-head p {
  margin: 12px 0 0;
  color: var(--ink-secondary);
  font-size: 1.02rem;
}

/* Interactive Raycast Demo */
.demo-shell {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.demo-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.demo-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
}

.window-dots {
  display: inline-flex;
  gap: 6px;
}

.wdot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}

.demo-badge {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.demo-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.demo-tab {
  padding: 6px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.demo-tab:hover {
  color: var(--ink);
}

.demo-tab[aria-selected="true"] {
  background: var(--accent-strong);
  color: #ffffff;
}

.demo-panel[hidden] {
  display: none;
}

.demo-input-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.demo-input-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  flex: none;
}

.demo-input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  outline: none;
}

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

.demo-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  min-height: 360px;
}

.demo-list-pane {
  padding: 12px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pane-label {
  padding: 4px 10px 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.preset-item {
  width: 100%;
  text-align: left;
  padding: 12px 13px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.preset-item:hover {
  background: var(--bg-surface);
}

.preset-item[aria-selected="true"] {
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

.preset-main {
  min-width: 0;
}

.preset-title {
  font-size: 0.94rem;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.3;
}

.preset-sub {
  margin-top: 3px;
  font-size: 0.8rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--ink-secondary);
}

.pill-accent {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-bright);
}

.pill-safe {
  background: var(--success-soft);
  border-color: var(--success-border);
  color: var(--success);
}

.pill-warn {
  background: var(--warn-soft);
  border-color: var(--warn-border);
  color: var(--warn);
}

.demo-detail-pane {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg-elevated);
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.detail-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.detail-meta-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  padding: 14px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
}

.detail-meta-grid dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}

.detail-meta-grid dd {
  margin: 3px 0 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  word-break: break-word;
}

.mono-value {
  font-family: var(--font-mono);
  font-size: 0.77rem;
}

.draft-prompt-box {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px dashed var(--border-strong);
  background: var(--bg-surface);
  font-size: 0.88rem;
  color: var(--ink-secondary);
}

.draft-prompt-label {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}

.demo-feedback {
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 0.86rem;
  line-height: 1.45;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--ink-secondary);
}

.demo-feedback[data-tone="preview"] {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--ink);
}

.demo-feedback[data-tone="saved"] {
  background: var(--success-soft);
  border-color: var(--success-border);
  color: var(--ink);
}

.demo-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.demo-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Search Threads mode */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.filter-pill {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--ink-secondary);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.filter-pill[aria-pressed="true"] {
  background: var(--accent-strong);
  border-color: var(--accent);
  color: #ffffff;
}

.thread-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Environments mode */
.env-grid {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.env-card {
  padding: 16px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.env-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.env-name {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ink);
}

.env-role {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.meter-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.meter-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meter-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-secondary);
}

.meter-track {
  height: 7px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent-bright));
}

.w-18 { width: 18%; }
.w-32 { width: 32%; }
.w-41 { width: 41%; }
.w-44 { width: 44%; }
.w-54 { width: 54%; }
.w-58 { width: 58%; }
.w-64 { width: 64%; }
.w-71 { width: 71%; }
.w-76 { width: 76%; }

/* Architecture Diagram */
.diagram-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-md);
  overflow-x: auto;
}

.arch-svg {
  width: 100%;
  min-width: 680px;
  height: auto;
}

.arch-lane-local {
  fill: var(--accent-soft);
  stroke: var(--accent-border);
  stroke-width: 1.5;
}

.arch-lane-remote {
  fill: var(--bg-surface);
  stroke: var(--border-strong);
  stroke-width: 1.5;
}

.arch-box {
  fill: var(--bg-elevated);
  stroke: var(--border-strong);
  stroke-width: 1.5;
}

.arch-box-accent {
  fill: var(--bg-elevated);
  stroke: var(--accent);
  stroke-width: 1.75;
}

.arch-lane-title {
  fill: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
}

.arch-lane-badge {
  fill: var(--accent-bright);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.arch-node-title {
  fill: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.arch-node-sub {
  fill: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 11px;
}

.arch-arrow {
  stroke: var(--accent-bright);
  stroke-width: 2;
  fill: none;
}

.arch-arrow-muted {
  stroke: var(--ink-muted);
  stroke-width: 2;
  fill: none;
}

.arch-summary-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

/* Cards & Grids */
.card {
  padding: 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
}

.card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-secondary);
  line-height: 1.55;
}

.commands-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.command-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.command-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.command-card h3 {
  margin: 0;
}

/* Install Section */
.install-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 20px;
  align-items: start;
}

.code-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-code);
  color: #f8f5ee;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.code-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.7);
}

.code-card-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #93c5fd;
  font-weight: 600;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 7px;
  border: 1px solid rgba(96, 165, 250, 0.36);
  background: rgba(37, 99, 235, 0.22);
  color: #f8f5ee;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.copy-btn:hover {
  background: rgba(37, 99, 235, 0.38);
}

.code-pre {
  margin: 0;
  padding: 18px 18px 20px;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.65;
  color: #f8f5ee;
  white-space: pre-wrap;
  word-break: break-word;
}

.install-note {
  margin: 14px 0 0;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.req-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.req-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--ink-secondary);
}

.req-marker {
  color: var(--accent-bright);
  font-weight: 700;
}

.walkthrough-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent-bright);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.upgrade-callout {
  margin-top: 20px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--warn-border);
  background: var(--warn-soft);
}

.upgrade-callout h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
  color: var(--ink);
}

.upgrade-callout p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-secondary);
}

/* Security Grid */
.security-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.security-tag {
  display: inline-block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--success-soft);
  border: 1px solid var(--success-border);
  color: var(--success);
}

/* Footer */
.site-footer {
  padding: 44px 0 56px;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

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

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.9rem;
  font-weight: 500;
}

.footer-links a {
  color: var(--ink-secondary);
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-legal {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

/* 404 Page */
.not-found-main {
  min-height: calc(100vh - 180px);
  display: flex;
  align-items: center;
  padding: 64px 0;
}

.not-found-card {
  max-width: 560px;
  margin: 0 auto;
  padding: 36px 32px;
  text-align: center;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-lg);
}

.not-found-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 18px;
}

.not-found-code {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-bright);
  letter-spacing: 0.08em;
}

.not-found-card h1 {
  margin: 8px 0 12px;
  font-size: 2rem;
  letter-spacing: -0.03em;
}

.not-found-card p {
  margin: 0 0 24px;
  color: var(--ink-secondary);
}

/* Responsive */
@media (max-width: 980px) {
  .commands-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .security-grid,
  .env-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .install-layout,
  .demo-split,
  .arch-summary-grid {
    grid-template-columns: 1fr;
  }
  .demo-list-pane {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 720px) {
  .container {
    padding: 0 16px;
  }
  .nav-links {
    display: none;
  }
  .hero {
    padding: 48px 0 36px;
  }
  .section {
    padding: 48px 0;
  }
  .commands-grid,
  .security-grid,
  .walkthrough-grid,
  .env-grid {
    grid-template-columns: 1fr;
  }
  .detail-meta-grid {
    grid-template-columns: 1fr;
  }
  .demo-topbar {
    padding: 12px 14px;
  }
  .demo-tabs {
    width: 100%;
    justify-content: space-between;
  }
  .demo-tab {
    flex: 1;
    padding: 7px 6px;
    font-size: 0.76rem;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
