/* ============================================================
   RankVision v2 — Elite Design System
   Primary: #019cd4 | Base: 14px | Style: Glassmorphic Dark
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Brand */
  --primary: #019cd4;
  --primary-mid: #4ab8e0;
  --primary-light: #80d0ea;
  --primary-glass: rgba(1, 156, 212, 0.10);
  --primary-glow: rgba(1, 156, 212, 0.22);
  --primary-border: rgba(1, 156, 212, 0.28);

  /* Status */
  --safe: #22c55e;
  --safe-glass: rgba(34, 197, 94, 0.10);
  --moderate: #f59e0b;
  --mod-glass: rgba(245, 158, 11, 0.10);
  --dream: #ef4444;
  --dream-glass: rgba(239, 68, 68, 0.10);
  --safe-high: #4ade80;

  /* Backgrounds (true dark) */
  --bg-0: #000000;
  --bg-1: #080b0e;
  --bg-2: #0d1117;
  --bg-3: #161b22;
  --bg-4: #21262d;
  --bg-5: #30363d;

  /* Borders */
  --border: rgba(255, 255, 255, 0.06);
  --border-2: rgba(255, 255, 255, 0.10);
  --border-3: rgba(255, 255, 255, 0.16);

  /* Text */
  --text: #f0f6fc;
  --text-muted: rgba(240, 246, 252, 0.50);
  --text-dim: rgba(240, 246, 252, 0.28);

  /* Glass surfaces */
  --glass: rgba(255, 255, 255, 0.03);
  --glass-medium: rgba(255, 255, 255, 0.055);
  --glass-border: rgba(255, 255, 255, 0.07);
  --glass-border-2: rgba(255, 255, 255, 0.12);

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 12px 50px rgba(0, 0, 0, 0.7);

  /* Radii */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-2xl: 28px;
  --r-full: 999px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Light theme */
[data-theme="light"] {
  --bg-0: #f6f8fa;
  --bg-1: #f0f3f6;
  --bg-2: #e8ecf0;
  --bg-3: #dde3ea;
  --bg-4: #ccd3dc;
  --bg-5: #bac3ce;
  --border: rgba(0, 0, 0, 0.07);
  --border-2: rgba(0, 0, 0, 0.12);
  --border-3: rgba(0, 0, 0, 0.18);
  --text: #0d1117;
  --text-muted: rgba(13, 17, 23, 0.55);
  --text-dim: rgba(13, 17, 23, 0.32);
  --glass: rgba(255, 255, 255, 0.65);
  --glass-medium: rgba(255, 255, 255, 0.80);
  --glass-border: rgba(0, 0, 0, 0.07);
  --glass-border-2: rgba(0, 0, 0, 0.12);
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.07);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.09);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
}

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

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-0);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

svg {
  display: block;
}

/* ── Lucide Icon Defaults ─────────────────────────────────── */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon svg {
  stroke-width: 1.8;
}

.icon-sm svg {
  width: 14px;
  height: 14px;
}

.icon-md svg {
  width: 16px;
  height: 16px;
}

.icon-lg svg {
  width: 20px;
  height: 20px;
}

.icon-xl svg {
  width: 24px;
  height: 24px;
}

/* Glass icon containers */
.icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border: 1px solid var(--glass-border-2);
  backdrop-filter: blur(8px);
}

.icon-box-primary {
  background: var(--primary-glass);
  border-color: var(--primary-border);
  color: var(--primary);
}

.icon-box-safe {
  background: var(--safe-glass);
  border-color: rgba(34, 197, 94, 0.25);
  color: var(--safe);
}

.icon-box-mod {
  background: var(--mod-glass);
  border-color: rgba(245, 158, 11, 0.25);
  color: var(--moderate);
}

.icon-box-dream {
  background: var(--dream-glass);
  border-color: rgba(239, 68, 68, 0.25);
  color: var(--dream);
}

.icon-box-neutral {
  background: var(--glass-medium);
  color: var(--text-muted);
}

/* ── Container ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

/* ── Typography ────────────────────────────────────────────── */
h1 {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 900;
  letter-spacing: 0px;
  line-height: 1.08;
}

h2 {
  font-size: clamp(1.3rem, 3.5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 0px;
  line-height: 1.2;
}

h3 {
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0px;
}

h4 {
  font-size: 0.875rem;
  font-weight: 700;
}

p {
  color: var(--text-muted);
  line-height: 1.75;
  font-size: 0.875rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 50%, #80d0ea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Glass Cards ───────────────────────────────────────────── */
.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.card:hover {
  border-color: var(--glass-border-2);
}

.card-sm {
  padding: 0.875rem 1rem;
  border-radius: var(--r-md);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.5rem 1.1rem;
  border: none;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: 0.8rem;
  transition: all 0.18s var(--ease);
  white-space: nowrap;
  cursor: pointer;
  line-height: 1.4;
}

.btn svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: #0289bc;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-2);
  color: var(--text);
}

.btn-outline:hover {
  background: var(--bg-3);
  border-color: var(--border-3);
}

.btn-glass {
  background: var(--glass-medium);
  border: 1px solid var(--glass-border-2);
  color: var(--text);
  backdrop-filter: blur(8px);
}

.btn-glass:hover {
  background: var(--bg-3);
}

.btn-sm {
  padding: 0.35rem 0.8rem;
  font-size: 0.75rem;
}

.btn-lg {
  padding: 0.7rem 1.75rem;
  font-size: 0.9rem;
}

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

.btn-gradient {
  background: linear-gradient(135deg, var(--primary), var(--primary-mid));
  color: #fff;
}

.btn-gradient:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--primary-glow);
}

kbd {
  font-size: 0.65rem;
  background: var(--bg-4);
  border: 1px solid var(--border-2);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: monospace;
  color: var(--text-muted);
}

/* ── Platform Bar ──────────────────────────────────────────── */
.platform-bar {
  background: var(--bg-0);
  border-bottom: 1px solid var(--border);
  padding: 0.3rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.platform-bar::-webkit-scrollbar {
  display: none;
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.22rem 0.75rem;
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: all 0.15s;
  cursor: pointer;
}

.platform-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.platform-pill.coming {
  opacity: 0.4;
  cursor: not-allowed;
}

.platform-pill:not(.coming):not(.active):hover {
  color: var(--text);
  background: var(--bg-3);
}

/* ── Navigation ────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 11, 14, 0.80);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

[data-theme="light"] .nav {
  background: rgba(246, 248, 250, 0.85);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  height: 60px;
  gap: 0.75rem;
}


.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.nav-logo-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), #0078a8);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px var(--primary-glow);
  flex-shrink: 0;
}

.nav-logo-icon svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
  stroke-width: 2.2;
}

/* Desktop nav links — see also nav-header.css for full styles */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  min-width: 0;
  justify-content: center;
}

/* Nav actions — buttons on the right side */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  margin-left: auto;
}


.mm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.mm-col-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  padding: 0.4rem 0.6rem 0.3rem;
}

.mm-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem 0.6rem;
  border-radius: var(--r-sm);
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: background 0.12s, color 0.12s;
}

.mm-item:hover {
  background: var(--bg-3);
  color: var(--text);
}

.mm-item-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mm-item-icon svg {
  width: 14px;
  height: 14px;
}

.mm-item-text strong {
  display: block;
  font-weight: 600;
  color: var(--text);
  font-size: 0.78rem;
}

.mm-item-text span {
  font-size: 0.68rem;
  color: var(--text-dim);
}

.mm-divider {
  grid-column: 1/-1;
  height: 1px;
  background: var(--border);
  margin: 0.25rem 0;
}

.mm-coming {
  opacity: 0.45;
  pointer-events: none;
}

/* Nav actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.theme-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
}

.theme-btn:hover {
  background: var(--bg-4);
  color: var(--text);
}

.theme-btn svg {
  width: 14px;
  height: 14px;
}

.nav-predict-btn {
  background: var(--primary);
  color: #fff;
  padding: 0.38rem 0.9rem;
  border-radius: var(--r-full);
  font-size: 0.78rem;
  font-weight: 700;
  transition: all 0.18s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}


.nav-predict-btn:hover {
  background: #0289bc;
  box-shadow: 0 3px 12px var(--primary-glow);
}

.hamburger {
  display: none;
  width: 30px;
  height: 30px;
  border-radius: var(--r-xs);
  background: var(--bg-3);
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.hamburger svg {
  width: 16px;
  height: 16px;
}

/* ── Mobile Nav ───────────────────────────────────────────── */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg-1);
  transform: translateX(-100%);
  transition: transform 0.28s var(--ease);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.25rem 2rem;
  gap: 0.25rem;
  overflow-y: auto;
}

.mobile-nav.open {
  transform: translateX(0);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.mobile-nav-links a {
  font-size: 1rem;
  font-weight: 600;
  padding: 0.7rem 0.875rem;
  border-radius: var(--r-md);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.12s;
}

.mobile-nav-links a:hover {
  background: var(--bg-3);
}

.mobile-nav-links a svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.8;
  color: var(--primary);
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 4.5rem 0 3.5rem;
  text-align: center;
  overflow: hidden;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: orbPulse 9s ease-in-out infinite;
}

.hero-orb-1 {
  width: min(520px, 75vw);
  height: min(520px, 75vw);
  background: radial-gradient(circle, rgba(1, 156, 212, 0.11), transparent);
  top: -18%;
  left: -12%;
}

.hero-orb-2 {
  width: min(400px, 60vw);
  height: min(400px, 60vw);
  background: radial-gradient(circle, rgba(74, 184, 224, 0.08), transparent);
  bottom: -12%;
  right: -12%;
  animation-delay: 4.5s;
}

@keyframes orbPulse {

  0%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-glass);
  border: 1px solid var(--primary-border);
  border-radius: var(--r-full);
  padding: 0.32rem 0.9rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.hero-badge svg {
  width: 12px;
  height: 12px;
}

.hero h1 {
  margin-bottom: 1rem;
}

.hero p {
  font-size: clamp(0.875rem, 2vw, 1rem);
  max-width: 560px;
  margin: 0 auto 1.75rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  flex-wrap: wrap;
  padding: 1rem 1.5rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xl);
  display: inline-flex;
  backdrop-filter: blur(12px);
}

.hero-stat {
  text-align: center;
}

.hero-stat-num {
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 900;
  color: var(--text);
  letter-spacing: 1px;
}

.hero-stat-num span {
  color: var(--primary);
}

.hero-stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── Sections ──────────────────────────────────────────────── */
.section {
  padding: clamp(2.5rem, 7vw, 5rem) 0;
}

.section-sm {
  padding: clamp(1.5rem, 4vw, 3rem) 0;
}

.section-header {
  text-align: center;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
}

.section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.section-label svg {
  width: 12px;
  height: 12px;
}

/* ── Features Grid ─────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 1rem;
}

.feature-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  backdrop-filter: blur(12px);
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--primary-border);
  transform: translateY(-2px);
}

.feature-card .icon-box {
  margin-bottom: 0.875rem;
}

.feature-card h3 {
  margin-bottom: 0.4rem;
  font-size: 1rem;
}

.feature-card p {
  font-size: 0.9rem;
}

/* ── Steps Grid ────────────────────────────────────────────── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
  gap: 1.25rem;
  text-align: center;
}

.step {
  padding: 1.25rem;
}

.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #0289bc);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1rem;
  color: #fff;
  margin: 0 auto 0.875rem;
  box-shadow: 0 0 16px var(--primary-glow);
}

.step-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--r-lg);
  background: var(--primary-glass);
  border: 1px solid var(--primary-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  color: var(--primary);
  transition: transform 0.2s, box-shadow 0.2s;
}

.step:hover .step-icon-wrap {
  transform: scale(1.08);
  box-shadow: 0 4px 16px var(--primary-glow);
}

.step h3 {
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
}

.step p {
  font-size: 0.78rem;
}

/* ── Scroll Reveal ────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Tools Section ─────────────────────────────────────────── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 1.25rem;
}

.tool-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  backdrop-filter: blur(12px);
}

.tool-card h3 {
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 7px;
}

.tool-card h3 svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

/* ── FAQ ───────────────────────────────────────────────────── */
.faq-item {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  margin-bottom: 0.5rem;
  overflow: hidden;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s;
}

.faq-item[open] {
  border-color: var(--primary-border);
}

.faq-item summary {
  font-weight: 600;
  font-size: 0.85rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 1.1rem;
  cursor: pointer;
  gap: 0.75rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  transition: transform 0.25s;
  color: var(--text-muted);
}

.faq-item[open] summary svg {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-item p {
  padding: 0 1.1rem 0.875rem;
  font-size: 0.82rem;
}

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  padding: 1.75rem 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  transition: color 0.15s;
}

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

/* ── Modals ────────────────────────────────────────────────── */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.open {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  display: none;
}

.modal-content {
  position: relative;
  z-index: 1;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-xl);
  padding: 1.5rem;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  backdrop-filter: blur(20px);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.modal-header h3 {
  font-size: 1rem;
}

.modal-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-4);
  border: 1px solid var(--border-2);
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}

.modal-close:hover {
  background: var(--dream);
  color: #fff;
  border-color: var(--dream);
}

.modal-body {
  font-size: 0.85rem;
}

/* ── Forms ─────────────────────────────────────────────────── */
.form-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 5px;
}

.form-input,
.form-select {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  padding: 0.6rem 0.875rem;
  transition: border-color 0.18s, box-shadow 0.18s;
  outline: none;
  appearance: none;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glass);
}

.form-input::placeholder {
  color: var(--text-dim);
}

.form-group {
  margin-bottom: 0;
}

/* ── Toasts ────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  pointer-events: none;
}

.toast {
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 7px;
  box-shadow: var(--shadow-md);
  animation: slideUp 0.28s var(--ease);
  max-width: 300px;
  pointer-events: auto;
}

.toast svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.toast.success {
  border-left: 3px solid var(--safe);
}

.toast.error {
  border-left: 3px solid var(--dream);
}

.toast.info {
  border-left: 3px solid var(--primary);
}

@keyframes slideUp {
  from {
    transform: translateY(10px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ── Scroll to Top ─────────────────────────────────────────── */
#scroll-top {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  color: var(--primary);
  font-size: 1rem;
  opacity: 0;
  transition: opacity 0.3s, transform 0.2s;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
}

#scroll-top svg {
  width: 16px;
  height: 16px;
}

#scroll-top.visible {
  opacity: 1;
}

#scroll-top:hover {
  transform: translateY(-3px);
  background: var(--bg-4);
}

/* ── Bookmarks Panel ───────────────────────────────────────── */
.bookmarks-panel {
  position: fixed;
  top: 0;
  right: -360px;
  width: min(360px, 95vw);
  height: 100vh;
  background: var(--bg-2);
  border-left: 1px solid var(--border-2);
  z-index: 150;
  transition: right 0.28s var(--ease);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(16px);
}

.bookmarks-panel.open {
  right: 0;
}

.bookmarks-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.bookmarks-panel-header h3 {
  font-size: 0.9rem;
}

#bookmark-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.875rem;
}

/* ── Compare Bar ───────────────────────────────────────────── */
.compare-bar {
  position: fixed;
  bottom: -70px;
  left: 0;
  right: 0;
  z-index: 90;
  background: var(--bg-2);
  border-top: 1px solid var(--border-2);
  padding: 0.6rem 0;
  transition: bottom 0.28s var(--ease);
  backdrop-filter: blur(14px);
}

.compare-bar.visible {
  bottom: 0;
}

/* ── AI Generated Content ──────────────────────────────────── */
.ai-generated-content h3,
.ai-generated-content h4 {
  margin: 0.875rem 0 0.4rem;
  color: var(--text);
}

.ai-generated-content ul {
  padding-left: 1.1rem;
  margin: 0.4rem 0;
}

.ai-generated-content li {
  margin-bottom: 3px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.ai-generated-content p {
  font-size: 0.82rem;
  margin-bottom: 0.4rem;
}

.ai-generated-content strong {
  color: var(--text);
}

.ai-thinking {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.ai-error {
  color: var(--dream);
  padding: 0.875rem;
  background: var(--dream-glass);
  border-radius: var(--r-md);
}

/* ── Demand Heatmap ────────────────────────────────────────── */
.demand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: 0.75rem;
}

.demand-card {
  background: var(--glass-medium);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  padding: 0.875rem 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(8px);
  transition: border-color 0.18s;
}

.demand-card:hover {
  border-color: var(--border-2);
}

.demand-emoji {
  font-size: 1.25rem;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}

.demand-info {
  flex: 1;
  min-width: 0;
}

.demand-branch {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demand-level {
  font-size: 0.65rem;
  font-weight: 600;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.demand-level.very_high {
  color: #ef4444;
}

.demand-level.high {
  color: #f59e0b;
}

.demand-level.medium {
  color: var(--primary);
}

.demand-level.low {
  color: #22c55e;
}

.demand-score-bar {
  width: 56px;
  flex-shrink: 0;
  text-align: right;
}

.demand-score-val {
  font-size: 0.8rem;
  font-weight: 900;
  margin-bottom: 3px;
}

.demand-bar-track {
  height: 4px;
  background: var(--bg-5);
  border-radius: 2px;
}

.demand-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), #ef4444);
}

/* ── Option List (Smart Web Options) ──────────────────────── */
.option-list {
  list-style: none;
  counter-reset: option-counter;
}

.option-list li {
  counter-increment: option-counter;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

.option-list li:last-child {
  border-bottom: none;
}

.option-list li::before {
  content: counter(option-counter);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  background: var(--bg-4);
  border: 1px solid var(--border-2);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
}

.option-name {
  font-weight: 700;
  font-size: 0.82rem;
}

.option-branch {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.option-zone-indicator {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--r-full);
}

/* ── Range Results ─────────────────────────────────────────── */
.range-result-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  transition: background 0.1s;
}

.range-result-item:last-child {
  border-bottom: none;
}

.range-result-item:hover {
  background: var(--bg-3);
  border-radius: var(--r-xs);
}

.range-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: var(--r-full);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  min-width: 38px;
}

/* ── Round Simulator Chips ─────────────────────────────────── */
.round-sim-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: var(--r-full);
  font-size: 0.65rem;
  font-weight: 700;
  white-space: nowrap;
  margin: 1px;
}

.sim-high {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.sim-medium {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.sim-low {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

/* ── Reveal Animations ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Insight Card ──────────────────────────────────────────── */
.insight-card {
  background: var(--primary-glass);
  border: 1px solid var(--primary-border);
  border-radius: var(--r-md);
  padding: 0.875rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
}

.insight-card svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Risk Meter ────────────────────────────────────────────── */
.risk-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 600;
}

.risk-bar-track {
  flex: 1;
  height: 4px;
  background: var(--bg-5);
  border-radius: 2px;
}

.risk-bar-fill-low {
  height: 100%;
  border-radius: 2px;
  background: #22c55e;
}

.risk-bar-fill-medium {
  height: 100%;
  border-radius: 2px;
  background: #f59e0b;
}

.risk-bar-fill-high {
  height: 100%;
  border-radius: 2px;
  background: #ef4444;
}

.risk-label-low {
  color: #22c55e;
}

.risk-label-medium {
  color: #f59e0b;
}

.risk-label-high {
  color: #ef4444;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 767px) {
  html {
    font-size: 13px;
  }

  .nav-links {
    display: none;
  }

  .nav-dropdown-trigger {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .nav-actions .btn:not(#bookmarks-toggle):not(.theme-btn) {
    display: none;
  }

  #search-trigger-btn {
    display: none;
  }

  .nav-predict-btn {
    display: none;
  }

  .hero {
    padding: 3rem 0 2.5rem;
  }

  .hero-stats {
    padding: 0.75rem 1rem;
    gap: 1.5rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

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

  .nav-megamenu {
    display: none;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .nav-links>a {
    font-size: 0.75rem;
    padding: 0.3rem 0.55rem;
  }

  #search-trigger-btn kbd {
    display: none;
  }

  .demand-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 400px) {
  .demand-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-stats {
    flex-direction: column;
    gap: 0.75rem;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1200px;
  }
}

/* ══════════════════════════════════════════════════════════ */
/*  MEGA MENU — WIDE 3-COLUMN VARIANT                         */
/* ══════════════════════════════════════════════════════════ */

/* Wide variant: overrides min-width for 3-col menus */
.nav-megamenu-wide {
  min-width: min(860px, 95vw);
  left: 50%;
}

/* Override awkward left position when near right edge */
.nav-dropdown-trigger:last-child .nav-megamenu,
.nav-dropdown-trigger:nth-last-child(2) .nav-megamenu {
  left: auto;
  right: 0;
  transform: translateY(-6px);
}

.nav-dropdown-trigger:last-child:hover .nav-megamenu,
.nav-dropdown-trigger:nth-last-child(2):hover .nav-megamenu {
  transform: translateY(0);
}

/* 3-column grid for wide mega menu */
.mm-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 0.25rem 1.25rem;
}

.mm-grid-3>div {
  padding: 0.3rem 0;
}

.mm-grid-3>div+div {
  border-left: 1px solid var(--border);
  padding-left: 1.25rem;
}

/* Standard 2-col grid (already defined, alias also works) */
.mm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

/* ── Institute Search inside Mega Menu ────────────────────── */
.mm-search-wrap {
  position: relative;
  margin-bottom: 0.5rem;
}

.mm-search-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  color: var(--text-dim);
  pointer-events: none;
}

.mm-search-input {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 0.78rem;
  font-family: inherit;
  padding: 0.42rem 0.6rem 0.42rem 1.75rem;
  outline: none;
  transition: border-color 0.15s;
}

.mm-search-input:focus {
  border-color: var(--primary);
}

/* Institute type filter chips inside mega menu */
.mm-inst-filters {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.mm-type-btn {
  padding: 0.2rem 0.6rem;
  border-radius: var(--r-full);
  font-size: 0.65rem;
  font-weight: 700;
  border: 1px solid var(--border-2);
  background: var(--bg-4);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}

.mm-type-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.mm-type-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Results list */
.mm-inst-results {
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-3);
  margin-bottom: 0.5rem;
}

.mm-inst-results::-webkit-scrollbar {
  width: 4px;
}

.mm-inst-results::-webkit-scrollbar-thumb {
  background: var(--border-2);
  border-radius: 2px;
}

.mm-inst-placeholder {
  padding: 0.6rem 0.75rem;
  font-size: 0.72rem;
  color: var(--text-dim);
  text-align: center;
}

.mm-inst-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0.45rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: background 0.1s;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

.mm-inst-item:last-child {
  border-bottom: none;
}

.mm-inst-item:hover {
  background: var(--bg-4);
  color: var(--text);
}

.mm-inst-badge {
  font-size: 0.58rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mm-inst-badge.IIT {
  background: rgba(1, 156, 212, 0.15);
  color: var(--primary);
}

.mm-inst-badge.NIT {
  background: rgba(129, 140, 248, 0.15);
  color: #818cf8;
}

.mm-inst-badge.IIIT {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.mm-inst-badge.GFTI {
  background: rgba(107, 114, 128, 0.15);
  color: #9ca3af;
}

.mm-inst-name {
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mm-inst-loc {
  font-size: 0.62rem;
  color: var(--text-dim);
  flex-shrink: 0;
}

/* View all link */
.mm-view-all {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary);
  padding: 0.1rem 0;
  transition: gap 0.15s;
}

.mm-view-all:hover {
  gap: 7px;
}

/* ── Ad placeholder in results ───────────────────────────── */
.results-ad-slot {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.625rem 1rem;
  margin-bottom: 0.75rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  overflow: hidden;
}

.results-ad-slot .sponsored-badge {
  position: absolute;
  top: 4px;
  left: 8px;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--bg-4);
  padding: 1px 5px;
  border-radius: 3px;
}

.results-ad-slot .ad-content {
  width: 100%;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ── Insight card (used in demand modals) ───────────────── */
.insight-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.6rem 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.insight-card svg {
  width: 14px;
  height: 14px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Intelligence stat cards (used in demand modal) */
.intel-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.75rem;
  text-align: center;
}

.intel-card-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.intel-card-value {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.intel-card-sub {
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* AI thinking / loading state */
.ai-thinking {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.ai-error {
  text-align: center;
  padding: 1rem;
  color: var(--dream);
  font-size: 0.82rem;
}