/* FlowForm.to — dark liquid metal theme */

:root {
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;

  --primary: var(--primary-500);
  --primary-dark: var(--primary-600);
  --secondary: var(--primary-700);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  --bg-deep: #0a0a0a;
  --bg-base: #0f1117;
  --bg-elevated: #151820;
  --bg-card: rgba(21, 24, 32, 0.85);
  --bg-card-hover: rgba(26, 30, 42, 0.95);

  --text: #f5f5f5;
  --text-muted: rgba(255, 255, 255, 0.62);
  --text-subtle: rgba(255, 255, 255, 0.45);
  --gray: var(--text-muted);

  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --glass-bg: rgba(20, 22, 30, 0.75);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --shadow-metal: 0 8px 20px -4px rgba(59, 130, 246, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --glow-blue: radial-gradient(ellipse 70% 50% at 50% -20%, rgba(59, 130, 246, 0.35), transparent);

  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-base) 40%, #12151f 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(59, 130, 246, 0.12), transparent),
    radial-gradient(ellipse 50% 30% at 100% 60%, rgba(37, 99, 235, 0.08), transparent);
  z-index: -1;
  pointer-events: none;
}

/* Brand wordmark */
.brand-wordmark {
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
}

.brand-wordmark .brand-tld {
  background: linear-gradient(135deg, #93c5fd, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.site-nav-brand,
.page-nav-brand.brand-wordmark {
  font-size: 1.2rem;
  white-space: nowrap;
  letter-spacing: -0.02em;
}

.site-nav-brand:hover {
  opacity: 0.92;
}

/* Navigation */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 14px 20px;
  background: rgba(10, 10, 10, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.site-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.site-nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 8px 14px;
  border-radius: 10px;
  transition: var(--transition);
}

.site-nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.site-nav-cta {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600)) !important;
  color: white !important;
  box-shadow: var(--shadow-metal);
}

.site-nav-cta:hover {
  transform: translateY(-1px);
  color: white !important;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 20px 80px;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 45%, #16213e 100%);
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(59, 130, 246, 0.45), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(96, 165, 250, 0.2), transparent),
    radial-gradient(ellipse 50% 30% at 0% 80%, rgba(37, 99, 235, 0.25), transparent);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-title {
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.hero-title .brand-tld {
  font-size: 0.92em;
}

.tagline {
  font-size: clamp(1.125rem, 3vw, 1.375rem);
  max-width: 560px;
  margin: 0 auto 40px;
  color: var(--text-muted);
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-strong);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 28px;
  color: var(--text-muted);
  backdrop-filter: blur(8px);
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 12px var(--success);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  color: white;
  box-shadow: var(--shadow-metal);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -6px rgba(59, 130, 246, 0.55);
}

.btn-white {
  background: white;
  color: var(--primary-600);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.btn-white:hover {
  transform: translateY(-2px);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.06);
  color: white;
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--primary-400);
  border: 1px solid rgba(96, 165, 250, 0.4);
}

.btn-ghost:hover {
  background: rgba(59, 130, 246, 0.12);
  border-color: var(--primary-400);
}

/* Dark glass cards (shared) */
.dark-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.dark-card:hover {
  border-color: rgba(96, 165, 250, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(59, 130, 246, 0.15);
}

.dark-card h3,
.dark-card h4 {
  color: var(--text);
}

.dark-card p,
.dark-card li {
  color: var(--text-muted);
}

/* Sections */
.modes,
.features,
.code-section,
.special-fields,
.case-studies,
.social-proof {
  padding: 100px 20px;
  position: relative;
}

.modes {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section-subtitle {
  text-align: center;
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 60px;
}

.section-subtitle a {
  color: var(--primary-400);
  font-weight: 500;
}

.section-intro {
  text-align: center;
  margin: 0 auto 48px;
  max-width: 40rem;
}

.section-intro .section-title {
  margin-bottom: 12px;
}

.section-intro .section-subtitle {
  margin-bottom: 16px;
  max-width: none;
}

.section-intro--inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.section-intro-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.section-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--primary-400);
  text-decoration: none;
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: rgba(59, 130, 246, 0.08);
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.section-action:hover {
  background: rgba(59, 130, 246, 0.16);
  border-color: var(--primary-400);
  color: var(--text);
}

.section-action svg {
  width: 0.875rem;
  height: 0.875rem;
  stroke: currentColor;
  fill: none;
}

@media (min-width: 520px) {
  .section-intro--inline .section-intro-copy {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 16px;
  }

  .section-intro--inline .section-subtitle {
    margin-bottom: 0;
  }
}

/* Mode cards */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 28px;
  margin-top: 48px;
}

.mode-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-xl);
  padding: 36px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.mode-card:hover {
  border-color: rgba(96, 165, 250, 0.35);
  transform: translateY(-4px);
}

.mode-card.featured {
  border-color: rgba(59, 130, 246, 0.45);
  background: linear-gradient(135deg, rgba(30, 35, 50, 0.9) 0%, rgba(21, 24, 32, 0.95) 100%);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2), var(--glass-shadow);
}

.mode-card.featured::before {
  content: 'POPULAR';
  position: absolute;
  top: 20px;
  right: -32px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  color: white;
  padding: 4px 40px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  transform: rotate(45deg);
}

/* Icons — small stroke marks, matches dark glass UI */
.ff-icon,
.mode-icon,
.feature-icon,
.pro-feature-icon,
.case-study-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary-400);
  line-height: 0;
}

.ff-icon svg,
.mode-icon svg,
.feature-icon svg,
.pro-feature-icon svg,
.case-study-icon svg {
  width: 1.125rem;
  height: 1.125rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
}

.mode-icon {
  margin-bottom: 12px;
}

.mode-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.feature-icon {
  margin-bottom: 10px;
  opacity: 0.9;
}

.pro-feature-icon,
.case-study-icon:not(.case-study-icon--logo),
.pro-panel-header .ff-icon,
.ai-prompt-header-icon.ff-icon,
.tip-box h4 .ff-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.1);
}

.pro-feature-icon {
  margin-bottom: 12px;
}

.case-study-icon {
  width: 2rem;
  height: 2rem;
}

.case-study-icon--logo {
  width: auto;
  height: auto;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.partner-logo {
  display: block;
  object-fit: contain;
}

.partner-logo--square {
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
}

.partner-logo--wide {
  height: 1.375rem;
  width: auto;
  max-width: 9rem;
}

.partner-badge {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.check-list li {
  padding: 8px 0 8px 28px;
  position: relative;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.check-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.check-list li::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.65em;
  width: 5px;
  height: 9px;
  transform: translateY(-60%) rotate(45deg);
  border: solid var(--success);
  border-width: 0 2px 2px 0;
}

.incident-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 6px;
  margin-right: 10px;
  vertical-align: middle;
}

.incident-badge-resolved {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.star-rating {
  display: flex;
  gap: 2px;
  margin-bottom: 16px;
}

.star-rating svg {
  width: 18px;
  height: 18px;
  color: #fbbf24;
  fill: currentColor;
}

.copy-btn.is-copied {
  border-color: rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
}

.tip-box h4 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tip-box h4 .ff-icon {
  width: 1.75rem;
  height: 1.75rem;
}

.form-example-box {
  background: linear-gradient(135deg, rgba(15, 17, 25, 0.98) 0%, rgba(10, 12, 18, 0.98) 100%);
  border-radius: var(--radius-xl);
  padding: 40px;
  border: 1px solid var(--border-strong);
  margin-top: 40px;
  box-shadow: var(--glass-shadow);
}

.form-example-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.form-example-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}

.form-example-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
}

.form-example-inner {
  background: #060608;
  border-radius: 12px;
  padding: 24px 24px 24px 20px;
  font-family: ui-monospace, 'Monaco', 'Menlo', monospace;
  font-size: 0.875rem;
  line-height: 1.8;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.form-example-inner .copy-btn {
  top: 12px;
  right: 12px;
}

.form-example-quote {
  margin: 0;
  color: #6ee7b7;
}

.form-example-line {
  margin: 8px 0 8px 24px;
  color: #e5e7eb;
}

.mode-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.mode-card .mode-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 20px;
}

.mode-features {
  list-style: none;
  margin-bottom: 24px;
}

.mode-features li {
  padding: 8px 0;
  padding-left: 28px;
  position: relative;
  color: var(--text-muted);
}

.mode-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.mode-features li::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.65em;
  width: 5px;
  height: 9px;
  transform: translateY(-60%) rotate(45deg);
  border: solid var(--success);
  border-width: 0 2px 2px 0;
}

.mode-url {
  background: rgba(0, 0, 0, 0.35);
  color: #e5e5e5;
  padding: 12px 16px;
  border-radius: 10px;
  font-family: ui-monospace, 'Monaco', 'Menlo', monospace;
  font-size: 0.875rem;
  margin-bottom: 20px;
  word-break: break-all;
  border: 1px solid var(--border);
}

.mode-url span {
  color: #34d399;
}

/* Pro panel */
.pro-panel {
  margin-top: 56px;
  padding: 40px;
  border-radius: var(--radius-xl);
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(16, 185, 129, 0.25);
  box-shadow: var(--glass-shadow);
}

.pro-panel h3 {
  color: var(--text);
}

.pro-panel > p {
  color: var(--text-muted);
}

.pro-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.pro-badge {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
}

.pro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.pro-feature-card {
  padding: 28px;
}

.pro-callout {
  margin-top: 20px;
  padding: 16px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 8px;
  border-left: 4px solid var(--success);
}

.pro-callout p {
  margin: 0;
  font-size: 0.8125rem;
  color: #6ee7b7;
  font-weight: 600;
}

.pro-cta-wrap {
  text-align: center;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid rgba(16, 185, 129, 0.2);
}

/* Features */
.features-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  padding: 28px;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: var(--text);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.feature-card a {
  color: var(--primary-400);
  font-weight: 500;
}


/* Code section */
.code-container {
  max-width: 900px;
  margin: 0 auto;
}

.code-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.code-tab {
  padding: 10px 18px;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  font-size: 0.875rem;
}

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

.code-tab.active {
  background: #0d0d0d;
  color: white;
  border-color: rgba(255, 255, 255, 0.15);
}

.code-tab-pro {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: white !important;
  border-color: #059669 !important;
}

.code-block {
  background: #0d0d0d;
  border-radius: 0 var(--radius-lg) var(--radius-lg) var(--radius-lg);
  padding: 24px;
  overflow-x: auto;
  position: relative;
  display: none;
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.code-block.active {
  display: block;
}

.code-block pre {
  margin: 0;
  color: #e5e7eb;
  font-family: ui-monospace, 'Monaco', 'Menlo', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
}

.code-block .comment { color: #6b7280; }
.code-block .tag { color: #f472b6; }
.code-block .attr { color: #93c5fd; }
.code-block .string { color: #34d399; }

.copy-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: white;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8125rem;
}

.copy-btn:hover {
  background: rgba(59, 130, 246, 0.25);
}

.ai-prompt-box {
  background: linear-gradient(135deg, rgba(15, 17, 25, 0.98) 0%, rgba(10, 12, 18, 0.98) 100%);
  border-radius: var(--radius-xl);
  padding: 40px;
  border: 1px solid var(--border-strong);
  margin-top: 40px;
  box-shadow: var(--glass-shadow);
}

.ai-prompt-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.ai-prompt-header-icon {
  width: 2rem;
  height: 2rem;
}

.ai-prompt-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}

.ai-prompt-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
}

.ai-prompt-inner {
  background: #060608;
  border-radius: 12px;
  padding: 24px 24px 24px 20px;
  font-family: ui-monospace, 'Monaco', 'Menlo', monospace;
  font-size: 0.875rem;
  line-height: 1.8;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ai-prompt-inner .copy-btn {
  top: 12px;
  right: 12px;
}

.ai-prompt-quote {
  margin: 0;
  color: #6ee7b7;
}

.ai-prompt-line {
  margin: 8px 0 8px 24px;
  color: #e5e7eb;
}

/* Docs */
.docs-header-brand {
  font-size: 1.5rem;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.docs-main pre[class*="language-"],
.docs-main code[class*="language-"] {
  background: #0d0d0d !important;
  color: #e5e7eb !important;
  text-shadow: none !important;
}

.docs-main pre[class*="language-"] {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 20px 0;
  padding: 20px !important;
}

.docs-main :not(pre) > code[class*="language-"] {
  background: rgba(59, 130, 246, 0.15) !important;
  color: var(--primary-400) !important;
  padding: 2px 8px;
  border-radius: 6px;
}

/* Tables */
.fields-table {
  max-width: 900px;
  margin: 0 auto;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

th, td {
  padding: 16px 20px;
  text-align: left;
  color: var(--text-muted);
}

th {
  background: rgba(0, 0, 0, 0.4);
  color: var(--text);
  font-weight: 600;
}

tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.03);
}

td code,
code {
  background: rgba(59, 130, 246, 0.15);
  padding: 2px 8px;
  border-radius: 6px;
  font-family: ui-monospace, monospace;
  font-size: 0.875rem;
  color: var(--primary-400);
}

.tip-box {
  margin-top: 24px;
  padding: 20px;
  background: var(--glass-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
}

.tip-box h4 {
  color: var(--text);
  margin-bottom: 8px;
}

.tip-box p {
  color: var(--text-muted);
}

.tip-box pre,
.tip-box code {
  display: block;
  background: rgba(0, 0, 0, 0.4);
  color: #34d399;
  padding: 12px;
  border-radius: 8px;
  margin-top: 12px;
  border: 1px solid var(--border);
}

/* Upgrade */
.upgrade {
  padding: 100px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.upgrade-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
  z-index: 0;
}

.upgrade-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 100%, rgba(59, 130, 246, 0.35), transparent);
}

.upgrade > *:not(.upgrade-bg) {
  position: relative;
  z-index: 1;
}

.upgrade h2 {
  font-size: 2.25rem;
  margin-bottom: 16px;
}

.upgrade p {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 32px;
}

.upgrade-features {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  color: var(--text-muted);
}

.upgrade-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.upgrade-feature svg {
  width: 22px;
  height: 22px;
  color: var(--primary-400);
}

/* Footer */
footer {
  background: #050508;
  color: var(--text-muted);
  padding: 56px 20px;
  text-align: center;
  border-top: 1px solid var(--border);
}

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

footer a:hover {
  color: var(--primary-400);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  font-weight: 500;
}

.footer-brand {
  margin-bottom: 16px;
  font-size: 1.25rem;
  font-weight: 800;
}

/* Docs / status */
.page-header {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
  color: white;
  padding: 100px 20px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(59, 130, 246, 0.35), transparent);
  pointer-events: none;
}

.page-header .container {
  position: relative;
  z-index: 1;
}

.page-header h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.page-header p {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

.page-nav {
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(12px);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.page-nav .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.page-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: var(--transition);
  font-size: 0.9375rem;
}

.page-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.page-nav-brand {
  font-weight: 800;
  color: var(--text) !important;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

main.docs-main {
  padding: 60px 0;
}

.docs-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
}

.sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar h3 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  color: var(--primary-400);
}

.sidebar ul {
  list-style: none;
}

.sidebar a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  display: block;
  font-size: 0.9375rem;
  transition: var(--transition);
}

.sidebar a:hover,
.sidebar a.active {
  color: var(--primary-400);
  background: rgba(59, 130, 246, 0.12);
}

.content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.content h3,
.content h4 {
  color: var(--text);
}

.content p,
.content li {
  color: var(--text-muted);
}

.content pre {
  background: #0d0d0d;
  color: #e5e7eb;
  padding: 20px;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin: 20px 0;
  font-size: 0.875rem;
  border: 1px solid var(--border);
}

.alert {
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  margin: 20px 0;
  border-left: 4px solid;
}

.alert-info {
  background: rgba(59, 130, 246, 0.12);
  border-color: var(--primary-500);
  color: var(--primary-400);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: var(--warning);
  color: #fbbf24;
}

.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border-color: var(--success);
  color: #6ee7b7;
}

/* Success page */
.success-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.success-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-2xl);
  padding: 48px 40px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.success-card h1 {
  color: var(--text);
}

.success-card > p {
  color: var(--text-muted);
}

.success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--success), #059669);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
}

.success-icon svg {
  width: 40px;
  height: 40px;
  color: white;
}

.success-footer {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.success-footer a {
  color: var(--primary-400);
  font-weight: 600;
}

.success-powered {
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--text-subtle);
}

.success-powered strong {
  color: var(--primary-400);
}

/* Status */
.status-page main {
  padding-bottom: 40px;
}

.status-overview,
.uptime-section,
.incidents-section {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  margin: 32px 0;
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.status-overview h2,
.uptime-section h2,
.incidents-section h2 {
  color: var(--text);
}

.status-overview p,
.incidents-section > p {
  color: var(--text-muted);
}

.metric-card {
  background: rgba(0, 0, 0, 0.25);
  padding: 24px;
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid var(--border);
}

.metric-value {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.uptime-chart {
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.chart-placeholder {
  height: 160px;
  background: linear-gradient(90deg, var(--success) 0%, var(--success) 96%, var(--warning) 96%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  text-align: center;
  padding: 16px;
}

.uptime-stat .value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--success);
}

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

.incident {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  background: rgba(0, 0, 0, 0.2);
}

.incident.resolved {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.08);
}

.incident-title {
  font-weight: 600;
  color: var(--text);
}

.incident-meta,
.incident-description {
  color: var(--text-muted);
}

.dep-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.dep-card strong {
  color: var(--text);
}

.dep-card > div > div:last-child {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.dep-card > div > div:first-child {
  font-weight: 600;
  color: var(--text);
}

.pill {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  color: white;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

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

/* Case studies — always 2-up on desktop, never a lone orphan */
.case-studies-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.case-studies-header {
  text-align: center;
  margin-bottom: 56px;
}

.case-studies-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.case-studies-header p {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 36rem;
  margin: 0 auto;
}

.case-study-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.case-study-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.case-study-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.case-study-card-head h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.35;
}

.case-study-card-head p {
  margin: 4px 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.case-study-card-quote {
  flex: 1;
  margin: 0 0 24px;
  line-height: 1.7;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.case-study-card-metric {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-top: 20px;
  margin-top: auto;
  border-top: 1px solid var(--border);
}

.case-study-card-metric strong {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--success);
  line-height: 1;
}

.case-study-card-metric span {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
}

.case-studies-cta {
  text-align: center;
  margin-top: 48px;
}

.case-studies-cta p {
  margin-bottom: 20px;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .case-study-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }

  .case-study-card {
    padding: 36px 40px;
  }

  .case-study-card-quote {
    font-size: 1rem;
    line-height: 1.75;
  }
}

@media (max-width: 768px) {
  .site-nav-links a:not(.site-nav-cta) {
    display: none;
  }

  .modes-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .mode-card.featured::before {
    display: none;
  }

  .docs-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .page-nav .nav-links-secondary {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .status-indicator {
    animation: none;
  }
}

.status-indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-status 2s infinite;
  box-shadow: 0 0 12px var(--success);
}

@keyframes pulse-status {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}
