:root {
  color-scheme: dark;

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --bg-canvas: #090d16;
  --bg-surface: #111827;
  --bg-surface-elevated: #162032;
  --bg-surface-subtle: #1e293b;

  --border-subtle: #27354a;
  --border-focus: #f97316;
  --border-accent: #f97316;
  --border-divider: rgba(255, 255, 255, 0.08);
  --ring-focus: rgba(249, 115, 22, 0.25);
  --badge-match-border: rgba(56, 189, 248, 0.2);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --accent-primary: #f97316;
  --accent-primary-hover: #ea580c;
  --btn-primary-text: #050a14;

  --accent-secondary: #f59e0b;
  --accent-secondary-bg: rgba(245, 158, 11, 0.12);

  --status-connected: #10b981;
  --status-connected-bg: #022c22;
  --status-connected-text: #6ee7b7;

  --path-line: #f97316;
  --path-line-inactive: #334155;

  --badge-match-bg: #1c2b3e;
  --badge-match-text: #7dd3fc;

  --hero-gradient: linear-gradient(135deg, #f97316 0%, #fbbf24 100%);
  --radar-glow: radial-gradient(circle, rgba(249, 115, 22, 0.15) 0%, rgba(9, 13, 22, 0) 70%);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  scrollbar-color: var(--border-subtle) transparent;
  scrollbar-width: thin;
}

[data-theme="light"] {
  color-scheme: light;

  --bg-canvas: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-surface-subtle: #e2e8f0;

  --border-subtle: #cbd5e1;
  --border-focus: #c2410c;
  --border-accent: #c2410c;
  --border-divider: rgba(0, 0, 0, 0.08);
  --ring-focus: rgba(194, 65, 12, 0.25);
  --badge-match-border: rgba(3, 105, 161, 0.25);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #475569;

  --accent-primary: #c2410c;
  --accent-primary-hover: #9a3412;
  --btn-primary-text: #ffffff;

  --accent-secondary: #b45309;
  --accent-secondary-bg: #fef3c7;

  --status-connected: #047857;
  --status-connected-bg: #ecfdf5;
  --status-connected-text: #065f46;

  --path-line: #c2410c;
  --path-line-inactive: #94a3b8;

  --badge-match-bg: #e0f2fe;
  --badge-match-text: #0369a1;

  --hero-gradient: linear-gradient(135deg, #c2410c 0%, #b45309 100%);
  --radar-glow: radial-gradient(circle, rgba(194, 65, 12, 0.08) 0%, rgba(248, 250, 252, 0) 70%);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);

  scrollbar-color: var(--border-subtle) transparent;
  scrollbar-width: thin;
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  background-image: var(--radar-glow);
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% 700px;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background-color: rgba(9, 13, 22, 0.85);
  border-bottom: 1px solid var(--border-divider);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="light"] .site-header {
  background-color: rgba(248, 250, 252, 0.88);
}

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

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

.logo-radar {
  position: relative;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radar-core {
  width: 10px;
  height: 10px;
  background-color: var(--accent-primary);
  border-radius: var(--radius-full);
  box-shadow: 0 0 8px var(--accent-primary);
}

.radar-ping {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid var(--accent-primary);
  border-radius: var(--radius-full);
  animation: radar-ping 2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
  opacity: 0.75;
}

.brand-dot {
  color: var(--accent-primary);
}

.site-nav {
  display: none;
}

@media (min-width: 768px) {
  .site-nav {
    display: block;
  }
}

.mobile-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0.35rem;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.mobile-menu-toggle:hover {
  border-color: var(--border-focus);
  background-color: var(--bg-surface-elevated);
}

@media (min-width: 768px) {
  .mobile-menu-toggle {
    display: none;
  }
}

.mobile-nav-popover {
  margin: 0;
  top: 4.25rem;
  right: 1.5rem;
  left: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background-color: var(--bg-surface);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0;
  margin: 0;
}

.mobile-nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: block;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.mobile-nav-links a:hover {
  color: var(--accent-primary);
  background-color: var(--bg-surface-elevated);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

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

.nav-links a:hover, .nav-links a:focus-visible {
  color: var(--accent-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.theme-toggle:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.sun-icon { display: none; }
.moon-icon { display: block; }

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

@media (max-width: 479px) {
  .theme-toggle {
    display: none;
  }

  .header-actions {
    gap: 0.5rem;
  }

  .header-inner .btn-sm {
    padding: 0.5rem 0.75rem;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: var(--btn-primary-text);
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.35);
}

.btn-primary:hover {
  background-color: var(--accent-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.45);
}

[data-theme="light"] .btn-primary {
  box-shadow: 0 4px 14px rgba(194, 65, 12, 0.25);
}

.btn-secondary {
  background-color: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background-color: var(--bg-surface-subtle);
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

.hero-section {
  padding-top: 4rem;
  padding-bottom: 5rem;
  position: relative;
  overflow: hidden;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-container {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-primary);
  border-radius: var(--radius-full);
  box-shadow: 0 0 6px var(--accent-primary);
}

.badge-tag {
  background-color: var(--accent-secondary-bg);
  color: var(--accent-secondary);
  font-size: 0.75rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.gradient-text {
  background-image: var(--hero-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2.25rem;
  max-width: 600px;
}

.hero-cta-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 3rem;
}

.hero-cta-group .btn-primary {
  width: 100%;
}

@media (min-width: 768px) {
  .hero-cta-group .btn-primary {
    width: auto;
  }
}

.hero-demo-link {
  padding: 0.5rem 0;
  font-size: 1rem;
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.hero-demo-link:hover,
.hero-demo-link:focus-visible {
  color: var(--text-primary);
}

.hero-demo-link:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-divider);
}

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

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

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

.stat-divider {
  width: 1px;
  height: 2.5rem;
  background-color: var(--border-divider);
}

.radar-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.radar-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #060910;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="light"] .radar-screen {
  background-color: #0f172a;
}

.radar-ring {
  position: absolute;
  border: 1px dashed rgba(249, 115, 22, 0.25);
  border-radius: var(--radius-full);
}

.ring-1 { width: 30%; height: 30%; }
.ring-2 { width: 60%; height: 60%; }
.ring-3 { width: 90%; height: 90%; }

.radar-sweep {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50%;
  height: 50%;
  transform-origin: 0 0;
  background: conic-gradient(from 0deg, rgba(249, 115, 22, 0.35) 0deg, transparent 60deg);
  animation: radar-sweep 6s linear infinite;
}

.radar-connections {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.radar-node {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  z-index: 5;
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffffff;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-full);
  background-color: rgba(17, 24, 39, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
}

.node-center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--accent-primary);
  color: var(--btn-primary-text);
  border-color: var(--accent-primary);
}

.node-elena { top: 30%; left: 15%; }
.node-alex { top: 25%; right: 18%; }
.node-marcus { bottom: 25%; right: 20%; }
.node-bram { top: 10%; left: 8%; border-color: var(--accent-primary); }
.node-david { top: 8%; right: 10%; border-color: var(--accent-primary); }

.node-ping {
  width: 6px;
  height: 6px;
  background-color: var(--accent-primary);
  border-radius: var(--radius-full);
  box-shadow: 0 0 6px var(--accent-primary);
}

.radar-caption {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
}

.status-indicator.live {
  background-color: var(--status-connected);
  box-shadow: 0 0 8px var(--status-connected);
}

.section {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

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

.section-header.text-center {
  text-align: center;
}

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

.section-title {
  font-size: clamp(1.875rem, 3.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.demo-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.preset-queries {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.preset-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.preset-btn {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

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

.preset-btn.active {
  background-color: var(--accent-primary);
  color: var(--btn-primary-text);
  border-color: var(--accent-primary);
  font-weight: 600;
}

.query-input-bar {
  margin-bottom: 2rem;
}

.input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--bg-surface-elevated);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.5rem 0.5rem 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrapper:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--ring-focus);
}

.input-icon {
  font-size: 1.125rem;
}

.query-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  font-size: 1.0625rem;
  color: var(--text-primary);
  outline: none;
  font-family: inherit;
}

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

.query-result-panel {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
}

.result-top-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-divider);
}

@media (min-width: 768px) {
  .result-top-bar {
    grid-template-columns: 1.2fr 1fr;
  }
}

.target-profile {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.target-avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-full);
  background: var(--hero-gradient);
  color: var(--btn-primary-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.target-header-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}

.target-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.badge-match {
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  background-color: var(--badge-match-bg);
  color: var(--badge-match-text);
  border: 1px solid var(--badge-match-border);
}

.target-role {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.target-location {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.target-rationale-box {
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.rationale-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 0.35rem;
}

.rationale-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.path-visualizer {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-divider);
}

.path-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.path-flow {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .path-flow {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.path-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  flex: 1;
}

.step-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
  font-weight: 700;
}

.step-details {
  display: flex;
  flex-direction: column;
}

.step-role {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.step-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.step-recency {
  font-size: 0.6875rem;
  color: var(--status-connected);
}

.path-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 0.5rem;
}

.connector-line {
  display: none;
}

@media (min-width: 768px) {
  .connector-line {
    display: block;
    width: 60px;
    height: 2px;
    background-color: var(--path-line);
    margin-bottom: 0.25rem;
  }
}

.connector-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.connector-sub {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.bridge-context-box {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background-color: var(--bg-surface-subtle);
  border-left: 3px solid var(--accent-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.85rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.draft-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .draft-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.draft-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
}

.draft-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.tone-tabs {
  display: flex;
  gap: 0.35rem;
  background-color: var(--bg-surface-subtle);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.tone-tab {
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

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

.tone-tab.active {
  background-color: var(--bg-surface);
  color: var(--accent-primary);
  box-shadow: var(--shadow-sm);
}

.draft-preview-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.draft-subject-line {
  font-size: 0.875rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-divider);
  color: var(--text-secondary);
}

.subject-tag {
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 0.5rem;
}

.draft-body {
  width: 100%;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--text-primary);
  line-height: 1.6;
  resize: vertical;
  outline: none;
}

.draft-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  margin-top: 0.75rem;
  border-top: 1px solid var(--border-divider);
}

.draft-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.channel-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  transition: border-color 0.2s, transform 0.2s;
}

.channel-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.channel-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.channel-icon {
  font-size: 1.75rem;
}

.channel-title-wrap {
  flex: 1;
}

.channel-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.channel-privacy {
  font-size: 0.75rem;
  color: var(--status-connected);
}

.channel-toggle-btn {
  width: 2.75rem;
  height: 1.5rem;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  padding: 2px;
  display: flex;
  align-items: center;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.switch-handle {
  width: 1.125rem;
  height: 1.125rem;
  border-radius: var(--radius-full);
  background-color: var(--text-muted);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.channel-toggle-btn.active {
  background-color: var(--status-connected);
  border-color: var(--status-connected);
}

.channel-toggle-btn.active .switch-handle {
  transform: translateX(1.25rem);
  background-color: #ffffff;
}

.channel-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  min-height: 2.75rem;
}

.channel-stats {
  display: flex;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-divider);
}

.ch-stat-num {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
}

.ch-stat-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.reach-summary-bar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

@media (min-width: 768px) {
  .reach-summary-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
  }
}

.reach-metric {
  text-align: center;
}

.metric-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.25rem;
}

.metric-value {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  display: block;
}

.metric-value.highlight {
  color: var(--accent-primary);
}

.metric-sub {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.reach-divider {
  display: none;
}

@media (min-width: 768px) {
  .reach-divider {
    display: block;
    width: 1px;
    height: 3.5rem;
    background-color: var(--border-divider);
  }
}

.hiw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.hiw-card {
  position: relative;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-md);
}

.hiw-step-num {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--border-subtle);
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  line-height: 1;
}

.hiw-icon {
  font-size: 2.25rem;
  margin-bottom: 1.25rem;
}

.hiw-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.hiw-card-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.privacy-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
  align-items: center;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
}

@media (min-width: 992px) {
  .privacy-container {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.privacy-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.privacy-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.check-icon {
  color: var(--status-connected);
  font-weight: 800;
  font-size: 1.125rem;
}

.privacy-shield-card {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.shield-graphic {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.shield-icon {
  font-size: 3rem;
  z-index: 2;
}

.shield-meta h4 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.shield-meta p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.enclave-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background-color: var(--status-connected-bg);
  color: var(--status-connected-text);
  font-size: 0.75rem;
  font-weight: 700;
}

.waitlist-card {
  background-color: var(--bg-surface);
  border: 2px solid var(--border-accent, var(--accent-primary));
  border-radius: var(--radius-lg);
  padding: 3.5rem 2.5rem;
  box-shadow: var(--shadow-lg);
  max-width: 800px;
  margin: 0 auto;
}

.waitlist-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-input-wrap {
  display: flex;
  gap: 0.75rem;
  flex-direction: column;
}

@media (min-width: 640px) {
  .form-input-wrap {
    flex-direction: row;
  }
}

.form-input {
  flex: 1;
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--ring-focus);
}

.form-error-msg {
  color: #ef4444;
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 0.5rem;
}

.form-channels-pref {
  padding-top: 1rem;
  border-top: 1px solid var(--border-divider);
}

.pref-label {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.pref-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.pref-checkbox {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.pref-checkbox input {
  accent-color: var(--accent-primary);
  width: 1rem;
  height: 1rem;
}

.waitlist-success {
  text-align: center;
  padding: 2rem 1rem;
}

.success-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.success-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.success-message {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.referral-box {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  max-width: 500px;
  margin: 0 auto;
}

.referral-label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.referral-input-group {
  display: flex;
  gap: 0.5rem;
}

.referral-input {
  flex: 1;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-divider);
  background-color: var(--bg-surface);
  padding: 4rem 0 3rem 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 1.5fr 1fr;
  }
}

.footer-tagline {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  max-width: 380px;
}

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

.footer-links-group {
  display: flex;
  gap: 4rem;
}

.footer-nav-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.footer-nav-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-nav-col a {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

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

.modal-dialog {
  margin: auto;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  max-width: 560px;
  width: 90%;
  max-height: min(90dvh, 800px);
  overflow-y: auto;
  box-shadow: var(--shadow-lg);

  opacity: 0;
  transform: scale(0.95);
  transition-property: opacity, transform, display, overlay;
  transition-duration: 0.25s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
}

.modal-dialog::backdrop {
  background-color: rgba(0, 0, 0, 0);
  backdrop-filter: blur(4px);
  transition-property: background-color, display, overlay;
  transition-duration: 0.25s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
}

.modal-dialog[open] {
  opacity: 1;
  transform: scale(1);

  @starting-style {
    opacity: 0;
    transform: scale(0.95);
  }
}

.modal-dialog[open]::backdrop {
  background-color: rgba(0, 0, 0, 0.65);

  @starting-style {
    background-color: rgba(0, 0, 0, 0);
  }
}

.dialog-content {
  padding: 2rem;
}

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

.dialog-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.dialog-close-btn {
  font-size: 1.5rem;
  color: var(--text-muted);
  line-height: 1;
  padding: 0.25rem;
}

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

.dialog-body {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.dialog-body h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 1rem;
  margin-bottom: 0.35rem;
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 1rem;
  border-top: 1px solid var(--border-divider);
}

@keyframes radar-sweep {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes radar-ping {
  0% {
    transform: scale(0.9);
    opacity: 0.8;
  }
  80%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .radar-sweep, .radar-ping {
    animation: none;
  }
}
