/* JetBrains Mono — must be first @import per CSS spec */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --bg: #0F0F13;
  --bg2: #16161E;
  --surface: #1A1A22;
  --surface2: #212129;
  --border: #2A2A35;
  --border2: #3A3A45;
  --primary: #085CFB;
  --primary-dim: rgba(8, 92, 251, 0.12);
  --primary-dim2: rgba(8, 92, 251, 0.2);
  --accent: #00E5A0;
  --accent-dim: rgba(0, 229, 160, 0.1);
  --accent2: #0EA5E9;
  --text: #FFFFFF;
  --text2: #A0A0B0;
  --text3: #606070;
  --positive: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  /* Design system tokens */
  --color-bg: var(--bg);
  --color-surface: var(--surface);
  --color-surface-hover: var(--surface2);
  --color-border: var(--border);
  --color-text-primary: var(--text);
  --color-text-secondary: var(--text2);
  --color-primary: var(--primary);
  --color-primary-hover: #0A4DD9;
  --color-accent: var(--accent);
  --color-success: var(--positive);
  --color-warning: var(--warning);
  --color-error: var(--error);
}

/* ── TERMINAL DESIGN SYSTEM ── */
:root {
  --terminal-bg: #0a0a0a;
  --terminal-surface: #111111;
  --terminal-border: #1e1e1e;
  --terminal-text: #e0e0e0;
  --terminal-muted: #666666;
  --terminal-green: #00ff88;
  --terminal-cyan: #00d4ff;
  --terminal-yellow: #ffcc00;
  --terminal-red: #ff4444;
  --terminal-font: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

/* Global terminal body — applied by layout.ejs when page has terminalMode=true */
body.terminal-mode {
  background: var(--terminal-bg);
  color: var(--terminal-text);
  font-family: var(--terminal-font);
  -webkit-font-smoothing: antialiased;
}

/* Terminal container component */
.terminal-container {
  background: var(--terminal-bg);
  border: 1px solid var(--terminal-border);
  font-family: var(--terminal-font);
  color: var(--terminal-text);
}

/* Terminal heading prefix */
.terminal-heading::before {
  content: '> ';
  color: var(--terminal-green);
}

/* Blinking cursor utility */
.cursor-blink {
  animation: cursor-blink 1s steps(1) infinite;
}
@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Terminal-style outlined button */
.terminal-btn {
  background: transparent;
  border: 1px solid var(--terminal-green);
  color: var(--terminal-green);
  font-family: var(--terminal-font);
  font-size: 12px;
  padding: 4px 12px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: background 0.15s, color 0.15s;
}
.terminal-btn:hover {
  background: var(--terminal-green);
  color: var(--terminal-bg);
}

/* Terminal input */
.terminal-input {
  background: var(--terminal-bg);
  border: 1px solid var(--terminal-border);
  color: var(--terminal-text);
  font-family: var(--terminal-font);
  font-size: 13px;
  padding: 6px 10px;
  outline: none;
  transition: border-color 0.15s;
}
.terminal-input:focus {
  border-color: var(--terminal-green);
}
.terminal-input::placeholder {
  color: var(--terminal-muted);
}

.terminal-container {
  background: var(--terminal-bg);
  border: 1px solid var(--terminal-border);
  font-family: var(--terminal-font);
  color: var(--terminal-text);
}

.terminal-btn {
  background: transparent;
  border: 1px solid var(--terminal-green);
  color: var(--terminal-green);
  font-family: var(--terminal-font);
  font-size: 12px;
  padding: 4px 12px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: background 0.15s, color 0.15s;
}
.terminal-btn:hover {
  background: var(--terminal-green);
  color: var(--terminal-bg);
}
.terminal-btn:active {
  opacity: 0.8;
}

.terminal-btn-cyan {
  border-color: var(--terminal-cyan);
  color: var(--terminal-cyan);
}
.terminal-btn-cyan:hover {
  background: var(--terminal-cyan);
  color: var(--terminal-bg);
}

.terminal-section-heading::before {
  content: '> ';
  color: var(--terminal-green);
}

.terminal-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--terminal-text);
  font-family: var(--terminal-font);
  font-size: 13px;
}

.cursor-blink {
  animation: cursor-blink 1s steps(1) infinite;
}
@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  font-size: 15px;
}

h1, h2, h3, h4 {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* ── NAV ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15, 15, 19, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 14px 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 16px; letter-spacing: -0.3px;
  text-decoration: none; color: var(--text);
}
.nav-logo-icon {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a {
  color: var(--text2); text-decoration: none; font-size: 14px;
  font-weight: 500; transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }
.nav-user { color: var(--text3); font-size: 13px; padding-left: 8px; border-left: 1px solid var(--border); }
.nav-logout { color: var(--text3) !important; font-size: 13px !important; }
.nav-cta {
  background: var(--primary); color: #fff !important;
  padding: 7px 16px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 13px !important;
  transition: opacity 0.15s;
}
.nav-cta:hover { opacity: 0.88; color: #fff !important; }

/* ── HERO (Centered URL-input layout) ── */
.hero {
  background: var(--bg);
  padding: 96px 0 80px;
  overflow: hidden;
  position: relative;
}
.hero-glow {
  position: absolute; top: -120px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse at 50% 0%, rgba(8,92,251,0.22) 0%, rgba(8,92,251,0.06) 40%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}
.hero-inner {
  max-width: 960px; margin: 0 auto; padding: 0 32px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0;
  position: relative; z-index: 1;
}
.hero-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: #60A5FA; margin-bottom: 20px;
  background: rgba(8,92,251,0.12); border: 1px solid rgba(8,92,251,0.25);
  padding: 5px 14px; border-radius: 100px;
}
.hero-headline {
  font-size: 52px; line-height: 1.08; letter-spacing: -1.8px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #fff 30%, rgba(148,163,184,0.9) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 18px; color: var(--text2); line-height: 1.65;
  max-width: 500px; margin: 0 auto 36px;
}

/* URL input form */
.hero-url-form { width: 100%; max-width: 580px; }
.url-form {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 8px 8px 8px 16px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.url-form:focus-within {
  border-color: rgba(8,92,251,0.7);
  box-shadow: 0 0 0 3px rgba(8,92,251,0.1), 0 8px 24px rgba(0,0,0,0.3);
  transform: translateY(-1px);
}
.url-icon {
  color: var(--text3); flex-shrink: 0; display: flex; align-items: center;
}
.url-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-size: 15px; font-family: inherit;
  min-width: 0;
}
.url-input::placeholder { color: var(--text3); }
.btn-hero-cta {
  padding: 10px 22px; font-size: 14px; white-space: nowrap;
  border-radius: var(--radius-sm); flex-shrink: 0;
  background: var(--primary);
  transition: opacity 0.15s, box-shadow 0.15s;
}
.btn-hero-cta:hover { opacity: 0.9; box-shadow: 0 4px 12px rgba(8,92,251,0.4); }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary); color: #fff;
  font-weight: 600; font-size: 15px; font-family: inherit;
  padding: 12px 28px; border-radius: var(--radius);
  border: none; cursor: pointer; text-decoration: none;
  transition: opacity 0.15s, box-shadow 0.15s;
}
.btn-primary:hover { opacity: 0.9; box-shadow: 0 4px 16px rgba(8,92,251,0.3); }
.btn-primary.btn-sm { font-size: 13px; padding: 8px 18px; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text2); font-weight: 500; font-size: 14px;
  text-decoration: none; transition: color 0.15s;
}
.btn-ghost:hover { color: var(--text); }
.hero-note { color: var(--text3); font-size: 13px; margin-top: 16px; }

/* ── SECTION HEADERS ── */
.section-eyebrow {
  display: inline-block;
  font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--primary); margin-bottom: 12px;
}
.section-title {
  font-size: 32px; font-weight: 700; color: var(--text);
  letter-spacing: -0.8px; line-height: 1.15;
  margin-bottom: 48px;
}
.section-header { text-align: center; }

/* ── ICON TILE GRID ── */
.features { padding: 80px 0; }
.features-inner { max-width: 960px; margin: 0 auto; padding: 0 32px; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.icon-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px 28px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.icon-tile::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(8,92,251,0.08) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}
.icon-tile:hover {
  border-color: var(--border2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.04) inset;
  transform: translateY(-3px);
}
.icon-tile:hover::before { opacity: 1; }
.tile-step {
  position: absolute; top: 20px; right: 20px;
  font-size: 11px; font-weight: 700; color: var(--text3);
  background: var(--bg2); border: 1px solid var(--border);
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.tile-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--primary-dim); border: 1px solid var(--primary-dim2);
  display: flex; align-items: center; justify-content: center;
  color: #60A5FA; margin-bottom: 4px;
  transition: transform 0.2s;
}
.icon-tile:hover .tile-icon { transform: scale(1.05); }
.tile-icon--accent {
  background: rgba(0,229,160,0.1); border-color: rgba(0,229,160,0.3); color: var(--accent);
}
.tile-icon--accent2 {
  background: rgba(14,165,233,0.1); border-color: rgba(14,165,233,0.3); color: var(--accent2);
}
.tile-title { font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: -0.2px; }
.tile-desc { font-size: 14px; color: var(--text2); line-height: 1.5; }
.tile-tag {
  display: inline-block; font-size: 11px; font-weight: 500;
  color: var(--text3); background: var(--bg2);
  border: 1px solid var(--border); border-radius: 100px;
  padding: 3px 10px; margin-top: 4px;
}

/* ── DASHBOARD MOCKUP ── */
.dashboard-mockup {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.04) inset;
}
.mockup-topbar {
  background: var(--bg2);
  padding: 10px 16px; display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border);
}
.mockup-dots { display: flex; gap: 6px; }
.mockup-dots span { width: 10px; height: 10px; border-radius: 50%; }
.mockup-dots span:first-child { background: #FF5F57; }
.mockup-dots span:nth-child(2) { background: #FEBC2E; }
.mockup-dots span:nth-child(3) { background: #28C840; }
.mockup-title { font-size: 12px; color: var(--text3); font-weight: 500; }
.mockup-body { display: flex; height: 340px; }
.mockup-sidebar {
  width: 140px; border-right: 1px solid var(--border);
  padding: 14px 8px; display: flex; flex-direction: column; gap: 2px;
}
.sidebar-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 7px;
  font-size: 11px; color: var(--text3); cursor: default;
}
.sidebar-item.active { background: var(--primary-dim); color: #60A5FA; }
.mockup-main { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.mockup-header-row { display: flex; justify-content: space-between; align-items: flex-start; }
.mockup-label { font-size: 10px; color: var(--text3); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.mockup-score { display: flex; align-items: baseline; gap: 8px; }
.score-num { font-size: 24px; font-weight: 700; color: var(--text); font-family: 'JetBrains Mono', 'Fira Code', monospace; }
.score-change { font-size: 10px; color: var(--positive); background: rgba(16,185,129,0.1); padding: 2px 6px; border-radius: 4px; }
.mockup-chart-mini { opacity: 0.8; }
.mockup-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi { background: var(--bg2); border-radius: 8px; padding: 10px; }
.kpi-label { font-size: 9px; color: var(--text3); display: block; margin-bottom: 2px; }
.kpi-val { font-size: 15px; font-weight: 700; color: var(--text); display: block; }
.kpi-delta { font-size: 9px; color: var(--positive); display: block; margin-top: 2px; }
.kpi-delta.up::before { content: '+'; }
.mockup-platforms { display: flex; flex-direction: column; gap: 7px; }
.platform-row { display: flex; align-items: center; gap: 8px; }
.platform-name { font-size: 10px; color: var(--text2); width: 70px; flex-shrink: 0; }
.platform-bar { flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.platform-fill { height: 100%; background: var(--primary); border-radius: 2px; }
.platform-pct { font-size: 10px; color: var(--text3); width: 28px; text-align: right; }

/* ── PLATFORMS ── */
.platforms { padding: 40px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.platforms-inner { max-width: 960px; margin: 0 auto; padding: 0 32px; text-align: center; }
.platforms-label { color: var(--text3); font-size: 13px; margin-bottom: 24px; }
.platform-logos { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 16px 40px; }
.platform-logo {
  display: flex; align-items: center; gap: 8px;
  color: var(--text3); font-size: 14px; font-weight: 500;
  opacity: 0.6; transition: opacity 0.2s;
}
.platform-logo:hover { opacity: 1; }

/* ── FEATURE CARDS (unused legacy) ── */
.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  border-color: var(--border2);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.feature-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--primary-dim); border: 1px solid var(--primary-dim2);
  display: flex; align-items: center; justify-content: center;
  color: #60A5FA; margin-bottom: 18px;
  font-size: 20px;
}
.feature-card h3 {
  font-size: 15px; font-weight: 600;
  margin-bottom: 8px; color: var(--text);
}
.feature-card p { font-size: 13px; color: var(--text2); line-height: 1.6; margin-bottom: 14px; }
.feature-card ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.feature-card li {
  font-size: 12px; color: var(--text3);
  padding-left: 14px; position: relative;
}
.feature-card li::before {
  content: ''; position: absolute; left: 0; top: 7px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--primary); opacity: 0.7;
}

/* ── PRICING ── */
.pricing { padding: 80px 0; background: var(--bg2); }
.pricing-inner { max-width: 960px; margin: 0 auto; padding: 0 32px; }
.pricing-sub { font-size: 16px; color: var(--text2); margin-bottom: 40px; max-width: 560px; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.price-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  position: relative;
}
.price-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary-dim2) inset, 0 8px 32px rgba(8,92,251,0.1);
}
.price-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; font-size: 11px; font-weight: 600;
  padding: 4px 14px; border-radius: 100px;
}
.price-name { font-size: 13px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.price-amount { font-size: 40px; font-weight: 700; color: var(--text); letter-spacing: -1px; margin-bottom: 8px; }
.price-amount span { font-size: 16px; font-weight: 400; color: var(--text3); }
.price-desc { font-size: 13px; color: var(--text3); margin-bottom: 20px; line-height: 1.5; }
.price-features { display: flex; flex-direction: column; gap: 9px; }
.price-feat { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text2); }
.price-feat svg { color: var(--primary); flex-shrink: 0; }
.pricing-urgency {
  display: inline-block;
  background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3);
  color: var(--warning); font-size: 12px; font-weight: 500;
  padding: 6px 14px; border-radius: 100px; margin-bottom: 12px;
}
.pricing-note { font-size: 13px; color: var(--text3); }
.pricing-note strong { color: var(--text2); }

/* ── FAQ ── */
.faq { padding: 80px 0; }
.faq-inner { max-width: 720px; margin: 0 auto; padding: 0 32px; }
.faq-list { display: flex; flex-direction: column; gap: 0; }
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-q { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.faq-a { font-size: 14px; color: var(--text2); line-height: 1.7; }

/* ── CLOSING ── */
.closing {
  padding: 80px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.closing-inner { max-width: 960px; margin: 0 auto; padding: 0 32px; text-align: center; }
.closing-headline {
  font-size: 48px; color: var(--text); letter-spacing: -1.5px; line-height: 1.1;
  margin-bottom: 16px;
}
.closing-sub { font-size: 17px; color: var(--text2); line-height: 1.6; margin-bottom: 24px; max-width: 560px; margin-left: auto; margin-right: auto; }
.closing-actions { display: flex; align-items: center; justify-content: center; gap: 12px; }

/* ── FOOTER ── */
footer { padding: 48px 0 32px; border-top: 1px solid var(--border); background: var(--bg); }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 32px; display: grid; grid-template-columns: 1fr auto; gap: 80px; margin-bottom: 40px; }
.footer-brand {}
.footer-tagline { font-size: 13px; color: var(--text3); margin-top: 10px; max-width: 280px; line-height: 1.5; }
.footer-links { display: flex; gap: 64px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col-head { font-size: 11px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.footer-col a { font-size: 13px; color: var(--text3); text-decoration: none; transition: color 0.15s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  max-width: 1200px; margin: 0 auto; padding: 20px 32px 0;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; font-size: 12px; color: var(--text3);
}

/* ── SPIN ANIMATION ── */
.spin { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── APP SHELL (bottom-nav layout) ── */
.app-topbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  height: 52px;
  display: flex; align-items: center; justify-content: space-between;
}
.app-topbar-left { display: flex; align-items: center; gap: 12px; }
.app-topbar-company {
  display: flex; align-items: center; gap: 6px;
  cursor: pointer; user-select: none;
}
.app-topbar-logo { display: flex; align-items: center; flex-shrink: 0; }
.app-topbar-logo svg { width: 20px; height: 20px; }
.app-topbar-name { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
.app-topbar-chevron { color: var(--text3); }
.app-topbar-ai { display: flex; align-items: center; }
.app-ai-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--primary-dim); border: 1px solid var(--primary-dim2);
  color: #60A5FA; font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 100px;
  letter-spacing: 0.5px;
}
.app-topbar-right { display: flex; align-items: center; }
.app-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  cursor: default; user-select: none;
}

.app-content {
  min-height: calc(100vh - 52px - 64px);
  padding-bottom: 80px;
}

.app-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-around;
  height: 64px;
  backdrop-filter: blur(20px);
}
.app-nav-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 6px 16px;
  color: var(--text3); text-decoration: none;
  font-size: 10px; font-weight: 600;
  transition: color 0.15s;
  min-width: 64px;
}
.app-nav-tab.active { color: var(--primary); }
.app-nav-tab:hover { color: var(--text2); }
.app-nav-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* App page layout */
.app-page {
  max-width: 800px; margin: 0 auto;
  padding: 20px 16px 0;
}
.app-page-header {
  margin-bottom: 20px;
}
.app-page-title { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
.app-page-sub { font-size: 13px; color: var(--text2); margin-top: 4px; }

/* Card styles */
.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

/* Agent card (Okara-style) */
.agent-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.agent-card:hover { border-color: var(--border2); background: var(--surface2); }
.agent-card-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
}
.agent-card-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--primary-dim); border: 1px solid var(--primary-dim2);
  display: flex; align-items: center; justify-content: center;
  color: #60A5FA; flex-shrink: 0;
}
.agent-card-info { flex: 1; min-width: 0; }
.agent-card-name { font-size: 14px; font-weight: 600; color: var(--text); }
.agent-card-status { font-size: 12px; color: var(--text2); margin-top: 2px; }
.agent-card-status.ready { color: var(--positive); }
.agent-card-chevron { color: var(--text3); flex-shrink: 0; transition: transform 0.2s; }
.agent-card.open .agent-card-chevron { transform: rotate(180deg); }
.agent-card-body {
  display: none;
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  font-size: 13px; color: var(--text2);
  background: var(--bg);
}
.agent-card.open .agent-card-body { display: block; }

/* Terminal loading screen */
.terminal-screen {
  position: fixed; inset: 0; z-index: 999;
  background: #0D1117;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: 'Courier New', 'Courier', monospace;
  transition: opacity 0.4s;
}
.terminal-screen.fade-out { opacity: 0; pointer-events: none; }
.terminal-lines { width: 400px; max-width: 90vw; }
.terminal-line {
  font-size: 13px; color: #4CAF50;
  padding: 4px 0; opacity: 0;
  animation: term-appear 0.3s forwards;
}
.terminal-line.dim { color: #607d8b; }
.terminal-line.done { color: #4CAF50; }
.terminal-line.loading::after {
  content: ''; display: inline-block; width: 8px; height: 14px;
  background: linear-gradient(90deg, #4CAF50 50%, transparent 50%);
  animation: term-blink 0.8s steps(1) infinite;
  margin-left: 4px; vertical-align: middle;
}
@keyframes term-appear { to { opacity: 1; } }
@keyframes term-blink { 50% { opacity: 0; } }

/* Section headers */
.section-header-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.section-header-title {
  font-size: 13px; font-weight: 700; color: var(--text);
  text-transform: uppercase; letter-spacing: 0.8px;
}
.section-header-action { font-size: 12px; color: var(--primary); text-decoration: none; font-weight: 500; }

/* URL entry card (dashboard) */
.url-entry-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}
.url-entry-row {
  display: flex; gap: 10px; align-items: center;
}
.url-entry-input {
  flex: 1; height: 44px;
  padding: 0 14px; font-size: 14px;
  border: 1.5px solid var(--border); border-radius: 8px;
  background: var(--surface2); color: var(--text);
  outline: none; transition: border-color 0.15s;
}
.url-entry-input:focus { border-color: var(--primary); }
.url-entry-input::placeholder { color: var(--text3); }
.url-entry-btn {
  height: 44px; padding: 0 20px; font-size: 14px;
  white-space: nowrap; flex-shrink: 0;
}
.url-entry-hint { font-size: 12px; color: var(--text3); margin-top: 10px; }

/* Stats row */
.app-stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; margin-bottom: 20px;
}
.app-stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 2px;
}
.app-stat-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text2); }
.app-stat-value { font-size: 22px; font-weight: 700; color: var(--text); letter-spacing: -0.5px; line-height: 1.1; }
.app-stat-sub { font-size: 10px; color: var(--text3); }

/* App section list */
.app-section-list { padding: 4px 0; }
.app-section-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; gap: 8px;
  border-bottom: 1px solid var(--border);
  text-decoration: none; transition: background 0.1s;
  cursor: pointer;
}
.app-section-item:last-child { border-bottom: none; }
.app-section-item:hover { background: var(--surface2); }
.app-section-item-left { flex: 1; min-width: 0; }
.app-section-item-title { font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-section-item-meta { font-size: 11px; color: var(--text3); margin-top: 1px; }
.app-section-item-sub { font-size: 12px; color: var(--text2); flex-shrink: 0; }
.app-empty { padding: 20px; text-align: center; color: var(--text3); font-size: 13px; }
.app-empty p { margin-bottom: 8px; }
.app-badge { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 4px; font-size: 10px; font-weight: 700; }
.app-badge--primary { background: var(--primary-dim); color: var(--primary); }
.app-badge--success { background: rgba(16,185,129,0.12); color: var(--positive); }
.app-badge--warning { background: rgba(245,158,11,0.12); color: var(--warning); }

/* App card header */
.app-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.app-card-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--text);
}
.app-card-title svg { color: var(--text2); }
.app-card-link { font-size: 11px; color: var(--primary); text-decoration: none; font-weight: 500; }

/* Grid layouts */
.app-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }

/* Responsive */
@media (max-width: 640px) {
  .app-stats-row { grid-template-columns: repeat(2, 1fr); }
  .app-grid-2 { grid-template-columns: 1fr; }
  .url-entry-row { flex-direction: column; }
  .url-entry-btn { width: 100%; }
}
@media (max-width: 900px) {
  .features-grid { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: 1fr 1fr; }
  .hero-headline { font-size: 36px; }
  .closing-headline { font-size: 38px; }
  .closing-inner { padding: 0 20px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .nav-links { display: none; }
}
@media (max-width: 640px) {
  .features-grid, .pricing-grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 56px; }
  .hero-headline { font-size: 28px; letter-spacing: -1px; }
  .hero-sub { font-size: 15px; }
  .hero-inner { padding: 0 20px; }
  .url-form { flex-direction: column; padding: 12px; gap: 8px; }
  .btn-hero-cta { width: 100%; justify-content: center; }
  .features { padding: 56px 0; }
  .features-inner { padding: 0 20px; }
  .pricing { padding: 56px 0; }
  .pricing-inner { padding: 0 20px; }
  .closing { padding: 56px 0; }
  .closing-headline { font-size: 30px; }
  .closing-inner { padding: 0 20px; }
  .footer-links { gap: 24px; }
  .footer-inner { padding: 0 20px; }
  .footer-bottom { padding: 20px 20px 0; }
}