/* ============================================================
   RozReady – Main Stylesheet
   Light theme default, dark-mode optional via data-theme="dark"
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  --bg:           #0a1120;
  --bg2:          #0e1730;
  --bg3:          #131f38;
  --card:         #121d36;
  --card-hover:   #17233f;
  --border:       #223354;
  --border-light: #2b3e64;
  --text:         #eef1f8;
  --text2:        #aab6cf;
  --text3:        #7c8bab;
  --accent:       #e2962c;
  --accent-h:     #f7bb52;
  --blue:         #5b8fe0;
  --green:        #21a878;
  --red:          #e35d5d;
  --orange:       #f2984a;
  --purple:       #9370c8;
  --cyan:         #2aa9ae;
  --pink:         #c9497e;
  --shadow:       0 4px 24px rgba(0,0,0,.45);
  --shadow-sm:    0 2px 8px rgba(0,0,0,.35);
  --radius:       14px;
  --radius-sm:    9px;
  --transition:   .18s ease;
  --font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --font-body:    'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;
}

[data-theme="light"] {
  --bg:           #faf6ee;
  --bg2:          #f1ead9;
  --bg3:          #ece2cc;
  --card:         #ffffff;
  --card-hover:   #fbf8f2;
  --border:       #e3d9c4;
  --border-light: #d6cbb2;
  --text:         #16213b;
  --text2:        #4c5a76;
  --text3:        #7d8aa3;
  --shadow:       0 4px 24px rgba(30,20,5,.10);
  --shadow-sm:    0 2px 8px rgba(30,20,5,.08);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 17px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, select { font: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
h1, h2, h3,
.logo-name, .hero-title, .cards-heading, .home-row-head h2,
.card-title, .auth-card h1, .legal-wrap h1 {
  font-family: var(--font-display);
}
.stat-num, .hcc-count, .cat-tab-count, .result-count, .vacancies-badge, .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }

/* ---------- Utilities ---------- */
.container { max-width: 1300px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,17,32,.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .header { background: rgba(250,246,238,.88); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 62px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  transition: opacity var(--transition);
}
.logo:hover { opacity: .85; }
.logo-icon { flex-shrink: 0; }
.logo-text-group { display: flex; flex-direction: column; line-height: 1.2; width: max-content; }
.logo-name { font-size: 1.2rem; font-weight: 800; color: var(--text); letter-spacing: -.3px; }
.logo-tag { font-size: .6rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); white-space: nowrap; width: 0; min-width: 100%; }

.header-search-wrap {
  flex: 1;
  max-width: 520px;
}
.header-nav-links {
  display: none;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.header-nav-links a {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: .86rem;
  font-weight: 600;
  color: var(--text2);
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}
.header-nav-links a:hover { background: var(--bg3); color: var(--text); }
/* The hero (with its own search box) shows on both the home view and while
   browsing a listing — anywhere it's visible, the header shows primary nav
   links instead of a second search box. Only pages without a hero (entry
   detail, blog) fall back to the header's own search. */
body:has(#heroSection:not(.hidden)) .header-search-wrap { display: none; }
body:has(#heroSection:not(.hidden)) .header-nav-links { display: flex; }
@media (max-width: 1200px) { .header-nav-links { display: none !important; } }
/* Laptop widths: the nav links plus the alert caption and labelled channel buttons overflow the header, so the
   caption goes and WhatsApp / Telegram collapse to icons (their labels survive as aria-labels). */
@media (max-width: 1400px) {
  .header-alert-text { display: none; }
  .header-actions .social-btn { padding: 7px 10px; }
  .header-actions .social-btn span { display: none; }
}
/* The category ledger on the home view already covers this ground — showing
   the employment-type/category tabs too just duplicates it there. They still
   appear once you're browsing a listing (#mainContent). */
body:has(#homeDashboard:not(.hidden)) .emp-nav,
body:has(#homeDashboard:not(.hidden)) .cat-nav { display: none; }
.header-search-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  height: 38px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.header-search-inner:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(226,150,44,.12);
}
.header-search-inner svg { color: var(--text3); flex-shrink: 0; }
.header-search-inner input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: .9rem;
}
.header-search-inner input::placeholder { color: var(--text3); }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.header-alert-block { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.header-alert-text { font-size: .7rem; color: var(--text2); white-space: nowrap; }
.header-social-row { display: flex; align-items: center; gap: 8px; }

.theme-toggle-btn, .hdr-icon-btn {
  width: var(--hdr-btn, 34px); height: var(--hdr-btn, 34px); border-radius: 50%;
  background: var(--bg3); border: 1px solid var(--border); color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); flex-shrink: 0;
}
.theme-toggle-btn:hover, .hdr-icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.lang-btn span { font-size: .78rem; font-weight: 800; line-height: 1; }
/* Buttons that only exist on the compact top strip (see the ≤1200px block in Responsive). */
.mob-only { display: none; }
.theme-toggle-btn .icon-moon { display: none; }
[data-theme="light"] .theme-toggle-btn .icon-sun { display: none; }
[data-theme="light"] .theme-toggle-btn .icon-moon { display: block; }

.lang-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px;
  width: 76px;
  height: 32px;
  flex-shrink: 0;
  transition: border-color var(--transition);
}
.lang-toggle:hover { border-color: var(--accent); }
.lang-toggle-slider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  background: var(--accent);
  border-radius: 16px;
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 2px 6px rgba(226,150,44,.4);
}
.lang-toggle[data-active="hi"] .lang-toggle-slider { transform: translateX(100%); }
.lang-toggle-opt {
  position: relative;
  z-index: 1;
  flex: 1;
  text-align: center;
  font-size: .74rem;
  font-weight: 700;
  color: var(--text2);
  transition: color .2s ease;
  pointer-events: none;
}
.lang-toggle[data-active="en"] .lang-toggle-opt:nth-child(2) { color: #000; }
.lang-toggle[data-active="hi"] .lang-toggle-opt:nth-child(3) { color: #000; }

.signup-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 700;
  background: var(--accent);
  color: #10131a;
  white-space: nowrap;
  transition: background var(--transition);
  flex-shrink: 0;
}
.signup-btn:hover { background: var(--accent-h); }
.signup-btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text2);
}
.signup-btn-ghost:hover { background: var(--bg3); color: var(--text); border-color: var(--accent); }

/* ---------- Logged-in user menu ---------- */
.user-menu { position: relative; flex-shrink: 0; }
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #10131a;
  display: flex; align-items: center; justify-content: center;
  font-size: .76rem; font-weight: 800; letter-spacing: .02em;
  flex-shrink: 0;
}
.user-avatar-lg { width: 40px; height: 40px; font-size: .95rem; }
.user-menu-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--bg3);
  color: var(--text); transition: border-color var(--transition);
}
.user-menu-trigger:hover { border-color: var(--accent); }
.user-menu-name { font-size: .82rem; font-weight: 700; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-chevron { color: var(--text3); transition: transform var(--transition); flex-shrink: 0; }
.user-menu.open .user-menu-chevron { transform: rotate(180deg); }
.user-menu-dropdown {
  display: none;
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 230px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px;
  z-index: 120;
}
.user-menu.open .user-menu-dropdown { display: block; }
.user-menu-header { display: flex; align-items: center; gap: 10px; padding: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.user-menu-fullname { font-size: .88rem; font-weight: 700; color: var(--text); }
.user-menu-email { font-size: .76rem; color: var(--text3); word-break: break-all; }
.user-menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 9px 8px; border-radius: var(--radius-sm); font-size: .85rem; font-weight: 600;
  color: var(--text2); transition: background var(--transition), color var(--transition);
  margin-top: 4px;
}
.user-menu-item:hover { background: var(--bg3); color: var(--text); }
.user-menu-logout:hover { color: var(--red); }

/* Signed-out account icon: only the phone top strip shows it (desktop has the Log In / Sign Up buttons). */
.guest-menu { display: none; }
.guest-menu .user-menu-dropdown { min-width: 190px; }

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}
.social-btn.wa { background: rgba(37,211,102,.12); color: #25d366; }
.social-btn.wa:hover { background: #25d366; color: #fff; }
.social-btn.tg { background: rgba(41,182,246,.12); color: #29b6f6; }
.social-btn.tg:hover { background: #29b6f6; color: #fff; }

/* ---------- Mobile search drawer (opened by the search icon on the top strip) ---------- */
.mobile-menu {
  display: none;
  position: fixed;
  top: 62px;
  left: 0;
  right: 0;
  z-index: 99;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
  gap: 12px;
  flex-direction: column;
}
.mobile-menu.open { display: flex; }

.mob-search {
  display: flex;
  gap: 8px;
}
.mob-search input {
  flex: 1;
  min-width: 0;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  outline: none;
}
.mob-search button {
  background: var(--accent);
  color: #000;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 700;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 56px;
  background: var(--bg2);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(226,150,44,.09) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 80% 50%, rgba(91,143,224,.06) 0%, transparent 60%);
  pointer-events: none;
}
.hero-content { position: relative; max-width: 1000px; margin: 0 auto; text-align: center; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(226,150,44,.12);
  color: var(--accent);
  border: 1px solid rgba(226,150,44,.25);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .3px;
  margin-bottom: 16px;
}
.hero-title {
  font-size: clamp(1.5rem, 3.4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -.5px;
  line-height: 1.4;
  padding-block: .1em;
  margin-block: -.1em 4px;
  background: linear-gradient(135deg, #fff 0%, var(--accent-h) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
[data-theme="light"] .hero-title {
  background: linear-gradient(135deg, var(--text) 0%, #7a4c0c 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text2);
  margin-bottom: 28px;
}

.hero-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 8px 8px 8px 18px;
  box-shadow: var(--shadow);
  transition: border-color var(--transition), box-shadow var(--transition);
  margin-bottom: 18px;
}
.hero-search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(226,150,44,.14), var(--shadow);
}
.hero-search-box svg { color: var(--text3); flex-shrink: 0; }
.hero-search-box input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1rem;
}
.hero-search-box input::placeholder { color: var(--text3); }
#heroSearchBtn {
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: .95rem;
  border-radius: 10px;
  padding: 10px 24px;
  flex-shrink: 0;
  transition: background var(--transition), transform .1s;
}
#heroSearchBtn:hover { background: var(--accent-h); }
#heroSearchBtn:active { transform: scale(.98); }

.popular-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.popular-tags span { font-size: .8rem; color: var(--text3); font-weight: 500; }
.popular-tags button {
  background: var(--bg3);
  color: var(--text2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: .8rem;
  font-weight: 500;
  transition: all var(--transition);
}
.popular-tags button:hover { background: var(--accent); color: #000; border-color: var(--accent); }

/* Practice calls to action under the hero copy (Mock Tests / PYQ) */
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin: -8px 0 20px; }
.hero-cta {
  display: inline-flex; align-items: center;
  padding: 11px 20px; border-radius: 10px;
  font-weight: 700; font-size: .95rem;
  border: 2px solid var(--accent); color: var(--text); background: var(--card);
  transition: background var(--transition), color var(--transition);
}
.hero-cta:hover { background: rgba(226,150,44,.12); }
.hero-cta-primary { background: var(--accent); color: #000; }
.hero-cta-primary:hover { background: var(--accent-h); }
@media (max-width: 960px) { .hero-ctas { justify-content: center; } }

/* ---------- Stats Strip ---------- */
.stats-strip {
  background: var(--bg3);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.stats-row {
  display: flex;
  justify-content: center;
  gap: 0;
}
.stat-item {
  flex: 1;
  text-align: center;
  padding: 8px 16px;
  border-right: 1px solid var(--border);
  max-width: 200px;
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat-lbl { font-size: .75rem; color: var(--text2); margin-top: 3px; font-weight: 500; }
.stat-item.skeleton .stat-num { color: var(--border-light); }

/* ---------- Category Nav ---------- */
.emp-nav {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}
.emp-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 10px 0;
}
.emp-scroll::-webkit-scrollbar { display: none; }
/* Auto margins centre the tabs when they fit and, unlike justify-content: center, keep the first tab reachable when they overflow. */
.emp-scroll > :first-child { margin-left: auto; }
.emp-scroll > :last-child { margin-right: auto; }
.emp-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  font-size: .85rem;
  font-weight: 700;
  color: var(--text2);
  white-space: nowrap;
  border-radius: 999px;
  background: var(--bg3);
  border: 1px solid var(--border);
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
  flex-shrink: 0;
}
.emp-tab:hover { color: var(--text); border-color: var(--text2); transform: translateY(-1px); }
.emp-tab.active {
  color: #000;
  background: linear-gradient(135deg, var(--accent), var(--accent-h));
  border-color: var(--accent);
  box-shadow: 0 6px 16px rgba(226,150,44,.3);
  transform: translateY(-1px);
}
[data-theme="light"] .emp-tab.active { color: #fff; }
.emp-tab svg { opacity: .8; }

/* ---------- Home Dashboard ---------- */
@keyframes viewFadeIn { from { opacity: 0; } to { opacity: 1; } }
.home-dashboard, .main-content, .detail-page { animation: viewFadeIn .35s ease; }
.home-dashboard { padding: 28px 0 8px; }
@keyframes homeRowIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.home-row { margin-bottom: 34px; animation: homeRowIn .4s ease backwards; }
.home-row:nth-of-type(1) { animation-delay: .02s; }
.home-row:nth-of-type(2) { animation-delay: .08s; }
.home-row:nth-of-type(3) { animation-delay: .14s; }
.home-row:nth-of-type(4) { animation-delay: .2s; }
.home-row:nth-of-type(5) { animation-delay: .26s; }
.home-row:nth-of-type(6) { animation-delay: .32s; }
.home-row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.home-row-head h2 { font-size: 1.15rem; font-weight: 800; }
.home-viewall { font-size: .82rem; font-weight: 700; color: var(--accent); white-space: nowrap; }
.home-viewall:hover { color: var(--accent-h); }
.home-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.home-cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 32px; }
.home-cat-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 16px 10px 14px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: .88rem; font-weight: 700; color: var(--text);
  transition: transform .2s cubic-bezier(.2,.8,.3,1), border-color .2s ease, box-shadow .2s ease;
}
.home-cat-card:hover { border-color: var(--border-light); transform: translateY(-4px); box-shadow: var(--shadow); }
.hcc-icon {
  font-size: 1.5rem;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  margin-bottom: 6px;
}
.hcc-jobs        { background: rgba(91,143,224,.15); }
.hcc-results     { background: rgba(33,168,120,.15); }
.hcc-admit-cards { background: rgba(226,150,44,.15); }
.hcc-answer-keys { background: rgba(147,112,200,.15); }
.hcc-admissions  { background: rgba(242,152,74,.15); }
.hcc-syllabus    { background: rgba(42,169,174,.15); }
.hcc-pyq         { background: rgba(201,73,126,.15); }
.hcc-mocktests   { background: rgba(42,169,174,.15); }
.hcc-progress    { background: rgba(124,131,234,.16); }
.hcc-icon svg { color: var(--accent); }
.hcc-jobs svg        { color: var(--blue); }
.hcc-results svg     { color: var(--green); }
.hcc-admit-cards svg { color: var(--accent); }
.hcc-answer-keys svg { color: var(--purple); }
.hcc-pyq svg         { color: var(--pink); }
.hcc-mocktests svg   { color: var(--cyan); }
.hcc-progress svg    { color: #7c83ea; }
.hcc-label { color: var(--text); }
.hcc-count { font-size: .74rem; font-weight: 600; color: var(--text3); }
/* "Track your progress" needs an account: a guest's card is muted with a lock and leads to sign-in. */
.home-cat-card { position: relative; }
.home-cat-card.hcc-card-progress { text-align: center; }
.hcc-lock { display: none; position: absolute; top: 10px; right: 10px; color: var(--text2); }
.home-cat-card.is-locked .hcc-lock { display: block; }
.home-cat-card.is-locked .hcc-label { opacity: .55; }
.home-cat-card.is-locked .hcc-icon { opacity: .8; filter: grayscale(.45); }
.home-cat-card.is-locked .hcc-count { color: var(--accent); }

/* ---------- Home split layout (main + sidebar) ---------- */
.home-split { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.home-main-col { min-width: 0; }
.home-sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 90px; }
.home-widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.home-widget-title { font-size: .92rem; font-weight: 800; margin-bottom: 14px; }

.deadline-list { display: flex; flex-direction: column; gap: 4px; }
.deadline-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 8px;
  border-radius: 8px;
  text-align: left;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border);
}
.deadline-item:last-child { border-bottom: none; }
.deadline-item:hover { background: var(--bg3); }
.deadline-item-title {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.deadline-item-time {
  font-size: .76rem;
  font-weight: 800;
  color: var(--green);
  flex-shrink: 0;
  white-space: nowrap;
}
.deadline-item-time.urgent { color: var(--red); animation: urgentPulse 1.8s ease-in-out infinite; }

.trending-list { display: flex; flex-direction: column; gap: 2px; }
.trending-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 6px;
  border-radius: 8px;
  text-align: left;
  font-size: .84rem;
  font-weight: 600;
  color: var(--text2);
  transition: background var(--transition), color var(--transition);
}
.trending-item:hover { background: var(--bg3); color: var(--accent); }
.trending-check {
  width: 18px; height: 18px;
  border-radius: 5px;
  background: rgba(33,168,120,.15);
  color: var(--green);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem;
  font-weight: 900;
  flex-shrink: 0;
}

@media (max-width: 860px) {
  /* minmax(0, ...) so the sidebar's single-line deadline titles ellipsize instead of stretching the column past the screen. */
  .home-split { grid-template-columns: minmax(0, 1fr); }
  .home-sidebar { position: static; }
}

.cat-nav {
  position: sticky;
  top: 62px;
  z-index: 90;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0;
}
.cat-scroll {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 20px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text2);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
  flex-shrink: 0;
  position: relative;
}
.cat-tab:hover { color: var(--text); background: var(--bg2); }
.cat-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.cat-tab svg { opacity: .7; transition: opacity .18s ease, transform .18s ease; }

.cat-tab-icon {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  font-size: .95rem;
  flex-shrink: 0;
  transition: transform .18s ease;
}
.cat-tab:active .cat-tab-icon { transform: scale(.88); }
.cti-jobs        { background: rgba(91,143,224,.15); }
.cti-results     { background: rgba(33,168,120,.15); }
.cti-admit-cards { background: rgba(226,150,44,.15); }
.cti-answer-keys { background: rgba(147,112,200,.15); }
.cti-admissions  { background: rgba(242,152,74,.15); }
.cti-syllabus    { background: rgba(42,169,174,.15); }
.cti-pyq         { background: rgba(201,73,126,.15); }
.cti-mock        { background: rgba(226,150,44,.15); }

.cat-tab-count {
  background: var(--bg3);
  color: var(--text3);
  font-size: .68rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  margin-left: 2px;
}
.cat-tab.active .cat-tab-count { background: rgba(226,150,44,.18); color: var(--accent); }
.cat-tab.active svg { opacity: 1; }
.cat-tab:active svg { transform: scale(.88); }

/* ---------- Main Layout ---------- */
.main-content { padding: 28px 0 48px; }
/* Blog and exam directories: same spacing as a category listing. */
.blog-list-page { padding: 28px 0 48px; }
.main-layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }

/* ---------- Sidebar ---------- */
.sidebar { position: sticky; top: 120px; display: flex; flex-direction: column; gap: 16px; }
.sidebar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.pyq-crosslink-section {
  background: linear-gradient(135deg, rgba(201,73,126,.1), rgba(201,73,126,.03));
  border: 1px solid rgba(201,73,126,.25);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.pyq-crosslink-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.pyq-crosslink-title { font-size: .95rem; font-weight: 800; margin-bottom: 4px; }
.pyq-crosslink-text { font-size: .82rem; color: var(--text2); line-height: 1.5; margin: 0; }
.pyq-crosslink-btn {
  background: linear-gradient(135deg, var(--pink), #db2777);
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  padding: 11px 20px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform .15s ease, box-shadow .15s ease;
}
.pyq-crosslink-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(201,73,126,.3); }
.pyq-crosslink-btn-group { display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }
@media (max-width: 600px) {
  .pyq-crosslink-inner { flex-direction: column; align-items: stretch; }
  .pyq-crosslink-btn { width: 100%; text-align: center; }
}

.sidebar-heading {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 14px;
}
.sidebar-desc { font-size: .8rem; color: var(--text2); margin-bottom: 12px; }

.radio-group { display: flex; flex-direction: column; gap: 10px; }
.radio-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: .88rem;
  color: var(--text2);
  transition: color var(--transition);
}
.radio-opt input { accent-color: var(--accent); width: 15px; height: 15px; }
.radio-opt:hover { color: var(--text); }
.radio-opt input:checked + span { color: var(--accent); font-weight: 600; }

.notify-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 8px;
  transition: all var(--transition);
}
.notify-btn:last-child { margin-bottom: 0; }
.notify-btn.wa { background: rgba(37,211,102,.1); color: #25d366; }
.notify-btn.wa:hover { background: #25d366; color: #fff; }
.notify-btn.tg { background: rgba(41,182,246,.1); color: #29b6f6; }
.notify-btn.tg:hover { background: #29b6f6; color: #fff; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text2);
  border-radius: 16px;
  padding: 4px 11px;
  font-size: .75rem;
  cursor: pointer;
  transition: all var(--transition);
}
.tag-chip:hover { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 600; }
.tag-chip.active { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 600; }
.tag-loading { font-size: .8rem; color: var(--text3); }

/* ---------- Mobile Filter Toggle ---------- */
.mobile-filter-btn {
  display: none;
  align-items: center;
  gap: 6px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: .82rem;
  font-weight: 600;
  padding: 7px 12px;
  cursor: pointer;
  transition: all var(--transition);
}
.mobile-filter-btn:hover,
.mobile-filter-btn.active { background: var(--accent); color: #000; border-color: var(--accent); }

/* ---------- PYQ Card Elements ---------- */
.card.pyq-card::before { opacity: 1; }
.pyq-doc-row { display: flex; gap: 10px; align-items: flex-start; }
.pyq-doc-icon {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: rgba(201,73,126,.15); color: var(--pink);
  display: flex; align-items: center; justify-content: center;
}
.pyq-year-badge {
  background: rgba(201,73,126,.15);
  color: var(--pink);
  border-radius: 4px;
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 8px;
  font-family: var(--font-mono);
}
.pyq-type-badge {
  background: rgba(147,112,200,.15);
  color: var(--purple);
  border-radius: 4px;
  font-size: .72rem;
  font-weight: 600;
  padding: 2px 8px;
  margin-right: 6px;
}
.pyq-subject-line {
  font-size: .78rem;
  color: var(--text3);
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-pdf-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--pink);
  color: #fff;
  border: 1px solid var(--pink);
  border-radius: var(--radius-sm);
  font-size: .8rem;
  font-weight: 700;
  padding: 9px 14px;
  width: 100%;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-pdf-download:hover { filter: brightness(1.1); }
.pyq-card-actions { display: flex; gap: 8px; }
.pyq-card-actions .btn-pdf-download { width: auto; flex: 1; padding: 9px 8px; font-size: .76rem; }
.pyq-card-actions .pyq-attempt-btn { background: var(--accent); border-color: var(--accent); color: #000; }

/* ---------- Sidebar Filters ---------- */
.filter-select {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .82rem;
  padding: 8px 10px;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
}
.filter-select:focus { border-color: var(--accent); }
.filter-select option { background: var(--bg2); }

.domain-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.domain-chip {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text2);
  font-size: .75rem;
  padding: 4px 10px;
  cursor: pointer;
  transition: all var(--transition);
}
.domain-chip:hover { background: var(--accent); color: #000; border-color: var(--accent); }
.domain-chip.active { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 600; }

.sidebar-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  transition: border-color var(--transition);
}
.sidebar-search-box:focus-within { border-color: var(--accent); }
.sidebar-search-box svg { color: var(--text3); flex-shrink: 0; }
.sidebar-search-box input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: .85rem; }
.sidebar-search-box input::placeholder { color: var(--text3); }

/* ---------- PYQ intro banner ---------- */
.pyq-hero {
  display: flex; flex-direction: column; gap: 16px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 24px; margin-bottom: 20px;
}
.pyq-hero-text { display: flex; gap: 14px; align-items: flex-start; }
.pyq-hero-ic {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: rgba(201,73,126,.15); color: var(--pink);
  display: flex; align-items: center; justify-content: center;
}
.pyq-hero-text h1, .pyq-hero-text h2 { font-size: 1.15rem; font-weight: 800; margin-bottom: 4px; font-family: var(--font-display); }
.pyq-hero-text p { font-size: .86rem; color: var(--text2); max-width: 62ch; }
.pyq-exam-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pyq-exam-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 14px; font-size: .84rem; font-weight: 700; color: var(--text2);
  transition: all var(--transition);
}
.pyq-exam-chip:hover { border-color: var(--pink); color: var(--pink); }
.pyq-exam-chip.active { background: var(--pink); color: #fff; border-color: var(--pink); }
@media (max-width: 640px) { .pyq-hero-text { flex-direction: column; } }

.age-range { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.age-range input {
  width: 60px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .82rem;
  padding: 6px 8px;
  outline: none;
  transition: border-color var(--transition);
  -moz-appearance: textfield;
}
.age-range input::-webkit-inner-spin-button,
.age-range input::-webkit-outer-spin-button { -webkit-appearance: none; }
.age-range input:focus { border-color: var(--accent); }
.age-range span { color: var(--text3); font-size: .85rem; }
.age-range button {
  flex: 1;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  font-size: .78rem;
  font-weight: 700;
  padding: 6px 8px;
  cursor: pointer;
  transition: background var(--transition);
}
.age-range button:hover { background: var(--accent-h); }

/* ---------- Modal Source Attribution ---------- */
.source-attribution {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  color: var(--text3);
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.source-attribution a { color: var(--text2); text-decoration: none; }
.source-attribution a:hover { color: var(--accent); }

/* ---------- Cards Header ---------- */
.cards-area { min-width: 0; }
.cards-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.cards-title-row { display: flex; align-items: baseline; gap: 10px; }
.cards-heading { font-size: 1.25rem; font-weight: 700; letter-spacing: -.2px; }
.result-count { font-size: .82rem; color: var(--text3); font-weight: 500; }

.cards-controls { display: flex; align-items: center; gap: 10px; }
.view-btns { display: flex; gap: 4px; }
.view-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  border-radius: 6px;
  padding: 7px 9px;
  line-height: 0;
  transition: all var(--transition);
}
.view-btn.active, .view-btn:hover { background: var(--accent); color: #000; border-color: var(--accent); }

.sort-select {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: .85rem;
  outline: none;
  cursor: pointer;
}
.sort-select:focus { border-color: var(--accent); }

/* ---------- Active Filters ---------- */
.active-filters-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(226,150,44,.1);
  border: 1px solid rgba(226,150,44,.3);
  color: var(--accent);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: .78rem;
  font-weight: 600;
}
.filter-chip button { color: var(--accent); font-size: 1rem; line-height: 1; padding: 0 2px; }
.filter-chip button:hover { color: var(--red); }

/* ---------- Cards Grid ---------- */
.cards-grid { display: grid; gap: 16px; }
.cards-grid[data-view="grid"] { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.cards-grid[data-view="list"] { grid-template-columns: 1fr; }

/* ---------- Job Card ---------- */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: transform .22s cubic-bezier(.2,.8,.3,1), border-color var(--transition), box-shadow .22s ease, background var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  animation: cardIn .38s cubic-bezier(.2,.8,.3,1) backwards;
}
.cards-grid .card:nth-child(1) { animation-delay: .02s; }
.cards-grid .card:nth-child(2) { animation-delay: .06s; }
.cards-grid .card:nth-child(3) { animation-delay: .1s; }
.cards-grid .card:nth-child(4) { animation-delay: .14s; }
.cards-grid .card:nth-child(5) { animation-delay: .18s; }
.cards-grid .card:nth-child(6) { animation-delay: .22s; }
.cards-grid .card:nth-child(n+7) { animation-delay: .24s; }
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--cat-color, var(--accent));
  opacity: 0;
  transition: opacity var(--transition);
}
.card:hover {
  border-color: var(--cat-color, var(--border-light));
  background: var(--card-hover);
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 16px 32px -12px rgba(0,0,0,.35), 0 0 0 1px var(--cat-color, var(--border-light)) inset;
}
.card:hover::before { opacity: 1; }
.card:active { transform: translateY(-1px) scale(1); }

/* Card: List view override */
.cards-grid[data-view="list"] .card {
  flex-direction: row;
  align-items: center;
  padding: 16px 20px;
  gap: 16px;
}
.cards-grid[data-view="list"] .card-main { flex: 1; min-width: 0; }
.cards-grid[data-view="list"] .card-footer { flex-direction: row; align-items: center; flex-shrink: 0; }
.cards-grid[data-view="list"] .card-tags { display: none; }

.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-top-badges { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.new-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .3px;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  color: #000;
  animation: newBadgeGlow 2.2s ease-in-out infinite;
}
@keyframes newBadgeGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(226,150,44,.4); }
  50% { box-shadow: 0 0 0 5px rgba(226,150,44,0); }
}
.cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.cat-badge.jobs      { background: rgba(91,143,224,.15);  color: var(--blue); }
.cat-badge.results   { background: rgba(33,168,120,.15);  color: var(--green); }
.cat-badge.admit-cards { background: rgba(226,150,44,.15); color: var(--accent); }
.cat-badge.answer-keys { background: rgba(147,112,200,.15); color: var(--purple); }
.cat-badge.admissions  { background: rgba(242,152,74,.15); color: var(--orange); }
.cat-badge.syllabus    { background: rgba(42,169,174,.15);  color: var(--cyan); }
.cat-badge.pyq         { background: rgba(201,73,126,.15); color: var(--pink); }

.vacancies-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(226,150,44,.1);
  color: var(--accent);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: .78rem;
  font-weight: 700;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card:hover .card-title { color: var(--accent); }

.card-org {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  color: var(--text2);
}
.card-org svg { opacity: .6; flex-shrink: 0; }

.card-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .78rem;
  color: var(--text2);
}
.meta-item svg { opacity: .7; flex-shrink: 0; }
.meta-item.deadline { font-weight: 600; }
.meta-item.deadline.urgent { color: var(--red); animation: urgentPulse 1.8s ease-in-out infinite; }
.meta-item.deadline.soon { color: var(--orange); }
.meta-item.deadline.ok { color: var(--green); }
.meta-item.deadline.closed { color: var(--text3); }
@keyframes urgentPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}

.card-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  background: var(--bg3);
  color: var(--text2);
  border-radius: 12px;
  padding: 2px 9px;
  font-size: .72rem;
  font-weight: 500;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}
.posted-date { font-size: .74rem; color: var(--text3); }
.btn-view-details {
  background: rgba(91,143,224,.1);
  color: var(--blue);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: .8rem;
  font-weight: 600;
  transition: all var(--transition);
}
.btn-view-details:hover { background: var(--blue); color: #fff; }

/* ---------- Blog ---------- */
.cat-badge.blog { background: rgba(42,169,174,.15); color: var(--cyan); }
.blog-card-emoji { font-size: 1.8rem; line-height: 1; margin-bottom: 2px; }
.blog-card-excerpt {
  font-size: .84rem;
  color: var(--text2);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-search-box { max-width: 320px; width: 100%; }
.blog-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.blog-body p { margin-bottom: 10px; }
.blog-body ul, .blog-body ol { margin: 0 0 10px 20px; }
.blog-body li { margin-bottom: 4px; }

/* ---------- Skeleton ---------- */
.skeleton-card { min-height: 220px; background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); }
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton-card {
  background: linear-gradient(90deg, var(--card) 25%, var(--bg3) 50%, var(--card) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite;
}

/* ---------- Empty / Error ---------- */
.empty-state, .error-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text2);
}
.empty-icon, .error-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3, .error-state h3 { font-size: 1.2rem; margin-bottom: 8px; color: var(--text); }
.empty-state p, .error-state p { font-size: .9rem; margin-bottom: 20px; }
.empty-state button, .error-state button {
  background: var(--accent);
  color: #000;
  font-weight: 700;
  border-radius: 8px;
  padding: 10px 24px;
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.page-btn {
  min-width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 600;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text2);
  transition: all var(--transition);
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); color: #000; border-color: var(--accent); }
.page-btn:disabled { opacity: .35; cursor: not-allowed; }
.page-btn.prev-btn, .page-btn.next-btn { padding: 0 14px; }

/* ---------- Entry Detail Page (full page) ---------- */
.detail-page { padding: 24px 0 60px; min-height: 60vh; }
.detail-back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg3); border: 1px solid var(--border); color: var(--text2);
  border-radius: 8px; padding: 8px 14px; font-size: .85rem; font-weight: 600;
  margin-bottom: 20px; transition: all var(--transition);
}
.detail-back-btn:hover { color: var(--text); border-color: var(--text2); }

.detail-loading {
  padding: 60px;
  text-align: center;
  color: var(--text2);
}
.detail-loading p { margin-top: 16px; font-size: .9rem; }

.detail-content {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  max-width: 860px;
  margin: 0 auto;
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
}
/* Entry page: the article card plus a right-hand panel of internal links. The panel is a
   flex sibling, so while it is empty (display:none) the card stays centred on its own. */
.detail-layout { display: flex; justify-content: center; align-items: flex-start; gap: 24px; }
.detail-layout .detail-content { flex: 0 1 860px; margin: 0; max-width: none; }
.detail-aside {
  flex: 0 0 320px; min-width: 0;
  display: flex; flex-direction: column; gap: 16px;
  position: sticky; top: 90px;
  max-height: calc(100vh - 110px); overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin;
}
.detail-aside:empty { display: none; }
.aside-widget { flex-shrink: 0; overflow-wrap: break-word; word-break: break-word; }
.aside-links { list-style: none; margin: 0; padding: 0; }
.aside-links li { padding: 9px 0; border-bottom: 1px solid var(--border); }
.aside-links li:first-child { padding-top: 0; }
.aside-links li:last-child { padding-bottom: 0; border-bottom: none; }
.aside-links a { font-size: .84rem; font-weight: 600; line-height: 1.4; color: var(--text); }
.aside-links a:hover { color: var(--accent); }
.aside-kind { display: block; margin-bottom: 2px; font-size: .68rem; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .4px; }
.aside-more { display: inline-block; margin-top: 12px; font-size: .8rem; font-weight: 700; color: var(--accent); }
.aside-more:hover { text-decoration: underline; }

/* Practice banner: the panel's ad for PYQ papers and mock tests. Navy with an orange glow in
   both themes (own colours, not theme variables) so it stands out from the plain widgets. */
.practice-banner {
  position: relative; overflow: hidden; flex-shrink: 0;
  padding: 20px 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(226,150,44,.4);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(226,150,44,.3), transparent 55%),
    linear-gradient(160deg, #1d2f5e 0%, #142348 55%, #0c1531 100%);
  color: #eef1f8;
  box-shadow: 0 10px 28px rgba(12,21,49,.28);
}
.practice-banner::after {
  content: '📝'; position: absolute; right: -4px; bottom: -16px;
  font-size: 5.5rem; line-height: 1; opacity: .08; transform: rotate(-12deg); pointer-events: none;
}
.practice-banner > * { position: relative; z-index: 1; }
.practice-banner-badge {
  display: inline-block; margin-bottom: 12px; padding: 3px 10px; border-radius: 999px;
  background: rgba(226,150,44,.16); border: 1px solid rgba(226,150,44,.5);
  color: #f3b45a; font-size: .68rem; font-weight: 800; letter-spacing: .6px; text-transform: uppercase;
}
.practice-banner-title {
  margin: 0 0 6px; font-family: var(--font-display); font-size: 1.2rem; font-weight: 800;
  line-height: 1.25; letter-spacing: -.2px; color: #fff;
}
.practice-banner-text { margin: 0 0 14px; font-size: .8rem; line-height: 1.5; color: #c3cde4; }
.practice-banner-actions { display: flex; flex-direction: column; gap: 8px; }
.practice-banner-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 14px; border-radius: 10px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.28); color: #fff;
  font-size: .88rem; font-weight: 800; text-align: center;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.practice-banner-btn:hover { background: rgba(255,255,255,.16); transform: translateY(-1px); }
.practice-banner-btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-h)); border-color: transparent; color: #000;
  box-shadow: 0 4px 14px rgba(226,150,44,.35);
}
.practice-banner-btn.primary:hover { box-shadow: 0 6px 20px rgba(226,150,44,.5); }
@media (max-width: 1100px) {
  /* Not enough room beside the card: the panel stacks under it, like the old bottom block. */
  .detail-layout { flex-direction: column; align-items: stretch; }
  .detail-layout .detail-content, .detail-aside { flex: none; width: 100%; max-width: 860px; margin: 0 auto; }
  .detail-aside { position: static; max-height: none; overflow: visible; }
}

.modal-cat { margin-bottom: 10px; }
.modal-title { font-size: 1.4rem; font-weight: 800; line-height: 1.3; margin-bottom: 6px; letter-spacing: -.3px; overflow-wrap: break-word; word-break: break-word; }
.modal-org { display: flex; align-items: center; gap: 6px; color: var(--text2); font-size: .9rem; margin-bottom: 20px; overflow-wrap: break-word; word-break: break-word; }

/* Modal quick stats */
.modal-quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.qs-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 16px;
  text-align: center;
}
.qs-val { font-size: 1.3rem; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.qs-lbl { font-size: .8rem; color: var(--text2); font-weight: 500; text-transform: uppercase; letter-spacing: .4px; }

.modal-section { margin-bottom: 22px; }
.modal-section-title {
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.data-table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.data-table th {
  text-align: left;
  padding: 9px 12px;
  background: var(--bg3);
  color: var(--text2);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.data-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); color: var(--text); overflow-wrap: break-word; word-break: break-word; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg3); }

.misc-list { margin: 0; padding-left: 20px; font-size: .87rem; color: var(--text); line-height: 1.8; list-style: disc; }
.misc-list li { overflow-wrap: break-word; word-break: break-word; }

/* "Additional Information": label/value rows with a shaded label column, and
   nested objects get the same treatment so they read as a structured block. */
.kv-table th {
  width: 34%;
  text-align: left;
  padding: 9px 12px;
  background: var(--bg3);
  color: var(--text2);
  font-size: .82rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  border-bottom: 1px solid var(--border);
}
.kv-table tr:last-child th { border-bottom: none; }
.kv-table td { vertical-align: top; }
.kv-table tr:hover td { background: transparent; }
.kv-table .kv-table { margin: 2px 0; }
.kv-table .kv-table th { width: 30%; }
@media (max-width: 560px) {
  .kv-table th { width: 40%; }
}

.modal-desc { font-size: .9rem; color: var(--text2); line-height: 1.7; overflow-wrap: break-word; word-break: break-word; }

/* ---------- Admin rich-text content ---------- */
.rich-content h2, .rich-content h3, .rich-content h4 { color: var(--text); line-height: 1.35; margin: 18px 0 8px; }
.rich-content h2 { font-size: 1.2rem; }
.rich-content h3 { font-size: 1.05rem; }
.rich-content h4 { font-size: .95rem; }
.rich-content > :first-child { margin-top: 0; }
.rich-content p { margin: 0 0 10px; }
.rich-content ul, .rich-content ol { margin: 0 0 10px 22px; }
.rich-content li { margin-bottom: 4px; }
.rich-content strong, .rich-content b { color: var(--text); }
.rich-content a { color: var(--blue); text-decoration: underline; }
.rich-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 8px 0; }
.rich-content blockquote { border-left: 3px solid var(--border); padding-left: 12px; margin: 0 0 10px; }
.rich-content hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
/* Highlighted text keeps dark ink so it stays readable in dark mode. */
.rich-content mark, .rich-content [style*="background-color"] { color: #1a1a1a; }
.rich-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 12px; }
.rich-content table { border-collapse: collapse; width: 100%; font-size: .87rem; }
.rich-content th, .rich-content td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; color: var(--text); }
.rich-content th { background: var(--bg3); font-weight: 600; }
.rich-content td p, .rich-content th p { margin: 0; }

.modal-links { display: flex; flex-direction: column; gap: 8px; }
.modal-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: .87rem;
  color: var(--blue);
  transition: all var(--transition);
}
.modal-link:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.modal-link span { font-weight: 600; }

.faq-item { margin-bottom: 8px; }
.faq-q {
  width: 100%;
  text-align: left;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--transition);
}
.faq-q:hover { background: var(--card-hover); }
.faq-q.open { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.faq-a {
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: none;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  padding: 12px 14px;
  font-size: .85rem;
  color: var(--text2);
  line-height: 1.6;
  display: none;
}
.faq-a.open { display: block; }

.modal-footer-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
  flex-wrap: wrap;
}
/* Show/hide password button (js/password-toggle.js wraps each password input) */
.pw-field { position: relative; }
.pw-field > input[type] { display: block; padding-right: 44px; }
.pw-field > input::-ms-reveal, .pw-field > input::-ms-clear { display: none; } /* Edge draws its own eye otherwise */
.pw-toggle {
  position: absolute; top: 0; right: 0; width: 42px; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text3); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: color var(--transition);
}
.pw-toggle:hover { color: var(--text); }
.pw-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pw-toggle .pw-eye-off, .pw-toggle[aria-pressed="true"] .pw-eye { display: none; }
.pw-toggle[aria-pressed="true"] .pw-eye-off { display: block; }
.btn-secondary {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: .9rem;
  transition: all var(--transition);
}
.btn-secondary:hover { border-color: var(--text2); color: var(--text); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-h));
  color: #000;
  border-radius: 8px;
  padding: 10px 24px;
  font-weight: 700;
  font-size: .9rem;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(226,150,44,.25);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(226,150,44,.35); }
.btn-primary:active { transform: translateY(0); }
.btn-primary.disabled, .btn-primary:disabled { opacity: .5; pointer-events: none; box-shadow: none; }
.btn-secondary.disabled, .btn-secondary:disabled { opacity: .5; pointer-events: none; }

/* ---------- Spinner ---------- */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Scroll to top ---------- */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 250;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(226,150,44,.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(.85);
  transition: opacity .25s ease, transform .25s ease, visibility .25s, background .15s;
}
.scroll-top-btn.visible { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.scroll-top-btn:hover { background: var(--accent-h); transform: translateY(-3px) scale(1.05); }

/* ---------- Toast ---------- */
.toast-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 18px;
  font-size: .88rem;
  color: var(--text);
  box-shadow: var(--shadow);
  animation: slideIn .2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 320px;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast-icon { font-size: 1rem; flex-shrink: 0; }
.toast.toast-out { animation: slideOut .22s ease forwards; }
@keyframes slideIn { from { opacity: 0; transform: translateX(120%); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(40px); } }

/* ---------- Footer ---------- */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 48px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.2fr 1fr;
  gap: 40px;
}
.footer-brand .logo-name { font-size: 1.3rem; color: var(--text); font-weight: 800; }
.footer-brand .logo-tag { font-size: .66rem; }
.footer-brand p { font-size: .83rem; color: var(--text2); margin: 14px 0 18px; line-height: 1.7; }
.footer-socials { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-col h4 { font-size: .85rem; font-weight: 700; color: var(--text); margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 9px; }
.footer-col ul li a { font-size: .83rem; color: var(--text2); transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); }
.footer-bottom .disclaimer { max-width: 900px; }
.disclaimer { font-size: .78rem; color: var(--text3); line-height: 1.7; margin-bottom: 14px; }
.footer-copy { font-size: .75rem; color: var(--text3); }

/* ---------- Responsive ---------- */
/* Compact header (phones, tablets and narrow laptop windows): what the old hamburger menu held (search, WhatsApp,
   Telegram, language, account) is a row of icons beside the logo, and the nav links give way to the category tabs. */
@media (max-width: 1200px) {
  .header-search-wrap { display: none; }
  .header-inner { gap: 8px; }
  .header-actions { --hdr-btn: 34px; gap: 6px; }
  .mob-only { display: flex; }
  .header-alert-text, .lang-toggle, .signup-btn { display: none; }
  /* Flatten the alert block so the channel links join the strip as ordinary items and can be ordered with the rest. */
  .header-alert-block, .header-social-row { display: contents; }
  #mobSearchBtn { order: 1; }
  .header-actions .social-btn.wa { order: 2; }
  .header-actions .social-btn.tg { order: 3; }
  #langBtn { order: 4; }
  #themeToggleBtn { order: 5; }
  .guest-menu, #userMenu { order: 6; }
  .guest-menu { display: block; }
  .header-actions .social-btn { width: var(--hdr-btn); height: var(--hdr-btn); padding: 0; justify-content: center; border-radius: 50%; }
  .header-actions .social-btn span { display: none; }
  .user-menu-trigger { padding: 0; border: 0; background: none; }
  .user-menu-trigger .user-avatar { width: var(--hdr-btn); height: var(--hdr-btn); }
  .user-menu-name, .user-menu-chevron { display: none; }
}

@media (max-width: 1100px) {
  .main-layout { grid-template-columns: 220px 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .main-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; display: none; }
  .sidebar.mobile-open { display: flex; margin-bottom: 16px; }
  .mobile-filter-btn { display: flex; }
  .cat-scroll { padding: 0 10px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cards-grid[data-view="grid"] { grid-template-columns: 1fr; }
  /* Home-page previews (mock tests, PYQ, jobs, results...): one card per row, like the listing grid above. */
  .home-preview-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  .hero { padding: 40px 0 36px; }
  .hero-title { font-size: clamp(1.1rem, 6.2vw, 1.7rem); }
  .hero-search-box { padding: 6px 6px 6px 14px; }
  #heroSearchBtn { padding: 10px 16px; }
  .stats-row { gap: 0; }
  .stat-item { padding: 8px 10px; }
  .stat-num { font-size: 1.2rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .cards-header { flex-direction: column; align-items: flex-start; }
  .detail-content { padding: 20px; border-radius: 12px; }
  /* Popular-exam chips stay on phones: one scrollable row instead of being hidden. */
  .popular-tags { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin-inline: -2px; padding-bottom: 2px; }
  .popular-tags::-webkit-scrollbar { display: none; }
  .popular-tags span, .popular-tags button { flex-shrink: 0; white-space: nowrap; }
}

/* Header fit on small phones: six icons beside the logo, so tighten the gutters and shrink the buttons in steps. */
@media (max-width: 430px) {
  .header .container { padding: 0 12px; }
  .header-inner { gap: 6px; }
  .header-actions { --hdr-btn: 32px; gap: 4px; }
  .logo { gap: 6px; }
  .logo-icon svg { width: 32px; height: 32px; }
  .logo-name { font-size: 1.05rem; }
}
@media (max-width: 374px) {
  .header-actions { --hdr-btn: 30px; gap: 3px; }
}
@media (max-width: 354px) {
  .header-actions { --hdr-btn: 28px; gap: 2px; }
  .logo-icon svg { width: 28px; height: 28px; }
  .logo-name { font-size: .95rem; }
}

/* ---------- Stats strip: superseded by the category ledger below the hero ---------- */
.stats-strip { display: none; }

/* ---------- Hero: two-column layout with the Study Planner teaser ---------- */
.hero-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 48px;
  align-items: center;
  position: relative;
}
.hero-content-grid .hero-content { text-align: left; margin: 0; max-width: none; }
.hero-visual { display: flex; align-items: center; justify-content: center; }
.pstack { position: relative; display: block; width: 100%; max-width: 320px; height: 360px; color: inherit; border-radius: var(--radius); }
.pstack-card {
  position: absolute; inset: 0 auto auto 0; width: 260px; display: block;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 18px 16px; box-shadow: var(--shadow);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .3s ease;
}
.pstack-c1 { transform: rotate(-8deg) translate(14px, 46px); opacity: .7; filter: saturate(.7); }
.pstack-c2 { transform: rotate(5deg) translate(46px, 10px); opacity: .85; filter: saturate(.85); }
.pstack-c3 { transform: rotate(-2deg) translate(18px, 0); z-index: 2; }
.pstack:hover .pstack-c3, .pstack:focus-visible .pstack-c3 { transform: rotate(-1deg) translate(18px, -7px); }
.pstack:hover .pstack-c2, .pstack:focus-visible .pstack-c2 { transform: rotate(7deg) translate(56px, 8px); }
.pstack:hover .pstack-c1, .pstack:focus-visible .pstack-c1 { transform: rotate(-10deg) translate(8px, 52px); }
.pstack:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.pstack-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 12px; }
.pstack-org { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text3); }
.pstack-stamp {
  font-family: var(--font-mono); font-size: .6rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--red);
  border: 1px solid var(--red); border-radius: 5px; padding: 2px 6px; transform: rotate(4deg); white-space: nowrap; flex-shrink: 0;
}
.pstack-stamp.ok { color: var(--green); border-color: var(--green); }
.pstack-title { display: block; font-family: var(--font-display); font-weight: 700; font-size: .96rem; margin-bottom: 10px; line-height: 1.3; }
.pstack-big { display: block; font-family: var(--font-display); font-weight: 700; font-size: .95rem; line-height: 1.3; }
.pstack-big b { font-family: var(--font-mono); font-weight: 600; color: var(--accent); }
.pstack-rows { display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; }
.pstack-row { display: grid; grid-template-columns: 13px 1fr 52px; gap: 8px; align-items: center; font-size: .7rem; color: var(--text2); }
.pstack-row i { width: 13px; height: 13px; border-radius: 4px; border: 1.5px solid var(--border-light); }
.pstack-row i.done { background: var(--green); border-color: var(--green); }
.pstack-row em { font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pstack-row u { position: relative; height: 5px; border-radius: 9px; background: var(--bg3); text-decoration: none; }
.pstack-row u::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit; background: var(--accent); }
.pstack-meta {
  display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: .7rem;
  color: var(--text2); border-top: 1px dashed var(--border-light); padding-top: 9px;
}
.pstack-meta b { color: var(--accent); font-weight: 700; }
/* Catchier planner card: accent top edge, glow, floating motion, filling bars, pulsing NEW, solid CTA */
.pstack-c3 {
  border-color: var(--accent); overflow: hidden;
  box-shadow: var(--shadow), 0 0 0 4px rgba(245, 158, 11, .14), 0 18px 40px -12px rgba(245, 158, 11, .45);
  animation: pstack-float 5s ease-in-out infinite;
}
.pstack-c3::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 5px;
  background: linear-gradient(90deg, var(--accent), #ef6a3a, #e2497e);
}
.pstack:hover .pstack-c3, .pstack:focus-visible .pstack-c3 { animation-play-state: paused; }
.pstack-c3 .pstack-org { color: var(--accent); }
.pstack-c3 .pstack-stamp { background: var(--red); color: #fff; animation: pstack-pulse 1.8s ease-in-out infinite; }
.pstack-title { font-size: 1.05rem; }
.pstack-title mark {
  background: linear-gradient(transparent 58%, rgba(245, 158, 11, .35) 58%); color: inherit; padding: 0 2px; border-radius: 2px;
}
.pstack-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pstack-chip {
  font-size: .64rem; font-weight: 700; padding: 3px 8px; border-radius: 20px;
  background: rgba(245, 158, 11, .14); color: var(--accent);
}
.pstack-chip.alt { background: rgba(33, 168, 120, .14); color: var(--green); }
.pstack-row u::after { animation: pstack-fill 1.2s .3s cubic-bezier(.2, .8, .2, 1) both; background: linear-gradient(90deg, var(--accent), #ef6a3a); }
.pstack-row i.done { animation: pstack-pop .5s .2s both; }
.pstack-cta {
  display: flex; justify-content: space-between; align-items: center; margin-top: 4px;
  background: var(--accent); color: #10131a; font-weight: 800; font-size: .8rem;
  padding: 9px 12px; border-radius: 9px; transition: filter .2s;
}
/* "Try it now" nudge: the one-line promise under the headline, a gently pulsing button, and a no-friction note below it */
.pstack-sub { display: block; font-size: .72rem; line-height: 1.4; color: var(--text2); margin: -4px 0 10px; }
.pstack-sub b { color: var(--green); font-weight: 800; white-space: nowrap; }
.pstack-note { display: block; text-align: center; font-size: .64rem; font-weight: 600; color: var(--text3); margin-top: 8px; }
.pstack-cta { font-size: .88rem; animation: pstack-cta-glow 2.2s ease-in-out infinite; }
.pstack:hover .pstack-cta { animation-play-state: paused; }
.pstack-cta b { display: inline-block; transition: transform .25s; }
.pstack:hover .pstack-cta { filter: brightness(1.08); }
.pstack:hover .pstack-cta b { transform: translateX(5px); }
@keyframes pstack-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes pstack-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .5); } 50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); } }
@keyframes pstack-cta-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, .55); } 50% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); } }
@keyframes pstack-fill { from { width: 0; } }
@keyframes pstack-pop { 0% { transform: scale(.4); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .pstack-c3, .pstack-c3 .pstack-stamp, .pstack-cta, .pstack-row u::after, .pstack-row i.done { animation: none; }
}
@media (max-width: 960px) {
  .hero-content-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-content-grid .hero-content { text-align: center; }
  .pstack { height: 255px; max-width: 240px; margin: 24px auto 0; }
  .pstack-card { width: 218px; padding: 14px 14px 12px; }
  .pstack-rows, .pstack-sub { display: none; }
  .pstack-title { font-size: .9rem; }
  .pstack-top { margin-bottom: 9px; }
  .pstack-org { white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  .pstack-card { transition: none; }
}
/* The Uttarakhand Exam Guide ad reuses the .pstack card with its own look: one upright navy card with a gold
   glow (the palette of the practice banner on entry pages), the guide's keywords as chips, and a stat strip.
   Everything is scoped to .pstack-guide / .pg-*, so the Study Planner card (same .pstack styles) is unchanged. */
.pstack-guide { height: auto; max-width: 300px; margin: 0 auto; }
.pstack-guide .pstack-c3 {
  position: relative; inset: auto; width: 100%; transform: none;
  padding: 22px 20px 18px; color: #eef1f8; border-color: rgba(226, 150, 44, .55);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(226, 150, 44, .34), transparent 55%),
    linear-gradient(165deg, #1f3466 0%, #142348 55%, #0c1531 100%);
  box-shadow: 0 0 0 4px rgba(226, 150, 44, .16), 0 22px 44px -14px rgba(12, 21, 49, .6);
}
.pstack-guide:hover .pstack-c3, .pstack-guide:focus-visible .pstack-c3 { transform: translateY(-4px); }
.pstack-guide .pstack-top { align-items: center; margin-bottom: 8px; }
.pg-ask { font-size: .72rem; font-weight: 600; line-height: 1.3; color: #aebbd6; }
.pstack-guide .pstack-title { font-size: 1.7rem; font-weight: 800; line-height: 1.1; letter-spacing: -.3px; color: #fff; margin-bottom: 12px; }
/* inline-block keeps "Exam Guide" together, so the headline breaks as "Uttarakhand" / "Exam Guide" */
.pstack-guide .pstack-title mark { display: inline-block; background: linear-gradient(transparent 82%, #f6c35b 82%); color: inherit; padding: 0 2px; }
.pg-offer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.pg-offer b {
  padding: 4px 11px; border-radius: 999px; background: linear-gradient(135deg, #f8cf6e, #e2962c); color: #1a1203;
  font-size: .78rem; font-weight: 900; letter-spacing: .05em; box-shadow: 0 4px 14px rgba(226, 150, 44, .4);
}
.pg-offer span { font-size: .78rem; font-weight: 800; color: #8fe3c0; }
.pstack-guide .pstack-chips { gap: 6px; margin-bottom: 14px; }
.pstack-guide .pstack-chip { padding: 4px 9px; font-size: .68rem; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .2); color: #eef1f8; }
.pg-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 14px; padding: 9px 0; text-align: center;
  border-top: 1px dashed rgba(255, 255, 255, .2); border-bottom: 1px dashed rgba(255, 255, 255, .2);
  font-size: .66rem; font-weight: 600; color: #aebbd6;
}
.pg-stats b { display: block; font-family: var(--font-mono); font-size: 1rem; font-weight: 700; color: #f6c35b; }
.pstack-guide .pstack-cta { margin-top: 0; }
@media (max-width: 960px) {
  .pstack-guide { margin-top: 24px; }
}

/* ---------- Why RozReady (trust cards) ---------- */
.trust-section { padding: 8px 0 40px; }
.trust-section h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: 18px; text-align: center; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.trust-card { padding: 22px 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); }
.trust-ic {
  width: 40px; height: 40px; border-radius: 10px; background: rgba(226,150,44,.15); color: var(--accent);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.trust-card h3 { font-size: .98rem; font-weight: 700; margin-bottom: 6px; font-family: var(--font-display); }
.trust-card p { font-size: .84rem; color: var(--text2); }
@media (max-width: 860px) { .trust-grid { grid-template-columns: 1fr; } }

/* ---------- Alerts CTA banner ---------- */
.alert-banner-section { padding: 0 0 44px; }
.alert-banner {
  background: linear-gradient(120deg, var(--bg) 0%, var(--bg3) 100%);
  border: 1px solid var(--border);
  border-radius: 20px; padding: 36px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  position: relative; overflow: hidden;
}
.alert-banner::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(50% 90% at 90% 10%, rgba(226,150,44,.18), transparent 70%);
  /* Decorative glow only: it sits over the buttons (it comes later in paint order), so without this
     it swallowed every click meant for the WhatsApp / Telegram buttons. */
  pointer-events: none;
}
.alert-copy { position: relative; max-width: 480px; }
.alert-copy h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: 8px; color: var(--text); }
.alert-copy p { font-size: .86rem; color: var(--text2); }
.alert-btns { display: flex; gap: 10px; position: relative; flex-shrink: 0; }
.alert-btn { display: flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: var(--radius-sm); font-weight: 700; font-size: .85rem; }
.alert-btn.wa { background: #25D366; color: #04220f; }
.alert-btn.tg { background: #2AABEE; color: #04182a; }
@media (max-width: 760px) {
  .alert-banner { flex-direction: column; align-items: flex-start; padding: 28px 24px; }
  .alert-btns { width: 100%; }
  .alert-btn { flex: 1; justify-content: center; }
}

/* ================= Mock Tests ================= */
.mock-page { padding: 28px 0 60px; }

/* ---- Browse list (/mock-tests): reuses the PYQ list layout and cards ---- */
.mock-list-layout { margin-top: 18px; }
.mock-sidebar .filter-select { width: 100%; max-width: 100%; text-overflow: ellipsis; }
.cat-badge.mock { background: rgba(147,112,200,.15); color: var(--purple); }
.mock-card .mock-card-link { color: inherit; text-decoration: none; }
.mock-card .mock-card-link:hover { color: var(--accent); }
.mock-card-meta { margin-top: 8px; font-size: .78rem; font-weight: 600; color: var(--text3); }

/* ---- Per-paper test intro (/mock-tests/<slug>) ---- */
.mock-intro { max-width: 760px; margin: 0 auto 32px; }
.mock-intro-title { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; line-height: 1.3; color: var(--text); margin: 0 0 16px; }
.mock-intro-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 18px;
}
.mock-intro-facts > div { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; }
.mock-intro-facts dt { font-size: .72rem; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .04em; }
.mock-intro-facts dd { margin: 2px 0 0; font-size: .95rem; font-weight: 600; color: var(--text); }
.mock-intro-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; margin-bottom: 8px; }
.mock-intro-start { flex: 1 1 220px; justify-content: center; }
.mock-intro-actions .attempt-view-btn { flex: 0 1 auto; justify-content: center; padding: 10px 18px; }
.mock-intro .pyq-detail-attempt .attempt-status { margin: 0 0 12px; }
.mock-intro-section { margin-top: 24px; }
.mock-intro-section h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--text); margin: 0 0 8px; }
.mock-intro-section p, .mock-intro-section li { font-size: .92rem; line-height: 1.65; color: var(--text2); }
.mock-intro-section ul { margin: 0; padding-left: 20px; }
.mock-intro-section a { color: var(--accent); font-weight: 600; }
.related-entry-kind { display: inline-block; margin-right: 4px; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text3); }
@media (min-width: 640px) { .mock-intro-start { flex: 0 1 auto; min-width: 220px; } }

/* ---- Quiz ---- */
.mock-quiz-header { display: flex; align-items: center; justify-content: space-between; max-width: 1100px; margin: 0 auto 14px; flex-wrap: wrap; gap: 8px; }
.mock-quiz-progress { font-size: .88rem; color: var(--text2); font-weight: 600; }
.mock-quiz-progress b { color: var(--text); font-family: var(--font-mono); }
.mock-quiz-timer {
  font-family: var(--font-mono); font-weight: 700; font-size: .92rem;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 5px 12px;
  color: var(--text);
}
.mock-quiz-timer.low { color: var(--red); border-color: var(--red); background: rgba(227,93,93,.1); }
.mock-back-to-paper {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: none; color: var(--text2);
  font-size: .85rem; font-weight: 600; cursor: pointer; padding: 4px 0;
  transition: color var(--transition);
}
.mock-back-to-paper:hover { color: var(--accent); }

.mock-quiz-layout { display: flex; align-items: stretch; gap: 24px; max-width: 1100px; margin: 0 auto; }
.mock-quiz-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.mock-quiz-sidebar {
  flex: 0 0 300px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; position: sticky; top: 84px;
  display: flex; flex-direction: column;
}

.mock-progress-bar { margin: 0 0 22px; height: 5px; border-radius: 3px; background: var(--bg3); overflow: hidden; }
.mock-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-h)); transition: width .25s ease; }

/* Fixed (not content-dependent) height, with its own scroll for long
   passages — keeps the action bar below it at a constant position instead
   of jumping around as question length varies, and makes short questions
   fill the available page height instead of leaving it mostly blank. */
.mock-question-card {
  margin: 0 0 18px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px;
  height: clamp(420px, calc(100vh - 300px), 640px);
  overflow-y: auto;
}
.mock-remark-badge {
  display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  background: rgba(226,150,44,.15); color: var(--accent); border-radius: 20px; padding: 3px 10px; margin-bottom: 12px;
}
.bi-en, .bi-hi { display: block; }
.bi-hi { margin-top: 4px; font-weight: 500; opacity: .88; }
.mock-question-text { font-size: 1.05rem; font-weight: 700; line-height: 1.5; margin-bottom: 20px; font-family: var(--font-display); }
/* A line break typed into a question or option (e.g. between "Statement I" and "Statement II") shows as one. */
.mock-question-text, .mock-option-text { white-space: pre-line; }
.mock-question-img { display: block; max-width: 100%; height: auto; margin: 4px 0 20px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
.mock-option-text .mock-question-img { margin: 6px 0 0; max-height: 120px; width: auto; }
.mock-options { display: flex; flex-direction: column; gap: 10px; }
.mock-option {
  display: flex; align-items: center; gap: 12px; text-align: left;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px;
  background: var(--bg2); color: var(--text); font-size: .92rem; transition: all var(--transition); cursor: pointer;
}
.mock-option:hover { border-color: var(--accent); }
.mock-option-letter {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700; font-family: var(--font-mono);
  background: var(--bg3); color: var(--text2); border: 1px solid var(--border);
}
.mock-option.selected { border-color: var(--accent); background: rgba(226,150,44,.1); }
.mock-option.selected .mock-option-letter { background: var(--accent); color: #241703; border-color: var(--accent); }
.mock-option.correct { border-color: var(--green); background: rgba(33,168,120,.12); }
.mock-option.correct .mock-option-letter { background: var(--green); color: #fff; border-color: var(--green); }
.mock-option.incorrect { border-color: var(--red); background: rgba(227,93,93,.12); }
.mock-option.incorrect .mock-option-letter { background: var(--red); color: #fff; border-color: var(--red); }
.mock-option[disabled] { cursor: default; }

.mock-quiz-actionbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.mock-quiz-actionbar-left, .mock-quiz-actionbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn-mark {
  background: rgba(147,112,200,.12); border: 1px solid var(--purple); color: var(--purple);
  border-radius: 8px; padding: 10px 18px; font-weight: 600; font-size: .9rem; transition: all var(--transition);
}
.btn-mark:hover { background: rgba(147,112,200,.2); }

.mock-palette-heading { font-size: 1rem; font-weight: 800; font-family: var(--font-display); color: var(--text); }
.mock-palette-label { font-size: .78rem; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .03em; margin: 10px 0; }
.mock-palette-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 18px;
  max-height: 280px; overflow-y: auto; padding-right: 4px;
}
.mock-palette-grid::-webkit-scrollbar { width: 6px; }
.mock-palette-grid::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
.mock-palette-btn {
  aspect-ratio: 1; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; font-family: var(--font-mono);
  background: var(--bg2); border: 1px solid var(--border); color: var(--text2); cursor: pointer;
  transition: all var(--transition);
}
.mock-palette-btn.not-answered { background: rgba(227,93,93,.14); border-color: var(--red); color: var(--red); }
.mock-palette-btn.answered { background: rgba(33,168,120,.16); border-color: var(--green); color: var(--green); }
.mock-palette-btn.marked { background: rgba(147,112,200,.18); border-color: var(--purple); color: var(--purple); }
.mock-palette-btn.answered-marked {
  background: rgba(147,112,200,.18); border-color: var(--purple); color: var(--purple);
  box-shadow: inset 0 0 0 2px var(--green);
}
.mock-palette-btn.current { outline: 2px solid var(--accent); outline-offset: 1px; }

.mock-legend { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid var(--border); margin-bottom: 16px; }
.mock-legend-item { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--text2); }
.mock-legend-swatch { width: 20px; height: 20px; border-radius: 5px; flex-shrink: 0; border: 1px solid var(--border); }
.mock-legend-swatch.answered { background: var(--green); border-color: var(--green); }
.mock-legend-swatch.not-answered { background: var(--red); border-color: var(--red); }
.mock-legend-swatch.marked { background: var(--purple); border-color: var(--purple); }
.mock-legend-swatch.answered-marked { background: var(--purple); border-color: var(--purple); box-shadow: inset 0 0 0 3px var(--green); }
.mock-legend-swatch.not-visited { background: var(--bg2); }

.mock-submit-btn { width: 100%; justify-content: center; margin-top: auto; }

.btn-report {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 1px solid var(--border); color: var(--text2);
  border-radius: 8px; padding: 10px 16px; font-weight: 600; font-size: .9rem;
  transition: all var(--transition); cursor: pointer;
}
.btn-report:hover { border-color: var(--red); color: var(--red); }
.btn-report svg { flex-shrink: 0; }

/* ---- Report a question modal ---- */
.report-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  z-index: 1000; opacity: 0; visibility: hidden; transition: opacity .2s ease;
}
.report-modal-overlay.open { opacity: 1; visibility: visible; }
.report-modal {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  max-width: 440px; width: 100%; max-height: 85vh; overflow-y: auto; padding: 24px;
}
.report-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.report-modal-head h3 { font-size: 1.05rem; font-weight: 800; font-family: var(--font-display); }
.report-modal-close { background: none; border: none; color: var(--text2); font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 4px; }
.report-modal-close:hover { color: var(--text); }
.report-reason-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.report-reason-item {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px;
  font-size: .88rem; color: var(--text); cursor: pointer; transition: all var(--transition);
}
.report-reason-item:hover { border-color: var(--accent); }
.report-reason-item input { accent-color: var(--accent); }
.report-details {
  width: 100%; resize: vertical; min-height: 70px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; font-family: var(--font-body); font-size: .88rem; color: var(--text);
}
.report-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

/* ---- Results ---- */
.mock-score-card {
  max-width: 480px; margin: 0 auto 32px; text-align: center;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 24px;
}
.mock-score-num { font-family: var(--font-mono); font-size: 2.6rem; font-weight: 700; color: var(--accent); line-height: 1; }
.mock-score-label { font-size: .92rem; color: var(--text2); margin: 8px 0 22px; }
.mock-score-actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; max-width: 320px; margin: 0 auto; }
/* .btn-primary is inline-flex, so in this stretched column its label sat at the left edge. */
.mock-score-actions .btn-primary { justify-content: center; }
.mock-review-heading { max-width: 720px; margin: 0 auto 14px; font-size: 1.1rem; font-weight: 800; font-family: var(--font-display); }
#mockReviewList { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.mock-review-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.mock-review-item .mock-question-text { font-size: .96rem; margin-bottom: 14px; }
.mock-review-item .mock-options { gap: 8px; }
.mock-review-item .mock-option { cursor: default; padding: 10px 13px; font-size: .86rem; }
.mock-review-explain {
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border-light);
  font-size: .84rem; color: var(--text2); line-height: 1.6;
}
.mock-review-explain b { color: var(--text); }

@media (max-width: 900px) {
  .mock-quiz-layout { flex-direction: column; }
  .mock-quiz-sidebar { flex: 1 1 auto; width: 100%; position: static; order: 2; }
}

@media (max-width: 640px) {
  .mock-question-card, .mock-review-item { padding: 18px; }
  .mock-quiz-actionbar { flex-wrap: wrap; }
}

/* ---- Exam mode: while attempting, the quiz is a full-screen dialog ----
   Covers the site header, nav, footer and everything else, so only the
   question, palette, timer and actions are on screen (see enterExamMode). */
body.exam-mode { overflow: hidden; }
body.exam-mode #mockQuizView {
  position: fixed; inset: 0; z-index: 900;
  background: var(--bg);
  overflow-y: auto; overscroll-behavior: contain;
  padding: 24px 28px 32px;
}
body.exam-mode .mock-quiz-header,
body.exam-mode .mock-quiz-layout { max-width: 1320px; }
body.exam-mode .mock-quiz-header { margin-bottom: 18px; }
body.exam-mode .mock-quiz-sidebar { top: 0; }
body.exam-mode .mock-question-card { height: clamp(360px, calc(100vh - 230px), 760px); }
body.exam-mode .toast-wrap { z-index: 1100; }
body.exam-mode .scroll-top-btn { display: none; }

@media (max-width: 640px) {
  body.exam-mode #mockQuizView { padding: 14px 16px 24px; }
  body.exam-mode .mock-question-card { height: auto; min-height: 280px; }
}

/* ---- Back links (setup / results) ---- */
.mock-back-link {
  display: inline-flex; align-items: center; gap: 4px; margin-bottom: 16px;
  background: none; border: none; color: var(--text2);
  font-size: .85rem; font-weight: 600; cursor: pointer; padding: 4px 0;
  transition: color var(--transition);
}
.mock-back-link:hover { color: var(--accent); }
#mockResultsView .mock-back-link { display: flex; max-width: 720px; margin: 0 auto 16px; }

/* ---- Result score card extras ---- */
.mock-score-title { font-family: var(--font-display); font-weight: 800; font-size: 1.02rem; color: var(--text); margin-bottom: 2px; }
.mock-score-date { font-size: .78rem; color: var(--text3); margin-bottom: 18px; }
.mock-score-label { margin-bottom: 14px; }
.mock-score-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 20px; }
.mock-save-note {
  font-size: .8rem; color: var(--text2); background: var(--bg2); border: 1px dashed var(--border-light);
  border-radius: var(--radius-sm); padding: 9px 12px; margin: -6px 0 18px;
}
.mock-save-note a { color: var(--accent); font-weight: 700; }

/* ---- Optional "help us improve" question under a fresh result (see maybeShowProfilePrompt) ---- */
.profile-prompt {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; margin: 0 0 18px; box-shadow: var(--shadow-sm);
}
.pp-title { font-family: var(--font-display); font-size: .92rem; font-weight: 800; color: var(--text); margin: 0 0 4px; }
.pp-question { font-size: .88rem; font-weight: 600; color: var(--text2); margin: 0 0 12px; }
.pp-controls { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.pp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-chip {
  padding: 7px 14px; border-radius: 20px; font-size: .8rem; font-weight: 600;
  border: 1px solid var(--border); background: var(--bg2); color: var(--text2); transition: all var(--transition);
}
.pp-chip:hover { border-color: var(--accent); color: var(--text); }
.pp-chip.active { border-color: var(--accent); background: var(--accent); color: #10131a; }
.pp-select {
  padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg2); color: var(--text); font-size: .86rem; max-width: 100%;
}
.pp-save:disabled { opacity: .5; cursor: not-allowed; }
.pp-status { font-size: .78rem; color: var(--red); min-height: 0; margin: 8px 0 0; }
.pp-status:empty { display: none; }
.pp-why { font-size: .74rem; color: var(--text3); margin: 12px 0 0; }
.pp-why a { color: var(--accent); font-weight: 600; }
.pp-actions { display: flex; gap: 16px; margin-top: 10px; }
.pp-link { font-size: .78rem; font-weight: 600; color: var(--text3); text-decoration: underline; padding: 4px 0; }
.pp-link:hover { color: var(--text); }
.pp-thanks { font-size: .86rem; font-weight: 600; color: var(--green); margin: 0; }

/* ---- Stat chips (shared: results, attempts list, PYQ cards) ---- */
.attempt-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.attempt-stat {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: .74rem; font-weight: 700; border-radius: 20px; padding: 3px 9px; white-space: nowrap;
}
.attempt-stat.correct { color: var(--green); background: rgba(33,168,120,.13); }
.attempt-stat.wrong { color: var(--red); background: rgba(227,93,93,.13); }
.attempt-stat.skipped { color: var(--text2); background: var(--bg3); }
.attempt-stat.time { color: var(--text2); background: var(--bg2); border: 1px solid var(--border); }

/* ---- Track your progress page: Your Attempts ---- */
.attempts-section { max-width: 720px; margin: 8px auto 0; scroll-margin-top: 90px; }
.attempts-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.attempts-head h3 { font-size: 1.1rem; font-weight: 800; font-family: var(--font-display); }
.attempts-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.progress-panel {
  max-width: 720px; margin: 8px auto 14px; text-align: center;
  background: var(--card); border: 1px dashed var(--border); border-radius: var(--radius); padding: 28px 20px;
}
.progress-panel h3 { font-size: 1.05rem; font-weight: 800; font-family: var(--font-display); margin-bottom: 6px; }
.progress-panel p { font-size: .86rem; color: var(--text2); max-width: 46ch; margin: 0 auto 16px; }
.progress-panel-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.progress-panel-actions a { display: inline-flex; align-items: center; text-decoration: none; }
.attempts-list { display: flex; flex-direction: column; gap: 10px; }
.attempts-empty {
  text-align: center; font-size: .86rem; color: var(--text3);
  background: var(--card); border: 1px dashed var(--border); border-radius: var(--radius); padding: 22px 16px;
}
.attempt-row {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; color: var(--text); cursor: pointer; transition: border-color var(--transition), transform var(--transition);
}
.attempt-row:hover { border-color: var(--accent); transform: translateY(-1px); }
.attempt-kind {
  flex-shrink: 0; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  border-radius: 6px; padding: 4px 7px;
}
.attempt-kind.mock { color: var(--purple); background: rgba(147,112,200,.15); }
.attempt-kind.pyq { color: var(--pink); background: rgba(201,73,126,.14); }
.attempt-row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.attempt-row-title { font-weight: 700; font-size: .92rem; line-height: 1.35; overflow-wrap: anywhere; }
.attempt-row-meta { font-size: .75rem; color: var(--text3); }
.attempt-row-score { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.attempt-row-score b { font-family: var(--font-mono); font-size: 1.05rem; color: var(--accent); }
.attempt-row-score small { font-size: .72rem; color: var(--text3); font-weight: 600; }
.attempts-more { display: flex; margin: 14px auto 0; justify-content: center; }

/* ---- Attempted state on PYQ cards / detail ---- */
.attempt-status-slot:empty { display: none; }
.attempt-status { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); }
.pyq-detail-attempt .attempt-status { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg2); }
.attempted-badge {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 4px;
  font-size: .72rem; font-weight: 800; color: var(--green); background: rgba(33,168,120,.13);
  border: 1px solid rgba(33,168,120,.35); border-radius: 20px; padding: 3px 10px;
}
.pyq-card.is-attempted { border-color: rgba(33,168,120,.45); }
.attempt-view-slot:empty { display: none; }
.attempt-view-slot { display: contents; }
.pyq-card-actions .attempt-view-btn { flex: 1 1 auto; justify-content: center; padding: 9px 12px; font-size: .76rem; white-space: nowrap; }
/* Narrow cards (home page): each label stays on one line at its full width; if both don't fit side by
   side, "View Result" drops to its own full-width row instead of the start label spilling out. */
.pyq-card-actions { flex-wrap: wrap; align-items: stretch; }
.pyq-card-actions .attempt-cta { flex: 1 1 auto; white-space: nowrap; min-width: max-content; }
/* Start button once the paper / test has been finished: green, "Reattempt" / "Retake". */
.attempt-cta.is-reattempt,
.pyq-card-actions .attempt-cta.is-reattempt { background: var(--green); border-color: var(--green); color: #000; }
.btn-primary.attempt-cta.is-reattempt { background: var(--green); box-shadow: 0 4px 14px rgba(33,168,120,.25); }
.btn-primary.attempt-cta.is-reattempt:hover { box-shadow: 0 8px 20px rgba(33,168,120,.35); }

/* ---- "Your progress" box on the PYQ and Mock Tests listings ---- */
.your-progress {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 20px;
}
.your-progress:empty { display: none; }
.yp-head { display: flex; align-items: center; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; }
.yp-head h3 { font-size: 1rem; font-weight: 800; font-family: var(--font-display); }
.yp-link { font-size: .82rem; font-weight: 700; color: var(--accent); text-decoration: none; }
.yp-link:hover { text-decoration: underline; }
.yp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.yp-stat {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 12px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.yp-stat b { font-family: var(--font-mono); font-size: 1.35rem; line-height: 1.2; color: var(--accent); }
.yp-stat span { font-size: .74rem; font-weight: 600; color: var(--text2); }
.yp-empty, .yp-note { margin: 8px 0 0; font-size: .82rem; color: var(--text2); }
.yp-note { color: var(--text3); }
@media (max-width: 480px) { .your-progress { padding: 14px 16px; } .yp-stat { padding: 8px 10px; } .yp-stat b { font-size: 1.15rem; } }

/* ---- PYQ / Mock cards: full title, one tidy meta line, clean list view ---- */
.pyq-card .card-title {
  display: block; overflow: visible; -webkit-line-clamp: unset;
  font-size: 1.02rem; line-height: 1.35; overflow-wrap: anywhere;
}
.pyq-doc-row { gap: 12px; }
.pyq-doc-icon { width: 38px; height: 38px; border-radius: 10px; }
.pyq-doc-text { min-width: 0; flex: 1; }
.pyq-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 8px; }
.pyq-card-meta .cat-badge,
.pyq-card-meta .pyq-year-badge,
.pyq-card-meta .pyq-type-badge { margin: 0; }
.pyq-meta-item { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; color: var(--text2); }
.pyq-meta-item svg { opacity: .6; flex-shrink: 0; }
.pyq-meta-subject { color: var(--text3); }
.pyq-meta-paper { color: var(--text); font-weight: 600; }

/* Exam hub: one block per registry paper (stage + paper) with its PYQ papers and mock tests */
.paper-group { margin-bottom: 22px; }
.paper-group:last-child { margin-bottom: 0; }
.paper-group-title { font-size: 1.05rem; font-weight: 700; color: var(--text); margin: 0 0 2px; }
.paper-group-facts { font-size: .8rem; color: var(--text2); margin-bottom: 10px; }
.paper-group-sub { font-size: .75rem; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .5px; margin: 12px 0 8px; }

.cards-grid[data-view="list"] .pyq-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "main actions";
  align-items: center;
  gap: 14px 28px;
  padding: 18px 22px;
}
/* Once attempted, the result chips sit under the title (so the title keeps its width) and the buttons span both rows. */
.cards-grid[data-view="list"] .pyq-card.is-attempted {
  grid-template-areas: "main actions" "status actions";
  row-gap: 12px;
}
.cards-grid[data-view="list"] .pyq-card .card-main { grid-area: main; }
.cards-grid[data-view="list"] .pyq-card .attempt-status-slot { grid-area: status; }
.cards-grid[data-view="list"] .pyq-card .attempt-status {
  flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 0; padding: 12px 0 0; border-top: 1px dashed var(--border);
}
.cards-grid[data-view="list"] .pyq-card .attempted-badge { align-self: center; }
.cards-grid[data-view="list"] .pyq-card .card-footer {
  grid-area: actions; margin: 0; padding: 0; border-top: 0; flex-wrap: nowrap; gap: 10px;
}
.cards-grid[data-view="list"] .pyq-card-actions .btn-pdf-download,
.cards-grid[data-view="list"] .pyq-card-actions .attempt-view-btn {
  flex: none; width: auto; white-space: nowrap; padding: 10px 18px; font-size: .8rem;
}
@media (max-width: 900px) {
  .cards-grid[data-view="list"] .pyq-card,
  .cards-grid[data-view="list"] .pyq-card.is-attempted {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "main" "status" "actions";
    align-items: stretch;
    gap: 12px;
    padding: 16px;
  }
  .cards-grid[data-view="list"] .pyq-card-actions .btn-pdf-download,
  .cards-grid[data-view="list"] .pyq-card-actions .attempt-view-btn { flex: 1; }
}

/* ---- Review list ---- */
.mock-review-toolbar { max-width: 720px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mock-review-toolbar .mock-review-heading { margin: 0; }
.mock-review-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.mock-review-item { border-left-width: 4px; }
.mock-review-item.correct { border-left-color: var(--green); }
.mock-review-item.wrong { border-left-color: var(--red); }
.mock-review-item.skipped { border-left-color: var(--border-light); }
.mock-review-item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.mock-review-item-head .mock-remark-badge { margin-bottom: 0; }
.mock-review-qno { font-family: var(--font-mono); font-weight: 700; font-size: .8rem; color: var(--text2); }
.review-status { font-size: .72rem; font-weight: 800; border-radius: 20px; padding: 2px 9px; }
.review-status.correct { color: var(--green); background: rgba(33,168,120,.13); }
.review-status.wrong { color: var(--red); background: rgba(227,93,93,.13); }
.review-status.skipped { color: var(--text2); background: var(--bg3); }
.mock-option-text { flex: 1 1 auto; }
.mock-your-answer {
  flex-shrink: 0; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em;
  color: var(--text2); border: 1px solid var(--border-light); border-radius: 20px; padding: 2px 8px;
}
.mock-option.correct .mock-your-answer { color: var(--green); border-color: var(--green); }
.mock-option.incorrect .mock-your-answer { color: var(--red); border-color: var(--red); }

@media (max-width: 640px) {
  .attempt-row { flex-wrap: wrap; gap: 10px; }
  .attempt-row-main { flex-basis: calc(100% - 90px); }
}

/* ---- Browser autofill ----
   Chrome paints autofilled fields its own light blue (e.g. a saved login on
   /login.html), which made the site's own pages look like a different,
   unstyled page. An inset shadow is the only way to repaint it; the long
   transition stops the blue flashing in before it's covered. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--bg2) inset;
  box-shadow: 0 0 0 1000px var(--bg2) inset;
  transition: background-color 9999s ease-out 0s;
}


/* ---------- Hero, second pass: promise headline, numbers strip, phone mock-up, trust row ---------- */
.hero-content-grid .hero-title { font-size: clamp(1.45rem, 2.7vw, 2.3rem); line-height: 1.3; padding-block: .15em; margin-block: -.15em 10px; }
.hero-cta-plan { border-color: var(--border-light); background: transparent; font-weight: 600; font-size: .88rem; }
.hero-cta-plan:hover { background: rgba(226, 150, 44, .12); border-color: var(--accent); }

.hero-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 22px; padding: 0; }
.hero-stat { display: flex; align-items: baseline; gap: 6px; font-size: .82rem; font-weight: 500; color: var(--text2); }
.hero-stat[hidden] { display: none; }
.hero-stat b { font-family: var(--font-mono); font-size: 1.3rem; font-weight: 700; line-height: 1; color: var(--accent); }
.hero-stat-free b { color: var(--green); }
@media (max-width: 960px) { .hero-stats { justify-content: center; } }
@media (max-width: 480px) {
  .hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; text-align: left; }
  .hero-stat { flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); }
}

.hphone { position: relative; width: 250px; margin: 0 auto; }
.hphone-frame {
  position: relative; border: 6px solid #101c33; border-radius: 30px; background: var(--card);
  padding: 20px 14px 14px; box-shadow: var(--shadow), 0 26px 50px -18px rgba(16, 28, 51, .55);
}
[data-theme="dark"] .hphone-frame { border-color: #2a3a5e; }
.hphone-notch { position: absolute; top: 5px; left: 50%; width: 58px; height: 6px; margin-left: -29px; border-radius: 6px; background: #101c33; }
[data-theme="dark"] .hphone-notch { background: #2a3a5e; }
.hphone-bar { display: flex; justify-content: space-between; align-items: center; margin: 6px 0 8px; font-size: .68rem; font-weight: 700; color: var(--text2); }
.hphone-timer { font-family: var(--font-mono); padding: 2px 7px; border-radius: 6px; background: var(--bg3); color: var(--text); }
.hphone-progress { height: 4px; margin-bottom: 12px; border-radius: 4px; background: var(--bg3); }
.hphone-progress i { display: block; width: 24%; height: 100%; border-radius: inherit; background: var(--accent); }
.hphone-q { margin: 0 0 10px; font-size: .78rem; font-weight: 600; line-height: 1.4; color: var(--text); }
.hphone-q small { display: block; margin-bottom: 3px; font-size: .6rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text3); }
.hphone-opts { display: grid; gap: 6px; margin-bottom: 12px; }
.hphone-opts span { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg2); font-size: .74rem; color: var(--text); }
.hphone-opts i { display: grid; place-items: center; width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%; background: var(--bg3); font-style: normal; font-size: .62rem; font-weight: 700; color: var(--text2); }
.hphone-opts .sel { border-color: var(--accent); background: rgba(226, 150, 44, .14); }
.hphone-opts .sel i { background: var(--accent); color: #000; }
.hphone-actions { display: flex; justify-content: space-between; gap: 8px; font-size: .66rem; font-weight: 700; }
.hphone-actions span { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--text2); }
.hphone-actions .go { border-color: var(--accent); background: var(--accent); color: #000; }
.hphone-score {
  position: absolute; right: -28px; bottom: -26px; display: grid; gap: 4px; padding: 12px 16px;
  border: 1px solid rgba(226, 150, 44, .55); border-radius: 14px; background: #101c33; color: #aebbd6;
  box-shadow: 0 18px 36px -12px rgba(12, 21, 49, .6); animation: pstack-float 5s ease-in-out infinite;
}
.hphone-score-tag { font-size: .58rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hphone-score-main { font-size: .8rem; }
.hphone-score-main b { font-family: var(--font-display); font-size: 1.9rem; line-height: 1; color: #f6c35b; }
.hphone-score-row { display: flex; gap: 12px; font-size: .7rem; }
.hphone-score-row b { color: #8fe3c0; }
@media (max-width: 960px) { .hphone { margin: 28px auto 34px; width: 232px; } .hphone-score { right: -22px; } }
@media (prefers-reduced-motion: reduce) { .hphone-score { animation: none; } }

.hero-trust { background: var(--bg2); border-bottom: 1px solid var(--border); padding: 18px 0; }
.hero-trust-list { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; }
.hero-trust-list li { display: flex; align-items: flex-start; gap: 12px; }
.hero-trust-list .trust-ic { flex-shrink: 0; width: 36px; height: 36px; margin-bottom: 0; }
.hero-trust-list b { display: block; font-family: var(--font-display); font-size: .9rem; font-weight: 700; }
.hero-trust-list li > span:last-child > span { display: block; font-size: .78rem; color: var(--text2); }
@media (max-width: 860px) { .hero-trust-list { grid-template-columns: 1fr; gap: 12px; } }

.home-guides { margin: 0 0 28px; }
.home-guides .pstack-guide { margin: 0; }
/* State and national guides side by side; they wrap onto their own lines on a narrow screen. */
.home-guide-cards { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
/* Cards in one row are the same height: the card fills its link, and the stats and button sit at the bottom. */
.home-guides .pstack-guide { display: flex; }
.home-guides .pstack-guide .pstack-card { display: flex; flex-direction: column; }
.home-guides .pstack-guide .pg-stats { margin-top: auto; }


/* ---------- Phone header, menu drawer and bottom bar (≤600px) ----------
   Above 600px none of this shows: the top strip above keeps its icons. On a phone the strip is logo · search ·
   Menu · Sign up, the drawer holds the rest (practice, updates, alerts, language, theme, account), and the
   bottom bar is Home · Practice · Jobs · Me. */
.phone-only, .su-short, .nav-backdrop, .nav-drawer, .bottom-nav { display: none; }
.nav-drawer [hidden], .nav-acct[hidden] { display: none !important; }

.nav-drawer-head { display: flex; align-items: center; justify-content: space-between; height: 62px; padding: 0 16px; flex-shrink: 0; border-bottom: 1px solid var(--border); }
.nav-drawer-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 800; }
.nav-drawer-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 28px; }

.nav-acct { display: block; margin: 14px 0 2px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.nav-acct p { margin-bottom: 12px; font-size: .84rem; line-height: 1.45; color: var(--text2); }
.nav-acct-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nav-btn { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 10px; border-radius: 22px; background: var(--accent); color: #10131a; font-size: .86rem; font-weight: 700; text-align: center; }
.nav-btn-ghost { background: transparent; border: 1px solid var(--border-light); color: var(--text); }
.nav-acct-user { display: flex; align-items: center; gap: 12px; }
.nav-acct-who { display: grid; min-width: 0; }
.nav-acct-cta { margin-top: 2px; font-size: .78rem; font-weight: 700; color: var(--accent); }

.nav-group { margin-top: 16px; }
.nav-group-title { padding: 0 4px 2px; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text3); }
.nav-link { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 46px; padding: 0 4px; border-bottom: 1px solid var(--border); font-size: .98rem; font-weight: 600; color: var(--text); text-align: left; }
.nav-link::after { content: '\203A'; font-size: 1.25rem; line-height: 1; color: var(--text3); }
.nav-link:active { background: var(--bg3); }
.nav-link-logout { margin-top: 12px; border-bottom: 0; color: var(--red); }
.nav-link-logout::after { content: none; }

.nav-alerts { margin-top: 20px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.nav-alerts .nav-group-title { padding-left: 0; }
.nav-alerts p:not(.nav-group-title) { margin: 2px 0 12px; font-size: .82rem; line-height: 1.45; color: var(--text2); }
.nav-alerts-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nav-alerts .social-btn { justify-content: center; min-height: 44px; padding: 0 10px; border-radius: 22px; }

.nav-prefs { display: grid; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.nav-pref { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nav-pref-label { font-size: .86rem; font-weight: 700; color: var(--text2); }
.nav-seg { display: inline-flex; padding: 3px; border: 1px solid var(--border); border-radius: 22px; background: var(--bg3); }
.nav-seg button { min-height: 36px; padding: 0 14px; border-radius: 18px; font-size: .82rem; font-weight: 700; color: var(--text2); }
.nav-seg button[aria-pressed="true"] { background: var(--accent); color: #10131a; box-shadow: 0 2px 6px rgba(226, 150, 44, .35); }

@media (max-width: 600px) {
  :root { --bn-h: 58px; }

  /* Top strip: search, Menu, Sign up. The icons that moved into the drawer go. */
  .phone-only { display: flex; }
  .header-actions #langBtn, .header-actions #themeToggleBtn, .header-actions .social-btn, .header-actions .guest-menu, .header-actions #userLoginBtn { display: none; }
  #userSignupBtn { display: inline-flex; height: var(--hdr-btn, 34px); padding: 0 14px; font-size: .8rem; }
  .su-full { display: none; }
  .su-short { display: inline; }
  #mobSearchBtn { order: 1; }
  #menuBtn { order: 2; }
  #userSignupBtn, #userMenu { order: 3; }

  /* Menu drawer */
  .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 190; background: rgba(6, 10, 20, .55); opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s linear .2s; }
  .nav-backdrop.open { opacity: 1; visibility: visible; transition-delay: 0s; }
  .nav-drawer { display: flex; flex-direction: column; position: fixed; top: 0; right: 0; bottom: 0; z-index: 200; width: min(86vw, 340px); background: var(--bg); border-left: 1px solid var(--border); box-shadow: var(--shadow); transform: translateX(100%); visibility: hidden; transition: transform .24s cubic-bezier(.4, 0, .2, 1), visibility 0s linear .24s; }
  .nav-drawer.open { transform: none; visibility: visible; transition-delay: 0s; }
  body.nav-open { overflow: hidden; }
  body.nav-open .scroll-top-btn { visibility: hidden; }
  @media (prefers-reduced-motion: reduce) { .nav-drawer, .nav-backdrop { transition: none; } }

  /* Bottom bar */
  body { padding-bottom: calc(var(--bn-h) + env(safe-area-inset-bottom, 0px)); }
  body.exam-mode { padding-bottom: 0; }
  .bottom-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; height: calc(var(--bn-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); background: rgba(10, 17, 32, .94); backdrop-filter: blur(16px); border-top: 1px solid var(--border); }
  [data-theme="light"] .bottom-nav { background: rgba(250, 246, 238, .94); }
  body.exam-mode .bottom-nav, body:has(input:focus, textarea:focus, select:focus) .bottom-nav { display: none; }
  .bn-tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .7rem; font-weight: 700; color: var(--text2); -webkit-tap-highlight-color: transparent; }
  .bn-tab.active { color: var(--text); }
  .bn-tab.active .bn-ic { color: var(--accent); }
  .bn-tab.active::before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
  .bn-avatar { display: none; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--accent); color: #10131a; font-size: .58rem; font-weight: 800; letter-spacing: .02em; }
  .bn-tab.signed-in .bn-ic { display: none; }
  .bn-tab.signed-in .bn-avatar { display: grid; }
  .bn-tab.signed-in.active .bn-avatar { box-shadow: 0 0 0 2px var(--bg2), 0 0 0 4px var(--accent); }

  /* Floating things sit above the bar */
  .scroll-top-btn { bottom: calc(var(--bn-h) + env(safe-area-inset-bottom, 0px) + 14px); right: 14px; }
  .toast-wrap { bottom: calc(var(--bn-h) + env(safe-area-inset-bottom, 0px) + 14px); right: 12px; }
}
