@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  /* ─── DESIGN TOKENS ─── */
  /* Spacing scale (8px base) */
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.5rem;   /* 24px */
  --space-6: 2rem;     /* 32px */
  --space-7: 3rem;     /* 48px */
  --space-8: 4rem;     /* 64px */

  /* Type scale (1.25 ratio) */
  --text-xs: 0.75rem;   /* 12px */
  --text-sm: 0.875rem;  /* 14px */
  --text-base: 1rem;    /* 16px */
  --text-lg: 1.25rem;   /* 20px */
  --text-xl: 1.5rem;    /* 24px */
  --text-2xl: 2rem;     /* 32px */
  --text-3xl: 2.5rem;   /* 40px */
  --text-hero: clamp(2.5rem, 5vw, 3.25rem);

  /* Colors */
  --bg: #000000;
  --surface: #111111;
  --surface-2: #1A1A1A;
  --border: #2A2A2A;
  --text: #F0F0F0;
  --muted: #A0A0A0;
  --dim: #666666;
  --accent: #FF9900;
  --accent-hover: #FFB033;
  --accent-dim: rgba(255, 153, 0, 0.12);
  --success: #34D399;
  --error: #F87171;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 200ms;
}

/* Light theme (data-theme="light") */
[data-theme="light"] {
  --bg: #F8F8F8;
  --surface: #FFFFFF;
  --surface-2: #F0F0F0;
  --border: #E0E0E0;
  --text: #1A1A1A;
  --muted: #555555;
  --dim: #777777;
  --accent: #D47B00;
  --accent-hover: #B86A00;
  --accent-dim: rgba(212, 123, 0, 0.1);
  --success: #16A34A;
  --error: #DC2626;
}
[data-theme="light"] .header { background: rgba(255, 255, 255, 0.92); }
[data-theme="light"] .hero::before { background-image: linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px); }

html { transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease); }
body { transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease); }
.theme-toggle {
  background: none; border: 1px solid var(--border); border-radius: 6px;
  color: var(--dim); padding: 0.35rem 0.6rem; cursor: pointer; font-size: 0.85rem;
  transition: border-color 0.15s, color 0.15s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

* { box-sizing: border-box; }

.skip-link {
  position: absolute; top: -3rem; left: 0.5rem;
  padding: 0.5rem 0.75rem; background: var(--accent); color: #000;
  font-weight: 600; text-decoration: none; border-radius: 4px; z-index: 100;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0.5rem; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, .hero-title, .stat-value, .trust-item .num {
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; }

/* ─── HEADER ─── */
.header {
  background: rgba(26, 26, 26, 0.85);
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 0;
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
}
.header .container { display: flex; align-items: center; justify-content: space-between; }

.logo { display: flex; align-items: center; gap: 0; text-decoration: none; font-weight: 700; font-size: 1.2rem; font-family: 'Space Grotesk', 'Inter', sans-serif; }
.logo-grand { color: var(--text); }
.logo-flipout {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #000; padding: 0.2rem 0.55rem;
  border-radius: 6px; margin-left: 0.4rem; font-weight: 800;
  box-shadow: 0 2px 8px rgba(255, 153, 0, 0.25);
}

.nav-toggle { display: none; background: none; border: none; color: var(--text); cursor: pointer; padding: 0.5rem; font-size: 1.25rem; }
nav { display: flex; align-items: center; gap: 1.25rem; }
nav a { color: var(--dim); text-decoration: none; font-size: 0.9rem; transition: color 0.15s; }
nav a:hover { color: var(--text); }
nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-discord { color: var(--accent) !important; }
.nav-cta {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%) !important;
  color: #000 !important;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  box-shadow: 0 2px 10px rgba(255, 153, 0, 0.2);
}
.nav-cta:hover { box-shadow: 0 4px 16px rgba(255, 153, 0, 0.3); }

/* ─── BUTTONS ─── */
.btn { display: inline-block; padding: 0.6rem 1.25rem; border-radius: 8px; font-weight: 600; text-decoration: none; cursor: pointer; border: none; font-size: 0.95rem; transition: all 0.15s ease; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #000;
  box-shadow: 0 4px 14px rgba(255, 153, 0, 0.25);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 153, 0, 0.35);
}
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--muted); transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-lg { padding: 0.8rem 1.75rem; font-size: 1.05rem; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

/* ─── HERO ─── */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
  background:
    radial-gradient(ellipse 100% 80% at 50% -20%, rgba(255, 153, 0, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 50%, rgba(255, 153, 0, 0.06) 0%, transparent 40%),
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(255, 153, 0, 0.04) 0%, transparent 40%),
    var(--bg);
  position: relative;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  opacity: 0.5;
}
.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15em;
  margin: 0 0 1rem;
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  position: relative;
}
.hero-line1 { color: var(--text); }
.hero-line2 {
  color: var(--accent);
  text-shadow: 0 0 30px rgba(255, 153, 0, 0.35), 0 0 60px rgba(255, 153, 0, 0.15);
}
.lead { font-size: 1.1rem; color: var(--muted); max-width: 560px; margin: 0 auto 2rem; line-height: 1.6; }
.cta { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.hero-sub { font-size: 0.9rem; color: var(--dim); margin: 1rem auto 0; max-width: 420px; }
.hero-live-preview {
  display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; align-items: center;
  padding: 0.75rem 1rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; max-width: 480px; margin-left: auto; margin-right: auto;
}
.hero-live-preview .live-pill {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.3rem 0.6rem; background: var(--surface-2); border-radius: 6px;
  font-size: 0.8rem; color: var(--muted); text-decoration: none; transition: border-color 0.15s;
}
.hero-live-preview .live-pill:hover { border: 1px solid var(--accent); color: var(--accent); }
.hero-live-preview .live-pill .pct { color: var(--success); font-weight: 600; }

/* ─── HUB QUICK ─── */
.hub-quick { padding: 2rem 0; border-top: 1px solid var(--border); }
.hub-quick-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--dim); margin: 0 0 0.75rem; text-align: center; }
.hub-section-label { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.15em; color: var(--accent); margin: 0 0 0.5rem; }
.hub-badge { display: inline-block; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.15rem 0.4rem; border-radius: 4px; }
.hub-badge-live { background: rgba(74, 222, 128, 0.2); color: var(--success); }
.hub-badge-new { background: var(--accent-dim); color: var(--accent); }
.hub-quick-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.hub-pill-link {
  display: inline-block; padding: 0.4rem 0.9rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: 9999px; font-size: 0.85rem; font-weight: 600; color: var(--muted); text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.15s;
}
.hub-pill-link:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); transform: translateY(-1px); }
.hub-pill-link.hub-pill-active { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.hub-live-pill { background: var(--surface-2) !important; border-color: var(--border) !important; }
.hub-live-pill:hover { border-color: var(--accent) !important; box-shadow: 0 0 12px var(--accent-dim); }
.hub-nav-compact { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
.hub-nav-compact .hub-pill-link { font-size: 0.8rem; padding: 0.3rem 0.7rem; }

/* ─── TRUST BAR ─── */
.trust-bar { padding: 3rem 0; border-top: 1px solid var(--border); background: linear-gradient(180deg, transparent 0%, rgba(255, 153, 0, 0.03) 50%, transparent 100%); }
.trust-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 3.5rem; }
.trust-item { text-align: center; font-size: 0.9rem; color: var(--muted); }
.trust-item .num { display: block; font-size: var(--text-xl); font-weight: 800; color: var(--accent); line-height: 1.2; letter-spacing: -0.03em; }
.trust-item a { color: inherit; text-decoration: none; display: block; transition: color 0.15s; }
.trust-item a:hover { color: var(--accent); }
.trust-item a:hover .num { color: var(--accent-hover); }
.trust-bar .small { text-align: center; }

/* Discord CTA card */
.discord-cta { padding: 2rem 0; border-top: 1px solid var(--border); }
.discord-cta .hub-section-label { text-align: center; margin-bottom: 0.5rem; }
.discord-cta-card {
  max-width: 480px; margin: 0 auto;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.12) 0%, var(--surface) 100%);
  border: 1px solid rgba(88, 101, 242, 0.3);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
}
.discord-cta-card h2 { margin: 0 0 0.5rem; font-size: 1.25rem; }
.discord-cta-card p { color: var(--muted); margin: 0 0 1.25rem; font-size: 0.95rem; }
.discord-cta-card .btn-discord { display: inline-block; }

/* ─── CARDS + GRID ─── */
.features { padding: 4rem 0; border-top: 1px solid var(--border); }
.features h2 { text-align: center; margin: 0 0 2.5rem; font-size: 1.75rem; font-weight: 700; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.25s;
}
.card:hover {
  border-color: rgba(255, 153, 0, 0.45);
  box-shadow: 0 12px 32px rgba(0,0,0,0.5), 0 0 24px rgba(255, 153, 0, 0.08);
  transform: translateY(-3px);
}
.card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-bottom: 0.75rem;
  background: var(--accent-dim); color: var(--accent);
  border-radius: 10px;
}
.card-icon svg { flex-shrink: 0; }
.card h3 { margin: 0 0 0.5rem; font-size: 1.05rem; color: var(--text); }
.card p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ─── FOOTER ─── */
.footer-cta { padding: 4rem 0; text-align: center; background: var(--surface); border-top: 1px solid var(--border); }
.footer-cta p { margin: 0 0 1.5rem; color: var(--muted); font-size: 1.1rem; }
.footer { padding: 2rem 0; border-top: 1px solid var(--border); text-align: center; }
.footer p { margin: 0; font-size: 0.8rem; color: var(--dim); }
.footer-tagline { margin-top: 0.5rem !important; font-size: 0.75rem !important; color: var(--dim) !important; font-style: italic; }
.footer a { color: var(--accent); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ─── PRICING ─── */
.pricing-section { padding: 4rem 0; }
.pricing-section h1 { text-align: center; font-size: 2rem; font-weight: 800; margin: 0 0 0.5rem; }
.pricing-subtitle { text-align: center; color: var(--muted); margin: 0 0 3rem; font-size: 1.05rem; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; max-width: 720px; margin: 0 auto; }
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  position: relative;
}
.pricing-card-featured {
  border-color: rgba(255, 153, 0, 0.5);
  box-shadow: 0 0 0 1px rgba(255, 153, 0, 0.2), 0 0 40px rgba(255, 153, 0, 0.12);
}
.pricing-card .badge { position: absolute; top: -0.6rem; right: 1.25rem; background: var(--accent); color: #000; font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 4px; }
.pricing-card h2 { margin: 0 0 0.25rem; font-size: 1.25rem; }
.pricing-card .price { font-size: 2.5rem; font-weight: 800; margin: 0.5rem 0 0; }
.pricing-card .price-period { font-size: 0.9rem; color: var(--dim); font-weight: 400; }
.pricing-card .muted { font-size: 0.875rem; color: var(--dim); margin: 0 0 1.25rem; }
.pricing-features { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.pricing-features li { padding: 0.4rem 0; font-size: 0.9rem; color: var(--muted); border-bottom: 1px solid var(--border); }
.pricing-features li:last-child { border-bottom: none; }
.pricing-features li::before { content: '✓'; color: var(--accent); margin-right: 0.5rem; font-weight: 700; }

/* ─── DASHBOARD ─── */
.page { min-height: calc(100vh - 200px); padding: 3rem 0; }
.page h1 { margin: 0 0 1.5rem; font-size: 1.75rem; font-weight: 700; }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.dashboard-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.25s;
}
.dashboard-card h2 { margin: 0 0 0.75rem; font-size: 1.1rem; color: var(--text); }
.dashboard-card .stat-value { font-size: var(--text-xl); font-weight: 800; color: var(--accent); transition: color var(--duration) var(--ease); }
.dashboard-card .stat-label { font-size: 0.8rem; color: var(--dim); margin-top: 0.25rem; }
.dashboard-card.stat-card {
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  border-left: 3px solid transparent;
}
.dashboard-card.stat-card:hover {
  border-left-color: rgba(255, 153, 0, 0.5);
}
.dashboard-card.stat-card.data-fresh { animation: stat-pulse 0.6s ease; }
.dashboard-card.data-fresh { animation: data-fresh-flash 0.6s ease; }
@keyframes stat-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 153, 0, 0.2); }
  50% { box-shadow: 0 0 20px 2px rgba(255, 153, 0, 0.15); }
  100% { box-shadow: none; }
}
@keyframes data-fresh-flash {
  0% { border-color: var(--border); }
  30% { border-color: rgba(255, 153, 0, 0.5); box-shadow: 0 0 12px rgba(255, 153, 0, 0.15); }
  100% { border-color: var(--border); box-shadow: none; }
}

.chart-container {
  background: linear-gradient(165deg, rgba(20, 20, 20, 0.98) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.chart-container h2 { margin: 0 0 1rem; font-size: 1.1rem; }
.chart-container canvas { width: 100% !important; max-height: 300px; }

/* Dashboard charts grid — 2x2/3x3 desktop, stacked mobile */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}
@media (min-width: 900px) {
  .charts-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .charts-grid { grid-template-columns: 1fr; }
}
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.25s;
}
.chart-card-primary {
  border-color: rgba(255, 153, 0, 0.5);
  box-shadow: 0 0 0 1px rgba(255, 153, 0, 0.2), 0 0 28px rgba(255, 153, 0, 0.08);
}
.chart-card-primary:hover {
  box-shadow: 0 0 0 1px rgba(255, 153, 0, 0.35), 0 0 36px rgba(255, 153, 0, 0.12);
}
.chart-card.data-fresh { animation: data-fresh-flash 0.5s ease; }
.chart-card h2 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.chart-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--success);
  background: rgba(74, 222, 128, 0.15);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}
.chart-sub {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  color: var(--dim);
}
.chart-card .chart-wrap {
  flex: 1;
  min-height: 200px;
  position: relative;
}
.chart-card .chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  max-height: 240px;
}

.item-table { width: 100%; border-collapse: collapse; }
.item-table thead th { position: sticky; top: 0; background: var(--surface); z-index: 5; box-shadow: 0 1px 0 var(--border); }
.item-table th { text-align: left; padding: 0.6rem 0.75rem; font-size: 0.8rem; color: var(--dim); border-bottom: 1px solid var(--border); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.item-table td { padding: 0.6rem 0.75rem; font-size: 0.9rem; border-bottom: 1px solid var(--border); }
.item-table tbody tr {
  transition: background 0.15s, box-shadow 0.15s;
}
.item-table tbody tr:hover {
  background: rgba(26, 26, 26, 0.8);
  box-shadow: inset 4px 0 0 var(--accent);
}
.item-table .positive { color: var(--success); }
.item-table .negative { color: var(--error); }
.item-table .up { color: var(--success); }
.item-table .down { color: var(--error); }
.item-table [data-change="up"]::after { content: ' ↑'; color: var(--success); font-size: 0.85em; }
.item-table [data-change="down"]::after { content: ' ↓'; color: var(--error); font-size: 0.85em; }
.item-icon {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  margin-right: 0.5rem;
  border-radius: 5px;
  background: var(--surface-2);
  padding: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.item-link:hover .item-icon,
tr:hover .item-icon { border-color: rgba(255, 153, 0, 0.5); box-shadow: 0 2px 6px rgba(255, 153, 0, 0.12); }
.item-link { display: inline-flex; align-items: center; }
.copy-price { cursor: pointer; padding: 0.2rem 0.35rem; border-radius: 6px; transition: background 0.15s, color 0.15s, transform 0.15s; }
.copy-price:hover { background: var(--accent-dim); color: var(--accent); transform: scale(1.02); }
.copy-price:active { transform: scale(0.98); }
.tag { display: inline-block; font-size: 0.7rem; padding: 0.1rem 0.35rem; border-radius: 3px; background: var(--accent-dim); color: var(--accent); font-weight: 600; margin-left: 0.35rem; }
.tag.tag-hot { background: rgba(74,222,128,0.2); color: var(--success); }
.tag.tag-rising { background: rgba(74,222,128,0.15); color: var(--success); }
.tag.tag-vol { background: rgba(59,130,246,0.2); color: #3b82f6; }
.hub-toast { font-family: inherit; }

/* ─── FORMS ─── */
.form-card { max-width: 400px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 2rem; }
.hub-form-container { max-width: 420px; margin: 0 auto; }
.hub-card { box-shadow: 0 0 0 1px var(--border), 0 4px 20px rgba(0,0,0,0.3); }
.hub-divider { display: flex; align-items: center; margin: 1rem 0; gap: 1rem; }
.hub-divider::before, .hub-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.hub-divider span { font-size: 0.8rem; color: var(--dim); text-transform: uppercase; letter-spacing: 0.05em; }
.btn-discord {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; padding: 0.7rem 1rem; background: #5865F2; color: #fff !important;
  border: none; border-radius: 8px; font-weight: 600; font-size: 0.95rem; text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}
.btn-discord:hover { background: #4752C4; transform: translateY(-1px); }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; margin-bottom: 0.375rem; font-size: 0.85rem; color: var(--dim); }
.form-group input { width: 100%; padding: 0.6rem 0.75rem; font-size: 1rem; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; color: var(--text); }
.form-group input::placeholder { color: var(--dim); opacity: 0.8; }
.form-group input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-dim); }
.form-group input:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.form-group.has-error input { border-color: var(--error); }
.form-group .field-error { font-size: 0.8rem; color: var(--error); margin-top: 0.25rem; display: none; }
.form-group.has-error .field-error { display: block; }

/* Consistent error states */
.error-msg { color: var(--error); font-size: 0.9rem; }
.error-state { padding: 1.5rem; text-align: center; color: var(--error); background: rgba(248, 113, 113, 0.08); border: 1px solid rgba(248, 113, 113, 0.3); border-radius: 8px; }
.form-hint { font-size: 0.8rem; color: var(--accent); margin-top: 0.35rem; display: inline-block; }
.form-hint:hover { text-decoration: underline; }
.form-card .btn { width: 100%; margin-top: 0.5rem; padding: 0.7rem; }
.form-card p { margin-top: 1rem; font-size: 0.85rem; color: var(--dim); text-align: center; }
.form-footer { margin-top: 1.25rem !important; }
.form-card a { color: var(--accent); }

.api-key-box { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; padding: 0.75rem; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; word-break: break-all; color: var(--muted); }
code { font-family: 'JetBrains Mono', monospace; font-size: 0.85em; padding: 0.15em 0.4em; background: var(--surface-2); border-radius: 4px; color: var(--accent); }

/* ─── STATUS BANNER ─── */
.status-banner { border-bottom: 1px solid var(--border); background: var(--surface); }
.status-banner-inner { padding: 0.5rem 0; font-size: 0.85rem; color: var(--text); }
.status-banner-warning { background: rgba(255, 153, 0, 0.08); }
.status-banner-error { background: rgba(248, 113, 113, 0.08); }

/* ─── DOCS ─── */
.docs-content { max-width: 720px; }
.docs-content h2 { margin: 2rem 0 1rem; font-size: 1.25rem; }
.docs-content p, .docs-content ul { color: var(--muted); margin: 0 0 1rem; }
.docs-content code { background: var(--surface); padding: 0.125rem 0.4rem; border-radius: 4px; font-size: 0.85rem; }
.docs-content pre { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 1rem; overflow-x: auto; font-size: 0.85rem; }
.docs-content .table-wrapper { overflow-x: auto; margin: 0.5rem 0; -webkit-overflow-scrolling: touch; }
.docs-content table { width: 100%; min-width: 320px; }

/* Quick start steps */
.steps { margin: 2rem 0; }
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  position: relative;
  padding-left: 3.5rem;
}
.step-num {
  position: absolute;
  left: 1rem;
  top: 1.25rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #000;
  font-weight: 800;
  font-size: 1rem;
  border-radius: 50%;
}
.step-card h2 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.step-card p { margin: 0 0 1rem; color: var(--muted); font-size: 0.95rem; }
.step-card .btn { margin-right: 0.5rem; margin-bottom: 0.25rem; }
.faq-section { margin-bottom: 2rem; }
.faq-section h2 { font-size: 1.2rem; margin-bottom: 0.75rem; color: var(--accent); }
.faq-item { margin-bottom: 1rem; }
.faq-item h3 { font-size: 1rem; margin: 0 0 0.35rem; color: var(--text); }
.faq-item p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.pulse-intro { color: var(--muted); margin-bottom: 1.5rem; font-size: 0.95rem; }
.pulse-meta { font-size: 0.85rem; color: var(--dim); margin-top: 0.5rem; }

/* Live indicator — pulse dot + label, badge-style */
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--success);
  padding: 0.3rem 0.7rem;
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.4);
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.1);
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: live-pulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
  50% { opacity: 0.85; transform: scale(1.15); box-shadow: 0 0 6px 2px rgba(74, 222, 128, 0.2); }
}

/* Live status strip — bar below header with item count, timestamp, refresh */
.live-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--dim);
}
.live-strip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dim);
  flex-shrink: 0;
}
.live-strip-ok .live-strip-dot { background: var(--success); animation: live-pulse 1.5s ease-in-out infinite; }
.live-strip-degraded .live-strip-dot { background: var(--accent); }
.live-strip-error .live-strip-dot { background: var(--error); }
.live-strip-fresh { animation: live-strip-fresh-pulse 1.5s ease; }
@keyframes live-strip-fresh-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 153, 0, 0); }
  15% { box-shadow: 0 0 16px 2px rgba(255, 153, 0, 0.25); }
  100% { box-shadow: 0 0 0 0 rgba(255, 153, 0, 0); }
}
.live-strip-text { font-weight: 600; }
.live-strip-ok .live-strip-text { color: var(--muted); }
.live-strip-time { font-size: 0.75rem; color: var(--dim); }
.live-strip-refresh {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--dim);
  font-size: 1rem;
  padding: 0.35rem 0.5rem;
  min-width: 36px;
  min-height: 36px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.live-strip-refresh:hover { color: var(--accent); border-color: var(--accent); }
.live-strip-refresh.live-strip-refreshing { animation: rotate-refresh 0.6s ease; }
.live-strip.live-strip-refreshing .live-strip-text { opacity: 0.85; }
.live-strip.live-strip-refreshing .live-strip-dot { animation: live-strip-pulse 0.8s ease-in-out infinite; }
@keyframes live-strip-pulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
@keyframes rotate-refresh {
  to { transform: rotate(360deg); }
}
.live-strip-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.75rem;
}
.live-strip-link:hover { text-decoration: underline; }
.live-strip-alerts {
  display: inline-block;
  min-width: 1.2em;
  padding: 0.1em 0.35em;
  background: var(--accent);
  color: #000;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 4px;
  margin-left: 0.5rem;
}

/* Status page — status pill colors */
.status-ok { color: var(--success) !important; }
.status-degraded { color: var(--accent) !important; }
.status-error { color: var(--error) !important; }
.status-starting { color: var(--dim) !important; }

/* Hub polish — card hover glow */
.dashboard-card:hover, .chart-card:hover {
  border-color: rgba(255, 153, 0, 0.4);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45), 0 0 16px rgba(255, 153, 0, 0.06);
}
.dashboard-card:focus-within, .chart-card:focus-within { box-shadow: 0 0 0 1px var(--accent), 0 4px 20px rgba(0, 0, 0, 0.3); }

/* Sparklines — tiny inline line charts */
.sparkline-wrap { display: inline-block; vertical-align: middle; }
.sparkline-svg { vertical-align: middle; }

/* Margin bar — horizontal bar for margin % or strength */
.margin-bar-wrap { display: inline-block; vertical-align: middle; }
.margin-bar-track {
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
  min-width: 48px;
}
.margin-bar-fill {
  border-radius: 4px;
  transition: width 0.2s ease;
}

*:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.small { font-size: 0.8rem; }

/* Skeleton loader — Hub orange shimmer */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 20%, rgba(255, 153, 0, 0.15) 50%, var(--surface-2) 80%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}
.skeleton-text { height: 1em; min-width: 4em; }
.skeleton-stat { height: 1.75rem; min-width: 5rem; }
.skeleton-row { height: 2.5rem; }
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (max-width: 900px) {
  .nav-toggle { display: block; min-width: 44px; min-height: 44px; padding: 0.5rem; }
  nav { display: none; flex-direction: column; width: 100%; padding-top: 0.75rem; gap: 0.25rem; }
  nav.nav-open { display: flex; }
  nav a { padding: 0.75rem 0.5rem; min-height: 44px; display: flex; align-items: center; }
  .header .container { flex-wrap: wrap; }
  .header .container .logo { order: 1; }
  .header .container .nav-toggle { order: 2; margin-left: auto; }
  .header .container nav { order: 3; width: 100%; }
}
@media (max-width: 768px) {
  .header .container { flex-wrap: wrap; gap: 0.5rem; }
  nav { flex-wrap: wrap; gap: 0.75rem; }
  .pricing-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
}
