/* ============================================================
   Markbit Student Calculator Suite v4 - Premium Multi-page Platform
   © 2026 Vyom Technologies
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --bg: #f0f4ff;
  --bg-soft: #e8eeff;
  --surface: rgba(255,255,255,0.85);
  --surface-solid: #ffffff;
  --text: #0f172a;
  --text-soft: #475569;
  --text-muted: #94a3b8;
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --secondary: #0891b2;
  --accent: #7c3aed;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --border: rgba(148,163,184,0.28);
  --border-strong: rgba(148,163,184,0.5);
  --shadow: 0 4px 24px rgba(15,23,42,0.07), 0 1px 4px rgba(15,23,42,0.04);
  --shadow-hover: 0 16px 40px rgba(79,70,229,0.14), 0 4px 12px rgba(15,23,42,0.08);
  --shadow-card: 0 2px 16px rgba(15,23,42,0.06);
  --radius: 18px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --transition: all .3s cubic-bezier(.4,0,.2,1);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --logo-height: 36px;
  --nav-height: 60px;
  --sticky-ad-height: 34px;
}

/* Dark Mode */
body[data-theme="dark"] {
  --bg: #060c1f;
  --bg-soft: #0c1630;
  --surface: rgba(13,20,40,0.82);
  --surface-solid: #0f1a35;
  --text: #e2e8f0;
  --text-soft: #94a3b8;
  --text-muted: #64748b;
  --border: rgba(148,163,184,0.18);
  --border-strong: rgba(148,163,184,0.3);
  --shadow: 0 4px 24px rgba(0,0,0,0.35), 0 1px 4px rgba(0,0,0,0.2);
  --shadow-hover: 0 16px 40px rgba(79,70,229,0.25), 0 4px 12px rgba(0,0,0,0.35);
  --shadow-card: 0 2px 16px rgba(0,0,0,0.25);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }
body {
  font-family: var(--font);
  color: var(--text);
  line-height: 1.65;
  background: var(--bg);
  transition: background .4s ease, color .4s ease;
  overflow-x: hidden;
}
body.route-leaving {
  opacity: .96;
  transform: translateY(2px);
  transition: opacity .1s ease, transform .1s ease;
}

body::before {
  content: '';
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse 70% 40% at 5% 5%, rgba(99,102,241,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 30% at 95% 10%, rgba(124,58,237,0.08) 0%, transparent 50%),
    radial-gradient(ellipse 40% 30% at 50% 100%, rgba(8,145,178,0.07) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
body > * { position: relative; z-index: 1; }

body[data-theme="dark"]::before {
  background:
    radial-gradient(ellipse 70% 40% at 5% 5%, rgba(99,102,241,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 50% 30% at 95% 10%, rgba(124,58,237,0.12) 0%, transparent 50%),
    radial-gradient(ellipse 40% 30% at 50% 100%, rgba(8,145,178,0.1) 0%, transparent 60%);
}

h1, h2, h3, h4 { line-height: 1.22; letter-spacing: 0; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.3rem, 2.8vw, 2.1rem); }
h3 { font-size: clamp(1.05rem, 2vw, 1.35rem); }
h4 { font-size: clamp(0.95rem, 1.5vw, 1.1rem); }
p { color: var(--text-soft); line-height: 1.7; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); text-decoration: underline; }
ul, ol { padding-left: 1.4em; }
li { color: var(--text-soft); margin-bottom: .35rem; }
strong { color: var(--text); font-weight: 700; }
em { color: var(--accent); font-style: normal; font-weight: 600; }

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

/* ── Layout ─────────────────────────────────────────────────── */
.container { width: min(1180px, 93%); margin-inline: auto; }
.section { padding: 3rem 0; }
.section-sm { padding: 1.5rem 0; }
.grid { display: grid; gap: 1.2rem; }
.grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
.content-card,
.calculator-card,
.tool-card,
.ad-zone,
.formula-block,
.result-box {
  min-width: 0;
}

/* ── Scroll Progress ────────────────────────────────────────── */
#scroll-progress {
  position: fixed; top: 0; left: 0;
  width: 0; height: 3px; z-index: 9999;
  background: linear-gradient(90deg, var(--secondary), var(--primary), var(--accent));
  transition: width .1s linear;
}

/* ── Sticky Ad Bar ──────────────────────────────────────────── */
.sticky-ad-bar {
  position: sticky; top: 0; z-index: 1200;
  height: var(--sticky-ad-height);
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(90deg, #1e1b4b, #312e81, #1e3a8a);
  color: rgba(255,255,255,0.88);
  font-size: .8rem; font-weight: 500;
  letter-spacing: .03em;
  gap: .5rem;
}
.sticky-ad-bar a { color: #a5b4fc; }

/* ── Navigation ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: var(--sticky-ad-height);
  z-index: 1100;
  height: var(--nav-height);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  background: color-mix(in srgb, var(--surface-solid) 82%, transparent);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 20px rgba(15,23,42,0.06);
  transition: var(--transition);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header,
  .tone-buttons,
  .glass-card,
  .nav-menu {
    background: var(--surface-solid) !important;
  }
  body[data-theme="dark"] .site-header,
  body[data-theme="dark"] .tone-buttons,
  body[data-theme="dark"] .glass-card,
  body[data-theme="dark"] .nav-menu {
    background: #0f1a35 !important;
  }
}

.nav-wrap {
  display: flex; align-items: center;
  gap: .6rem; height: 100%;
  min-width: 0;
}

/* Logo */
.brand {
  display: flex; align-items: center; gap: .55rem;
  font-weight: 800; font-size: 1.12rem;
  color: var(--text);
  margin-right: auto;
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-logo {
  height: var(--logo-height);
  width: auto;
  object-fit: contain;
}
.brand-logo.logo-dark { display: none; }
body[data-theme="dark"] .brand-logo.logo-light { display: none; }
body[data-theme="dark"] .brand-logo.logo-dark { display: block; }
.brand-name { color: var(--text); }
.brand-name em { color: var(--success); font-style: normal; }

/* Nav Menu */
.nav-menu {
  list-style: none; display: flex;
  align-items: center; gap: .15rem;
  padding: 0; margin: 0;
}
.nav-menu a {
  display: block;
  padding: .45rem .7rem;
  border-radius: var(--radius-xs);
  color: var(--text-soft);
  font-weight: 500;
  font-size: .88rem;
  transition: var(--transition);
  white-space: nowrap;
}
.nav-menu a:hover,
.nav-menu a[aria-current="page"] {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  text-decoration: none;
}

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

.tone-select {
  height: 36px; padding: 0 .6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface);
  color: var(--text);
  font-size: .8rem;
  cursor: pointer;
}
.tone-select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.tone-buttons {
  display: flex;
  align-items: center;
  gap: .25rem;
  padding: .2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-solid) 70%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.tone-btn {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  font: 700 .72rem/1 var(--font);
  padding: .48rem .58rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.tone-btn:hover {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 9%, transparent);
}
.tone-btn.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 4px 12px rgba(79,70,229,.25);
}

.theme-toggle, .mobile-toggle {
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: grid; place-items: center;
  font-size: .95rem;
  transition: var(--transition);
}
.theme-toggle:hover, .mobile-toggle:hover {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border-color: var(--primary);
  color: var(--primary);
}

.mobile-toggle { display: none; }

/* ── Cards / Glassmorphism ──────────────────────────────────── */
.glass-card {
  background: var(--surface);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: color-mix(in srgb, var(--primary) 35%, transparent);
}

.content-card { padding: 1.8rem; }
.hero-card { padding: 2rem; }
.calculator-card { padding: 1.6rem; }
.faq-item { padding: 1.1rem 1.4rem; }
.tool-card { padding: 1.3rem; cursor: pointer; display: block; color: inherit; min-height: 100%; touch-action: manipulation; }
.tool-card:hover { text-decoration: none; color: inherit; }
.tool-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 1.15rem;
  margin-bottom: .7rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
}
.tool-card .mini { margin-top: .35rem; font-size: .83rem; }

.blog-card { padding: 1.4rem; display: block; color: inherit; }
.blog-card:hover { text-decoration: none; color: inherit; }
.blog-meta { display: flex; gap: .7rem; align-items: center; margin-bottom: .6rem; font-size: .78rem; color: var(--text-muted); }
.blog-tag {
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  color: var(--accent);
  padding: .18rem .55rem;
  border-radius: 999px;
  font-size: .73rem;
  font-weight: 600;
}

/* ── Badge ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--primary) 15%, transparent),
    color-mix(in srgb, var(--accent) 10%, transparent));
  color: var(--primary);
  padding: .3rem .8rem;
  border-radius: 999px;
  font-size: .77rem;
  font-weight: 600;
  letter-spacing: .03em;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
  margin-bottom: .9rem;
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero { padding: 3.5rem 0 2rem; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr .95fr;
  gap: 1.4rem;
  align-items: start;
}
.hero-eyebrow { font-size: .82rem; font-weight: 600; color: var(--primary); letter-spacing: .06em; text-transform: uppercase; margin-bottom: .5rem; }
.lead {
  font-size: 1.07rem;
  color: var(--text-soft);
  max-width: 60ch;
  line-height: 1.65;
}
.hero-stats {
  display: flex; gap: 1.4rem; margin-top: 1.4rem;
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-num { display: block; font-size: 1.5rem; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-label { font-size: .73rem; color: var(--text-muted); margin-top: .2rem; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .45rem;
  border: none; border-radius: var(--radius-sm);
  padding: .72rem 1.1rem;
  cursor: pointer;
  font-weight: 600; font-size: .9rem;
  position: relative; overflow: hidden;
  transition: var(--transition);
  white-space: nowrap;
  font-family: var(--font);
  line-height: 1;
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
  touch-action: manipulation;
}
.btn i { pointer-events: none; }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(79,70,229,0.35);
}
.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(79,70,229,0.45);
  transform: translateY(-1px);
}

.btn-calculate-now {
  background:
    radial-gradient(circle at 18% 20%, rgba(255,255,255,.34), transparent 24%),
    linear-gradient(135deg, #4f46e5 0%, #0891b2 52%, #10b981 100%);
  color: #fff;
  border: 1px solid rgba(255,255,255,.24);
  box-shadow:
    0 10px 28px rgba(79,70,229,.26),
    0 0 0 1px rgba(255,255,255,.12) inset;
}
.btn-calculate-now:hover {
  color: #fff;
  box-shadow:
    0 14px 34px rgba(8,145,178,.32),
    0 0 22px rgba(16,185,129,.22);
}
.btn-loading { cursor: wait; opacity: .86; }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  border-color: color-mix(in srgb, var(--primary) 30%, transparent);
  color: var(--primary);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16,185,129,0.3);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #b91c1c);
  color: #fff;
}
.btn-danger:hover { opacity: .9; }

.btn-ghost {
  background: color-mix(in srgb, var(--secondary) 14%, transparent);
  color: var(--secondary);
  border: 1px solid color-mix(in srgb, var(--secondary) 28%, transparent);
}
.btn.active,
.btn[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent);
}

.btn-sm { padding: .45rem .72rem; font-size: .82rem; border-radius: 8px; }
.btn-lg { padding: .9rem 1.6rem; font-size: 1rem; border-radius: 14px; }

.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .9rem; }
.quick-links { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.2rem; }

/* Ripple */
.ripple {
  position: absolute; border-radius: 50%;
  transform: scale(0);
  background: rgba(255,255,255,0.55);
  animation: ripple-anim .65s linear;
  pointer-events: none;
}

/* ── Subject System ──────────────────────────────────────────── */
.subject-list { display: grid; gap: .7rem; margin-bottom: 1rem; }

.subject-row {
  display: grid;
  grid-template-columns: 28px 1.6fr 1fr 1fr 36px 36px 36px;
  gap: .6rem;
  align-items: end;
  padding: .9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  animation: slide-in .22s ease;
}

.badge-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: .75rem; font-weight: 700;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 20%, transparent),
    color-mix(in srgb, var(--primary) 15%, transparent));
  color: var(--accent);
  align-self: center;
  flex-shrink: 0;
}

.input-group { display: grid; gap: .3rem; }
.input-group label {
  font-size: .79rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: .01em;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: .65rem .75rem;
  background: color-mix(in srgb, var(--surface-solid) 90%, transparent);
  color: var(--text);
  font-family: var(--font);
  font-size: .9rem;
  transition: var(--transition);
  outline: none;
  min-height: 44px;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
  background: var(--surface-solid);
}
input::placeholder { color: var(--text-muted); }
textarea { min-height: 120px; resize: vertical; }

.subject-row .btn {
  padding: .5rem .5rem;
  min-width: 34px; min-height: 34px;
  border-radius: 8px;
  align-self: end;
}

/* ── Result Box ──────────────────────────────────────────────── */
.result-box {
  display: none;
  margin-top: 1.1rem;
  padding: 1.2rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-solid) 90%, transparent);
}
.result-box.show {
  display: block;
  animation: result-pop .42s cubic-bezier(.16,1,.3,1);
}
.result-box.result-pending { opacity: .55; filter: blur(.5px); }
.share-export-card {
  width: min(760px, 94vw);
  padding: 1.5rem;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, var(--surface-solid)), var(--surface-solid));
}
.share-export-card::after {
  content: 'Markbit';
  display: block;
  margin-top: .9rem;
  color: var(--primary);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.result-box.success { border-left: 4px solid var(--success); }
.result-box.warning { border-left: 4px solid var(--warning); }
.result-box.error { border-left: 4px solid var(--danger); }
.result-box.info { border-left: 4px solid var(--info); }

.result-highlight {
  display: block;
  font-size: 2.2rem; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: .55rem;
}
.result-meta { font-size: .9rem; line-height: 1.7; margin-bottom: .45rem; }
.result-meta strong { color: var(--text); }
.insight {
  margin-top: .6rem;
  padding: .6rem .8rem;
  border-radius: 8px;
  background: color-mix(in srgb, var(--info) 10%, transparent);
  color: var(--text-soft);
  font-size: .88rem;
  border-left: 3px solid var(--info);
}
.result-actions {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-top: .9rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
}
.result-ready {
  margin-bottom: .45rem;
  color: var(--success);
  font-size: .82rem;
  font-weight: 700;
}
.score-reaction {
  margin-top: .55rem;
  font-weight: 700;
  color: var(--text);
}
.roast-line {
  display: block;
  margin-top: .25rem;
  color: var(--accent);
}
.recommendation-card {
  margin-top: .85rem;
  padding: .85rem;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--primary) 7%, var(--surface-solid));
}
.recommendation-card strong {
  display: block;
  margin-bottom: .2rem;
}
.recommendation-card p {
  font-size: .86rem;
  margin-bottom: .55rem;
}

.cuet-tier-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .8rem;
  margin-top: .9rem;
}
.cuet-tier-grid article {
  padding: .9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-solid) 82%, transparent);
}
.cuet-tier-grid h4 { margin-bottom: .45rem; }
.course-tier-list { margin: 0; padding-left: 1rem; }
.course-tier-list li { margin-bottom: .25rem; font-size: .88rem; }

.neet-tool-grid .result-box {
  overflow: hidden;
}
.neet-example-row {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: .85rem 0 .3rem;
}
.neet-data-list {
  display: grid;
  gap: .65rem;
  margin: .8rem 0;
}
.neet-data-list p {
  margin: 0;
  color: var(--text-soft);
  font-size: .92rem;
}
.neet-rank-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .7rem;
  margin: .85rem 0;
}
.neet-rank-summary article {
  padding: .8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface-solid) 82%, transparent);
}
.neet-rank-summary strong {
  display: block;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.2;
}
.neet-rank-summary span {
  display: block;
  margin-top: .2rem;
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
}
.neet-result-card {
  display: grid;
  gap: .85rem;
}
.neet-result-head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: center;
  flex-wrap: wrap;
}
.neet-confidence {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .3rem .65rem;
  font-size: .78rem;
  font-weight: 800;
}
.neet-confidence.success {
  color: var(--success);
  background: color-mix(in srgb, var(--success) 14%, transparent);
}
.neet-confidence.warning {
  color: var(--warning);
  background: color-mix(in srgb, var(--warning) 16%, transparent);
}
.neet-confidence.info {
  color: var(--info);
  background: color-mix(in srgb, var(--info) 14%, transparent);
}
.neet-note {
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 700;
}
.neet-tone-message {
  padding: .75rem .85rem;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--border));
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  color: var(--text);
  font-weight: 800;
}
.neet-meaning {
  padding-top: .2rem;
}
.neet-meaning h3 {
  margin-bottom: .65rem;
  font-size: 1rem;
}
.neet-meaning-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .7rem;
}
.neet-meaning-grid article {
  padding: .85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface-solid) 84%, transparent);
}
.neet-meaning-grid span {
  display: block;
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
}
.neet-meaning-grid strong {
  display: block;
  margin-top: .2rem;
  font-size: 1.12rem;
}
.neet-meaning-grid .strong { color: var(--success); }
.neet-meaning-grid .possible { color: var(--warning); }
.neet-meaning-grid .tough { color: var(--danger); }
.neet-featured-tool {
  position: relative;
  border-color: color-mix(in srgb, var(--success) 40%, var(--border));
  box-shadow: 0 12px 32px rgba(16,185,129,.13);
}
.neet-featured-tool::after {
  content: 'Top Tool';
  position: absolute;
  top: .9rem;
  right: .9rem;
  padding: .24rem .55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--success) 16%, var(--surface-solid));
  color: var(--success);
  font-size: .72rem;
  font-weight: 800;
}
.neet-chart-wrap {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  overflow: hidden;
}
.neet-chart-head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: center;
  padding: .8rem .9rem;
  border-bottom: 1px solid var(--border);
}
.neet-chart-head h3 {
  margin: 0;
  font-size: 1rem;
}
.neet-chart-head span {
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 700;
}
#neet-rank-chart {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
}
.neet-college-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: .9rem;
  margin-top: 1rem;
}
.neet-college-group {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .9rem;
  background: color-mix(in srgb, var(--surface-solid) 84%, transparent);
}
.neet-group-head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: center;
  margin-bottom: .7rem;
}
.neet-group-head h3 {
  margin: 0;
  font-size: 1rem;
}
.neet-group-head span {
  padding: .25rem .5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--text-soft);
  font-size: .78rem;
  font-weight: 700;
}
.neet-college-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: .75rem;
  align-items: center;
  padding: .75rem 0;
  border-top: 1px solid var(--border);
}
.neet-college-card:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.neet-college-card h4 {
  margin: 0 0 .2rem;
  font-size: .95rem;
}
.neet-college-card p,
.neet-cutoff-meta span,
.neet-cutoff-meta small {
  margin: 0;
  color: var(--text-muted);
  font-size: .78rem;
}
.neet-cutoff-meta {
  text-align: right;
  min-width: 88px;
}
.neet-cutoff-meta strong {
  display: block;
  color: var(--text);
}
.neet-cutoff-meta small {
  display: block;
}
.neet-chance {
  min-width: 54px;
  min-height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--success) 16%, transparent);
  color: var(--success);
  font-weight: 800;
  font-size: .9rem;
}
.neet-target .neet-chance {
  background: color-mix(in srgb, var(--warning) 18%, transparent);
  color: var(--warning);
}
.neet-dream .neet-chance {
  background: color-mix(in srgb, var(--info) 16%, transparent);
  color: var(--info);
}
.neet-empty-state {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--warning) 8%, transparent);
}
.neet-empty-state p {
  margin: .3rem 0 0;
  color: var(--text-soft);
}

.syllabus-card { margin-top: 1.5rem; }
.syllabus-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: center;
}
.syllabus-ring {
  width: 150px;
  display: grid;
  justify-items: center;
  gap: .2rem;
  margin-inline: auto;
}
.syllabus-ring svg {
  width: 132px;
  height: 132px;
  transform: rotate(-90deg);
}
.syllabus-ring circle {
  fill: none;
  stroke-width: 12;
}
.ring-bg { stroke: color-mix(in srgb, var(--text-muted) 18%, transparent); }
.ring-progress {
  stroke: var(--success);
  stroke-linecap: round;
  transition: stroke-dashoffset .35s ease;
}
.syllabus-ring strong {
  margin-top: -88px;
  font-size: 1.7rem;
  color: var(--text);
}
.syllabus-ring span {
  font-size: .76rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.syllabus-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: .7rem;
  margin: 1.1rem 0;
}
.syllabus-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: .55rem;
}
.syllabus-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  padding: .65rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: color-mix(in srgb, var(--surface-solid) 86%, transparent);
}
.syllabus-list label {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex: 1;
}
.syllabus-list input[type="checkbox"] {
  width: 20px;
  min-height: 20px;
  accent-color: var(--success);
}
.syllabus-list li.done span {
  color: var(--text-muted);
  text-decoration: line-through;
}
.syllabus-empty {
  justify-content: center !important;
  color: var(--text-muted);
  font-size: .9rem;
}

/* ── Ad Zones ─────────────────────────────────────────────────── */
.ad-zone {
  margin: 1.2rem 0;
  border: 2px dashed color-mix(in srgb, var(--text-muted) 40%, transparent);
  border-radius: var(--radius-sm);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--surface-solid) 75%, transparent);
  padding: .8rem 1rem;
  font-size: .8rem;
  gap: .25rem;
  transition: var(--transition);
}
.ad-zone strong { font-size: .75rem; color: var(--text-soft); letter-spacing: .04em; text-transform: uppercase; }
.ad-premium { min-height: 90px; }
.ad-average { min-height: 140px; }
.ad-passive { min-height: 110px; }
.ad-footer { min-height: 80px; }
.ad-sidebar { min-height: 250px; }

/* ── Calendar ─────────────────────────────────────────────────── */
.calendar-widget {
  background: color-mix(in srgb, var(--surface-solid) 85%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .85rem;
  overflow: hidden;
}

.cal-head {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: .7rem;
}
.cal-title { font-size: .92rem; font-weight: 700; color: var(--text); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: .2rem;
  font-size: .76rem;
}
.cal-day {
  text-align: center;
  padding: .3rem .1rem;
  color: var(--text-muted);
  font-weight: 700;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.cal-cell {
  text-align: center;
  padding: .35rem .15rem;
  border-radius: 7px;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1.2;
}
.cal-cell:hover { background: color-mix(in srgb, var(--primary) 13%, transparent); color: var(--primary); }
.cal-cell.today {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff !important;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(79,70,229,.3);
}
.cal-cell.selected {
  background: color-mix(in srgb, var(--secondary) 20%, transparent);
  color: var(--secondary);
  font-weight: 700;
}
.cal-cell.has-note::after {
  content: '•';
  display: block;
  font-size: .5rem;
  color: var(--warning);
  line-height: 1;
}

/* Full calendar page */
.cal-full { max-width: 680px; margin: 0 auto; }
.cal-full .cal-grid { gap: .35rem; }
.cal-full .cal-cell { padding: .65rem .3rem; font-size: .9rem; border-radius: 10px; }
.cal-full .cal-day { padding: .5rem; font-size: .75rem; }

/* ── FAQ ────────────────────────────────────────────────────── */
.faq-grid { display: grid; gap: .7rem; }
.faq-item { overflow: hidden; }
.faq-item details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  padding: .1rem 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .95rem;
  gap: .5rem;
}
.faq-item details summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--primary);
  flex-shrink: 0;
  transition: var(--transition);
}
.faq-item details[open] summary::after { content: '−'; }
.faq-item details p { margin-top: .65rem; font-size: .9rem; }
.faq-item details[open] { padding-bottom: .4rem; }

/* ── Recent Tools List ──────────────────────────────────────── */
.recent-list { list-style: none; display: grid; gap: .45rem; padding: 0; }
.recent-list li a {
  display: flex; align-items: center; gap: .55rem;
  padding: .55rem .75rem;
  border-radius: var(--radius-xs);
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  color: var(--text);
  font-size: .88rem;
  font-weight: 500;
  border: 1px solid color-mix(in srgb, var(--primary) 14%, transparent);
  transition: var(--transition);
}
.recent-list li a:hover {
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--primary);
  text-decoration: none;
}
.recent-list li a::before {
  content: '⚡';
  font-size: .75rem;
  opacity: .7;
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 1.5rem;
  background: color-mix(in srgb, var(--surface-solid) 60%, transparent);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.4rem;
  margin-bottom: 1.5rem;
}
.footer-brand-name { font-weight: 800; font-size: 1.05rem; margin-bottom: .5rem; color: var(--text); display: flex; align-items: center; gap: .4rem; }
.footer-links { list-style: none; padding: 0; display: grid; gap: .35rem; }
.footer-links li a { color: var(--text-soft); font-size: .88rem; }
.footer-links li a:hover { color: var(--primary); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: .7rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}
.footer-note { font-size: .83rem; color: var(--text-muted); }

/* ── Floating Help ──────────────────────────────────────────── */
.floating-help {
  position: fixed; right: 16px; bottom: 70px;
  z-index: 1600;
  display: flex; flex-direction: column; align-items: flex-end; gap: .6rem;
}
.help-btn {
  width: 52px; height: 52px;
  border: none; border-radius: 50%;
  background: linear-gradient(135deg, #0891b2, #6366f1);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(99,102,241,.38);
  font-size: 1.15rem;
  display: grid; place-items: center;
  transition: var(--transition);
}
.help-btn:hover { transform: scale(1.08); }

.help-panel {
  width: 280px;
  padding: 1.1rem;
  display: none;
}
.help-panel.open { display: block; animation: slide-in .2s ease; }
.help-links { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .6rem; }

/* ── Back to Top ────────────────────────────────────────────── */
#back-to-top {
  position: fixed; left: 16px; bottom: 70px;
  z-index: 1600;
  width: 44px; height: 44px;
  border: none; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; cursor: pointer;
  box-shadow: 0 6px 18px rgba(79,70,229,.3);
  display: none;
  place-items: center;
  font-size: .9rem;
  transition: var(--transition);
}
#back-to-top.show { display: grid; animation: slide-in .2s ease; }
#back-to-top:hover { transform: translateY(-3px); }

/* ── Section Headers ────────────────────────────────────────── */
.section-header { margin-bottom: 1.8rem; }
.section-header h2 { margin-bottom: .45rem; }
.section-header p { max-width: 60ch; }

/* ── Feature Blocks ─────────────────────────────────────────── */
.feature-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: grid; place-items: center;
  color: #fff; font-size: 1.3rem;
  margin-bottom: .9rem;
  flex-shrink: 0;
}

.tip-box {
  display: flex; gap: .8rem; align-items: flex-start;
  padding: .9rem 1.1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--success) 8%, transparent);
  border-left: 4px solid var(--success);
}
.tip-box.warning { background: color-mix(in srgb, var(--warning) 8%, transparent); border-left-color: var(--warning); }
.tip-box.error { background: color-mix(in srgb, var(--danger) 8%, transparent); border-left-color: var(--danger); }
.tip-box.info { background: color-mix(in srgb, var(--info) 8%, transparent); border-left-color: var(--info); }
.tip-icon { font-size: 1.15rem; margin-top: .05rem; flex-shrink: 0; }
.tip-content h4 { font-size: .92rem; margin-bottom: .25rem; color: var(--text); }
.tip-content p { font-size: .86rem; }

.formula-block {
  padding: 1rem 1.3rem;
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
  border-radius: var(--radius-sm);
  font-family: 'Courier New', monospace;
  font-size: .95rem;
  color: var(--primary);
  font-weight: 600;
}

.highlight-card {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-radius: var(--radius);
  padding: 2rem;
}
.highlight-card h2, .highlight-card h3 { color: #fff; }
.highlight-card p { color: rgba(255,255,255,.85); }
.highlight-card .btn-secondary {
  background: rgba(255,255,255,.18);
  color: #fff;
  border-color: rgba(255,255,255,.35);
}

/* ── Scroll Reveal ──────────────────────────────────────────── */
.fade-section {
  opacity: 1;
  transform: none;
}
html.markbit-js .fade-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .55s cubic-bezier(.4,0,.2,1), transform .55s cubic-bezier(.4,0,.2,1);
}
html.markbit-js .fade-section.in-view,
.fade-section.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ── Form ───────────────────────────────────────────────────── */
.form-row { display: grid; gap: 1rem; }
.form-2col { grid-template-columns: 1fr 1fr; }
.form-success {
  padding: 1.2rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--success) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--success) 30%, transparent);
  color: var(--success);
  font-weight: 600;
  text-align: center;
}
.form-error {
  padding: 1rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent);
  color: var(--danger);
  font-size: .88rem;
}

/* ── Content / Article ──────────────────────────────────────── */
.prose h2 { margin: 2rem 0 .8rem; }
.prose h3 { margin: 1.5rem 0 .6rem; }
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { margin-bottom: 1rem; padding-left: 1.6em; }
.prose li { margin-bottom: .5rem; color: var(--text-soft); }
.prose strong { color: var(--text); }
.prose a { color: var(--primary); }
.prose blockquote {
  border-left: 4px solid var(--primary);
  padding: .7rem 1.2rem;
  margin: 1.2rem 0;
  background: color-mix(in srgb, var(--primary) 7%, transparent);
  border-radius: 0 8px 8px 0;
  font-style: italic;
}
.prose .formula-block { margin: 1.2rem 0; }

/* ── Tags / Pills ───────────────────────────────────────────── */
.tag {
  display: inline-block;
  padding: .22rem .6rem;
  border-radius: 999px;
  font-size: .73rem; font-weight: 600;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
}
.tag-success { background: color-mix(in srgb, var(--success) 12%, transparent); color: var(--success); border-color: color-mix(in srgb, var(--success) 20%, transparent); }
.tag-warning { background: color-mix(in srgb, var(--warning) 12%, transparent); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 20%, transparent); }
.tag-danger { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 20%, transparent); }

/* ── Timeline (changelog) ───────────────────────────────────── */
.timeline { display: grid; gap: 0; position: relative; }
.timeline::before {
  content: ''; position: absolute;
  left: 18px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--accent), transparent);
}
.timeline-item { display: flex; gap: 1.2rem; padding: 1.1rem 0 1.1rem 0; }
.timeline-dot {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; display: grid; place-items: center;
  font-size: .85rem; z-index: 1;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent);
}
.timeline-content { flex: 1; padding-top: .4rem; }
.timeline-date { font-size: .76rem; color: var(--text-muted); font-weight: 600; margin-bottom: .3rem; }

/* ── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb {
  display: flex; align-items: center;
  gap: .4rem; flex-wrap: wrap;
  font-size: .8rem; color: var(--text-muted);
  margin-bottom: 1.2rem;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text-soft); }

/* ── CTA Section ────────────────────────────────────────────── */
.cta-section {
  text-align: center;
  padding: 3rem 2rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--primary) 10%, transparent),
    color-mix(in srgb, var(--accent) 7%, transparent));
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
}
.cta-section h2 { margin-bottom: .7rem; }
.cta-section p { max-width: 50ch; margin: 0 auto 1.4rem; }

/* ── Misc ───────────────────────────────────────────────────── */
.mini { font-size: .83rem; color: var(--text-muted); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.flex { display: flex; align-items: center; }
.flex-gap { gap: .6rem; }
.flex-wrap { flex-wrap: wrap; }
.flex-between { justify-content: space-between; }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes slide-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes result-fade {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes result-pop {
  from { opacity: 0; transform: translateY(16px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes ripple-anim {
  to { transform: scale(5); opacity: 0; }
}
@keyframes confetti-fall {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  to {
    opacity: 0;
    transform: translate3d(calc((var(--i) - 13) * 8px), -220px, 0) rotate(420deg);
  }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(79,70,229,0.2); }
  50% { box-shadow: 0 0 0 8px rgba(79,70,229,0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.animate-pulse { animation: pulse-glow 2.5s infinite; }
.animate-float { animation: float 4s ease-in-out infinite; }
.confetti-fallback {
  position: fixed;
  inset: auto 0 18vh 0;
  z-index: 9999;
  pointer-events: none;
  display: flex;
  justify-content: center;
  gap: .25rem;
}
.confetti-fallback span {
  width: 9px;
  height: 15px;
  border-radius: 2px;
  background: hsl(calc(var(--i) * 47), 82%, 56%);
  animation: confetti-fall .82s cubic-bezier(.2,.7,.2,1) forwards;
  animation-delay: calc(var(--i) * 12ms);
}

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .syllabus-head { grid-template-columns: 1fr auto; }
  .syllabus-form { grid-template-columns: 1fr auto; }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cuet-tier-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .neet-college-groups { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .mobile-toggle { display: grid; }
  .site-header { height: auto; min-height: var(--nav-height); }
  .nav-wrap { padding-block: .45rem; }
  .nav-actions {
    margin-left: 0;
    flex-shrink: 0;
  }
  .tone-select-native {
    position: static;
    width: auto;
    height: 38px;
    opacity: 1;
    pointer-events: auto;
  }
  .tone-buttons { display: none; }

  .nav-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 1rem; right: 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: .1rem;
    display: none;
    padding: .8rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface-solid) 95%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
    z-index: 50;
    max-height: calc(100vh - var(--sticky-ad-height) - var(--nav-height) - 24px);
    max-height: calc(100dvh - var(--sticky-ad-height) - var(--nav-height) - 24px);
    overflow-y: auto;
  }
  .nav-menu.open { display: flex; animation: slide-in .18s ease; }
  .nav-menu a { width: 100%; min-height: 44px; padding: .65rem .8rem; border-radius: 8px; font-size: .9rem; }

  .subject-row {
    grid-template-columns: 28px 1fr 1fr;
    grid-template-rows: auto auto auto;
  }
  .subject-row .input-group:nth-child(2) { grid-column: 2 / span 2; }
  .subject-row .btn { grid-row: 2; }

  .form-2col { grid-template-columns: 1fr; }
  .neet-rank-summary { grid-template-columns: 1fr; }
  .neet-meaning-grid { grid-template-columns: 1fr; }
  .neet-college-card { grid-template-columns: 1fr; align-items: start; }
  .neet-cutoff-meta { text-align: left; }
  .neet-chance { width: 54px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 580px) {
  :root { --nav-height: 55px; --sticky-ad-height: 30px; }
  .container { width: min(100% - 1.5rem, 1180px); }
  .sticky-ad-bar {
    padding-inline: .75rem;
    justify-content: flex-start;
    overflow-x: auto;
    white-space: nowrap;
  }
  .hero { padding: 2rem 0 1.5rem; }
  .section { padding: 2rem 0; }
  .content-card { padding: 1.2rem; }
  .hero-card { padding: 1.4rem; }
  .calculator-card { padding: 1.2rem; }
  .tool-card { padding: 1.05rem; }
  .btn { min-height: 44px; justify-content: center; width: 100%; }
  .btn-row .btn,
  .quick-links .btn { flex: 1 1 100%; }
  .form-row,
  .grid { gap: .85rem; }
  .result-highlight { font-size: 1.7rem; }
  .subject-row { grid-template-columns: 1fr; }
  .badge-num { display: none; }
  .tone-select { max-width: 100px; font-size: .75rem; }
  .theme-toggle,
  .mobile-toggle { width: 38px; height: 38px; }
  .nav-wrap { gap: .4rem; }
  .nav-actions { gap: .35rem; }
  .ad-zone {
    min-height: 0;
    margin: .85rem 0;
    padding: .65rem .8rem;
    font-size: .72rem;
  }
  .ad-zone span { display: none; }
  .floating-help { right: 12px; bottom: 62px; }
  .help-panel { width: min(280px, calc(100vw - 1.5rem)); }
  .tone-buttons { gap: .15rem; padding: .16rem; }
  .tone-btn { padding: .42rem .42rem; font-size: .66rem; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.2rem; }
  .cal-full .cal-cell { padding: .45rem .15rem; font-size: .82rem; }
}

@media print {
  .site-header, .sticky-ad-bar, .floating-help,
  #back-to-top, .ad-zone, .btn-row { display: none !important; }
  body { background: white; }
  .glass-card { box-shadow: none; border: 1px solid #ddd; }
}
