/* ═══════════════════════════════════════════════════════════════
   ResumeXray V5 — Design System (Linear / Vercel / Stripe tier)
   ═══════════════════════════════════════════════════════════════
 *
 *  ARCHITECTURE — Two-Layer CSS
 *  ─────────────────────────────────────────────────────────────
 *  LAYER 1  (lines ~1–2200)   — BASE DEFINITIONS
 *    Structural foundation for every component:
 *    display, position, width, height, padding, flex, grid,
 *    font-size, font-weight, color, border, cursor, etc.
 *
 *  LAYER 2  (lines ~3100+)    — PREMIUM VISUAL OVERRIDES
 *    Glassmorphism (backdrop-filter, blur), animated gradients,
 *    box-shadow, hover transforms, shimmer animations.
 *    These are ADDITIVE — they enhance Layer 1, never replace it.
 *
 *  ⚠ CRITICAL RULE: Never delete Layer 1 classes. If you remove
 *    a base definition, the premium override has nothing to
 *    enhance — the element becomes invisible/un-styled.
 *
 *  PROPERTY ORDERING (Google convention):
 *    1. Layout:     display, position, top/left, z-index
 *    2. Box Model:  width, height, margin, padding, border
 *    3. Typography: font-*, letter-spacing, text-*, color
 *    4. Visual:     background, box-shadow, opacity
 *    5. Animation:  transition, animation
 *
 *  @author  ResumeXray Engineering
 *  @version 5.4.0
 *  @updated 2026-04-06
 * ═══════════════════════════════════════════════════════════════ */
/* Self-hosted Inter font — eliminates Google Fonts CDN dependency (saves ~300ms LCP)
 * Downloaded from: https://fonts.google.com/specimen/Inter
 * Latin subset only, 3 weights: 400 (body), 600 (headings), 700 (display)
 * font-display: swap — renders fallback immediately, swaps when loaded */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter-latin-400.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/inter-latin-600.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/inter-latin-700.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Zinc-based neutrals (warm undertone, premium feel) */
  --bg-deep: #0a0a0f;
  --bg-base: #0e0e14;
  --bg-card: #18181b;
  --bg-card-hover: #1f1f23;
  --bg-elevated: #27272a;
  --bg-input: #131316;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-default: rgba(255, 255, 255, 0.14);
  --border-bright: rgba(99, 91, 255, 0.35);
  --border-focus: rgba(99, 91, 255, 0.5);

  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #7e7e8a;
  --text-faint: #9191a1;

  /* Single accent family (indigo-purple — trust + intelligence) */
  --accent: #635bff;
  --accent-hover: #5046e4;
  --accent-subtle: rgba(99, 91, 255, 0.1);
  --accent-glow: rgba(99, 91, 255, 0.25);

  /* Semantic colors */
  --green: #22c55e;
  --green-subtle: rgba(34, 197, 94, 0.1);
  --amber: #f59e0b;
  --amber-subtle: rgba(245, 158, 11, 0.1);
  --red: #ef4444;
  --red-subtle: rgba(239, 68, 68, 0.1);
  --blue: #3b82f6;
  --blue-subtle: rgba(59, 130, 246, 0.1);
  --purple: #a78bfa;
  --purple-subtle: rgba(167, 139, 250, 0.1);

  /* Gradients */
  --gradient-accent: linear-gradient(135deg, #635bff 0%, #8b5cf6 100%);
  --gradient-text: linear-gradient(135deg, #818cf8 0%, #c084fc 50%, #f472b6 100%);
  --gradient-card: linear-gradient(135deg, rgba(99, 91, 255, 0.04), rgba(139, 92, 246, 0.02));
  --gradient-shine: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.03) 50%,
    transparent 100%
  );

  /* Border radius — consistent scale */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-full: 9999px;

  /* Shadows — subtle, layered (Stripe-style) */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(99, 91, 255, 0.15);

  /* Motion — Material Design 3 Standards */
  /* Standard easing for general transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  /* Decelerate for entering elements */
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-decelerate: cubic-bezier(0, 0, 0.2, 1);
  /* Accelerate for exiting elements */
  --ease-accelerate: cubic-bezier(0.4, 0, 1, 1);
  /* Emphasized for important transitions */
  --ease-emphasized: cubic-bezier(0.2, 0, 0, 1);
  /* Spring for playful interactions */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  /* Duration scale */
  --duration-fast: 150ms;
  --duration-normal: 200ms;
  --duration-slow: 300ms;
  --duration-emphasis: 400ms;

  /* Spacing — 4px base, 8px grid */
  --sp-1: 0.25rem; /* 4px */
  --sp-2: 0.5rem; /* 8px */
  --sp-3: 0.75rem; /* 12px */
  --sp-4: 1rem; /* 16px */
  --sp-5: 1.25rem; /* 20px */
  --sp-6: 1.5rem; /* 24px */
  --sp-8: 2rem; /* 32px */
  --sp-10: 2.5rem; /* 40px */
  --sp-12: 3rem; /* 48px */
  --sp-16: 4rem; /* 64px */
  --sp-20: 5rem; /* 80px */
  --sp-24: 6rem; /* 96px */

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Georgia', 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* Typography Scale — Golden Ratio (1.618) */
  --text-display: 3.5rem; /* 56px - Hero/Display */
  --text-display-sm: 2.5rem; /* 40px - Large headlines */
  --text-headline: 2rem; /* 32px - Headlines */
  --text-title-lg: 1.5rem; /* 24px - Large titles */
  --text-title: 1.25rem; /* 20px - Titles */
  --text-body-lg: 1.125rem; /* 18px - Large body */
  --text-body: 1rem; /* 16px - Body (base) */
  --text-body-sm: 0.875rem; /* 14px - Small body */
  --text-caption: 0.75rem; /* 12px - Captions */
  --text-overline: 0.6875rem; /* 11px - Overlines */
}

/* ── Reset & Base ──────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Hide focus ring on programmatic focus (SPA nav), keep for keyboard users */
[tabindex='-1']:focus:not(:focus-visible) {
  outline: none;
}
[tabindex='-1']:focus {
  outline: none;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  font-size: 16px;
}

/* Subtle ambient background glow */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 25% 0%, rgba(99, 91, 255, 0.06), transparent 70%),
    radial-gradient(ellipse 50% 30% at 75% 100%, rgba(139, 92, 246, 0.04), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease);
}
a:hover {
  color: #818cf8;
}

::selection {
  background: rgba(99, 91, 255, 0.3);
  color: var(--text-primary);
}

.view {
  display: none;
  position: relative;
  z-index: 1;
}
.view.active {
  display: block;
}

/* ── Layout ────────────────────────────────────────────────── */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: var(--sp-8) var(--sp-6);
}
.container-narrow {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--sp-8) var(--sp-6);
}
.container-wide {
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--sp-8) var(--sp-6);
}
.text-center {
  text-align: center;
}
.flex {
  display: flex;
}
.flex-wrap {
  flex-wrap: wrap;
}
.items-center {
  align-items: center;
}
.justify-between {
  justify-content: space-between;
}
.justify-center {
  justify-content: center;
}
.gap-2 {
  gap: var(--sp-2);
}
.gap-3 {
  gap: var(--sp-3);
}
.gap-4 {
  gap: var(--sp-4);
}
.grid {
  display: grid;
}

/* ── Typography ────────────────────────────────────────────── */
.headline {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.body-md {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.body-sm {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.body-xs {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.02em;
}
.mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ── Topbar ────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-8);
  height: 64px;
  background: rgba(9, 9, 11, 0.7);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s var(--ease);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.topbar-center {
  /* Logo/brand area — auto flex item, stays naturally centred via space-between */
  display: flex;
  align-items: center;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  position: relative;
  z-index: 2;
}

/* Hidden spacer — used in topbar-left when credits badge is hidden (guests), to
   prevent the logo shifting left when the badge disappears */
.topbar-credits-spacer {
  display: none; /* toggled by JS */
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
}
.logo:hover {
  text-decoration: none;
}
.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--gradient-accent);
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.65rem;
  color: white;
  letter-spacing: 0.5px;
}
.logo-text {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease);
  position: relative;
}
.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}
.nav-links a.active {
  color: var(--text-primary);
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  background: var(--accent);
  border-radius: 4px;
  box-shadow: 0 0 10px var(--accent);
}

/* ── User Area & Credits ──────────────────────────────────── */
#nav-user-area {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) 0;
}

/* Profile link — wraps credits badge + avatar */
.nav-user-info {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
.nav-user-info:hover {
  background: rgba(255, 255, 255, 0.05);
}

.nav-user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Nav Avatar ──────────────────────────────────────────── */
.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    box-shadow 0.2s var(--ease),
    transform 0.2s var(--ease);
  overflow: hidden;
  flex-shrink: 0;
}
.nav-avatar:hover {
  box-shadow: 0 0 0 3px var(--accent-glow);
  transform: scale(1.08);
}
.nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Mobile Menu Button (Animated Hamburger → X) ──────────── */
.mobile-menu-btn {
  /* Hidden on desktop — shown via media query at ≤640px */
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    background var(--duration-fast) var(--ease),
    border-color var(--duration-fast) var(--ease);
  flex-shrink: 0;
}
.mobile-menu-btn .bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition:
    transform 0.3s var(--ease),
    opacity 0.2s var(--ease);
  transform-origin: center;
}
.mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-default);
}
.mobile-menu-btn:hover .bar {
  background: var(--text-primary);
}
.mobile-menu-btn:active {
  transform: scale(0.92);
}
/* X state — when bottom sheet is open */
.mobile-menu-btn.open .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-menu-btn.open .bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.mobile-menu-btn.open .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Bottom Sheet ────────────────────────────────────────── */
.bottom-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s var(--ease),
    visibility 0.25s;
  z-index: 998;
}
.bottom-sheet-backdrop.open {
  opacity: 1;
  visibility: visible;
}
.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  border-radius: 16px 16px 0 0;
  padding: var(--sp-2) var(--sp-4) calc(var(--sp-6) + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 999;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
  will-change: transform;
  -webkit-user-select: none;
  user-select: none;
}
.bottom-sheet.open {
  transform: translateY(0);
}
.bottom-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border-default);
  border-radius: 2px;
  margin: 0 auto var(--sp-4);
}
.bottom-sheet-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  min-height: 48px;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
}
.bottom-sheet-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}
.bottom-sheet-danger {
  color: var(--red);
}
.bottom-sheet-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
}
.bottom-sheet-accent {
  color: var(--accent);
  font-weight: 600;
}
.bottom-sheet-accent:hover {
  background: rgba(99, 91, 255, 0.08);
  color: var(--accent);
}
.bottom-sheet-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: var(--sp-2) 0;
}

/* ── Credits Badge ─────────────────────────────────────────── */
.credits-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 2px 10px;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #c084fc;
}

.premium-glow {
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.1);
  animation: pulse-glow 3s infinite;
}
@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 5px rgba(168, 85, 247, 0.1);
  }
  50% {
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
  }
  100% {
    box-shadow: 0 0 5px rgba(168, 85, 247, 0.1);
  }
}

/* ── Logout Button (always visible in topbar) ─────────────── */
.nav-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  color: #ef4444;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s var(--ease),
    border-color 0.2s var(--ease);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logout-btn:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.6);
}

#nav-guest-area {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.nav-cta:hover {
  background: var(--accent-hover) !important;
  box-shadow: var(--shadow-glow);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.625rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
  text-decoration: none;
  line-height: 1.4;
  min-height: 44px;
  white-space: nowrap;
}
.btn:hover {
  text-decoration: none;
}
.btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px var(--bg-deep),
    0 0 0 4px var(--accent);
}
.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px var(--accent-glow);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--text-muted);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: var(--sp-2) var(--sp-3);
}
.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  min-height: 32px;
}
.btn-lg {
  padding: 0.75rem 1.75rem;
  font-size: 0.9375rem;
  min-height: 48px;
}

.btn-social {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 0.625rem 1.25rem;
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
  text-decoration: none;
  flex: 1;
  justify-content: center;
  min-height: 44px;
}
.btn-social:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--text-muted);
  text-decoration: none;
}

.btn-loading {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  transition:
    border-color var(--duration-fast) var(--ease),
    box-shadow var(--duration-fast) var(--ease),
    transform var(--duration-fast) var(--ease);
  will-change: transform, box-shadow;
}
.card:hover {
  border-color: var(--border-default);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.card-elevated {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--sp-8);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.3),
    0 4px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    box-shadow var(--duration-normal) var(--ease-out),
    transform var(--duration-normal) var(--ease-out);
  will-change: transform, box-shadow;
}

.card-elevated:hover {
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 8px 16px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

/* Card active/pressed state for tactile feedback */
.card:active,
.card-elevated:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* ── Badges ────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge-red {
  background: var(--red-subtle);
  color: var(--red);
}
.badge-amber {
  background: var(--amber-subtle);
  color: var(--amber);
}
.badge-green {
  background: var(--green-subtle);
  color: var(--green);
}
.badge-blue {
  background: var(--blue-subtle);
  color: var(--blue);
}
.badge-purple {
  background: var(--purple-subtle);
  color: var(--purple);
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: var(--sp-20) var(--sp-6) var(--sp-12);
  max-width: 980px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-4);
  background: var(--accent-subtle);
  border: 1px solid rgba(99, 91, 255, 0.15);
  border-radius: var(--radius-full);
  font-size: var(--text-overline);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #818cf8;
  margin-bottom: var(--sp-8);
  text-transform: uppercase;
}
.hero-title {
  font-size: clamp(2.5rem, 7vw, var(--text-display));
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: var(--sp-6);
}
.hero-sub {
  font-size: var(--text-body-lg);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--sp-10);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
}
.hero-note {
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.hero-proof-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}
.hero-proof-card {
  text-align: left;
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    radial-gradient(circle at top right, rgba(99, 91, 255, 0.1), transparent 52%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.hero-proof-card strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  line-height: 1.35;
}
.hero-proof-card span:last-child {
  display: block;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.55;
}
.hero-proof-kicker {
  display: inline-flex;
  margin-bottom: 0.6rem;
  color: #a5b4fc;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Social Proof Stats ───────────────────────────────────── */
.social-proof-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-4);
  padding: 0;
  max-width: 960px;
  margin: var(--sp-8) auto var(--sp-8);
  position: relative;
}
.proof-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  gap: 0.4rem;
  min-width: 0;
  min-height: 138px;
  padding: var(--sp-5);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    radial-gradient(circle at top left, rgba(99, 91, 255, 0.14), transparent 54%),
    linear-gradient(180deg, rgba(18, 18, 24, 0.92) 0%, rgba(11, 11, 16, 0.94) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 40px rgba(0, 0, 0, 0.24);
  position: relative;
  overflow: hidden;
}
.proof-stat::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(99, 91, 255, 0.65), rgba(99, 91, 255, 0));
  opacity: 0.7;
}
.proof-kicker {
  display: inline-flex;
  margin-bottom: 0.25rem;
  color: #a5b4fc;
  font-size: 0.675rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.proof-value {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.15;
}
.proof-label {
  font-size: 0.84rem;
  font-weight: 500;
  color: rgba(226, 232, 240, 0.74);
  line-height: 1.45;
  max-width: 18ch;
}
.proof-divider {
  display: none;
}

@media (max-width: 960px) {
  .social-proof-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-3);
    max-width: 760px;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: var(--sp-16);
  }
  .hero-proof-strip {
    grid-template-columns: 1fr;
  }
  .social-proof-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-3);
    margin-left: var(--sp-4);
    margin-right: var(--sp-4);
  }
  .proof-divider {
    display: none;
  }
  .proof-stat {
    min-width: 0;
    min-height: 124px;
    padding: var(--sp-4);
  }
  .proof-label {
    max-width: none;
  }
}

/* ── How It Works ──────────────────────────────────────────── */
.how-section {
  max-width: 960px;
  margin: 0 auto;
  padding: var(--sp-12) var(--sp-6);
}
.section-title {
  text-align: center;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-10);
  color: var(--text-primary);
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}
.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--sp-8) var(--sp-6);
  text-align: center;
  position: relative;
  transition: all var(--duration-normal) var(--ease);
  overflow: visible; /* Allow step-number circles to extend above card edge */
}
.step-card:hover {
  border-color: var(--border-default);
  transform: translateY(-2px);
}
.step-number {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: var(--radius-full);
  font-size: 0.625rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 2;
}
.step-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: var(--sp-4);
}
.step-icon svg {
  width: 24px;
  height: 24px;
}
.step-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--sp-2);
  letter-spacing: -0.01em;
}
.step-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Why Section ───────────────────────────────────────────── */
.why-section {
  max-width: 720px;
  margin: var(--sp-8) auto;
  padding: 0 var(--sp-6);
}
.why-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--sp-12) var(--sp-8);
  text-align: center;
}
.why-card h2 {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

/* ── FAQ Section ───────────────────────────────────────────── */
.faq-section {
  max-width: 760px;
  margin: var(--sp-8) auto;
  padding: var(--sp-12) var(--sp-6) var(--sp-6);
}
.faq-grid {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  transition:
    border-color var(--duration-normal) var(--ease),
    box-shadow var(--duration-normal) var(--ease);
}
.faq-item:hover {
  border-color: var(--border-default);
}
.faq-item[open] {
  border-color: rgba(99, 91, 255, 0.2);
  box-shadow: 0 0 20px rgba(99, 91, 255, 0.05);
}
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--sp-6);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  transition:
    color var(--duration-fast) var(--ease),
    background var(--duration-fast) var(--ease);
  user-select: none;
  -webkit-user-select: none;
}
.faq-question::-webkit-details-marker {
  display: none;
}
.faq-question::marker {
  display: none;
  content: '';
}
.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-muted);
  transition:
    transform var(--duration-normal) var(--ease),
    color var(--duration-normal) var(--ease);
  flex-shrink: 0;
  margin-left: var(--sp-4);
}
.faq-item[open] .faq-question::after {
  content: '−';
  color: var(--accent);
  transform: rotate(180deg);
}
.faq-question:hover {
  background: rgba(255, 255, 255, 0.02);
  color: #818cf8;
}
.faq-answer {
  padding: 0 var(--sp-6) var(--sp-5);
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  animation: faq-slide-in 0.25s var(--ease) forwards;
}
@keyframes faq-slide-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 640px) {
  .faq-section {
    padding: var(--sp-8) var(--sp-4) var(--sp-4);
  }
  .faq-question {
    padding: var(--sp-4) var(--sp-4);
    font-size: 0.875rem;
  }
  .faq-answer {
    padding: 0 var(--sp-4) var(--sp-4);
    font-size: 0.8125rem;
  }
}

/* ── Trust Bar ─────────────────────────────────────────────── */
.trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding: var(--sp-10) var(--sp-6) var(--sp-16);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.trust-logo {
  padding: var(--sp-1) var(--sp-3);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-faint);
  transition: all var(--duration-fast) var(--ease);
}
.trust-logo:hover {
  color: var(--text-secondary);
  border-color: var(--border-default);
}

/* ── Auth Pages ────────────────────────────────────────────── */
.auth-container {
  max-width: 400px;
  margin: var(--sp-16) auto;
  padding: 0 var(--sp-6);
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.form-group label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
}
.form-group input {
  padding: 0.625rem 0.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  transition:
    border-color var(--duration-fast) var(--ease),
    box-shadow var(--duration-fast) var(--ease);
  min-height: 44px;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}
.form-group input::placeholder {
  color: var(--text-faint);
}

.form-error {
  padding: var(--sp-3) var(--sp-4);
  background: var(--red-subtle);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-md);
  color: var(--red);
  font-size: 0.8125rem;
}
.form-success {
  padding: var(--sp-3) var(--sp-4);
  background: var(--green-subtle);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-md);
  color: var(--green);
  font-size: 0.8125rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin: var(--sp-6) 0;
  color: var(--text-faint);
  font-size: 0.75rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.social-buttons {
  display: flex;
  gap: var(--sp-3);
}

.auth-switch {
  text-align: center;
  margin-top: var(--sp-6);
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.auth-switch a {
  color: var(--accent);
  font-weight: 600;
}

/* ── Upload Zone ───────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--sp-10) var(--sp-8);
  text-align: center;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease);
  background: rgba(255, 255, 255, 0.01);
  position: relative;
}
.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--accent);
  background: rgba(99, 91, 255, 0.03);
  border-style: solid;
}
.upload-zone.file-selected {
  border-color: var(--green);
  border-style: solid;
  background: rgba(34, 197, 94, 0.03);
}
.upload-icon {
  font-size: 2rem;
  margin-bottom: var(--sp-3);
  opacity: 0.8;
}
.upload-text {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.upload-text strong {
  font-size: 0.9375rem;
  font-weight: 600;
}

/* File preview after selection */
.file-preview {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  margin-top: var(--sp-4);
}
.file-preview-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-subtle);
  border-radius: var(--radius-md);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.file-preview-icon svg {
  color: var(--accent);
  opacity: 0.95;
}
.file-preview-icon::after {
  content: attr(data-file-type);
  position: absolute;
  right: -4px;
  bottom: -4px;
  min-width: 22px;
  padding: 2px 5px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  text-align: center;
}
.file-preview-info {
  flex: 1;
  text-align: left;
}
.file-preview-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}
.file-preview-size {
  font-size: 0.6875rem;
  color: var(--text-muted);
}
.file-preview-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--sp-2);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast) var(--ease);
  font-size: 1.125rem;
  line-height: 1;
}
.file-preview-remove:hover {
  color: var(--red);
  background: var(--red-subtle);
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
  display: flex;
  align-items: center;
}
.form-label-optional {
  font-weight: 400;
  color: var(--text-faint);
  margin-left: var(--sp-2);
  font-size: 0.75rem;
}

.jd-textarea {
  width: 100%;
  padding: var(--sp-4);
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.6;
  resize: vertical;
  transition:
    border-color var(--duration-fast) var(--ease),
    box-shadow var(--duration-fast) var(--ease);
  min-height: 120px;
}
.jd-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}
.jd-textarea::placeholder {
  color: var(--text-muted);
}

/* ── Loading & Skeleton ───────────────────────────────────── */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-16) var(--sp-8);
  text-align: center;
}

.loader {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-default);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-card) 25%,
    var(--bg-elevated) 50%,
    var(--bg-card) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}
.skeleton-text {
  height: 14px;
  margin-bottom: var(--sp-2);
}
.skeleton-title {
  height: 20px;
  width: 60%;
  margin-bottom: var(--sp-3);
}
.skeleton-circle {
  border-radius: 50%;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ── Results Hero ──────────────────────────────────────────── */
.results-hero {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
  margin-bottom: var(--sp-6);
  text-align: center;
}
.results-hero-score {
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-6);
  border-bottom: 1px solid var(--border-subtle);
}
.results-hero-number {
  font-size: 3.5rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.04em;
  line-height: 1;
}
.results-hero-pct {
  font-size: 1.25rem;
  opacity: 0.5;
  font-weight: 600;
}
.results-hero-label {
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: var(--sp-2);
  letter-spacing: -0.01em;
}
.results-hero-breakdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
}

/* ── Score Display ─────────────────────────────────────────── */
.scores-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--sp-6);
}
.score-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  padding: var(--sp-6) var(--sp-4);
  background: transparent;
}
.score-ring-value {
  position: absolute;
  top: 32px;
  font-size: 1.25rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.02em;
}
.score-ring-pct {
  font-size: 0.6875rem;
  opacity: 0.6;
}
.score-ring-progress {
  transition: stroke-dashoffset 1.2s var(--ease-out);
}
.ring-label {
  margin-top: var(--sp-2);
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.ring-sub {
  font-size: 0.625rem;
  color: var(--text-faint);
  margin-top: 2px;
}

/* ── Tabs ──────────────────────────────────────────────────── */
.tabs-nav {
  display: flex;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 3px;
  margin-bottom: var(--sp-6);
}
.tab-btn {
  flex: 1;
  padding: var(--sp-3) var(--sp-4);
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
}
.tab-btn:hover {
  color: var(--text-secondary);
}
.tab-btn.active {
  background: var(--accent);
  color: white;
  box-shadow: 0 1px 4px var(--accent-glow);
}

.tab-content {
  display: none;
}
.tab-content.active-tab {
  display: block;
}

/* ── Section Blocks ────────────────────────────────────────── */
.section-block {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  transition: border-color var(--duration-fast) var(--ease);
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
}
.section-header h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.section-header h4 {
  font-size: 0.875rem;
  font-weight: 600;
}

/* ── Warning Banner ──────────────────────────────────────── */
.warning-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--amber-subtle);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  color: var(--amber);
  margin-bottom: var(--sp-6);
  line-height: 1.5;
}

/* ── Issue Cards ───────────────────────────────────────────── */
.issue-card {
  padding: var(--sp-4) var(--sp-5);
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-3);
  transition: border-color var(--duration-fast) var(--ease);
}
.issue-card:hover {
  border-color: var(--border-default);
}
.issue-header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-2);
}
.issue-title {
  font-weight: 600;
  font-size: 0.875rem;
}
.issue-body {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.issue-fix {
  margin-top: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--green-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--green);
  line-height: 1.5;
}

.success-card {
  text-align: center;
  padding: var(--sp-10);
  border-color: rgba(34, 197, 94, 0.15);
}
.success-card h3 {
  font-weight: 600;
  margin-bottom: var(--sp-1);
}

/* ── Keywords ──────────────────────────────────────────────── */
.keyword-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-4);
}
.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.keyword-tag {
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}
.keyword-tag.missing {
  background: var(--red-subtle);
  color: var(--red);
}
.keyword-tag.matched {
  background: var(--green-subtle);
  color: var(--green);
}

/* ── Upsell Card ───────────────────────────────────────────── */
.upsell-card {
  text-align: center;
  padding: var(--sp-10);
  background: var(--gradient-card);
  border: 1px dashed var(--border-bright);
  border-radius: var(--radius-lg);
  margin-top: var(--sp-8);
}
.upsell-card h3 {
  font-weight: 700;
  margin-bottom: var(--sp-2);
}
.upsell-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  max-width: 420px;
  margin: 0 auto var(--sp-5);
  line-height: 1.6;
}

/* ── Recruiter Table ───────────────────────────────────────── */
.recruiter-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--bg-card);
}
.recruiter-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  display: table;
}

.recruiter-table thead {
  display: table-header-group;
}

.recruiter-table tbody {
  display: table-row-group;
}

.recruiter-table tr {
  display: table-row;
}
.recruiter-table th {
  text-align: left;
  padding: var(--sp-4) var(--sp-5);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  border-bottom: 2px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}
.recruiter-table td {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: top;
}

/* Column width constraints - keep the table stable without crushing the content */
.recruiter-table {
  table-layout: fixed;
}

.recruiter-table th:first-child,
.recruiter-table td:first-child {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
}

.recruiter-table th:nth-child(2),
.recruiter-table td:nth-child(2) {
  width: auto;
  max-width: none;
  overflow: visible;
}

.recruiter-table th:nth-child(3),
.recruiter-table td:nth-child(3) {
  width: 90px;
  min-width: 90px;
  max-width: 90px;
  text-align: center;
}
.recruiter-table tr:last-child td {
  border-bottom: none;
}
.recruiter-table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}
.recruiter-table tr:hover {
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease;
}

.field-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.875rem;
  letter-spacing: 0.01em;
}
.field-found {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.5;
  word-break: break-word;
}
.field-missing {
  color: var(--red);
  font-size: 0.8125rem;
  line-height: 1.55;
}
.field-missing em {
  opacity: 0.8;
}
.field-preview-main {
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.5;
}
.field-preview-meta {
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.55;
  margin-top: 0.25rem;
}

/* Status pills — polished */
.recruiter-table .status-found,
.recruiter-table .status-partial,
.recruiter-table .status-missing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.recruiter-table .status-found {
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
}
.recruiter-table .status-partial {
  background: rgba(250, 204, 21, 0.12);
  color: #facc15;
}
.recruiter-table .status-missing {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

/* ── Diff Cards (AI Fix) ───────────────────────────────────── */
.diff-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: var(--sp-4);
  overflow: hidden;
}
.diff-before {
  padding: var(--sp-5);
  background: rgba(239, 68, 68, 0.03);
  border-bottom: 1px solid var(--border-subtle);
}
.diff-after {
  padding: var(--sp-5);
  background: rgba(34, 197, 94, 0.03);
}
.diff-label {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-2);
}
.diff-label-before {
  color: var(--red);
}
.diff-label-after {
  color: var(--green);
}
.diff-before p,
.diff-after p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-secondary);
}
.diff-actions {
  padding: var(--sp-3) var(--sp-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.diff-meta {
  padding: var(--sp-3) var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  border-top: 1px solid var(--border-subtle);
}

/* ── Knockout Risks ────────────────────────────────────────── */
.knockout-section {
  background: var(--bg-card);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.knockout-header {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--border-subtle);
}
.knockout-header h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--red);
  margin-bottom: var(--sp-1);
}
.knockout-header .badge {
  flex-shrink: 0;
  margin-left: auto;
}
.knockout-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--red-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.knockout-list {
  padding: var(--sp-4) var(--sp-6);
}
.knockout-item {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: rgba(239, 68, 68, 0.03);
  border: 1px solid rgba(239, 68, 68, 0.08);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: var(--sp-3);
  line-height: 1.6;
  animation: fadeUp 0.3s var(--ease-out) both;
}
.knockout-item:last-child {
  margin-bottom: 0;
}
.knockout-item-icon {
  flex-shrink: 0;
  font-size: 0.875rem;
  margin-top: 1px;
}
.knockout-item-text {
  flex: 1;
}

/* ── Diff Card Enhancements ───────────────────────────────── */
.diff-card-number {
  position: absolute;
  top: -1px;
  left: var(--sp-5);
  background: var(--accent);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.diff-card {
  position: relative;
}
.diff-badges {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.bullet-fixes-count {
  margin-bottom: var(--sp-3);
}
.empty-state-card {
  text-align: center;
  padding: var(--sp-12);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}
.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: var(--sp-4);
}
.empty-state-card h3 {
  font-weight: 600;
  margin-bottom: var(--sp-2);
}
.empty-state-card p {
  max-width: 400px;
  margin: 0 auto;
  color: var(--text-muted);
}

/* ── Pricing ───────────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
  max-width: 900px;
  margin: 0 auto;
}
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--sp-8);
  text-align: center;
  position: relative;
  transition: all var(--duration-normal) var(--ease);
}
.pricing-card:hover {
  border-color: var(--border-default);
  transform: translateY(-2px);
}
.pricing-card.featured {
  border-color: rgba(99, 91, 255, 0.3);
  background: linear-gradient(180deg, rgba(99, 91, 255, 0.06) 0%, var(--bg-card) 100%);
  box-shadow: 0 0 40px rgba(99, 91, 255, 0.08);
}
.pricing-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--sp-1) var(--sp-4);
  background: var(--accent);
  border-radius: var(--radius-full);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: white;
  white-space: nowrap;
}
.pricing-tier {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--sp-3);
  color: var(--text-secondary);
}
.pricing-price {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: var(--sp-6);
  letter-spacing: -0.03em;
}
.pricing-price span {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
}
.pricing-features {
  list-style: none;
  margin-bottom: var(--sp-8);
  text-align: left;
}
.pricing-features li {
  padding: var(--sp-2) 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
}
.pricing-features li::before {
  content: '✓';
  color: var(--green);
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Credit-specific pricing styles */
.pricing-credits {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: var(--sp-1);
  letter-spacing: -0.01em;
}
.pricing-per-credit {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--sp-2);
}
.pricing-per-credit strong {
  color: var(--green);
}
.pricing-intro-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-8);
  padding: var(--sp-3) var(--sp-4);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.875rem;
}
.pricing-plan-note {
  min-height: 2.6em;
  margin-bottom: var(--sp-5);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.45;
}

/* Featured badge ("MOST POPULAR") */
.featured-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 16px;
  background: rgba(99, 91, 255, 0.14);
  border: 1px solid rgba(99, 91, 255, 0.24);
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #d9d6ff;
  white-space: nowrap;
  box-shadow: none;
  z-index: 1;
}

/* ── Guest Blur Overlay (Premium Content Gate) ────────────── */
.blurred-container > *:not(.unlock-overlay) {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

/* Nav credit badge */
.nav-credits-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: var(--accent-subtle);
  border: 1px solid rgba(99, 91, 255, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  color: #818cf8;
  transition: all var(--duration-fast) var(--ease);
  margin-right: var(--sp-2);
}
.nav-credits-badge:hover {
  background: rgba(99, 91, 255, 0.15);
  border-color: rgba(99, 91, 255, 0.3);
}
.credit-icon {
  font-size: 0.875rem;
}

/* ── Scan History ──────────────────────────────────────────── */
.scan-history-card {
  display: block;
  border-left: 3px solid transparent;
  color: inherit;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.scan-history-card:hover {
  border-left-color: var(--accent);
  background: var(--bg-elevated);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.scan-history-card:hover,
.scan-history-card:focus-visible {
  color: inherit;
  text-decoration: none;
}

.scan-history-card:hover .history-arrow {
  color: var(--text-primary);
  transform: translateX(4px);
}

.scan-history-card:focus-visible .history-arrow {
  color: var(--text-primary);
  transform: translateX(4px);
}

/* ── Animations ────────────────────────────────────────────── */
.animate-fade-up {
  animation: fadeUp 0.4s var(--ease-out) both;
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.delay-1 {
  animation-delay: 0.05s;
}
.delay-2 {
  animation-delay: 0.1s;
}
.delay-3 {
  animation-delay: 0.15s;
}

/* Count-up animation helper */
.count-up {
  transition: all 1.2s var(--ease-out);
}

/* ── Mobile Hamburger — Legacy (replaced by bottom sheet) ─── */
@media (prefers-reduced-motion: reduce) {
  .mobile-toggle-inner span {
    transition: none;
  }
}

/* ── Agent Progress Bar ───────────────────────────────────── */
.agent-progress {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-6);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: var(--sp-6);
  overflow-x: auto;
  white-space: nowrap;
  flex-wrap: wrap;
  row-gap: var(--sp-4);
}
.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  flex: 0 0 auto;
  min-width: 52px;
  position: relative;
}
.progress-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 9px;
  left: 60%;
  width: 80%;
  height: 2px;
  background: var(--border-subtle);
  transition: background var(--duration-slow) var(--ease);
}
.progress-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--border-default);
  transition: all var(--duration-normal) var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.progress-step.complete .progress-dot::after {
  content: '✓';
  font-size: 9px;
  color: white;
  font-weight: 700;
}
.progress-step.error .progress-dot {
  border-color: var(--red);
  background: var(--red-subtle);
}
.progress-step.running .progress-dot {
  border-color: var(--accent);
  background: var(--accent-subtle);
  animation: pulse-dot 1.5s infinite;
}
.progress-step.complete .progress-dot {
  border-color: var(--green);
  background: var(--green);
}
.progress-step.complete:not(:last-child)::after {
  background: var(--green);
}
.progress-label {
  font-size: 0.5625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  transition: color var(--duration-normal) var(--ease);
}
.progress-step.running .progress-label {
  color: var(--accent);
}
.progress-step.complete .progress-label {
  color: var(--green);
}

@keyframes pulse-dot {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(99, 91, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(99, 91, 255, 0);
  }
}

/* ── Agent Score Summary ──────────────────────────────────── */
.agent-score-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.agent-score-value {
  font-size: 2rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.agent-score-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: var(--sp-3);
}
.agent-score-value.score-green {
  color: var(--green);
}
.agent-score-value.score-amber {
  color: var(--amber);
}
.agent-score-value.score-red {
  color: var(--red);
}
.agent-score-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Score interpretation labels */
.score-interpretation {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-top: var(--sp-2);
}
.score-interpretation.excellent {
  background: var(--green-subtle);
  color: var(--green);
}
.score-interpretation.good {
  background: var(--blue-subtle);
  color: var(--blue);
}
.score-interpretation.fair {
  background: var(--amber-subtle);
  color: var(--amber);
}
.score-interpretation.poor {
  background: var(--red-subtle);
  color: var(--red);
}

/* ── Agent Timeline ───────────────────────────────────────── */
.agent-timeline {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-8);
}

.agent-step-header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  cursor: pointer;
  user-select: none;
}
.agent-step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: fadeUp 0.3s var(--ease-out) both;
}
.agent-step-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  border: 2px solid var(--border-default);
  background: var(--bg-elevated);
  transition: all var(--duration-normal) var(--ease);
}
.agent-step-icon.running {
  border-color: var(--accent);
  background: var(--accent-subtle);
  color: var(--accent);
  animation: pulse-dot 1.5s infinite;
}
.agent-step-icon.complete {
  border-color: var(--green);
  background: var(--green);
  color: white;
}
.agent-step-icon.error {
  background: var(--red-subtle);
  color: var(--red);
  border: 2px solid var(--red);
}
.agent-step-icon.locked {
  background: var(--purple-subtle);
  color: var(--purple);
  border: 2px solid var(--purple);
}
.agent-step-label {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.agent-step-status {
  font-size: 0.75rem;
  color: var(--text-faint);
  font-weight: 500;
}

.agent-step-body {
  padding: 0 var(--sp-5) var(--sp-5);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Typewriter streaming text */
.agent-stream-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-word;
  padding: var(--sp-3) var(--sp-4);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  max-height: 160px;
  overflow-y: auto;
}
.agent-stream-text .cursor {
  display: inline-block;
  width: 2px;
  height: 13px;
  background: var(--accent);
  margin-left: 1px;
  animation: blink 0.6s step-end infinite;
  vertical-align: text-bottom;
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* Bullet diff cards in agent timeline */
.agent-bullet-card {
  margin: var(--sp-3) 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  transition: border-color var(--duration-fast) var(--ease);
}
.agent-bullet-card:hover {
  border-color: var(--border-default);
}
.agent-bullet-before {
  padding: var(--sp-4);
  background: rgba(239, 68, 68, 0.03);
  border-bottom: 1px solid var(--border-subtle);
}
.agent-bullet-after {
  padding: var(--sp-4);
  background: rgba(34, 197, 94, 0.03);
}
.agent-bullet-label {
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-2);
}
.agent-bullet-label.before {
  color: var(--red);
}
.agent-bullet-label.after {
  color: var(--amber);
}
.agent-bullet-label.after.done {
  color: var(--green);
}
.agent-bullet-card.bullet-complete {
  border-color: rgba(34, 197, 94, 0.15);
}
.agent-bullet-text {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-secondary);
}
.agent-bullet-meta {
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  border-top: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.01);
}

/* Copy button */
.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.6875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
  font-family: inherit;
}
.btn-copy:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}
.btn-copy.copied {
  background: var(--green-subtle);
  color: var(--green);
  border-color: rgba(34, 197, 94, 0.3);
}

/* ── Download Bar ─────────────────────────────────────────── */
.agent-download-bar {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  padding: var(--sp-4) 0;
  z-index: 100;
}
.download-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
.download-bar-text strong {
  display: block;
  margin-bottom: 2px;
  font-size: 0.875rem;
}
.download-bar-text .body-sm {
  color: var(--text-muted);
}
.download-bar-actions {
  display: flex;
  gap: var(--sp-2);
  flex-shrink: 0;
}

/* Upgrade prompt inside agent */
.agent-upgrade-prompt {
  text-align: center;
  padding: var(--sp-6);
  background: var(--gradient-card);
  border: 1px dashed var(--border-bright);
  border-radius: var(--radius-lg);
  margin: var(--sp-3) 0;
}
.agent-upgrade-prompt h4 {
  font-weight: 700;
  margin-bottom: var(--sp-2);
  font-size: 0.9375rem;
}
.agent-upgrade-prompt p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: var(--sp-4);
  line-height: 1.5;
}

/* ── Toast Notifications — Industry Standard (Vercel/Linear) ── */
#toast-container {
  position: fixed;
  top: 72px;
  right: var(--sp-4);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  pointer-events: none;
  max-width: 400px;
  width: calc(100% - var(--sp-8));
}
.toast {
  position: relative;
  padding: var(--sp-4) var(--sp-5);
  padding-right: var(--sp-10);
  background: rgba(23, 23, 28, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  animation: toastSlideIn 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  overflow: hidden;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1.5;
}
.toast-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.toast-message {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}
.toast-dismiss {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
  padding: 0;
  line-height: 1;
  font-family: inherit;
}
.toast-dismiss:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

/* Timer bar — counts down at the bottom of the toast */
.toast-timer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
.toast-timer-bar {
  height: 100%;
  width: 100%;
  transform-origin: left;
  animation: toastTimerShrink linear forwards;
}

/* Type-specific accents */
.toast-success {
  border-color: rgba(34, 197, 94, 0.2);
}
.toast-success .toast-icon {
  color: #22c55e;
}
.toast-success .toast-timer-bar {
  background: #22c55e;
}

.toast-error {
  border-color: rgba(239, 68, 68, 0.2);
}
.toast-error .toast-icon {
  color: #ef4444;
}
.toast-error .toast-timer-bar {
  background: #ef4444;
}

.toast-warning {
  border-color: rgba(245, 158, 11, 0.2);
}
.toast-warning .toast-icon {
  color: #f59e0b;
}
.toast-warning .toast-timer-bar {
  background: #f59e0b;
}

.toast-info {
  border-color: rgba(99, 91, 255, 0.2);
}
.toast-info .toast-icon {
  color: #635bff;
}
.toast-info .toast-timer-bar {
  background: #635bff;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}
@keyframes toastTimerShrink {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

/* ── Footer ────────────────────────────────────────────────── */
/* ── Footer — Secondary-Task Hub ────────────────────────────── */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: var(--sp-16) var(--sp-6) var(--sp-8);
  margin-top: var(--sp-16);
  background: rgba(9, 9, 11, 0.8);
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-8);
  margin-bottom: var(--sp-8);
}
.footer-brand {
  max-width: 280px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.footer-heading {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  font-weight: 700;
  margin-bottom: var(--sp-1);
}
.footer-col a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--duration-fast) var(--ease);
}
.footer-col a:hover {
  color: var(--accent);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--sp-6);
  font-size: 0.7rem;
  color: var(--text-faint);
}
.footer-disclaimer {
  opacity: 0.68;
  font-size: 0.75rem;
}
body[data-route-group='app'] .footer,
body[data-route-group='auth'] .footer {
  margin-top: var(--sp-10);
  padding: var(--sp-10) var(--sp-6) var(--sp-6);
}
body[data-route-group='app'] .footer-grid,
body[data-route-group='auth'] .footer-grid {
  gap: var(--sp-6);
  margin-bottom: var(--sp-6);
}
body[data-route-group='app'] .footer-brand,
body[data-route-group='auth'] .footer-brand {
  max-width: 240px;
}
body[data-route-group='app'] .footer-brand .body-xs,
body[data-route-group='auth'] .footer-brand .body-xs {
  display: none;
}
body[data-route-group='app'] .footer-disclaimer,
body[data-route-group='auth'] .footer-disclaimer {
  opacity: 0.48;
  font-size: 0.6875rem;
}

/* ── Cover Letter Tab ───────────────────────────────────────── */
.cover-letter-container {
  min-height: 400px;
}
.cover-letter-container .preview-frame {
  margin-bottom: 0;
  padding-bottom: 0;
}
.cover-letter-container .preview-iframe {
  margin-bottom: 0;
}
.cover-letter-placeholder {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.cover-letter-document {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
  font-size: 0.95rem;
  color: var(--text-secondary);
}
.cover-letter-document p {
  margin-bottom: var(--sp-4);
}
.cover-letter-document p:last-child {
  margin-bottom: 0;
}
.cover-letter-actions {
  display: flex;
  gap: var(--sp-3);
  justify-content: center;
  margin-top: 0;
  padding: var(--sp-4);
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

/* ── Legal Pages ────────────────────────────────────────────── */
.legal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
  line-height: 1.8;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.legal-content h3 {
  color: var(--text-primary);
  font-size: 1.05rem;
  margin: var(--sp-6) 0 var(--sp-2);
}
.legal-content h3:first-child {
  margin-top: 0;
}
.legal-content ul {
  padding-left: var(--sp-5);
  margin: var(--sp-2) 0 var(--sp-4);
}
.legal-content li {
  margin-bottom: var(--sp-2);
}

/* ── Sticky Header ──────────────────────────────────────────── */
/* Note: .topbar position:sticky is defined in the Topbar section above */

/* ── Blurred Guest Overlay ──────────────────────────────────── */
.blurred-gate {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
}

/* ── Responsive ────────────────────────────────────────────── */

/* -- Backdrop overlay for mobile menu -- */

/* -- Mobile-only sections — MUST stay hidden on desktop even when JS sets inline display -- */
.nav-mobile-user,
.nav-mobile-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: var(--sp-2) 0;
}

/* -- Tablet: ≤1024px -- */
@media (max-width: 1024px) {
  .nav-links {
    gap: 0;
  }
  .nav-links a {
    padding: var(--sp-2) var(--sp-3);
    font-size: 0.85rem;
  }
  .nav-cta {
    font-size: 0.8rem;
    padding: var(--sp-2) var(--sp-4);
  }
  .topbar {
    padding: 0 var(--sp-5);
  }
}

/* -- Small tablet / large phone: ≤768px -- */
@media (max-width: 768px) {
  .hero {
    padding: var(--sp-12) var(--sp-4) var(--sp-8);
  }
  .hero-title {
    font-size: 2rem;
  }
  .hero-sub {
    font-size: 1rem;
  }
  .hero-sub br {
    display: none;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin: 0 auto;
  }
  .scores-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .results-hero {
    padding: var(--sp-6);
  }
  .results-hero-number {
    font-size: 2.5rem;
  }
  .results-hero-breakdown {
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
  }
  .tabs-nav {
    flex-direction: column;
    gap: 2px;
  }
  .keyword-grid {
    grid-template-columns: 1fr;
  }
  .social-buttons {
    flex-direction: column;
  }
  .container,
  .container-narrow {
    padding: var(--sp-6) var(--sp-4);
  }

  .agent-progress {
    padding: var(--sp-3);
    gap: var(--sp-1);
  }
  .progress-label {
    font-size: 0.5rem;
  }
  .progress-step:not(:last-child)::after {
    display: none;
  }
  .agent-scores {
    grid-template-columns: 1fr 1fr;
  }
  .download-bar-inner {
    flex-direction: column;
    text-align: center;
  }
  .download-bar-actions {
    width: 100%;
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-6);
  }
  .footer-brand {
    max-width: 100%;
    grid-column: 1 / -1;
    text-align: center;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: var(--sp-2);
  }
  .cover-letter-actions {
    flex-direction: column;
    align-items: stretch;
  }

  /* On small tablets: hide topbar logout text, show icon only */
  .nav-logout-btn span {
    display: none;
  }
}

/* -- Mobile: ≤640px — menu button + bottom sheet -- */
@media (max-width: 640px) {
  .topbar {
    padding: 0 var(--sp-3);
  }

  /* Hide desktop nav links on mobile */
  .nav-links {
    display: none !important;
  }

  /* Show mobile menu button */
  .mobile-menu-btn {
    display: flex;
  }

  /* Hide desktop guest buttons — bottom sheet handles auth on mobile */
  #nav-guest-area {
    display: none !important;
  }

  /* On mobile: keep credits+avatar link, hide the logout button (bottom sheet has it) */
  .nav-logout-btn {
    display: none !important;
  }
  .nav-user-info {
    gap: var(--sp-2);
    padding: var(--sp-1);
  }

  /* Touch targets */
  .btn-sm {
    min-height: 44px;
    padding: var(--sp-3) var(--sp-5);
  }
}

/* -- Small phones: ≤480px -- */
@media (max-width: 480px) {
  .topbar {
    height: 56px;
    padding: 0 var(--sp-3);
  }
  /* Collapse to 2-col: [credits+logo] [controls] on very small screens */
  .topbar {
    grid-template-columns: 1fr 1fr;
  }
  .topbar-center {
    display: none;
  } /* Logo hidden at 480px — use left slot */
  .topbar-left {
    gap: var(--sp-2);
  }

  .agent-progress {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--sp-2);
  }
  .progress-step {
    min-width: 40px;
  }
  .agent-scores {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-8);
    padding: var(--sp-4);
  }

  .hero-title {
    font-size: 1.75rem;
  }
  .card-elevated {
    padding: var(--sp-6);
  }
  .auth-container {
    margin: var(--sp-8) auto;
  }

  .bento-stat {
    font-size: 1.25rem;
  }
  .bento-stat-large {
    font-size: 2rem;
  }
  .bento-label {
    font-size: 0.625rem;
  }
  .section-title {
    font-size: 1.5rem;
  }

  .pricing-grid {
    max-width: 100%;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════
   BENTO GRID & DASHBOARD
   ═══════════════════════════════════════════════════════════════ */

.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(140px, auto);
  gap: var(--sp-4);
  margin-top: var(--sp-8);
}

.dash-focus-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.dash-focus-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-xl);
  padding: var(--sp-6);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
}

.dash-focus-primary {
  background:
    radial-gradient(circle at top right, rgba(99, 91, 255, 0.16), transparent 35%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
}

.dash-focus-kicker {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--sp-3);
}

.dash-focus-title {
  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin: 0 0 var(--sp-3);
  line-height: 1.15;
}

.dash-focus-value {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.dash-focus-body {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.dash-focus-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
  flex-wrap: wrap;
}

.dash-focus-meta {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  max-width: 34ch;
  line-height: 1.5;
}

.dash-momentum-stats {
  display: flex;
  gap: var(--sp-4);
  margin: var(--sp-2) 0 var(--sp-4);
}

.dash-momentum-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-momentum-value {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.dash-momentum-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--duration-normal) var(--ease);
  position: relative;
  overflow: hidden;
}
.bento-card:hover {
  border-color: var(--border-default);
  transform: translateY(-2px);
}

.bento-glass {
  background: rgba(255, 255, 255, 0.02) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.bento-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--sp-3);
}

.bento-stat {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.bento-stat-large {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bento-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
}

/* Grid Area Assignments */
.card-usage {
  grid-column: span 2;
}
.card-ai {
  grid-column: span 2;
}
.card-plan {
  grid-column: span 2;
}
.card-score {
  grid-column: span 2;
}

@media (max-width: 900px) {
  .dash-focus-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dash-focus-primary {
    grid-column: 1 / -1;
  }
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .card-usage,
  .card-ai,
  .card-plan,
  .card-score {
    grid-column: span 1;
  }
}
@media (max-width: 600px) {
  .dash-focus-grid {
    grid-template-columns: 1fr;
  }
  .bento-grid {
    grid-template-columns: 1fr;
  }
}

/* Progress Bars */
.progress-bar-bg {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  margin-top: var(--sp-4);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width 1s var(--ease-out);
}
.progress-bar-fill.accent-purple {
  background: var(--purple);
}
.progress-bar-fill.accent-green {
  background: var(--green);
}

/* Profile */
.profile-header {
  text-align: center;
  padding: var(--sp-12) 0 var(--sp-8);
}

/* ── Empty States ──────────────────────────────────────────── */
.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: var(--sp-4);
  opacity: 0.5;
}
.empty-state h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--sp-2);
}
.empty-state p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  max-width: 320px;
  margin: 0 auto var(--sp-6);
  line-height: 1.5;
}

/* ── Tooltip ───────────────────────────────────────────────── */
[data-tooltip] {
  position: relative;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: var(--sp-1) var(--sp-3);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  color: var(--text-primary);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease);
  z-index: 10;
}

[data-tooltip]:hover::after {
  opacity: 1;
}

/* ── Focus Visible (Accessibility) ─────────────────────────── */
/* Global focus indicator for all interactive elements */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Skip programmatic focus indicators for non-interactive elements */
[tabindex='-1']:focus:not(:focus-visible) {
  outline: none;
}

/* Ensure all interactive elements have visible focus */
a:focus-visible,
button:focus-visible,
[role='button']:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex='0']:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Remove dangerous outline: none from interactive elements */
input:focus:not(:focus-visible),
textarea:focus:not(:focus-visible),
select:focus:not(:focus-visible) {
  /* Allow browser default or component-specific styles */
}

/* Ensure focus is visible on all cards and interactive containers */
.card:focus-visible,
.scan-history-card:focus-visible,
.agent-step-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--accent-subtle);
}

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ── Context Humanizer — Refinement UI ─────────────────────── */
.context-metric-prompt {
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  margin-top: var(--sp-3);
}
.metric-prompt-header {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
}
.metric-prompt-icon {
  font-size: 1.125rem;
}
.metric-prompt-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--amber);
}
.metric-prompt-question {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--sp-3);
}
.metric-prompt-input-row {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
}
.metric-prompt-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.8125rem;
  transition: border-color var(--duration-fast) var(--ease);
}
.metric-prompt-input:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}
.metric-prompt-input::placeholder {
  color: var(--text-faint);
}

.context-warnings {
  margin-top: var(--sp-2);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.context-warning-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: var(--red-subtle);
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.context-warning-icon {
  flex-shrink: 0;
  font-size: 0.75rem;
  margin-top: 1px;
}

/* ── Results Tabs ──────────────────────────────────────────── */
.results-tabs {
  display: flex;
  gap: var(--sp-1);
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  margin: var(--sp-6) 0;
}
.results-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease);
  font-family: inherit;
}
.results-tab:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}
.results-tab.active {
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow-sm);
}
.results-tab-panel {
  display: none;
}
.results-tab-panel.active {
  display: block;
}

/* ── Results Tab Nav (actual HTML classes) ─────────────────── */
/* Layer 1 — Base: structural foundation for .results-tab-nav / .results-tab-btn
 * The HTML uses these class names (not .results-tabs / .results-tab above).
 * Premium overrides in Layer 2 add glassmorphism + gradient active state.        */
.results-tab-nav {
  display: flex;
  gap: var(--sp-2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
  padding: 6px;
  border-radius: calc(var(--radius-lg) + 2px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: var(--sp-4);
  position: sticky;
  top: 64px;
  z-index: 40;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 14px 32px rgba(0, 0, 0, 0.18);
}
.results-tab-btn {
  flex: 1;
  padding: 13px 16px;
  min-height: 60px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.015);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: calc(var(--radius-md) + 2px);
  transition: all var(--duration-fast) var(--ease);
  font-family: inherit;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.results-tab-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}
.results-tab-copy > span:first-child {
  line-height: 1.2;
}
.results-tab-meta {
  font-size: 0.66rem;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.72;
}
.results-tab-btn.active .results-tab-meta {
  opacity: 0.88;
}
.results-tab-btn.is-limited .results-tab-meta {
  color: var(--amber);
  opacity: 0.98;
}
.results-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}
.results-tab-btn.active {
  background: linear-gradient(135deg, rgba(99, 91, 255, 0.96), rgba(76, 110, 245, 0.78));
  color: white;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 14px 30px rgba(79, 70, 229, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.results-summary-strip {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.results-summary-card {
  padding: var(--sp-5);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.012));
}

.results-summary-priority {
  background:
    radial-gradient(circle at top right, rgba(99, 91, 255, 0.15), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.012));
}

.results-summary-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--sp-3);
}

.results-summary-title {
  font-size: 1.1rem;
  font-weight: 750;
  line-height: 1.3;
  color: var(--text-primary);
  margin: 0 0 var(--sp-2);
}

.results-summary-value {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}

.results-summary-body {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

/* ── Circular Score Gauges ─────────────────────────────────── */
.score-gauge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-4);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  position: relative;
}
.score-gauge {
  width: 100px;
  height: 100px;
}
.gauge-ring {
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.gauge-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}
.gauge-value {
  font-size: 1.5rem;
  font-weight: 800;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'JetBrains Mono', monospace;
  /* Offset for the label below the gauge — shift up by half the label+gap height */
  margin-top: -12px;
}
.agent-scores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--sp-6);
  margin: var(--sp-6) 0;
}

@media (max-width: 768px) {
  .results-summary-strip {
    grid-template-columns: 1fr;
  }
  .agent-scores {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-8);
    padding: var(--sp-4) var(--sp-2);
  }
  .score-gauge-card {
    padding: var(--sp-6);
    min-height: 160px;
  }
}

/* ── Recruiter View (Plain Text) ───────────────────────────── */
.recruiter-view-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.recruiter-view-header {
  padding: var(--sp-6) var(--sp-6) var(--sp-4);
}
.recruiter-view-header h3 {
  font-size: 1rem;
  font-weight: 700;
}
.recruiter-view-toggle {
  display: flex;
  gap: var(--sp-2);
  padding: 0 var(--sp-6) var(--sp-4);
}
.recruiter-toggle-btn.active {
  background: var(--accent) !important;
  color: white !important;
}
.recruiter-text-box {
  background: var(--bg-card, #ffffff);
  padding: var(--sp-6);
  max-height: 600px;
  overflow-y: auto;
}
.recruiter-text-box pre {
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-primary, #1a1a1a);
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
}
.recruiter-field-map {
  padding: var(--sp-6);
}
.field-map-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border-subtle);
}
.field-map-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.field-map-value {
  font-size: 0.85rem;
  color: var(--text-primary);
}
.field-map-empty {
  color: var(--red);
  font-style: italic;
}

/* ── AI Optimization (Side-by-Side) ────────────────────────── */
.ai-opt-header {
  margin-bottom: var(--sp-6);
}
.anti-fluff-badge {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: rgba(34, 197, 94, 0.06);
  border: 1px solid rgba(34, 197, 94, 0.15);
  border-radius: var(--radius-lg);
}
.comparison-grid {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.comparison-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (max-width: 768px) {
  .comparison-row {
    grid-template-columns: 1fr;
  }
}
.comparison-col {
  padding: var(--sp-4);
}
.comparison-col.original {
  border-right: 1px solid var(--border-subtle);
}
.comparison-col-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: var(--sp-2);
}
.comparison-col-label.before {
  color: var(--text-muted);
}
.comparison-col-label.after {
  color: var(--green);
}
.comparison-col-text {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-primary);
}
.comparison-meta {
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-subtle);
  grid-column: 1 / -1;
  flex-wrap: wrap;
}

/* ── Cover Letter Box ──────────────────────────────────────── */

/* ── Profile v3 ────────────────────────────────────────────── */
.profile-card {
  padding: var(--sp-6);
}

.profile-guidance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.profile-guidance-card {
  padding: var(--sp-5);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.015));
}

.profile-guidance-kicker {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: var(--sp-3);
}

.profile-guidance-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin: 0 0 var(--sp-2);
}

.profile-guidance-body {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}
.profile-top {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--border-subtle);
}
.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  overflow: hidden;
}
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-upload-btn {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  cursor: pointer;
  border: 2px solid var(--bg-card);
}
.profile-identity h2 {
  font-size: 1.2rem;
  font-weight: 700;
}
.tier-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: var(--sp-2);
}
.tier-badge.tier-free {
  background: var(--bg-elevated);
  color: var(--text-muted);
}
.tier-badge.tier-starter {
  background: var(--blue-subtle);
  color: var(--blue);
}
.tier-badge.tier-pro {
  background: var(--purple-subtle);
  color: var(--purple);
}
.tier-badge.tier-hustler {
  background: var(--amber-subtle);
  color: var(--amber);
}
.profile-credits-bar {
  padding: var(--sp-5) 0;
  border-bottom: 1px solid var(--border-subtle);
}
.profile-credits-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-2);
}
.profile-credit-count {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
}
.profile-meta {
  padding-top: var(--sp-4);
  color: var(--text-muted);
}

/* Prevents body scroll behind modal (set via JS when modal opens/closes) */
body.modal-open {
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: var(--sp-4);
  overflow-y: auto;
}
.modal-overlay > * {
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  width: 100%;
  max-width: 480px;
}

/* ── Download Bar v3 ───────────────────────────────────────── */
.download-balance {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  padding: 4px 12px;
  background: var(--accent-subtle);
  border-radius: var(--radius-full);
}

/* ── Credit History Table ──────────────────────────────────── */
.credit-history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.8rem;
}
.credit-history-row:last-child {
  border-bottom: none;
}
.credit-amount-pos {
  color: var(--green);
  font-weight: 600;
}
.credit-amount-neg {
  color: var(--red);
  font-weight: 600;
}

/* ── Print ─────────────────────────────────────────────────── */
@media print {
  .topbar,
  .agent-download-bar,
  .mobile-toggle,
  #toast-container,
  .footer {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
  .view {
    display: block !important;
  }
}

/* ── Reduced Motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Password Toggle ───────────────────────────────────────── */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.password-wrapper input {
  width: 100%;
  padding-right: 40px; /* space for icon */
}
.pw-toggle {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0.6;
  transition: opacity 0.2s;
  padding: 4px;
}
.pw-toggle:hover {
  opacity: 1;
}

/* ── Tabbed Dashboard v3.6 ──────────────────────────────── */
.container-full {
  max-width: 1000px;
  width: 100%;
  padding: 0 24px;
  margin: 0 auto;
  box-sizing: border-box;
}

.results-tabs-container {
  margin-top: 24px;
}

.results-tab-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

/* All tab panes share the same frosted glass foundation as the ATS Diagnosis tab */
.results-tab-pane {
  display: none;
  animation: fadeUp 0.3s ease-in-out forwards;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
}

/* ── Pane Header / Title ─────────────────────────────────── */
.pane-header {
  margin-bottom: var(--sp-6);
}

.pane-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.pane-title + .body-sm {
  margin-top: var(--sp-1);
}

/* ── Preview empty / skeleton states ─────────────────────── */
.preview-empty {
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
}

.preview-empty h4 {
  color: var(--text-primary);
  font-size: var(--text-title);
  font-weight: 600;
  margin: 0;
}

.preview-empty p {
  max-width: 320px;
  margin: 0 auto;
  line-height: 1.6;
}

.preview-empty .btn {
  margin-top: var(--sp-2);
}

.preview-skeleton {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.cover-letter-skeleton {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background: var(--bg-card);
}

/* ── PDF Error Message ──────────────────────────────────── */
.pdf-error-message {
  padding: 3rem;
  text-align: center;
  color: var(--text-muted);
}

.results-tab-pane.active {
  display: block;
}

#tab-diagnosis.active {
  display: block;
}

#tab-recruiter-agent.active {
  display: block;
}

#tab-pdf-preview.active,
#tab-cover-letter.active {
  display: flex;
}

#tab-pdf-preview,
#tab-cover-letter {
  flex-direction: column;
  height: calc(100vh - 120px);
  overflow: hidden;
  position: relative;
  padding: 0; /* PDF/CL tabs have internal padding via their child containers */
}

#tab-cover-letter {
  padding: var(--sp-6);
  height: auto;
  overflow: visible;
}
#tab-cover-letter.active {
  display: flex;
}

/* Visual watermark for cover letter — accessible but deterrent */
.cover-letter-container {
  position: relative;
}

/* Watermark overlay — visible but doesn't block interaction */
.cover-letter-container::before {
  content: 'PREVIEW';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-30deg);
  font-size: 4rem;
  font-weight: 700;
  color: var(--text-faint);
  opacity: 0.08;
  pointer-events: none;
  user-select: none;
  z-index: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* Secondary watermark for content area */
.cover-letter-document::after,
#cover-letter-stream::after {
  content: 'ResumeXray';
  position: absolute;
  bottom: 24px;
  right: 24px;
  font-size: 0.75rem;
  color: var(--text-faint);
  opacity: 0.25;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

/* Ensure content remains accessible */
.cover-letter-container > #cover-letter-stream {
  position: relative;
}

.preview-frame,
.pdf-preview-container {
  flex: 1;
  position: relative;
  background: #f0f0f0;
}

/* ── Mobile PDF scaling ─────────────────────────────────────────
    Default to a fit-to-width preview on narrow screens so the
    document feels native to mobile instead of like a desktop canvas.
    ──────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  #pdf-canvas-container {
    max-height: min(70vh, 760px);
  }
}

.pdf-scanning-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg-elevated);
  z-index: 10;
}

.pdf-viewer-overlay {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

/* Wrapper card around the canvas scroll area */
.pdf-preview-container {
  flex: 1 1 auto;
  min-height: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.15),
    0 1px 4px rgba(0, 0, 0, 0.1);
  margin: var(--sp-4) 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  background: #f0f0f0;
}

/* Default canvas container height — JS overrides this dynamically */
#pdf-canvas-container {
  max-height: min(75vh, 960px);
}


/* Adjust agent scores layout for left pane */
#tab-diagnosis .agent-scores {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

@media (max-width: 768px) {
  #tab-diagnosis .agent-scores {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .profile-guidance-grid {
    grid-template-columns: 1fr;
  }
}

/* Inside the new pane, we override the fixed positioning of the download bar */
#tab-pdf-preview .agent-download-bar {
  position: relative;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-default);
  margin-top: 0;
  z-index: 10;
}

/* ── Ready Overlay Animation ───────────────────────────────────── */
.ready-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.ready-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.ready-content {
  text-align: center;
  transform: scale(0.8) translateY(20px);
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ready-overlay.show .ready-content {
  transform: scale(1) translateY(0);
}

.ready-check-icon {
  width: 80px;
  height: 80px;
  background: var(--green);
  color: var(--bg-deep);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto var(--sp-6) auto;
  box-shadow: 0 0 30px rgba(76, 175, 80, 0.4);
}

.ready-title {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}

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

/* ── Layout Selector ─────────────────────────────────────────── */
.layout-selector {
  display: flex;
  align-items: center;
  background: var(--bg-deep);
  padding: 2px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.btn-xs {
  font-size: 11px;
  padding: var(--sp-1) var(--sp-2);
  height: auto;
  min-height: auto;
}

/* ── GUEST BLURRED FUNNEL ── */
.guest-blurred {
  filter: blur(4px) grayscale(40%);
  pointer-events: none;
  user-select: none;
  opacity: 0.7;
  position: relative;
  transition: filter 0.3s ease;
}

/* ── SVG inline icon base sizing ── */
.dropdown-item svg,
.pw-toggle svg,
.profile-avatar svg,
.bento-card svg,
.nav-link svg,
button svg:not(.score-gauge):not(.gauge-ring),
a svg {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  vertical-align: -0.125em;
}

.blurred-container {
  position: relative;
  overflow: hidden;
  min-height: 280px;
}

.unlock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 280px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(9, 9, 11, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
}

.unlock-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  padding: 1.75rem 2rem;
  max-width: 340px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: fadeUp 0.4s ease-out;
}

.unlock-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.unlock-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
}

.unlock-text {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* ── Score Badges (scan history cards) ─────────────────────── */
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 650;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

/* Premium badges: transparent backgrounds, subtle borders, high-contrast text */
.score-badge-green {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.2);
}
.score-badge-amber {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.2);
}
.score-badge-red {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.2);
}

/* ── Credit History Labels ─────────────────────────────────── */
.credit-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.6;
  margin-right: 0.25rem;
}

/* ── Empty State ───────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.empty-state svg {
  display: block;
}

/* ── Results Tabs Responsive ──────────────────────────────── */
@media (max-width: 640px) {
  .container-full {
    padding: 0 var(--sp-3);
  }

  /* 2×2 grid tab nav — all tabs visible, no scrolling */
  .results-tab-nav {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
  }
  .results-tab-btn {
    font-size: 0.78rem;
    padding: 12px 8px;
    min-height: 60px;
    white-space: normal;
    text-align: left;
    line-height: 1.2;
  }
  .results-tab-copy {
    gap: 3px;
  }
  .results-tab-meta {
    font-size: 0.62rem;
  }

  /* Reduce tab pane padding on mobile */
  .results-tab-pane {
    padding: var(--sp-4);
  }

  /* PDF tab height — account for mobile tab bar */
  #tab-pdf-preview {
    height: calc(100vh - 160px);
  }
  #tab-cover-letter {
    height: auto;
    overflow: visible;
  }
  .preview-iframe,
  .pdf-preview-frame {
    min-height: 280px;
  }

  /* Field map — stack label above value */
  .field-map-row {
    grid-template-columns: 1fr;
    gap: var(--sp-1);
  }

  /* Recruiter table — card-style stacking on mobile only */
  .recruiter-table {
    display: block;
  }

  .recruiter-table thead {
    display: none;
  }

  .recruiter-table tbody {
    display: block;
  }

  .recruiter-table tr {
    display: flex;
    flex-direction: column;
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--border-subtle);
    gap: var(--sp-2);
    width: 100%;
  }

  .recruiter-table tr:last-child {
    border-bottom: none;
  }

  .recruiter-table td {
    display: block;
    width: 100% !important;
    min-width: auto !important;
    max-width: none !important;
    padding: var(--sp-1) 0;
    border-bottom: none;
  }

  .recruiter-table td.field-name {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-faint);
    margin-bottom: 0;
    width: 100% !important;
  }

  .recruiter-table .field-found {
    white-space: normal;
    word-break: break-word;
    width: 100%;
  }

  /* PDF toolbar — simplified (template/density removed) */
  .pdf-toolbar-top {
    flex-wrap: wrap;
    gap: var(--sp-2);
  }
  .pdf-toolbar-controls {
    display: none !important;
  }

  /* Download bar mobile */
  .download-bar-inner {
    padding: 0 var(--sp-4);
  }
  .download-bar-actions {
    flex-wrap: wrap;
    width: 100%;
  }
  .download-bar-actions .btn {
    flex: 1;
    min-width: 0;
  }
}

@media (max-width: 480px) {
  /* Score gauges single column on small phones */
  #tab-diagnosis .agent-scores {
    grid-template-columns: 1fr;
  }
  .scan-features {
    flex-direction: column;
    gap: 2px;
    align-items: center;
  }
}

/* ═══════════════════════════════════════════════════════════════
   PREMIUM UI OVERHAUL — Linear · Vercel · Stripe Tier
   Additive overrides — no existing layouts broken.
   ═══════════════════════════════════════════════════════════════ */

/* Button press feedback */
.btn:active {
  transform: scale(0.97);
}

/* Section divider */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
  margin: var(--sp-8) 0;
}

/* Scan feature callout row */
.scan-features {
  display: flex;
  justify-content: flex-start;
  gap: var(--sp-6);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─── 1. ANIMATED HERO BACKGROUND MESH ─────────────────────── */

/*
 * The hero has max-width: 720px so we CANNOT put the mesh gradient
 * as ::before on .hero — it would clip to that narrow box.
 * Instead, we use the LANDING VIEW section (#view-landing) as the
 * full-bleed canvas for the ambient glow.
 */
#view-landing {
  position: relative;
  overflow: hidden; /* clip the oversized mesh at viewport edges */
}

/* Full-width ambient glow — placed on the landing section, NOT the hero */
#view-landing::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background:
    radial-gradient(ellipse 60% 55% at 50% 40%, rgba(99, 91, 255, 0.1), transparent 70%),
    radial-gradient(ellipse 40% 35% at 30% 30%, rgba(139, 92, 246, 0.06), transparent 65%),
    radial-gradient(ellipse 35% 40% at 70% 35%, rgba(244, 114, 182, 0.04), transparent 60%);
  animation: hero-mesh-drift 30s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
  filter: blur(40px); /* soft feathered edges — no hard rectangle */
}

.hero {
  position: relative;
  z-index: 1; /* content sits above the glow */
}

@keyframes hero-mesh-drift {
  0% {
    transform: translateX(-50%) translate(0, 0) scale(1);
  }
  50% {
    transform: translateX(-50%) translate(15px, -20px) scale(1.05);
  }
  100% {
    transform: translateX(-50%) translate(-10px, 10px) scale(0.98);
  }
}

/* Floating particle dots — now on landing view too */
#view-landing::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 700px;
  background-image:
    radial-gradient(1px 1px at 10% 15%, rgba(255, 255, 255, 0.12), transparent),
    radial-gradient(1px 1px at 30% 50%, rgba(255, 255, 255, 0.08), transparent),
    radial-gradient(1px 1px at 50% 30%, rgba(255, 255, 255, 0.1), transparent),
    radial-gradient(1px 1px at 70% 20%, rgba(255, 255, 255, 0.06), transparent),
    radial-gradient(1px 1px at 90% 55%, rgba(255, 255, 255, 0.08), transparent);
  animation: hero-particles 30s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes hero-particles {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-15px);
  }
}

/* Hero title glow enhancement */
.hero-title .gradient-text {
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 40%, #f472b6 70%, #818cf8 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 6s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Hero badge glow pulse */
.hero-badge {
  position: relative;
  overflow: hidden;
}
.hero-badge::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 100%
  );
  animation: badge-shimmer 4s ease-in-out infinite;
}
@keyframes badge-shimmer {
  0%,
  100% {
    left: -100%;
  }
  50% {
    left: 100%;
  }
}

/* ─── 2. PREMIUM BUTTONS ──────────────────────────────────── */

/* Primary button shimmer overlay */
.btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
  border: none;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(99, 91, 255, 0.3);
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.12) 50%,
    transparent 100%
  );
  transition: left 0.5s var(--ease);
}
.btn-primary:hover::before {
  left: 100%;
}
.btn-primary:hover {
  box-shadow:
    0 4px 20px rgba(99, 91, 255, 0.35),
    0 0 0 1px rgba(99, 91, 255, 0.4);
  transform: translateY(-2px);
}

/* Hero CTA extra large glow */
.hero-actions .btn-lg {
  padding: 0.875rem 2.5rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
  letter-spacing: -0.01em;
}
.hero-actions .btn-lg:hover {
  box-shadow:
    0 0 30px rgba(99, 91, 255, 0.3),
    0 8px 32px rgba(99, 91, 255, 0.2),
    0 0 0 1px rgba(99, 91, 255, 0.3);
}

/* ─── 3. GLASSMORPHISM SCORE CARDS ─────────────────────────── */

.agent-score-card {
  background: rgba(24, 24, 27, 0.6);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease);
}

/* Animated gradient top border */
.agent-score-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(99, 91, 255, 0.5) 20%,
    rgba(139, 92, 246, 0.6) 50%,
    rgba(99, 91, 255, 0.5) 80%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: border-flow 4s linear infinite;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  transform: none;
}

@keyframes border-flow {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Inner radial glow on hover */
.agent-score-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 0%, rgba(99, 91, 255, 0.06), transparent 70%);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease);
  pointer-events: none;
}
.agent-score-card:hover::after {
  opacity: 1;
}
.agent-score-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(99, 91, 255, 0.08);
}

/* "After" score card — green glow */
.agent-score-card.agent-score-after {
  border-color: rgba(34, 197, 94, 0.15);
}
.agent-score-card.agent-score-after::before {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(34, 197, 94, 0.5) 20%,
    rgba(34, 197, 94, 0.7) 50%,
    rgba(34, 197, 94, 0.5) 80%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: border-flow 4s linear infinite;
}
.agent-score-card.agent-score-after::after {
  background: radial-gradient(circle at 50% 0%, rgba(34, 197, 94, 0.06), transparent 70%);
  opacity: 1;
}

/* Score value animated color pulse */
.agent-score-value {
  text-shadow: 0 0 40px currentColor;
  opacity: 0.95;
}

/* Score interpretation pill hover */
.score-interpretation {
  transition: all var(--duration-fast) var(--ease);
}
.score-interpretation:hover {
  transform: scale(1.05);
}

/* ─── 4. PREMIUM STEP CARDS (How It Works) ─────────────────── */

.step-card {
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: visible;
}

/* Subtle inner glow on hover */
.step-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at 50% 0%, rgba(99, 91, 255, 0.06), transparent 70%);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease);
  pointer-events: none;
}
.step-card:hover::after {
  opacity: 1;
}
.step-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* Step number glow */
.step-number {
  box-shadow: 0 0 16px rgba(99, 91, 255, 0.3);
  transition: all var(--duration-normal) var(--ease);
  z-index: 2;
}
.step-card:hover .step-number {
  box-shadow: 0 0 24px rgba(99, 91, 255, 0.5);
  transform: translateX(-50%) scale(1.15);
}

/* Emoji icon scale on hover */
.step-icon {
  transition: transform var(--duration-normal) var(--ease-spring);
}
.step-card:hover .step-icon {
  transform: scale(1.2);
}

/* ─── 5. PREMIUM PRICING CARDS ─────────────────────────────── */

.pricing-card {
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--ease);
}

/* Inner glow on hover */
.pricing-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at 50% -20%, rgba(99, 91, 255, 0.05), transparent 70%);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease);
  pointer-events: none;
}
.pricing-card:hover::after {
  opacity: 1;
}
.pricing-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-6px);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Featured card — animated gradient border */
.pricing-card.featured {
  border: 1px solid transparent;
  background-clip: padding-box;
  background:
    linear-gradient(180deg, rgba(99, 91, 255, 0.08) 0%, rgba(24, 24, 27, 0.9) 50%) padding-box,
    linear-gradient(180deg, rgba(99, 91, 255, 0.5), rgba(139, 92, 246, 0.2), rgba(99, 91, 255, 0.5))
      border-box;
  box-shadow:
    0 0 40px rgba(99, 91, 255, 0.08),
    0 0 80px rgba(99, 91, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.pricing-card.featured::after {
  background: radial-gradient(ellipse at 50% -20%, rgba(99, 91, 255, 0.08), transparent 60%);
  opacity: 1;
}
.pricing-card.featured:hover {
  box-shadow:
    0 0 60px rgba(99, 91, 255, 0.15),
    0 20px 60px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Featured badge shimmer */
.featured-badge {
  position: relative;
  overflow: hidden;
}
.featured-badge::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: badge-shimmer 3s ease-in-out infinite;
}

/* Price value enhancement */
.pricing-price {
  background: linear-gradient(180deg, var(--text-primary) 0%, rgba(255, 255, 255, 0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Pricing features check icon */
.pricing-features li {
  transition: all var(--duration-fast) var(--ease);
}
.pricing-features li:hover {
  color: var(--text-primary);
  transform: translateX(4px);
}

/* ─── 6. IMPROVED RESULTS TABS ─────────────────────────────── */

/* Glassmorphism overlay for desktop — does NOT override mobile grid display */
@media (min-width: 641px) {
  .results-tab-nav {
    background: rgba(24, 24, 27, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: 4px;
  }
}

.results-tab-btn {
  position: relative;
  z-index: 1;
  transition: all var(--duration-normal) var(--ease);
  border-radius: var(--radius-md);
}
.results-tab-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}
.results-tab-btn.active {
  background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
  color: white;
  box-shadow:
    0 2px 12px rgba(99, 91, 255, 0.3),
    0 0 0 1px rgba(99, 91, 255, 0.2);
}

/* ─── 7. TOPBAR ENHANCEMENT ────────────────────────────────── */

.topbar {
  background: rgba(9, 9, 11, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02);
}

/* Logo hover micro-animation */
.logo:hover .logo-icon {
  box-shadow: 0 0 16px rgba(99, 91, 255, 0.4);
  transform: scale(1.05);
  transition: all var(--duration-normal) var(--ease-spring);
}
.logo-icon {
  transition: all var(--duration-normal) var(--ease);
}

/* Nav link hover underline animation */
.nav-links a {
  position: relative;
}
.nav-links a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: all var(--duration-normal) var(--ease);
  transform: translateX(-50%);
}
.nav-links a:hover::before {
  width: 60%;
}

/* ─── 8. AGENT STEP CARDS PREMIUM ──────────────────────────── */

.agent-step-card {
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all var(--duration-normal) var(--ease);
}
.agent-step-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Step icon premium enhancement */
.agent-step-icon {
  transition: all var(--duration-normal) var(--ease);
}
.agent-step-icon.running {
  box-shadow: 0 0 0 4px rgba(99, 91, 255, 0.15);
}
.agent-step-icon.running::after {
  animation: pulse-ring 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}
@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(99, 91, 255, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(99, 91, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(99, 91, 255, 0);
  }
}

.agent-step-icon.complete {
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.3);
}

/* ─── 9. PROGRESS BAR PREMIUM ──────────────────────────────── */

.agent-progress {
  background: rgba(24, 24, 27, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

/* Completed connector line glow */
.progress-step.complete:not(:last-child)::after {
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
}

/* Running dot enhanced pulse */
.progress-step.running .progress-dot {
  box-shadow:
    0 0 0 4px rgba(99, 91, 255, 0.15),
    0 0 12px rgba(99, 91, 255, 0.2);
}

/* Completed dot checkmark glow */
.progress-step.complete .progress-dot {
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

/* ─── 10. CARD & SECTION BLOCK GLASSMORPHISM ───────────────── */

.card,
.section-block {
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all var(--duration-normal) var(--ease);
}
.card:hover,
.section-block:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

/* ─── 11. WHY SECTION CARD PREMIUM ─────────────────────────── */

.why-card {
  background: rgba(24, 24, 27, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}
.why-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(99, 91, 255, 0.06), transparent 70%);
  pointer-events: none;
}

/* ─── 12. DOWNLOAD BAR PREMIUM ─────────────────────────────── */

.agent-download-bar {
  background: rgba(9, 9, 11, 0.9);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid rgba(99, 91, 255, 0.2);
  box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.2);
}

/* Download bar lock row — value-wall CTA */
.download-bar-lock-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--sp-1);
}

.download-bar-lock-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  text-transform: uppercase;
}

/* ─── 13. PDF TOOLBAR PREMIUM ──────────────────────────────── */

.pdf-toolbar {
  background: rgba(20, 20, 24, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.pdf-toolbar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pdf-toolbar-title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.pdf-toolbar-heading {
  font-size: 0.875rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0;
}

.anti-fluff-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--green);
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.18);
  border-radius: var(--radius-full);
  white-space: nowrap;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.08);
}

.pdf-toolbar-controls {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.pdf-control-group {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.pdf-control-label {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.pdf-control-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.08);
}

.pdf-pill-group {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.pdf-pill {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 5px 12px;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
  position: relative;
  white-space: nowrap;
}

.pdf-pill:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.pdf-pill.active {
  background: var(--accent);
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(99, 91, 255, 0.25);
}

.pdf-pill + .pdf-pill {
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.pdf-pill.active + .pdf-pill,
.pdf-pill + .pdf-pill.active {
  border-left-color: transparent;
}

/* ── PDF Canvas Container — replaces iframe; prevents native browser toolbar ─── */
.pdf-canvas-container {
  overflow-y: auto;
  overflow-x: hidden;
  background: #f0f0f0;
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  scroll-behavior: smooth;
  /* Prevent iOS bounce / pull-to-refresh interfering with scroll */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.pdf-page-wrapper {
  width: 100%;
  max-width: 860px;
  background: #fff;
  box-shadow:
    0 2px 8px rgba(0,0,0,0.12),
    0 0 0 1px rgba(0,0,0,0.04);
  border-radius: 2px;
  overflow: hidden;
  line-height: 0; /* remove inline gap below canvas */
}

.pdf-page-canvas {
  width: 100% !important;
  height: auto !important;
  display: block;
  /* Prevent context-menu from offering a 'save image' shortcut */
  -webkit-user-select: none;
  user-select: none;
}

/* Mobile: tighter padding */
@media (max-width: 600px) {
  .pdf-canvas-container {
    padding: var(--sp-2);
    gap: var(--sp-2);
  }
}

/* Mobile: stack controls */
@media (max-width: 600px) {
  .pdf-toolbar-controls {
    gap: var(--sp-3);
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .pdf-control-divider {
    display: none;
  }
  .pdf-control-group {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .pdf-pill {
    padding: 5px 10px;
    font-size: 0.6875rem;
  }
}

/* ─── 13b. TIMELINE CARDS (RESULTS) ────────────────────────── */

.tl-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease);
  animation: fadeUp 0.35s var(--ease-out) both;
}

.tl-card + .tl-card {
  margin-top: var(--sp-3);
}

.tl-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* Left accent bar */
.tl-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  border-radius: 3px 0 0 3px;
  opacity: 0.7;
}

/* Icon badge */
.tl-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Content area */
.tl-card-content {
  flex: 1;
  min-width: 0;
}

.tl-card-title {
  font-size: 0.875rem;
  font-weight: 650;
  color: var(--text-primary);
  line-height: 1.3;
}

.tl-card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

.tl-card-body {
  margin-top: var(--sp-3);
}

/* Section tags / pills */
.tl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tl-tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  letter-spacing: 0.01em;
  text-transform: capitalize;
}

/* Issue list */
.tl-issue-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tl-issue-list li {
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 4px 0 4px 16px;
  position: relative;
  line-height: 1.4;
}

.tl-issue-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  opacity: 0.7;
}

/* Inline progress bar */
.tl-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 2px;
}

.tl-progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Variant: danger */
.tl-card--danger {
  background: rgba(239, 68, 68, 0.04);
  border-color: rgba(239, 68, 68, 0.12);
}
.tl-card--danger:hover {
  border-color: rgba(239, 68, 68, 0.2);
}

/* Variant: success */
.tl-card--success {
  background: rgba(34, 197, 94, 0.04);
  border-color: rgba(34, 197, 94, 0.1);
}

/* Variant: premium */
.tl-card--premium {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.04), rgba(99, 91, 255, 0.04));
  border-color: rgba(139, 92, 246, 0.12);
}
.tl-card--premium:hover {
  border-color: rgba(139, 92, 246, 0.2);
}

/* ─── 13c. SCORE GAUGE PREMIUM ─────────────────────────────── */

.score-gauge-card {
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--duration-normal) var(--ease);
  padding: var(--sp-5);
}

.score-gauge-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.gauge-label {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  margin-top: var(--sp-2);
}

.gauge-value {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ─── 14. ISSUE CARDS PREMIUM ──────────────────────────────── */

.issue-card {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all var(--duration-normal) var(--ease);
}
.issue-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.025);
  transform: translateX(4px);
}

/* ─── 15. TRUST BAR LOGOS ANIMATION ────────────────────────── */

.trust-logo {
  transition: all var(--duration-normal) var(--ease);
}
.trust-logo:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  transform: translateY(-2px);
}

/* ─── 16. SOCIAL LOGIN BUTTONS ─────────────────────────────── */

.btn-social {
  position: relative;
  overflow: hidden;
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.btn-social::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), transparent);
  pointer-events: none;
}
.btn-social:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* ─── 17. SCROLL-TRIGGERED REVEAL ANIMATIONS ──────────────── */

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.animate-reveal {
  animation: revealUp 0.6s var(--ease-out) both;
}

/* Staggered animation delays for grid items */
.step-card:nth-child(1) {
  animation-delay: 0.05s;
}
.step-card:nth-child(2) {
  animation-delay: 0.15s;
}
.step-card:nth-child(3) {
  animation-delay: 0.25s;
}

.pricing-card:nth-child(1) {
  animation-delay: 0.05s;
}
.pricing-card:nth-child(2) {
  animation-delay: 0.15s;
}
.pricing-card:nth-child(3) {
  animation-delay: 0.25s;
}

/* ─── 18. SCORE RING SVG GLOW ──────────────────────────────── */

.score-ring svg {
  filter: drop-shadow(0 0 6px currentColor);
}

.score-ring-value {
  text-shadow: 0 0 20px currentColor;
}

/* ─── 19. CREDITS BADGE PREMIUM ────────────────────────────── */

.credits-badge {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.12), rgba(99, 91, 255, 0.08));
  border: 1px solid rgba(168, 85, 247, 0.2);
  transition: all var(--duration-fast) var(--ease);
}
.credits-badge:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(99, 91, 255, 0.12));
  border-color: rgba(168, 85, 247, 0.3);
  transform: scale(1.05);
}

/* ─── 22. WARNING BANNER PREMIUM ───────────────────────────── */

.warning-banner {
  position: relative;
  overflow: hidden;
}
.warning-banner::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--amber);
  border-radius: 0 2px 2px 0;
}

/* ─── 23. EMPTY STATE ANIMATION ────────────────────────────── */

.empty-state-card {
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* ─── 24. FORM FIELD PREMIUM ───────────────────────────────── */

.form-group input,
.form-group textarea,
.form-group select {
  background: rgba(18, 18, 20, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all var(--duration-fast) var(--ease);
}
.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

/* ─── 25. GLOBAL SMOOTH SCROLL & SELECTION ─────────────────── */

::selection {
  background: rgba(99, 91, 255, 0.35);
  color: #fff;
}

/* Scrollbar premium styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ─── 26. TABS (GENERIC) PREMIUM ───────────────────────────── */

.tab-btn {
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease);
}
.tab-btn.active {
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  box-shadow: 0 2px 8px rgba(99, 91, 255, 0.25);
}

/* ─── 27. BADGE MICRO-INTERACTIONS ─────────────────────────── */

.badge {
  transition: all var(--duration-fast) var(--ease);
}
.badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ─── 28. UPLOAD ZONE PREMIUM ──────────────────────────────── */

.upload-zone {
  position: relative;
  overflow: hidden;
}
.upload-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at 50% 50%, rgba(99, 91, 255, 0.04), transparent 70%);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease);
  pointer-events: none;
}
.upload-zone:hover::before,
.upload-zone.drag-over::before {
  opacity: 1;
}

/* ─── 29. COVER LETTER TAB PREMIUM ─────────────────────────── */

.cover-letter-content {
  position: relative;
}
.cover-letter-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 91, 255, 0.3), transparent);
}

/* ─── 30. REDUCED MOTION RESPECT ───────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  #view-landing::before,
  #view-landing::after,
  .hero::before,
  .hero::after {
    animation: none !important;
  }
  .hero-title .gradient-text {
    animation: none !important;
    background-size: 100% 100% !important;
  }
}

/* ─── 31. UI/UX AUDIT FIXES ────────────────────────────────── */

/* Fix 1: Hide logo text on small mobile screens */
/* Fix 1: Logo text visible on all screens (removed mobile hide) */

/* Fix 3: Discount badge utility for pricing savings pills */
.discount-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--green-subtle);
  color: var(--green);
  font-size: 0.6875rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  margin-left: 4px;
  vertical-align: middle;
}

/* Fix 5: Hide progress bar on unlimited scans card */
.card-usage .progress-bar-bg {
  display: none;
}

/* Fix 6: Disabled scan submit button styling */
#scan-submit-btn:disabled,
#scan-submit-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.3);
}

/* Fix 4: Dashboard header flex-wrap for mobile */
@media (max-width: 600px) {
  #view-dashboard .flex.justify-between {
    flex-wrap: wrap;
    gap: var(--sp-4);
  }
  #view-dashboard .flex.justify-between .btn {
    width: 100%;
    text-align: center;
  }
}

/* Fix 14: Tier badge inside credit balance card */
.dash-tier-badge {
  display: inline-block;
  padding: 2px 10px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  vertical-align: middle;
  margin-right: 6px;
}
.dash-tier-badge.tier-pro {
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid rgba(99, 91, 255, 0.2);
}
.dash-tier-badge.tier-free {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

/* ── Credits Explainer (Pricing Page) ───────────────────────── */
.credits-explainer-title {
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}
.credits-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
}
@media (max-width: 600px) {
  .credits-feature-grid {
    grid-template-columns: 1fr;
  }
}
.credits-feature-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  position: relative;
  transition: all var(--duration-normal) var(--ease);
}
.credits-feature-card:hover {
  border-color: var(--border-default);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
}
.credits-feature-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.credits-feature-name {
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.credits-feature-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.45;
}
.credits-feature-tag {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}
.tag-free {
  background: var(--green-subtle);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.15);
}
.tag-credit {
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid rgba(99, 91, 255, 0.15);
}
.tag-bonus {
  background: var(--purple-subtle);
  color: var(--purple);
  border: 1px solid rgba(167, 139, 250, 0.15);
}

/* ── Dashboard Section Headers ─────────────────────────────── */
.dash-section-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(99, 91, 255, 0.2),
    rgba(139, 92, 246, 0.12),
    transparent
  );
  margin: 2.5rem 0 0;
}
.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0 1rem;
}
.dash-section-header-left {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.dash-section-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-subtle);
  border: 1px solid rgba(99, 91, 255, 0.15);
  border-radius: var(--radius-md);
  color: var(--accent);
  flex-shrink: 0;
}
.dash-section-title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}
.dash-section-sub {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 2px 0 0;
  line-height: 1.4;
}

/* ═══ COOKIE CONSENT MANAGEMENT PLATFORM (CMP) ═══ */
/* GDPR Art.7 | ePrivacy Dir. Art.5(3) | UK PECR | CCPA/CPRA */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  padding: 0 var(--sp-4) env(safe-area-inset-bottom, 0px);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.cookie-banner-inner {
  max-width: 720px;
  margin: 0 auto var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
  background: rgba(18, 18, 22, 0.96);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: 0 -4px 40px rgba(0, 0, 0, 0.4);
  max-height: 85vh;
  overflow-y: auto;
}
.cookie-banner-text {
  margin-bottom: var(--sp-4);
}
.cookie-banner-text strong {
  display: block;
  font-size: 1rem;
  margin-bottom: var(--sp-2);
  color: var(--text-primary);
}
.cookie-banner-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}
.cookie-banner-actions {
  display: flex;
  gap: var(--sp-3);
}
/* GDPR Compliance: ALL buttons must have EQUAL visual prominence. */
/* No dark patterns — identical size, color, and font weight. */
.cookie-banner-actions .btn {
  flex: 1;
  font-size: 0.8rem;
  padding: 0.55rem 1rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  transition: all 0.2s ease;
}
.cookie-banner-actions .btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

/* ── Preference Center (Layer 2) ── */
.cookie-preferences {
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.cookie-pref-header {
  margin-bottom: var(--sp-4);
}
.cookie-pref-header strong {
  font-size: 0.9rem;
  color: var(--text-primary);
}
.cookie-category {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.cookie-category:last-of-type {
  border-bottom: none;
}
.cookie-category-info {
  flex: 1;
}
.cookie-category-info strong {
  font-size: 0.85rem;
  color: var(--text-primary);
  display: inline;
}
.cookie-badge {
  display: inline-block;
  font-size: 0.6rem;
  padding: 2px 8px;
  border-radius: 99px;
  margin-left: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  vertical-align: middle;
}
.cookie-badge-required {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
}

/* Toggle Switch */
.cookie-toggle-wrap {
  flex-shrink: 0;
  padding-top: 2px;
}
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}
.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.cookie-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  transition: background 0.25s ease;
}
.cookie-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s ease;
}
.cookie-toggle input:checked + .cookie-slider {
  background: var(--accent);
}
.cookie-toggle input:checked + .cookie-slider::before {
  transform: translateX(20px);
}
.cookie-toggle-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Cookie Details / Tables */
.cookie-details {
  margin-top: var(--sp-2);
}
.cookie-details summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.75rem;
}
.cookie-table {
  width: 100%;
  margin-top: var(--sp-2);
  font-size: 0.7rem;
  border-collapse: collapse;
}
.cookie-table th,
.cookie-table td {
  padding: 4px 8px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.cookie-table th {
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.65rem;
}
.cookie-table td {
  color: var(--text-secondary);
}

/* Save Preferences */
.cookie-pref-footer {
  margin-top: var(--sp-4);
}

/* Mobile */
@media (max-width: 640px) {
  .cookie-banner-inner {
    padding: var(--sp-4);
  }
  .cookie-banner-actions {
    flex-direction: column;
    gap: var(--sp-2);
  }
  .cookie-category {
    flex-direction: column;
    gap: var(--sp-3);
  }
  .cookie-toggle-wrap {
    align-self: flex-end;
  }
}

/* ── PASSWORD STRENGTH INDICATOR ──────────────────────────────── */
.pw-strength {
  margin-top: var(--sp-2);
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition:
    opacity 0.3s ease,
    max-height 0.4s ease;
}
.pw-strength.visible {
  opacity: 1;
  max-height: 200px;
}

/* Strength meter bar */
.pw-meter {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: var(--sp-2);
}
.pw-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 100px;
  transition:
    width 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.4s ease;
}
.pw-meter-fill[data-strength='0'] {
  width: 0%;
  background: var(--red);
}
.pw-meter-fill[data-strength='1'] {
  width: 25%;
  background: var(--red);
}
.pw-meter-fill[data-strength='2'] {
  width: 50%;
  background: var(--amber);
}
.pw-meter-fill[data-strength='3'] {
  width: 75%;
  background: #e8b931;
}
.pw-meter-fill[data-strength='4'] {
  width: 100%;
  background: var(--green);
}

/* Rules checklist */
.pw-rules {
  list-style: none !important;
  list-style-type: none !important;
  padding: 0 !important;
  padding-inline-start: 0 !important;
  margin: 0 !important;
  margin-inline-start: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.pw-rules li {
  list-style: none !important;
  list-style-type: none !important;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.3s ease;
  line-height: 1.3;
  padding-inline-start: 0 !important;
}
/* iOS Safari still paints ::marker on flex <li> even with list-style:none */
.pw-rules li::marker {
  content: '' !important;
  display: none !important;
  font-size: 0 !important;
}
.pw-rules li::before {
  content: none !important;
}
.pw-rules li.pass {
  color: var(--green);
}
.pw-rule-icon {
  font-size: 0.7rem;
  width: 1rem;
  text-align: center;
  flex-shrink: 0;
  transition:
    color 0.3s ease,
    transform 0.2s ease;
}
.pw-rules li.pass .pw-rule-icon {
  color: var(--green);
  transform: scale(1.1);
}

/* ═══════════════════════════════════════════════════════════════
   NEW COMPONENTS — Upgrade Additions
   ═══════════════════════════════════════════════════════════════ */

/* ── Profile: Email + Verified Badge Row ──────────────────── */
.profile-email-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

/* ── Verified Badge ───────────────────────────────────────── */
.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 999px;
  color: #4ade80;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Provider Badges (Google Connected, etc.) ─────────────── */
.provider-badges {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-top: var(--sp-2);
}

.provider-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}
.provider-badge svg {
  opacity: 0.7;
}

/* ── Email Verification Banner ────────────────────────────── */
.verify-banner {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(168, 85, 247, 0.15));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-lg);
  margin-bottom: var(--sp-4);
  animation: fadeUp 0.4s ease;
}
.verify-banner-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md);
  color: #a78bfa;
}
.verify-banner-body {
  flex: 1;
  min-width: 0;
}
.verify-banner-body strong {
  display: block;
  font-size: 0.88rem;
  color: var(--text-primary);
}
.verify-banner-btn {
  flex-shrink: 0;
  background: rgba(99, 102, 241, 0.3);
  border: 1px solid rgba(99, 102, 241, 0.5);
  color: #c4b5fd;
  white-space: nowrap;
}
.verify-banner-btn:hover {
  background: rgba(99, 102, 241, 0.5);
  color: white;
}

/* ── ATS Platform Badge (Download Bar) ───────────────────── */
.ats-platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #22d3ee;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ats-platform-badge::before {
  content: '✓';
  font-size: 0.65rem;
}

/* ── Credits Badge cursor ─────────────────────────────── */
.nav-user-info .credits-badge {
  cursor: pointer;
}

/* ── Topbar responsive (flex-based) ────────────────────── */
@media (max-width: 900px) {
  .topbar {
    padding: 0 var(--sp-5);
  }
  .nav-links a {
    padding: var(--sp-2) var(--sp-2);
    font-size: 0.82rem;
  }
}

@media (max-width: 640px) {
  .topbar {
    height: 56px;
    padding: 0 var(--sp-3);
  }
  .nav-links {
    display: none !important;
  }
  .mobile-menu-btn {
    display: flex;
  }
}

/* ═══════════════════════════════════════════════════════════════
   SCAN PAGE V2 — Two-column redesign + company detection
   ═══════════════════════════════════════════════════════════════ */

/* ── Scan page container ───────────────────────────────────── */
.scan-page-container {
  max-width: 860px;
  margin: 0 auto;
  padding: var(--sp-8) var(--sp-6) var(--sp-16);
}

.scan-page-header {
  margin-bottom: var(--sp-5);
}

/* ── Trust row (replaced scan-features) ───────────────────── */
.scan-trust-row {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  margin-bottom: var(--sp-6);
  flex-wrap: wrap;
}
.scan-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}
.scan-trust-item svg {
  color: var(--green);
  flex-shrink: 0;
}

/* ── Scan form card ────────────────────────────────────────── */
.scan-form-card {
  background: rgba(24, 24, 27, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-xl);
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 4px 32px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* ── Two-column grid ───────────────────────────────────────── */
.scan-form-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
}

.scan-col {
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.scan-col-heading {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--sp-1);
}
.scan-col-heading svg {
  color: var(--accent);
  opacity: 0.8;
  flex-shrink: 0;
}

/* Vertical divider between columns */
.scan-col-divider {
  width: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: var(--sp-4) 0;
  align-self: stretch;
}

/* Progressive disclosure — job details revealed after resume upload */
.scan-col-job-details {
  position: relative;
  opacity: 1;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.job-details-hint {
  display: flex;
  align-items: center;
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-2);
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}

.scan-col-job-details:not(.is-active) .form-group {
  opacity: 0.24;
  pointer-events: none;
  filter: saturate(0.4);
}

.scan-col-job-details.is-active .job-details-hint {
  display: none;
}

.scan-col-job-details.is-active .form-group {
  opacity: 1;
  pointer-events: auto;
  filter: none;
}

/* Upload completion indicator */
.upload-complete-indicator {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  background: var(--green-subtle);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-md);
  color: var(--green);
  font-size: var(--text-body-sm);
  font-weight: 500;
  margin-top: var(--sp-3);
  animation: slideInUp 0.3s var(--ease-out);
}

/* Shrink upload zone padding in the grid */
.scan-form-card .upload-zone {
  padding: var(--sp-8) var(--sp-4);
  flex: 1;
}

/* ── URL input with icon ───────────────────────────────────── */
.job-url-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.job-url-icon {
  position: absolute;
  top: 50%;
  left: calc(var(--sp-3) + 1px);
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
  display: flex;
  align-items: center;
  transition: color var(--duration-fast) var(--ease);
  z-index: 1;
}

.job-url-input {
  width: 100%;
  padding: var(--sp-3) var(--sp-4) var(--sp-3) calc(var(--sp-4) + 14px + var(--sp-4) + 2px);
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  transition:
    border-color var(--duration-fast) var(--ease),
    box-shadow var(--duration-fast) var(--ease);
}
.job-url-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}
.job-url-input:focus + .job-url-icon,
.job-url-wrapper:focus-within .job-url-icon {
  color: var(--accent);
}
.job-url-input::placeholder {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.job-url-input:disabled,
.job-url-input.is-locked,
.jd-textarea:disabled,
.jd-textarea.is-locked {
  cursor: not-allowed;
  opacity: 0.72;
  background: rgba(255, 255, 255, 0.035);
  border-style: dashed;
}

.job-url-input:disabled::placeholder,
.jd-textarea:disabled::placeholder {
  color: var(--text-faint);
}

/* ── Company preview badge ─────────────────────────────────── */
.company-preview {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: rgba(34, 197, 94, 0.07);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-md);
  animation: fade-slide-in 0.2s var(--ease-out);
}
@keyframes fade-slide-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.company-favicon {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  flex-shrink: 0;
  object-fit: contain;
}
.company-name-preview {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}
.company-preview-tick {
  font-size: 0.72rem;
  color: var(--green);
  font-weight: 600;
  margin-left: auto;
}

.job-link-status {
  margin-top: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
  animation: fade-slide-in 0.2s var(--ease-out);
}

.job-link-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.job-link-status-title {
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--text-primary);
}

.job-link-status-note {
  margin-top: var(--sp-2);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.job-link-status-pills,
.scan-loading-context {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.job-link-pill,
.scan-loading-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.job-link-pill.is-success,
.scan-loading-pill.is-success {
  color: var(--green);
  border-color: rgba(34, 197, 94, 0.24);
  background: rgba(34, 197, 94, 0.08);
}

.job-link-pill.is-warning,
.scan-loading-pill.is-warning {
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.24);
  background: rgba(245, 158, 11, 0.08);
}

.job-link-pill.is-info,
.scan-loading-pill.is-info {
  color: var(--accent);
  border-color: rgba(56, 189, 248, 0.24);
  background: rgba(56, 189, 248, 0.08);
}

.scan-loading-context {
  max-width: 520px;
  margin-top: var(--sp-5);
}

/* ── Scan form footer ──────────────────────────────────────── */
.scan-form-footer {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.015);
}
.scan-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}

/* ── Tab icon alignment ────────────────────────────────────── */
.results-tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.tab-icon {
  flex-shrink: 0;
  opacity: 0.7;
}
.results-tab-btn.active .tab-icon {
  opacity: 1;
}

/* ── Scan form — mobile stacking ───────────────────────────── */
@media (max-width: 700px) {
  .scan-page-container {
    padding: var(--sp-6) var(--sp-4) var(--sp-12);
  }

  .scan-form-grid {
    grid-template-columns: 1fr;
  }

  .scan-col-divider {
    width: auto;
    height: 1px;
    margin: 0 var(--sp-6);
  }

  .scan-form-footer {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-3);
  }

  .scan-submit-btn {
    width: 100%;
    justify-content: center;
  }

  .scan-form-footer > .body-xs {
    text-align: center;
  }

  .scan-trust-row {
    gap: var(--sp-3);
  }
}

/* ═══════════════════════════════════════════════════════════════
   EMERGENCY DEPLOYMENT FIXES — Phase 1-3 Audit Implementation
   Added: Security, Performance, Accessibility
   ═══════════════════════════════════════════════════════════════ */

/* ── Skip Navigation Link (Accessibility) ───────────────────── */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: white;
  padding: 8px 16px;
  z-index: 10000;
  transition: top 0.3s;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 4px 0;
}
.skip-link:focus {
  top: 0;
}

/* ── Visually Hidden (Accessibility) ────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Mobile Backdrop-Filter Optimization (Performance) ─────── */
@media (max-width: 768px) {
  .topbar,
  .card-elevated,
  .agent-score-card,
  .glass-panel,
  .bottom-sheet,
  [class*='backdrop'],
  [class*='blur'] {
    backdrop-filter: blur(8px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(8px) saturate(140%) !important;
  }
}

/* Reduce motion / transparency preference */
@media (prefers-reduced-transparency: reduce), (prefers-reduced-motion: reduce) {
  .topbar,
  .card-elevated,
  .agent-score-card,
  .glass-panel,
  .bottom-sheet,
  [class*='backdrop'],
  [class*='blur'] {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: var(--bg-card) !important;
  }
}

/* ── Touch Target Standards (Material Design) ───────────────── */
/* Minimum 48dp (48px) touch targets for all interactive elements */
@media (pointer: coarse) {
  .btn,
  .nav-links a,
  .results-tab-btn,
  .bottom-sheet-item,
  .scan-history-card,
  .agent-step-header {
    min-height: 48px;
    min-width: 48px;
  }

  /* Ensure adequate spacing between touch targets */
  .nav-links {
    gap: var(--sp-2);
  }

  .results-tab-nav {
    gap: 4px;
  }
}

/* ── Results Workspace Refinement (Apr 20) ─────────────────── */
.results-tab-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  margin-bottom: var(--sp-5);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012)),
    rgba(11, 12, 18, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: calc(var(--radius-lg) + 4px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 36px rgba(0, 0, 0, 0.2);
}

.results-tab-btn {
  min-height: 72px;
  padding: 14px 16px;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 10px;
  border-radius: calc(var(--radius-md) + 2px);
  background: rgba(255, 255, 255, 0.018);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.results-tab-copy {
  gap: 4px;
}

.results-tab-copy > span:first-child {
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.results-tab-meta {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.62);
}

.results-tab-btn .tab-icon {
  margin-top: 2px;
  opacity: 0.78;
}

.results-tab-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.results-tab-btn.active {
  background:
    linear-gradient(135deg, rgba(99, 91, 255, 0.95), rgba(140, 92, 255, 0.92)),
    rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 12px 26px rgba(88, 70, 229, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.results-tab-btn.active .results-tab-meta {
  color: rgba(255, 255, 255, 0.86);
}

@media (max-width: 980px) {
  .results-tab-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .results-tab-nav {
    grid-template-columns: 1fr;
    position: static;
  }

  .results-tab-btn {
    min-height: 64px;
  }
}
