/* =========================================================================
   VCI SCRAPER - DESIGN SYSTEM
   Tech-noir / forensic intelligence aesthetic
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Palette */
  --c-bg:           #050507;
  --c-bg-1:         #0a0a0e;
  --c-bg-2:         #12121a;
  --c-bg-3:         #1a1a25;
  --c-line:         #2a2a35;
  --c-line-hot:     #3a1a1a;
  --c-text:         #e8e8ee;
  --c-text-dim:     #9090a0;
  --c-text-mute:    #5a5a6a;
  --c-red:          #cc0000;
  --c-red-bright:   #ff2244;
  --c-red-glow:     rgba(204, 0, 0, 0.4);
  --c-green:        #00cc66;
  --c-amber:        #ffaa00;
  --c-blue:         #1f3864;
  --c-blue-bright:  #2a4d8c;

  /* Type */
  --f-mono:    'JetBrains Mono', 'Courier New', monospace;
  --f-sans:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;

  /* Radius */
  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 6px;

  /* Shadows / glows */
  --glow-red: 0 0 24px rgba(204,0,0,0.35), 0 0 1px rgba(204,0,0,0.8);
  --glow-soft: 0 8px 24px rgba(0,0,0,0.6);
  --inset-line: inset 0 0 0 1px var(--c-line);
}

/* ========================================================================= */
/* Reset & base                                                              */
/* ========================================================================= */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body {
  background-image:
    /* scanlines */
    repeating-linear-gradient(180deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 3px),
    /* radial accent */
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(204,0,0,0.08), transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(31,56,100,0.12), transparent 70%);
  background-attachment: fixed;
}

a { color: var(--c-red-bright); text-decoration: none; transition: color .15s ease; }
a:hover { color: #ff5577; }

img { max-width: 100%; display: block; }

button { font: inherit; cursor: pointer; }

/* ========================================================================= */
/* Layout containers                                                          */
/* ========================================================================= */
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--sp-5); }
.container-tight { max-width: 560px; margin: 0 auto; padding: 0 var(--sp-5); }
.container-md { max-width: 880px; margin: 0 auto; padding: 0 var(--sp-5); }

.grid-bg {
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: -1px -1px;
}

/* ========================================================================= */
/* Type                                                                       */
/* ========================================================================= */
h1, h2, h3, h4, .mono { font-family: var(--f-mono); font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(36px, 6vw, 64px); line-height: 0.98; }
h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.05; }
h3 { font-size: 22px; line-height: 1.2; }
h4 { font-size: 16px; line-height: 1.2; text-transform: uppercase; letter-spacing: 0.08em; }

.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-red-bright);
}

.label {
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-text-mute);
  display: block;
  margin-bottom: var(--sp-2);
}

.muted { color: var(--c-text-dim); }
.dim   { color: var(--c-text-mute); }
.red   { color: var(--c-red-bright); }
.mono  { font-family: var(--f-mono); }

/* ========================================================================= */
/* Top nav + mobile drawer                                                    */
/* ========================================================================= */
.topnav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(5,5,7,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--c-line);
}
.topnav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  max-width: 1400px; margin: 0 auto;
  min-height: 60px;
}

/* Brand / logo */
.brand {
  font-family: var(--f-mono); font-weight: 800;
  font-size: 15px; letter-spacing: 0.05em;
  color: var(--c-text); display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.brand:hover { color: var(--c-text); }
.brand .dot {
  display: inline-block; width: 8px; height: 8px;
  background: var(--c-red); border-radius: 50%;
  box-shadow: 0 0 8px var(--c-red-glow);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}
.brand-tag {
  font-family: var(--f-mono); font-size: 10px;
  color: var(--c-text-mute); letter-spacing: 0.15em;
  padding-left: 10px; border-left: 1px solid var(--c-line);
  margin-left: 4px;
}

/* Desktop nav links */
.nav-links,
.nav-links-desktop { display: flex; align-items: center; gap: 24px; }
.nav-links a,
.nav-links-desktop a {
  color: var(--c-text-dim); font-size: 14px; font-weight: 500;
  text-decoration: none; transition: color 0.15s ease;
}
.nav-links a:hover, .nav-links a.active,
.nav-links-desktop a:hover, .nav-links-desktop a.active { color: var(--c-text); }
.nav-links-desktop a.red { color: var(--c-red-bright); }
.nav-links-desktop a.red:hover { color: #ff5577; }

.nav-credits {
  font-family: var(--f-mono); font-size: 12px;
  padding: 7px 12px;
  border: 1px solid var(--c-line);
  background: var(--c-bg-1);
  color: var(--c-text);
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap;
}
.nav-credits .dim { color: var(--c-text-mute); }
.nav-credits .v { color: var(--c-red-bright); font-weight: 700; }

/* Mobile right side */
.nav-mobile-right {
  display: none;
  align-items: center;
  gap: 12px;
}
.nav-credits-mobile {
  font-family: var(--f-mono); font-size: 12px;
  padding: 6px 10px;
  background: rgba(204,0,0,0.12);
  border: 1px solid var(--c-line-hot);
  color: var(--c-red-bright);
  font-weight: 700; letter-spacing: 0.05em;
}

/* Hamburger button */
.nav-burger {
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid var(--c-line);
  cursor: pointer;
  padding: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px;
  transition: border-color 0.2s ease;
}
.nav-burger:hover, .nav-burger.open { border-color: var(--c-red); }
.nav-burger span {
  display: block; width: 18px; height: 2px;
  background: var(--c-text);
  transition: all 0.3s ease;
  transform-origin: center;
}
.nav-burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--c-red-bright);
}
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--c-red-bright);
}

/* Mobile drawer */
.nav-drawer {
  position: fixed; inset: 0;
  z-index: 200;
  visibility: hidden;
  pointer-events: none;
}
.nav-drawer.open { visibility: visible; pointer-events: auto; }
.nav-drawer-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.nav-drawer.open .nav-drawer-overlay { opacity: 1; }
.nav-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 86%; max-width: 380px;
  background: linear-gradient(180deg, #0a0a0e 0%, #050507 100%);
  border-left: 1px solid var(--c-line);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex; flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.nav-drawer.open .nav-drawer-panel {
  transform: translateX(0);
  box-shadow: -20px 0 60px rgba(0,0,0,0.6);
}
.nav-drawer-panel::before,
.nav-drawer-panel::after {
  content: ''; position: absolute;
  width: 16px; height: 16px;
  border: 2px solid var(--c-red);
  pointer-events: none;
}
.nav-drawer-panel::before {
  top: 8px; left: 8px; border-right: 0; border-bottom: 0;
}
.nav-drawer-panel::after {
  bottom: 8px; right: 8px; border-left: 0; border-top: 0;
}

.nav-drawer-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--c-line);
}
.nav-drawer-brand {
  font-family: var(--f-mono); font-weight: 800; font-size: 14px;
  letter-spacing: 0.08em; color: var(--c-text);
  display: flex; align-items: center; gap: 10px;
}
.nav-drawer-brand .dot {
  width: 8px; height: 8px;
  background: var(--c-red); border-radius: 50%;
  animation: pulse 2s infinite;
}
.nav-drawer-close {
  width: 36px; height: 36px;
  background: transparent;
  border: 1px solid var(--c-line);
  color: var(--c-text);
  font-size: 22px; line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease;
}
.nav-drawer-close:hover {
  border-color: var(--c-red);
  color: var(--c-red-bright);
}

.nav-drawer-user {
  padding: 20px 24px;
  border-bottom: 1px solid var(--c-line);
  background: linear-gradient(180deg, rgba(204,0,0,0.05), transparent);
}
.user-eyebrow {
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.2em; color: var(--c-red-bright);
  margin-bottom: 8px; font-weight: 700;
}
.user-name {
  font-family: var(--f-mono); font-size: 18px; font-weight: 700;
  color: var(--c-text); margin-bottom: 4px;
}
.user-email {
  font-size: 12px; color: var(--c-text-mute);
  margin-bottom: 16px; word-break: break-all;
}
.user-credits {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 14px;
  border-top: 1px dashed var(--c-line);
}
.user-credits .label {
  font-family: var(--f-mono); font-size: 9px;
  letter-spacing: 0.2em; color: var(--c-text-mute);
  margin-bottom: 4px;
}
.user-credits .val {
  font-family: var(--f-mono); font-size: 22px; font-weight: 800;
  color: var(--c-red-bright); line-height: 1;
}

.nav-drawer-section { padding: 16px 16px 8px; }
.drawer-section-label {
  font-family: var(--f-mono); font-size: 9px;
  letter-spacing: 0.22em; color: var(--c-text-mute);
  text-transform: uppercase;
  padding: 0 8px 12px;
  font-weight: 700;
}
.drawer-section-label.red { color: var(--c-red-bright); }

.drawer-link {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 12px;
  font-family: var(--f-mono); font-size: 14px; font-weight: 500;
  color: var(--c-text-dim);
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.15s ease;
  letter-spacing: 0.02em;
}
.drawer-link:hover, .drawer-link.active {
  background: rgba(204,0,0,0.08);
  color: var(--c-text);
}
.drawer-link.active { border-left: 2px solid var(--c-red); }
.drawer-link.red, .drawer-link.red:hover { color: var(--c-red-bright); }
.drawer-link-quiet { color: var(--c-text-mute); }
.drawer-link-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  font-size: 16px; color: var(--c-red-bright);
  flex-shrink: 0;
}

.nav-drawer-cta {
  padding: 16px 24px 24px;
  margin-top: auto;
  border-top: 1px solid var(--c-line);
}
.nav-drawer-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--c-line);
  margin-top: auto;
  text-align: center;
}

/* Responsive breakpoints */
@media (max-width: 900px) {
  .topnav-inner { padding: 12px 16px; min-height: 56px; }
  .nav-links-desktop,
  .nav-links { display: none !important; }
  .nav-mobile-right { display: flex; }
  .brand { font-size: 14px; }
  .brand-tag { display: none; }
}
@media (max-width: 480px) {
  .topnav-inner { padding: 10px 14px; }
  .brand { font-size: 13px; gap: 8px; }
  .brand .dot { width: 7px; height: 7px; }
  .nav-credits-mobile { font-size: 11px; padding: 5px 8px; }
  .nav-burger { width: 38px; height: 38px; }
  .nav-drawer-panel { width: 92%; }
}


/* ========================================================================= */
/* Buttons                                                                    */
/* ========================================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-family: var(--f-mono); font-size: 13px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 12px 22px; border: 1px solid transparent; border-radius: var(--r-sm);
  cursor: pointer; transition: all .18s ease;
  position: relative; overflow: hidden;
}
.btn-primary {
  background: var(--c-red); color: #fff;
  box-shadow: 0 0 0 1px var(--c-red), 0 0 24px rgba(204,0,0,0.25);
}
.btn-primary:hover {
  background: var(--c-red-bright); color: #fff;
  box-shadow: 0 0 0 1px var(--c-red-bright), 0 0 32px rgba(255,34,68,0.5);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent; color: var(--c-text);
  border-color: var(--c-line);
}
.btn-ghost:hover { border-color: var(--c-text); color: var(--c-text); background: var(--c-bg-1); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 11px; }
.btn-lg { padding: 16px 28px; font-size: 14px; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }

.btn-google {
  background: #fff; color: #1a1a1a; border-color: #fff;
}
.btn-google:hover { background: #f0f0f0; color: #000; }

/* ========================================================================= */
/* Forms                                                                      */
/* ========================================================================= */
.field { margin-bottom: var(--sp-5); }
.field input,
.field textarea,
.field select {
  width: 100%;
  background: var(--c-bg-1);
  border: 1px solid var(--c-line);
  color: var(--c-text);
  font-family: var(--f-sans);
  font-size: 15px;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  transition: all .15s ease;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--c-red);
  box-shadow: 0 0 0 3px rgba(204,0,0,0.15);
}
.field .hint { font-size: 12px; color: var(--c-text-mute); margin-top: var(--sp-2); }

.divider {
  display: flex; align-items: center; gap: var(--sp-3);
  margin: var(--sp-5) 0;
  color: var(--c-text-mute);
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.15em; text-transform: uppercase;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--c-line);
}

/* ========================================================================= */
/* Alerts / flash                                                             */
/* ========================================================================= */
.alert {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-sm);
  font-size: 14px;
  margin-bottom: var(--sp-4);
  border-left: 3px solid;
  background: var(--c-bg-1);
}
.alert-error   { border-color: var(--c-red-bright); color: #ffb0bd; }
.alert-success { border-color: var(--c-green); color: #b0ffd6; }
.alert-info    { border-color: var(--c-blue-bright); color: #b0d6ff; }
.alert-warn    { border-color: var(--c-amber); color: #ffdd99; }

/* ========================================================================= */
/* Cards / panels                                                             */
/* ========================================================================= */
.panel {
  background: linear-gradient(180deg, var(--c-bg-1), var(--c-bg));
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  position: relative;
}
.panel-hot {
  border-color: var(--c-line-hot);
  box-shadow: 0 0 32px rgba(204,0,0,0.08);
}
.panel-tight { padding: var(--sp-4); }
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--c-line);
}
.panel-header h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.12em; }

/* corner brackets - tactical detail */
.corners { position: relative; }
.corners::before,
.corners::after {
  content: '';
  position: absolute;
  width: 12px; height: 12px;
  border: 1px solid var(--c-red);
}
.corners::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.corners::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* ========================================================================= */
/* Status pills                                                               */
/* ========================================================================= */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid;
}
.pill-green  { color: var(--c-green); border-color: rgba(0,204,102,0.4); background: rgba(0,204,102,0.08); }
.pill-amber  { color: var(--c-amber); border-color: rgba(255,170,0,0.4); background: rgba(255,170,0,0.08); }
.pill-red    { color: var(--c-red-bright); border-color: rgba(255,34,68,0.4); background: rgba(204,0,0,0.08); }
.pill-mute   { color: var(--c-text-dim); border-color: var(--c-line); background: var(--c-bg-1); }
.pill::before {
  content: ''; display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; background: currentColor;
}

/* ========================================================================= */
/* Tables                                                                     */
/* ========================================================================= */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  font-family: var(--f-mono); font-size: 10px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--c-text-mute); text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-line);
}
.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--c-bg-2);
  vertical-align: middle;
}
.table tr:hover td { background: var(--c-bg-1); }
.table .mono { color: var(--c-text-dim); font-size: 12px; }

/* ========================================================================= */
/* Auth pages                                                                 */
/* ========================================================================= */
.auth-wrap {
  min-height: calc(100vh - 70px);
  display: grid; place-items: center;
  padding: var(--sp-6) var(--sp-4);
}
.auth-card {
  width: 100%; max-width: 440px;
  background: var(--c-bg-1);
  border: 1px solid var(--c-line);
  padding: var(--sp-7) var(--sp-6);
  position: relative;
}
.auth-card .eyebrow { margin-bottom: var(--sp-3); }
.auth-card h1 {
  font-size: 32px; margin-bottom: var(--sp-5);
}
.auth-card .footer-link {
  margin-top: var(--sp-5); padding-top: var(--sp-4);
  border-top: 1px solid var(--c-line);
  text-align: center; font-size: 13px; color: var(--c-text-mute);
}

/* ========================================================================= */
/* Landing page                                                               */
/* ========================================================================= */
.hero {
  padding: var(--sp-9) 0 var(--sp-8);
  position: relative; overflow: hidden;
}
.hero-content { max-width: 880px; }
.hero h1 {
  margin-bottom: var(--sp-5);
}
.hero h1 .red { color: var(--c-red-bright); }
.hero h1 .blink::after {
  content: '_'; animation: blink 1.1s steps(2, jump-none) infinite;
}
@keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
.hero-sub {
  font-size: 19px; color: var(--c-text-dim);
  max-width: 580px; margin-bottom: var(--sp-6);
}

.hero-meta {
  display: flex; gap: var(--sp-5); flex-wrap: wrap;
  font-family: var(--f-mono); font-size: 11px;
  color: var(--c-text-mute); letter-spacing: 0.12em; text-transform: uppercase;
}
.hero-meta span::before {
  content: '› '; color: var(--c-red);
}

/* Hero chat widget */
.chat-launch {
  margin-top: var(--sp-7);
  background: var(--c-bg-1);
  border: 1px solid var(--c-line);
  max-width: 760px;
  position: relative;
}
.chat-launch::before {
  content: 'SPYDER // LIVE';
  position: absolute; top: -10px; left: 16px;
  background: var(--c-bg);
  padding: 0 10px;
  font-family: var(--f-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.18em; color: var(--c-red-bright);
}
.chat-window {
  min-height: 280px; max-height: 480px; overflow-y: auto;
  padding: var(--sp-5);
  font-family: var(--f-sans); font-size: 14px;
  display: flex; flex-direction: column; gap: var(--sp-3);
}
.chat-msg {
  max-width: 86%; padding: 12px 16px;
  border-radius: var(--r-md);
  line-height: 1.5;
  animation: msgIn .25s ease;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-msg.assistant {
  align-self: flex-start;
  background: var(--c-bg-2);
  border: 1px solid var(--c-line);
}
.chat-msg.user {
  align-self: flex-end;
  background: rgba(204,0,0,0.12);
  border: 1px solid var(--c-line-hot);
  color: #fff;
}
.chat-msg .role {
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--c-text-mute); margin-bottom: 4px;
}
.chat-msg.assistant .role { color: var(--c-red-bright); }
.chat-input-row {
  display: flex; gap: 0;
  border-top: 1px solid var(--c-line);
}
.chat-input-row input {
  flex: 1; background: transparent;
  border: 0; padding: var(--sp-4) var(--sp-5);
  color: var(--c-text); font-family: var(--f-mono); font-size: 14px;
}
.chat-input-row input:focus { outline: none; }
.chat-input-row input::placeholder { color: var(--c-text-mute); }
.chat-input-row button {
  background: var(--c-red); color: #fff;
  border: 0; padding: 0 var(--sp-5);
  font-family: var(--f-mono); font-weight: 700; font-size: 13px;
  letter-spacing: 0.08em; text-transform: uppercase;
  transition: background .15s ease;
}
.chat-input-row button:hover { background: var(--c-red-bright); }

.thinking { display: inline-flex; gap: 4px; }
.thinking span {
  width: 6px; height: 6px; background: var(--c-red-bright); border-radius: 50%;
  animation: thinking 1.4s infinite ease-in-out;
}
.thinking span:nth-child(2) { animation-delay: 0.2s; }
.thinking span:nth-child(3) { animation-delay: 0.4s; }
@keyframes thinking {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Plan card inside chat */
.plan-card {
  background: var(--c-bg-3);
  border: 1px solid var(--c-line-hot);
  padding: var(--sp-4);
  border-radius: var(--r-sm);
  margin-top: var(--sp-3);
  font-family: var(--f-mono);
  font-size: 13px;
}
.plan-card .row {
  display: flex; justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed var(--c-line);
}
.plan-card .row:last-child { border-bottom: 0; }
.plan-card .k { color: var(--c-text-mute); text-transform: uppercase; font-size: 10px; letter-spacing: 0.12em; }
.plan-card .v { color: var(--c-text); font-weight: 700; }
.plan-card .v.cost { color: var(--c-red-bright); }
.plan-actions { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); }

/* ========================================================================= */
/* Feature grid (landing)                                                     */
/* ========================================================================= */
.features {
  padding: var(--sp-9) 0;
  border-top: 1px solid var(--c-line);
}
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-5); margin-top: var(--sp-6);
}
.feature {
  padding: var(--sp-5);
  border: 1px solid var(--c-line);
  background: var(--c-bg-1);
  position: relative;
  transition: border-color .2s ease;
}
.feature:hover { border-color: var(--c-line-hot); }
.feature .num {
  font-family: var(--f-mono); font-size: 11px; font-weight: 700;
  color: var(--c-red); letter-spacing: 0.12em;
  margin-bottom: var(--sp-3); display: block;
}
.feature h3 { margin-bottom: var(--sp-3); font-size: 18px; }
.feature p { color: var(--c-text-dim); font-size: 14px; }

/* ========================================================================= */
/* Pricing                                                                    */
/* ========================================================================= */
.pricing { padding: var(--sp-9) 0; border-top: 1px solid var(--c-line); }
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-4); margin-top: var(--sp-6);
}
.price-card {
  background: var(--c-bg-1);
  border: 1px solid var(--c-line);
  padding: var(--sp-5);
  position: relative;
  transition: transform .2s ease, border-color .2s ease;
}
.price-card:hover { transform: translateY(-3px); border-color: var(--c-line-hot); }
.price-card.featured {
  border-color: var(--c-red);
  box-shadow: var(--glow-red);
}
.price-card .ribbon {
  position: absolute; top: -10px; right: 16px;
  background: var(--c-red); color: #fff;
  font-family: var(--f-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.15em; padding: 4px 10px;
}
.price-card h3 { margin-bottom: var(--sp-2); }
.price-card .price {
  font-family: var(--f-mono); font-size: 36px; font-weight: 800;
  margin: var(--sp-3) 0; color: var(--c-text);
}
.price-card .price span { font-size: 14px; color: var(--c-text-mute); font-weight: 400; }
.price-card .credits {
  font-family: var(--f-mono); font-size: 13px; color: var(--c-red-bright);
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-4);
}
.price-card .desc { font-size: 13px; color: var(--c-text-dim); margin-bottom: var(--sp-4); }

/* ========================================================================= */
/* Footer                                                                     */
/* ========================================================================= */
.footer {
  padding: var(--sp-7) 0 var(--sp-5);
  border-top: 1px solid var(--c-line);
  margin-top: var(--sp-9);
  font-size: 13px;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: var(--sp-4);
  color: var(--c-text-mute);
}
.footer-links { display: flex; gap: var(--sp-5); }
.footer-links a { color: var(--c-text-dim); font-size: 13px; }

/* ========================================================================= */
/* Dashboard                                                                  */
/* ========================================================================= */
.page-wrap { padding: var(--sp-7) 0 var(--sp-8); }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}
.page-head h1 { font-size: 36px; line-height: 1; }
.page-head .sub { color: var(--c-text-dim); margin-top: var(--sp-2); }

.stat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-4); margin-bottom: var(--sp-6);
}
.stat {
  padding: var(--sp-5);
  border: 1px solid var(--c-line);
  background: var(--c-bg-1);
}
.stat .k {
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--c-text-mute); margin-bottom: var(--sp-3);
}
.stat .v {
  font-family: var(--f-mono); font-size: 28px; font-weight: 700;
  color: var(--c-text);
}
.stat .v.hot { color: var(--c-red-bright); }
.stat .delta {
  font-size: 11px; font-family: var(--f-mono);
  color: var(--c-text-mute); margin-top: 6px;
}

.empty {
  padding: var(--sp-8) var(--sp-5);
  text-align: center;
  border: 1px dashed var(--c-line);
  color: var(--c-text-mute);
}
.empty h3 { color: var(--c-text-dim); margin-bottom: var(--sp-2); }

/* ========================================================================= */
/* Utilities                                                                  */
/* ========================================================================= */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-3 { margin-bottom: var(--sp-3); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-5 { margin-bottom: var(--sp-5); }
.mb-6 { margin-bottom: var(--sp-6); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.hidden { display: none !important; }

/* ========================================================================= */
/* Responsive                                                                 */
/* ========================================================================= */
@media (max-width: 640px) {
  .hero { padding: var(--sp-7) 0 var(--sp-6); }
  .page-wrap { padding: var(--sp-5) 0; }
}