:root {
  /* Light theme inspired by modern exam-prep sites:
     purple→blue gradient accents, white surfaces, green CTAs. */
  --grad-a: #6a3fd0;
  --grad-b: #2b50d8;
  --navy: #232946;        /* headings */
  --navy-dark: #191c2b;   /* footer */
  --blue: #3b50d8;        /* primary actions */
  --blue-dark: #2c3fb8;
  --gold: #26d765;        /* CTA green (kept var name for compatibility) */
  --bg: #f7f8fd;
  --card: #ffffff;
  --text: #22252f;
  --muted: #5f6673;
  --border: #e6e9f4;
  --success: #1fa85c;
  --error: #e5484d;
  --radius: 12px;
  --shadow: 0 6px 18px rgba(43, 60, 120, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

/* Green activity line at the bottom of the page, shown while a button
   action is being processed. */
#globalProgress {
  position: fixed;
  left: 0;
  top: 0;
  height: 4.5px;
  width: 100%;
  overflow: hidden;
  z-index: 9999;
  pointer-events: none;
}

#globalProgress.on::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 40%;
  border-radius: 999px;
  background: var(--gold);
  animation: progSlide 1s linear infinite;
}

@keyframes progSlide {
  from { transform: translateX(-110%); }
  to { transform: translateX(300%); }
}

/* ---------- Styled popups (replaces browser alert/confirm) ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 40, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}

.modal-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 1.4rem 1.4rem 1.2rem;
  max-width: 340px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(10, 15, 40, 0.35);
  animation: modalIn 0.18s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.modal-card h3 {
  color: #1c1e26;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.modal-card p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 1.1rem;
}

.modal-card p:empty {
  display: none;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
}

.modal-actions .btn {
  border-radius: 999px;
  font-weight: 700;
  padding: 0.5rem 1.5rem;
  font-size: 0.95rem;
}

.modal-ok {
  background: #6f74e8;
  color: #ffffff;
}

.modal-ok:hover {
  background: #585ee0;
}

.modal-cancel {
  background: #ffffff;
  color: #6f74e8;
  border: 1.5px solid #6f74e8;
}

.modal-cancel:hover {
  background: #f2f3ff;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--blue);
  text-decoration: none;
}

/* ---------- Header ---------- */
.site-header {
  background: #ffffff;
  color: var(--text);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(43, 60, 120, 0.08);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--navy);
  font-weight: 700;
  font-size: 1.25rem;
}

.brand .logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
}

.brand-logo {
  height: 40px;
  width: auto;
  display: block;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.header-left .dropdown > a {
  color: #1c1e26;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

.header-left .dropdown > a:hover {
  color: #6f74e8;
}

@media (max-width: 760px) {
  .brand-logo {
    height: 32px;
  }
  .header-left {
    gap: 0.6rem;
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-links a {
  color: #1c1e26;
  font-size: 1rem;
  font-weight: 700;
}

.nav-links a:hover {
  color: #6f74e8;
}

.nav-links a.btn {
  color: #ffffff;
}

/* Header action buttons: blue pills; Log Out is red. */
.site-header .btn-gold,
body.home .site-header .btn-gold {
  background: #6f74e8;
  color: #ffffff;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: none;
}

.site-header .btn-gold:hover,
body.home .site-header .btn-gold:hover {
  background: #585ee0;
  filter: none;
}

#logoutBtn,
#logoutNavBtn {
  background: #ef4444 !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 999px;
  font-weight: 700;
}

#logoutBtn:hover,
#logoutNavBtn:hover {
  background: #dc2626 !important;
}

.user-email {
  background: #eef4ee;
  color: #1f7a45;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
  white-space: nowrap;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 760px) {
  .user-email {
    display: none;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, filter 0.15s ease;
}

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

.btn-primary:hover {
  background: var(--blue-dark);
}

.btn-gold {
  background: var(--gold);
  color: #ffffff;
}

.btn-gold:hover {
  filter: brightness(1.06);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
}

.btn-outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* Outline buttons that sit on the white header */
.site-header .btn-outline {
  color: #4a5064;
  border-color: #c9cede;
}

.site-header .btn-outline:hover {
  color: var(--blue);
  border-color: var(--blue);
  background: #f2f4ff;
}

.btn-block {
  width: 100%;
}

/* Homepage buttons: bold rounded pill style in light blue. */
body.home .btn {
  border-radius: 999px;
  font-weight: 800;
}

body.home .btn-primary,
body.home .btn-gold {
  background: #38bdf8;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.45);
}

body.home .btn-primary:hover,
body.home .btn-gold:hover {
  background: #0ea5e9;
  filter: none;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(110deg, var(--grad-a) 0%, var(--grad-b) 70%);
  color: #fff;
  padding: 4.5rem 1.25rem 5rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  max-width: 800px;
  margin: 0 auto 1rem;
  line-height: 1.25;
}

.hero h1 .accent {
  color: #7ef2a8;
}

.hero p {
  max-width: 620px;
  margin: 0 auto 2rem;
  color: #e6e3fb;
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Category tiles (SmartKeeda-style) ---------- */
.type-tiles {
  max-width: 1100px;
  margin: -2.5rem auto 0;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.type-tile {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.type-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(43, 60, 120, 0.16);
}

.type-tile .ticon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.type-tile .chev {
  margin-left: auto;
  color: var(--muted);
  font-size: 1.3rem;
  font-weight: 400;
}

@media (max-width: 760px) {
  .type-tiles {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.7rem;
  }
  .type-tile {
    padding: 0.75rem 0.8rem;
    font-size: 0.88rem;
    gap: 0.6rem;
  }
  .type-tile .ticon {
    width: 38px;
    height: 38px;
    font-size: 1.15rem;
  }
}

/* ---------- Stats strip ---------- */
.stats {
  max-width: 900px;
  margin: -2.5rem auto 0;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  text-align: center;
  transition: transform 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
}

.stat-card .num {
  font-size: 1.7rem;
  font-weight: 800;
  background: linear-gradient(110deg, var(--grad-a), var(--grad-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-card .label {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Sections ---------- */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1.25rem 1rem;
}

.section-title {
  text-align: center;
  font-size: 1.7rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.section-sub {
  text-align: center;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 2.5rem;
}

/* ---------- Exam cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

@media (max-width: 1100px) {
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 840px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.exam-card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  animation: cardIn 0.5s ease both;
}

.exam-card:nth-child(2) { animation-delay: 0.08s; }
.exam-card:nth-child(3) { animation-delay: 0.16s; }
.exam-card:nth-child(4) { animation-delay: 0.24s; }
.exam-card:nth-child(5) { animation-delay: 0.32s; }
.exam-card:nth-child(6) { animation-delay: 0.4s; }

.card-top {
  background: linear-gradient(180deg, #efe3ff 0%, #f7f1ff 55%, #ffffff 100%);
  padding: 1rem 1.1rem 0.7rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.exam-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 34px rgba(43, 60, 120, 0.16);
  border-color: #c9d2f5;
}

.exam-card .card-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(43, 60, 120, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-chip {
  background: #ffffff;
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #4a5064;
  box-shadow: 0 2px 8px rgba(43, 60, 120, 0.12);
  white-space: nowrap;
}

.exam-tag {
  background: #eef0ff;
  color: #4646c8;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(43, 60, 120, 0.1);
}

.tag-title {
  color: var(--navy);
  font-size: 1.2rem;
  margin: 2.2rem 0 1rem;
  padding-left: 0.75rem;
  border-left: 4px solid var(--blue);
}

.subcat-title {
  color: #4a5064;
  font-size: 1rem;
  font-weight: 700;
  margin: 1.1rem 0 0.7rem;
  padding-left: 0.7rem;
  border-left: 3px solid #b9bdf5;
}

.collapse-head {
  cursor: pointer;
  user-select: none;
}

.collapse-head .plus {
  display: inline-block;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #6f74e8;
  color: #ffffff;
  text-align: center;
  line-height: 26px;
  font-weight: 800;
  font-size: 1.05rem;
  margin-right: 0.5rem;
  vertical-align: -3px;
}

.tag-block:first-child .tag-title {
  margin-top: 0;
}

/* ---------- Mobile hamburger menu ---------- */
.hamburger {
  display: none;
  background: #ffffff;
  border: 1.5px solid #d8dcec;
  border-radius: 8px;
  width: 42px;
  height: 38px;
  padding: 8px 9px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: #1c1e26;
}

.mobile-drawer {
  display: none;
  position: fixed;
  top: 62px;
  left: 0.6rem;
  right: 0.6rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 44px rgba(20, 30, 70, 0.2);
  padding: 1rem;
  z-index: 400;
  flex-direction: column;
  gap: 0.8rem;
  max-height: 75vh;
  overflow-y: auto;
}

.mobile-drawer.open {
  display: flex;
}

.mobile-drawer a {
  font-weight: 700;
  color: #1c1e26;
  font-size: 1rem;
  padding: 0.3rem 0.2rem;
}

.mobile-drawer .btn {
  width: 100%;
  text-align: center;
}

.mobile-drawer .user-email:not([hidden]) {
  display: inline-block !important;
  max-width: 100%;
}

@media (max-width: 760px) {
  .hamburger {
    display: flex;
  }
}

/* ---------- Header dropdown ---------- */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown > a {
  cursor: pointer;
}

.dropdown-menu {
  position: absolute;
  top: 145%;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(20, 30, 70, 0.18);
  padding: 0.5rem;
  min-width: 270px;
  max-height: 70vh;
  overflow-y: auto;
  display: none;
  z-index: 300;
}

.dropdown.open .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1.1rem;
  border-radius: 10px;
  color: #22252f;
  font-size: 1.02rem;
  font-weight: 400;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  white-space: nowrap;
}

.dropdown-menu a .mi {
  font-size: 1.35rem;
  width: 1.7rem;
  text-align: center;
  flex-shrink: 0;
}

.mi-img {
  width: 27px;
  height: 27px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.tag-title .mi-img {
  vertical-align: -6px;
  margin-right: 0.4rem;
}

.dropdown-menu a:hover {
  background: #f2f4ff;
  color: var(--blue);
}

.dropdown-menu .menu-divider {
  border: none;
  border-top: 1px solid #eef0f6;
  margin: 0.35rem 0.5rem;
}

.card-body {
  padding: 0.4rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.exam-card h3 {
  color: var(--navy);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.4rem;
}

.card-stats {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.card-stats .sep {
  color: #c3c9d6;
  margin: 0 0.25rem;
}

.card-stats .green {
  color: #16a34a;
}

.card-divider {
  border: none;
  border-top: 1px solid #eef0f6;
  margin: 0.65rem 0;
}

.card-desc {
  color: var(--muted);
  font-size: 0.85rem;
}

.card-bullets {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text);
  font-size: 0.88rem;
}

.card-bullets li {
  margin-bottom: 0.28rem;
}

.card-bullets .more {
  color: #16a34a;
  font-weight: 600;
}

.card-footer {
  margin-top: auto;
  padding-top: 0.9rem;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.card-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy);
}

.card-price.free {
  color: #149a4e;
}

.card-price .strike {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.85rem;
  text-decoration: line-through;
  margin-left: 0.4rem;
}

.paid-badge {
  background: #e6f9ee;
  color: #149a4e;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

.bundle-card .card-top {
  background: linear-gradient(180deg, #ffefd9 0%, #fff8ee 55%, #ffffff 100%);
}

/* ---------- Features ---------- */
.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.feature {
  display: flex;
  gap: 0.9rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.feature .f-icon {
  font-size: 1.5rem;
}

.feature h4 {
  color: var(--navy);
  margin-bottom: 0.2rem;
}

.feature p {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(110deg, var(--grad-a), var(--grad-b));
  color: #fff;
  text-align: center;
  padding: 3rem 1.25rem;
  margin-top: 4rem;
}

.cta-band h2 {
  margin-bottom: 0.5rem;
}

.cta-band p {
  color: #e6e3fb;
  margin-bottom: 1.5rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-dark);
  color: #9aa2b8;
  text-align: center;
  padding: 1.5rem 1.25rem;
  font-size: 0.9rem;
}

/* ---------- Auth pages ---------- */
.auth-wrap {
  min-height: calc(100vh - 62px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.auth-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 420px;
  padding: 2.25rem 2rem;
}

.auth-card h2 {
  color: var(--navy);
  margin-bottom: 0.25rem;
  text-align: center;
}

.auth-card .auth-sub {
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
  margin-bottom: 1.75rem;
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.form-group input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.15s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--blue);
}

.form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
}

.form-row label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  cursor: pointer;
}

.form-msg {
  display: none;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.form-msg.error {
  display: block;
  background: #fdecea;
  color: var(--error);
  border: 1px solid #f5c6c4;
}

.form-msg.success {
  display: block;
  background: #e8f6ef;
  color: var(--success);
  border: 1px solid #bfe5d2;
}

.auth-alt {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.demo-note {
  margin-top: 1.25rem;
  background: #eef7ff;
  border: 1px solid #cfe4f7;
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font-size: 0.85rem;
  color: #2b5876;
}

/* ---------- Dashboard ---------- */
.dash-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}

.dash-welcome {
  background: linear-gradient(110deg, var(--grad-a), var(--grad-b));
  color: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
}

.dash-welcome h2 {
  margin-bottom: 0.25rem;
}

.dash-welcome p {
  color: #e6e3fb;
}

.dash-section-title {
  color: var(--navy);
  margin-bottom: 1rem;
}

.test-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
}

.test-card h3 {
  color: var(--navy);
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.test-card .test-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  flex: 1;
}

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .header-inner {
    padding: 0.55rem 0.75rem;
    gap: 0.5rem;
  }

  .brand {
    font-size: 1.02rem;
    gap: 0.4rem;
  }

  .brand .logo {
    width: 30px;
    height: 30px;
    font-size: 0.95rem;
    border-radius: 7px;
  }

  .nav-links {
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .nav-links a {
    font-size: 0.85rem;
  }

  .nav-links .btn,
  #logoutBtn,
  #logoutNavBtn {
    padding: 0.42rem 0.85rem;
    font-size: 0.82rem;
  }

  /* The Exams menu becomes a near-full-width sheet under the header. */
  .dropdown {
    position: static;
  }

  .dropdown-menu {
    position: fixed;
    left: 0.6rem;
    right: 0.6rem;
    top: 64px;
    transform: none;
    min-width: 0;
  }

  .hero {
    padding: 3rem 1rem 3.5rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.7rem;
  }

  .stat-card {
    padding: 0.9rem 0.5rem;
  }

  .stat-card .num {
    font-size: 1.35rem;
  }

  .section {
    padding: 2.5rem 1rem 0.5rem;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .dash-wrap {
    padding: 1.5rem 0.9rem;
  }

  .dash-welcome {
    padding: 1.4rem 1.1rem;
  }

  .cta-band {
    padding: 2.2rem 1rem;
  }

  .auth-card {
    padding: 1.7rem 1.25rem;
  }

  .tag-title {
    font-size: 1.05rem;
    margin: 1.6rem 0 0.8rem;
  }
}
