.admin-quiz-explanations {
  display: grid;
  gap: 8px;
}

.admin-quiz-expl-label {
  font-size: 13px;
  font-weight: 800;
  color: #44536e;
}

.admin-quiz-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d9e1ee;
  border-radius: 14px;
  padding: 12px 14px;
  resize: vertical;
}

.admin-quiz-translations-toggle {
  margin-top: 10px;
  width: 100%;
}

.admin-quiz-translations-body {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #d9e1ee;
}

.admin-quiz-translations-hint {
  margin: 0 0 10px;
}

.admin-quiz-translations-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 720px) {
  .admin-quiz-translations-grid {
    grid-template-columns: 1fr;
  }
}

.admin-quiz-translations-lang {
  display: grid;
  gap: 8px;
}

.admin-quiz-translations-lang-title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: #44536e;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Quiz editor: make Close button more visible */
.admin-quiz-topbar-right .admin-lessons-close {
  background: linear-gradient(135deg, #334155, #0f172a);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.28);
}

.admin-quiz-topbar-right .admin-lessons-close:hover {
  transform: translateY(-1px);
}

.admin-quiz-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.admin-quiz-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-quiz-save-wrap {
  display: flex;
  gap: 12px;
  align-items: center;
}

.admin-homework-editor-list {
  display: grid;
  gap: 12px;
}

.admin-homework-editor-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid #e6edf6;
  border-radius: 14px;
  background: #f8fbff;
}

.admin-homework-editor-index {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #eef2f7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #1c2a4a;
}

.admin-homework-editor-fields {
  display: grid;
  gap: 10px;
}

.admin-homework-editor-actions {
  display: flex;
  align-items: start;
}

@media (max-width: 980px) {
  .admin-lesson-edit-grid {
    grid-template-columns: 1fr;
  }
  .admin-lesson-buttons-col {
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .admin-lessons-modal {
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
      max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }

  .admin-lesson-edit-card {
    padding: 14px;
  }

  .admin-lesson-edit-title {
    font-size: 18px;
  }

  .admin-lesson-cover-actions {
    flex-wrap: wrap;
  }

  .admin-lesson-buttons-col {
    flex-direction: column;
    gap: 10px;
  }

  .admin-lesson-pill {
    padding: 12px 14px;
    font-size: 15px;
  }
}

/* Close buttons: red gradient (global override). */
:root {
  --close-btn-grad-from: #8f0f17;
  --close-btn-grad-to: #ff3b3b;
}

button[class*="close"],
button[id*="close"],
a[class*="close"],
a[id*="close"],
.btn[data-admin-close] {
  background: linear-gradient(135deg, var(--close-btn-grad-from), var(--close-btn-grad-to)) !important;
  color: #ffffff !important;
  border: 1px solid rgba(70, 10, 16, 0.22) !important;
  box-shadow: 0 12px 22px rgba(170, 22, 35, 0.25) !important;
}

button[class*="close"]:hover,
button[id*="close"]:hover,
a[class*="close"]:hover,
a[id*="close"]:hover,
.btn[data-admin-close]:hover {
  filter: brightness(1.05) saturate(1.05) !important;
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(170, 22, 35, 0.3) !important;
}

/* ─── Mobile Nav Drawer ─────────────────────────────────────────── */
#mobile-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(6, 14, 28, 0.60);
  z-index: 998;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

#mobile-nav-backdrop.is-open {
  display: block;
  opacity: 1;
}

#mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 280px;
  height: 100dvh;
  background: linear-gradient(180deg, #f0f6ff 0%, #e8f2fd 55%, #f4f8ff 100%);
  border-left: 1px solid rgba(15,42,69,0.10);
  box-shadow: -12px 0 60px rgba(0,0,0,0.18);
  z-index: 999;
  display: flex;
  flex-direction: column;
  padding: 0;
  transition: right 0.34s cubic-bezier(0.4, 0, 0.2, 1), background 0.35s ease;
  border-radius: 26px 0 0 26px;
  overflow: hidden;
}

#mobile-nav-drawer.is-open {
  right: 0;
}

/* Dark theme — same midnight-navy surface as the rest of the site,
   instead of staying stuck on the light-blue panel */
[data-theme="dark"] #mobile-nav-drawer {
  background: linear-gradient(180deg, #101f3a 0%, #0a1628 60%, #0a1628 100%);
  border-left: 1px solid rgba(240, 180, 41, 0.14);
  box-shadow: -12px 0 60px rgba(0,0,0,0.5);
}

/* Top accent bar — cyan in light theme, gold in dark (matches "Choose Your Level" gold) */
#mobile-nav-drawer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2aabee, #1459a8, #2aabee);
  opacity: 0.7;
  z-index: 2;
  transition: background 0.35s ease;
}

[data-theme="dark"] #mobile-nav-drawer::before {
  background: linear-gradient(90deg, #c88a10, #f0b429, #c88a10);
  opacity: 0.9;
}

/* Faint Big Ben watermark anchored bottom-right — quiet brand touch that
   fills the empty lower half of the drawer without competing with the
   action buttons above it */
#mobile-nav-drawer::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 40px;
  width: 220px;
  height: 220px;
  background-image: url("../../assets/images/logo.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: bottom right;
  opacity: 0.06;
  filter: grayscale(1);
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.35s ease;
}

[data-theme="dark"] #mobile-nav-drawer::after {
  opacity: 0.10;
  filter: grayscale(1) invert(1);
}

.mobile-nav-drawer-header {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 24px;
  border-bottom: 1px solid rgba(15,42,69,0.10);
  background-color: #dce8f4;
  overflow: hidden;
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

[data-theme="dark"] .mobile-nav-drawer-header {
  background-color: #0d1e38;
  border-bottom-color: rgba(240, 180, 41, 0.18);
}

/* Same night-sky / sunrise artwork as the main hero header, so the drawer
   always matches whatever backdrop is currently showing behind it */
.mobile-nav-drawer-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../../assets/images/space_2.jpg");
  background-size: cover;
  background-position: center 75%;
  background-repeat: no-repeat;
  opacity: 0.55;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

[data-theme="light"] .mobile-nav-drawer-header::before {
  background-image: url("../../assets/images/sky.jpg");
  background-position: center bottom;
}

[data-theme="dark"] .mobile-nav-drawer-header::before {
  opacity: 0.85;
}

.mobile-nav-drawer-header > * {
  position: relative;
  z-index: 1;
}

/* Close button — absolute top-right, override global close-button rules */
#mobile-nav-drawer-close,
#mobile-nav-drawer-close:hover,
#mobile-nav-drawer-close:focus {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  background: rgba(255,255,255,0.85) !important;
  border: 1px solid rgba(15,42,69,0.14) !important;
  color: #0f2a45 !important;
  border-radius: 50% !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1rem !important;
  line-height: 1 !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18) !important;
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s !important;
  transform: none !important;
  filter: none !important;
}

#mobile-nav-drawer-close:hover {
  background: rgba(255,255,255,1) !important;
  transform: scale(1.1) !important;
  box-shadow: 0 6px 18px rgba(0,0,0,0.24) !important;
}

[data-theme="dark"] #mobile-nav-drawer-close,
[data-theme="dark"] #mobile-nav-drawer-close:hover,
[data-theme="dark"] #mobile-nav-drawer-close:focus {
  background: rgba(255,255,255,0.10) !important;
  border-color: rgba(240,180,41,0.35) !important;
  color: #ffe9b3 !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(240,180,41,0.18) !important;
}

[data-theme="dark"] #mobile-nav-drawer-close:hover {
  background: rgba(255,255,255,0.18) !important;
}

.mobile-nav-drawer-logo {
  height: 56px;
  width: auto;
  object-fit: contain;
  opacity: 0.95;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.12));
}

[data-theme="dark"] .mobile-nav-drawer-logo {
  /* Own thin-outline asset, not the certificate's - see base-landing.css's
     .logo img dark-theme rule for why they can't share one file. */
  content: url("../../assets/images/logo_citizen_x_white_thin.png");
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.5)) drop-shadow(0 0 14px rgba(240,180,41,0.25));
}

.mobile-nav-drawer-greeting {
  margin: 0;
  padding: 16px 20px 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #4a6a88;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  transition: color 0.35s ease;
}

[data-theme="dark"] .mobile-nav-drawer-greeting {
  color: #f0b429;
}

.mobile-nav-drawer-items {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: 20px 22px 32px;
  flex: 1;
  overflow: hidden;
}

/* ── Drawer action buttons — shared base ── */
.mobile-nav-drawer-items .btn {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding: 16px 22px !important;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  border-radius: 18px !important;
  text-align: center !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 10px !important;
  letter-spacing: 0.4px !important;
  display: flex !important;
  position: relative !important;
  overflow: hidden !important;
  transition: transform 0.22s cubic-bezier(.22,.68,0,1.2),
              box-shadow 0.22s ease,
              filter 0.18s ease !important;
}

/* Glass-shine overlay on every drawer button */
.mobile-nav-drawer-items .btn::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 48%;
  background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 100%);
  border-radius: 18px 18px 0 0;
  pointer-events: none;
}

/* Respect hidden attribute — must come AFTER the display:flex rule */
.mobile-nav-drawer-items .btn[hidden] {
  display: none !important;
}

/* ── Profile / Admin button — rich deep blue ── */
#drawer-profile-btn,
#drawer-admin-btn {
  background: linear-gradient(150deg, #2fb3f0 0%, #1468c0 45%, #0d3d85 100%) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.22) !important;
  box-shadow:
    0 6px 20px rgba(20, 104, 192, 0.40),
    0 2px 6px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.20) !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.22) !important;
}

#drawer-profile-btn:hover,
#drawer-admin-btn:hover {
  transform: translateY(-3px) scale(1.01) !important;
  box-shadow:
    0 12px 32px rgba(20, 104, 192, 0.50),
    0 4px 10px rgba(0,0,0,0.20),
    inset 0 1px 0 rgba(255,255,255,0.25) !important;
  filter: brightness(1.08) !important;
}

#drawer-profile-btn:active,
#drawer-admin-btn:active {
  transform: translateY(0) scale(0.98) !important;
  filter: brightness(0.96) !important;
}

/* ── Logout button — warm crimson ── */
#drawer-logout-btn {
  background: linear-gradient(150deg, #f05252 0%, #c8192a 45%, #8b0c18 100%) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
  box-shadow:
    0 6px 20px rgba(200, 25, 42, 0.40),
    0 2px 6px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.18) !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.22) !important;
}

#drawer-logout-btn:hover {
  transform: translateY(-3px) scale(1.01) !important;
  box-shadow:
    0 12px 32px rgba(200, 25, 42, 0.50),
    0 4px 10px rgba(0,0,0,0.20),
    inset 0 1px 0 rgba(255,255,255,0.22) !important;
  filter: brightness(1.08) !important;
}

#drawer-logout-btn:active {
  transform: translateY(0) scale(0.98) !important;
  filter: brightness(0.96) !important;
}

#mobile-menu-btn {
  display: none;
}

@media (max-width: 720px) {
  /* Menu button sits inside the sticky header grid (right-actions cell).
     White/glass pill — matches the original site button aesthetic.
     Reads the same --m-btn-* custom properties as .header-actions .btn,
     now defined as plain CSS on .hero-header / .hero-header.is-compact
     (a class toggle), not written by JS on every scroll frame. */
  #mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: var(--m-btn-pad-y, 8px) var(--m-btn-pad-x, 12px) !important;
    font-size: var(--m-btn-fs, 0.88rem) !important;
    font-weight: 700;
    line-height: 1;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.90) !important;
    color: #102740 !important;
    border: 1.5px solid rgba(16, 39, 64, 0.18) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.10), 0 1px 3px rgba(0, 0, 0, 0.07) !important;
    letter-spacing: 0.2px;
    white-space: nowrap;
    transition: transform 0.18s, box-shadow 0.18s, background 0.18s,
      padding 0.25s ease, font-size 0.25s ease !important;
  }

  #mobile-menu-btn:hover,
  #mobile-menu-btn:active {
    background: rgba(255, 255, 255, 1) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14) !important;
  }

  /* When logged in on mobile: the drawer menu already covers Profile /
     Students / Admin Panel / Classes, so hide those specific buttons on
     index.html's header — but keep the theme toggle visible so column 1
     isn't empty and the logo stays centred. (#mentor-course-btn only ever
     lived in mentor.html's own header, which now has a dashboard-action-bar
     on the page instead, so there's nothing left to hide for it here.) */
  .hero-header.mobile-logged-in .header-actions-left #profile-btn,
  .hero-header.mobile-logged-in .header-actions-left #streak-badge,
  .hero-header.mobile-logged-in .header-actions-left #mentor-students-btn,
  .hero-header.mobile-logged-in .header-actions-left #school-admin-btn,
  .hero-header.mobile-logged-in .header-actions-left #admin-panel-btn {
    display: none !important;
  }

  /* Login button on mobile — same pill/glass style as the Menu button */
  .hero-header #login-btn {
    display: inline-flex !important;
    align-items: center;
    align-self: center !important;
    padding: var(--m-btn-pad-y, 8px) var(--m-btn-pad-x, 14px) !important;
    font-size: var(--m-btn-fs, 0.88rem) !important;
    font-weight: 700;
    line-height: 1;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.90) !important;
    color: #102740 !important;
    border: 1.5px solid rgba(16, 39, 64, 0.18) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.10), 0 1px 3px rgba(0,0,0,0.07) !important;
    letter-spacing: 0.2px;
    white-space: nowrap;
    transition: transform 0.18s, box-shadow 0.18s, background 0.18s,
      padding 0.25s ease, font-size 0.25s ease !important;
  }
  .hero-header #login-btn:hover,
  .hero-header #login-btn:active {
    background: rgba(255,255,255,1) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.14) !important;
  }

  /* When logged in on mobile: hide the regular login button */
  .hero-header.mobile-logged-in #login-btn {
    display: none !important;
  }

  /* When logged in on mobile: show the Menu button */
  .hero-header.mobile-logged-in #mobile-menu-btn {
    display: inline-flex !important;
  }
}

/* ── Final mobile overrides — must come LAST so they win over every earlier rule ── */
@media (max-width: 720px) {
  /* --m-logo-w is set on .hero-header / .hero-header.is-compact (plain
     CSS, class-toggle driven — see the "Hard mobile overrides" block).
     This rule must be the last word so nothing above overrides it. */
  .hero-header .logo img {
    width: var(--m-logo-w, min(72vw, 270px)) !important;
    max-width: 100% !important;
  }

  /* Cap logo when Menu button is visible so the button fits in the 1fr cell */
  .hero-header.mobile-logged-in .logo img {
    max-width: min(52vw, 195px) !important;
  }

  /* Stretch action cells to full grid-row height, then flex-centre their content */
  .hero-header .header-actions-left,
  .hero-header .header-actions-right {
    align-self: stretch !important;   /* fill the full grid row height */
    display: flex !important;
    align-items: center !important;   /* centre button vertically inside */
  }
  .hero-header .header-actions-left  { justify-content: flex-start !important; }
  .hero-header .header-actions-right { justify-content: flex-end   !important; }

  /* Compact state: keep a minimum height so the button sits visually
     centred in the sticky bar, not pinned to the very top edge */
  .hero-header.is-compact {
    min-height: 92px !important;
  }

}


/* ══════════════════════════════════════════════════════════════════════════════
   NEWS  — drawer badge + modal + editor + feed cards
══════════════════════════════════════════════════════════════════════════════ */

/* ── Drawer button badge (unread count) ── */
.news-drawer-btn {
  position: relative;
}
.news-drawer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e8192c;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  margin-left: 6px;
  vertical-align: middle;
  box-shadow: 0 2px 6px rgba(232,25,44,0.45);
}

/* ── Modal overlay ── */
.news-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(10, 24, 42, 0.60);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  box-sizing: border-box;
  animation: newsOverlayIn 0.20s ease;
}
.news-overlay[hidden] { display: none !important; }
@keyframes newsOverlayIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Dialog panel ── */
.news-dialog {
  background: #fff;
  width: 100%;
  max-width: 520px;
  /* height: 100% fills the overlay's padding-box → guarantees feed can scroll */
  height: 100%;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.30), 0 4px 16px rgba(0,0,0,0.14);
  animation: newsDialogIn 0.26s cubic-bezier(.22,.68,0,1.15);
}
@keyframes newsDialogIn {
  from { transform: scale(0.93) translateY(16px); opacity: 0; }
  to   { transform: scale(1)    translateY(0);    opacity: 1; }
}

/* ── Dialog header ── */
.news-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(16,39,64,0.08);
  flex-shrink: 0;
  background: linear-gradient(135deg, #e8f3fc, #f5f9ff);
  position: relative;
  overflow: hidden;
}
.news-dialog-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("https://wallpapers.com/images/hd/white-geometric-shapes-nvtlzwob9kw7mc8t.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.25;
  z-index: 0;
  pointer-events: none;
}
.news-dialog-header > * { position: relative; z-index: 1; }
.news-dialog-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0e2a46;
  letter-spacing: 0.3px;
}
.news-close-btn {
  background: rgba(16,39,64,0.08);
  border: 1px solid rgba(16,39,64,0.12);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  color: #0e2a46;
  transition: background 0.18s, transform 0.18s;
  flex-shrink: 0;
}
.news-close-btn:hover { background: rgba(16,39,64,0.15); transform: scale(1.08); }

/* ── Admin toolbar ── */
.news-admin-bar {
  padding: 12px 20px 10px;
  display: flex;
  justify-content: flex-end;
  border-bottom: 1px solid rgba(16,39,64,0.07);
  flex-shrink: 0;
}
.news-add-post-btn {
  background: linear-gradient(135deg, #1a6fb5, #2aabee) !important;
  color: #fff !important;
  border-radius: 999px !important;
  padding: 10px 24px !important;
  font-size: 0.93rem !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(42,171,238,0.30) !important;
}
.news-add-post-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* ── Editor panel ── */
.news-editor-wrap {
  padding: 16px 20px 0;
  border-bottom: 2px solid #e3edf7;
  flex-shrink: 0;
  background: #f7fbff;
  overflow-y: auto;
  max-height: 55vh;
}
.news-editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 700;
  color: #0e2a46;
  font-size: 1rem;
}
.news-editor-toolbar {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.news-tool-btn {
  background: #fff;
  border: 1.5px solid #cad8e8;
  border-radius: 8px;
  padding: 5px 11px;
  font-size: 0.9rem;
  cursor: pointer;
  color: #0e2a46;
  transition: background 0.15s, border-color 0.15s;
  line-height: 1.4;
}
.news-tool-btn:hover { background: #e8f3ff; border-color: #2aabee; }
.news-tool-link { font-size: 1rem; }

/* ── Editable area ── */
.news-editor-area {
  min-height: 100px;
  max-height: 180px;
  overflow-y: auto;
  border: 1.5px solid #cad8e8;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.95rem;
  color: #1a2e42;
  background: #fff;
  outline: none;
  line-height: 1.55;
  transition: border-color 0.18s;
}
.news-editor-area:focus { border-color: #2aabee; box-shadow: 0 0 0 3px rgba(42,171,238,0.12); }
.news-editor-area:empty::before {
  content: attr(data-placeholder);
  color: #a0b4c6;
  pointer-events: none;
}
.news-editor-area a { color: #1a6fb5; text-decoration: underline; }

/* ── Link popup ── */
.news-link-popup {
  background: #fff;
  border: 1.5px solid #cad8e8;
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 6px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.10);
}
.news-link-popup-hint {
  font-size: 0.8rem;
  color: #5a7a94;
  margin: 0 0 8px;
}
.news-link-url-input {
  width: 100%;
  border: 1.5px solid #cad8e8;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.9rem;
  box-sizing: border-box;
  outline: none;
  margin-bottom: 8px;
}
.news-link-url-input:focus { border-color: #2aabee; }
.news-link-popup-row {
  display: flex;
  gap: 8px;
}
.news-link-popup-row .btn {
  flex: 1;
  font-size: 0.88rem !important;
  padding: 7px 0 !important;
}
.news-link-cancel {
  background: rgba(16,39,64,0.06) !important;
  color: #3a5a78 !important;
  border-color: #cad8e8 !important;
}

/* ── Image row ── */
.news-editor-image-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 6px;
}
.news-image-pick-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #fff;
  border: 1.5px solid #cad8e8;
  border-radius: 8px;
  font-size: 0.88rem;
  color: #3a5a78;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.news-image-pick-btn:hover { background: #e8f3ff; border-color: #2aabee; }
.news-image-remove-btn {
  background: rgba(200,25,44,0.08);
  border: 1.5px solid rgba(200,25,44,0.20);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.85rem;
  color: #c8192c;
  cursor: pointer;
}
.news-image-remove-btn:hover { background: rgba(200,25,44,0.15); }
.news-image-preview {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 8px;
}

/* ── Editor footer ── */
.news-editor-actions {
  display: flex;
  gap: 10px;
  padding: 12px 0 16px;
}
.news-save-btn {
  flex: 1;
  background: linear-gradient(135deg, #1a6fb5, #2aabee) !important;
  color: #fff !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(42,171,238,0.28) !important;
}

/* ── PIN gate ── */
.news-dialog { position: relative; }
.news-pin-wrap {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(10,24,42,0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}
.news-pin-wrap[hidden] { display: none !important; }
.news-pin-dialog {
  background: #fff;
  border-radius: 20px;
  padding: 28px 28px 22px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.28);
  animation: newsDialogIn 0.22s cubic-bezier(.22,.68,0,1.15);
}

[data-theme="dark"] .news-pin-dialog {
  background: linear-gradient(160deg, #0f1e38 0%, #0a1628 100%);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}
.news-pin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.news-pin-title {
  font-weight: 800;
  color: #0e2a46;
  font-size: 1.05rem;
}
.news-pin-hint {
  font-size: 0.86rem;
  color: #5a7a94;
  margin: 0 0 16px;
  line-height: 1.45;
}
.news-pin-input {
  width: 100%;
  box-sizing: border-box;
  border: 2px solid #cad8e8;
  border-radius: 14px;
  padding: 14px;
  font-size: 1.6rem;
  letter-spacing: 10px;
  text-align: center;
  outline: none;
  font-weight: 700;
  color: #0e2a46;
  margin-bottom: 10px;
  transition: border-color 0.18s;
  background: #f7fbff;
}
.news-pin-input:focus { border-color: #2aabee; box-shadow: 0 0 0 3px rgba(42,171,238,0.14); background: #fff; }
.news-pin-status {
  font-size: 0.83rem;
  min-height: 20px;
  margin-bottom: 12px;
  font-weight: 600;
  text-align: center;
}
.news-pin-status:not(:empty) { padding: 6px 10px; border-radius: 8px; }
/* green for success messages (✓), red for errors */
.news-pin-status[data-ok="true"] { color: #0a7a3a; background: rgba(10,122,58,0.08); }
.news-pin-status:not([data-ok="true"]):not(:empty) { color: #c8192c; background: rgba(200,25,44,0.07); }
.news-pin-row {
  display: flex;
  gap: 10px;
}
.news-pin-submit-btn {
  flex: 1;
  background: linear-gradient(135deg, #1a6fb5, #2aabee) !important;
  color: #fff !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  border: none !important;
  padding: 11px 0 !important;
  font-size: 0.93rem !important;
}
.news-pin-resend-btn {
  background: rgba(16,39,64,0.06) !important;
  color: #3a5a78 !important;
  border-radius: 999px !important;
  border: 1.5px solid #cad8e8 !important;
  font-size: 0.83rem !important;
  padding: 11px 14px !important;
}

/* ── News feed ── */
.news-feed {
  flex: 1;
  min-height: 0;        /* required for overflow-y: auto inside flex */
  overflow-y: auto;
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.news-feed-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #5a7a94;
  font-size: 0.9rem;
  justify-content: center;
  padding: 24px 0;
}
.news-spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2.5px solid #cad8e8;
  border-top-color: #2aabee;
  border-radius: 50%;
  animation: newsSpin 0.7s linear infinite;
}
@keyframes newsSpin { to { transform: rotate(360deg); } }
.news-empty {
  text-align: center;
  color: #8aabca;
  font-size: 0.9rem;
  padding: 32px 0;
}

/* ── News card ── */
.news-card {
  background: #fff;
  border-radius: 16px;
  border: 1.5px solid rgba(16,39,64,0.08);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(16,39,64,0.06);
  transition: box-shadow 0.2s;
  position: relative;
  flex-shrink: 0;   /* don't let cards shrink inside the feed flex column */
}
.news-card:hover { box-shadow: 0 4px 20px rgba(16,39,64,0.10); }
.news-card-unread {
  border-color: rgba(42,171,238,0.30);
  box-shadow: 0 2px 14px rgba(42,171,238,0.12);
}
.news-card-new-badge {
  display: inline-block;
  background: linear-gradient(135deg, #e8192c, #ff4b5c);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 0 0 10px 0;
  position: absolute;
  top: 0; left: 0;
  box-shadow: 0 2px 8px rgba(232,25,44,0.35);
  z-index: 1;
}
.news-card-img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  display: block;
}
.news-card-body {
  padding: 12px 14px 14px;
  display: block;
}
.news-card-content {
  font-size: 0.93rem;
  color: #1a2e42;
  line-height: 1.6;
  word-break: break-word;
}
.news-card-content a {
  color: #1a6fb5;
  text-decoration: underline;
  font-weight: 600;
  word-break: break-all;
}
.news-card-content a:hover { color: #2aabee; }
.news-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(16,39,64,0.07);
}
.news-card-time {
  font-size: 0.78rem;
  color: #7a9ab4;
  font-weight: 600;
}
.news-card-admin-actions {
  display: flex;
  gap: 6px;
}
.btn-xs {
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  border: 1.5px solid #cad8e8;
  background: #f5f9ff;
  color: #3a5a78;
  transition: background 0.15s, border-color 0.15s;
}
.btn-xs:hover { background: #e4f0fb; border-color: #2aabee; }
.btn-xs-red {
  background: rgba(200,25,44,0.06);
  border-color: rgba(200,25,44,0.20);
  color: #c8192c;
}
.btn-xs-red:hover { background: rgba(200,25,44,0.14); }

/* ═══════════════════════════════════════════════
   NEWS v2 ADDITIONS
═══════════════════════════════════════════════ */

/* ── Multi-image thumbnails in editor ── */
.news-image-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 8px;
}
.news-image-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: #e8f0f8;
  border: 1.5px solid #cad8e8;
}
.news-image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.news-image-thumb-del {
  position: absolute;
  top: 3px; right: 3px;
  width: 20px; height: 20px;
  background: rgba(10,20,36,0.65);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 0.62rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  transition: background 0.15s;
}
.news-image-thumb-del:hover { background: rgba(200,25,44,0.85); }

/* ── Telegram-style photo grid ── */
.news-photo-grid {
  display: grid;
  gap: 3px;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  line-height: 0;
}
/* 1 image: full width */
.news-photo-grid[data-count="1"] { grid-template-columns: 1fr; }
.news-photo-grid[data-count="1"] .news-grid-img { height: auto; max-height: 220px; }
/* 2 images: side by side */
.news-photo-grid[data-count="2"] { grid-template-columns: 1fr 1fr; }
/* 3 images: big left + 2 stacked right */
.news-photo-grid[data-count="3"] { grid-template-columns: 1fr 1fr; grid-template-rows: 90px 90px; }
.news-photo-grid[data-count="3"] .news-grid-img:first-child { grid-row: 1 / 3; height: 183px; } /* 2×90 + gap */
/* 4 images: 2×2 */
.news-photo-grid[data-count="4"] { grid-template-columns: 1fr 1fr; }
/* 5–10 images: 3 columns */
.news-photo-grid[data-count="5"],
.news-photo-grid[data-count="6"],
.news-photo-grid[data-count="7"],
.news-photo-grid[data-count="8"],
.news-photo-grid[data-count="9"],
.news-photo-grid[data-count="10"] { grid-template-columns: repeat(3, 1fr); }

.news-grid-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: filter 0.18s;
}
.news-grid-img:hover { filter: brightness(0.88); }

/* "+N more" wrapper */
.news-grid-more-wrap {
  position: relative;
  overflow: hidden;
  height: 120px;
}
.news-grid-more-wrap .news-grid-img { height: 100%; }
.news-grid-more-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,20,36,0.52);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* ── Floating Telegram-style selection toolbar ── */
.news-sel-toolbar {
  position: fixed;
  z-index: 9999;
  background: #1a2e42;
  border-radius: 10px;
  padding: 5px 8px;
  display: flex;
  gap: 2px;
  box-shadow: 0 4px 22px rgba(0,0,0,0.38);
  transform: translateX(-50%);
  pointer-events: auto;
  white-space: nowrap;
  transition: opacity 0.12s;
  /* triangle pointer below */
}
.news-sel-toolbar::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border: 6px solid transparent;
  border-bottom: none;
  border-top-color: #1a2e42;
}
.news-sel-toolbar[hidden] { display: none !important; }
.news-sel-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 7px;
  transition: background 0.14s;
  line-height: 1.3;
  min-width: 34px;
  text-align: center;
}
.news-sel-btn:hover { background: rgba(255,255,255,0.18); }
.news-sel-btn b { font-weight: 800; }
.news-sel-btn i { font-style: italic; }

/* separator between toolbar buttons */
.news-sel-toolbar .news-sel-sep {
  width: 1px;
  background: rgba(255,255,255,0.20);
  margin: 4px 2px;
  flex-shrink: 0;
}

/* ── Mentor quiz breakdown modal ──────────────────────────────────────── */
.mentor-quiz-breakdown-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 25, 45, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1200;
}
.mentor-quiz-breakdown-modal.is-open {
  display: flex;
}
.mentor-quiz-breakdown-card {
  width: min(680px, 100%);
  max-height: 90vh;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #cfdae6;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(10,25,45,0.18);
}
.mentor-quiz-breakdown-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #e3eaf2;
  background: #f6f9fc;
  flex-shrink: 0;
}
.mentor-quiz-breakdown-topbar h3 {
  flex: 1;
  margin: 0;
  font-size: 1rem;
  color: #143456;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mentor-quiz-breakdown-close-btn,
.mentor-quiz-breakdown-back-btn {
  flex-shrink: 0;
  padding: 5px 12px;
  font-size: 0.88rem;
}
.mentor-quiz-breakdown-list-view {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  -webkit-overflow-scrolling: touch;
}
.mentor-quiz-breakdown-note {
  margin: 0 0 10px;
  color: #5a7a9a;
  font-size: 0.92rem;
  text-align: center;
  padding: 8px 0;
}
.mentor-quiz-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.mentor-qb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  border: 1.5px solid transparent;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.mentor-qb-item:active {
  transform: scale(0.98);
  opacity: 0.82;
}
.mentor-qb-item.is-correct {
  background: linear-gradient(90deg, #edf8f1 0%, #e4f3ea 100%);
  border-color: #a8d5b8;
  color: #165f38;
}
.mentor-qb-item.is-wrong {
  background: linear-gradient(90deg, #fff2f0 0%, #fde9e6 100%);
  border-color: #f5b3ab;
  color: #9f2f23;
}
.mentor-qb-item.is-skipped {
  background: #f2f5f8;
  border-color: #cfd9e5;
  color: #5a7a9a;
}
.mentor-qb-num {
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  background: rgba(0,0,0,0.09);
  padding: 2px 7px;
  border-radius: 5px;
  min-width: 30px;
  text-align: center;
}
.mentor-qb-text {
  flex: 1;
  font-size: 0.87rem;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.mentor-qb-status {
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
}
/* Detail view */
.mentor-quiz-detail-view {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  -webkit-overflow-scrolling: touch;
}
.mentor-qb-detail-status {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.mentor-qb-detail-status.is-correct {
  background: #e4f3ea;
  color: #165f38;
}
.mentor-qb-detail-status.is-wrong {
  background: #fde9e6;
  color: #9f2f23;
}
.mentor-qb-detail-status.is-skipped {
  background: #f2f5f8;
  color: #5a7a9a;
}
.mentor-qb-detail-question {
  font-size: 1.02rem;
  color: #143456;
  margin: 0 0 14px;
  line-height: 1.5;
}
.mentor-qb-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.mentor-qb-option {
  padding: 10px 13px;
  border-radius: 9px;
  border: 1.5px solid #dde6f0;
  background: #f8fafb;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #2a4060;
}
.mentor-qb-option.is-correct-answer {
  border-color: #7dcb96;
  background: linear-gradient(90deg, #edf8f1 0%, #e4f3ea 100%);
  color: #165f38;
  font-weight: 600;
}
.mentor-qb-option.is-wrong-selected {
  border-color: #f5b3ab;
  background: linear-gradient(90deg, #fff2f0 0%, #fde9e6 100%);
  color: #9f2f23;
}
.mentor-qb-option-key {
  font-weight: 700;
  margin-right: 3px;
}
.mentor-qb-correct-badge,
.mentor-qb-wrong-badge {
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 4px;
  vertical-align: middle;
}
.mentor-qb-correct-badge {
  color: #165f38;
  background: #c7ecd5;
}
.mentor-qb-wrong-badge {
  color: #9f2f23;
  background: #fbd7d3;
}
.mentor-qb-explanation {
  background: #f0f4f8;
  border-radius: 9px;
  padding: 12px 14px;
  font-size: 0.88rem;
  color: #3a5a7a;
  line-height: 1.5;
}
/* Accuracy hint */
.admin-progress-percent-hint {
  font-size: 0.68rem;
  opacity: 0.65;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-top: 1px;
}
@media (max-width: 480px) {
  .mentor-quiz-breakdown-card {
    max-height: 96vh;
    border-radius: 12px;
  }
  .mentor-quiz-breakdown-topbar h3 {
    font-size: 0.88rem;
  }
  .mentor-qb-item {
    padding: 8px 10px;
  }
  .mentor-qb-text {
    font-size: 0.82rem;
  }
  .mentor-quiz-breakdown-list-view,
  .mentor-quiz-detail-view {
    padding: 10px;
  }
}

/* ── Header buttons (Login / Home / Logout / Upgrade / profile / admin panel):
   always transparent background with gold text — same look in light & dark
   theme and across every header type (.hero-header, .level-header,
   .admin-header, results modal headers, etc.). Placed last so it wins over
   the earlier per-breakpoint !important color/background overrides. ── */
header .btn,
.hero-header .btn,
.hero-header .header-actions .btn,
.hero-header.is-compact .header-actions .btn,
.level-header .btn,
.level-header .level-header-actions .btn,
.admin-header .btn,
.header-actions .btn,
.results-modal-level-header .btn {
  background: rgba(0, 0, 0, 0.28) !important;
  background-image: none !important;
  color: #f0b429 !important;
  border: 1.5px solid rgba(240, 180, 41, 0.55) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

header .btn:hover,
.hero-header .btn:hover,
.hero-header .header-actions .btn:hover,
.hero-header.is-compact .header-actions .btn:hover,
.level-header .btn:hover,
.level-header .level-header-actions .btn:hover,
.admin-header .btn:hover,
.header-actions .btn:hover,
.results-modal-level-header .btn:hover {
  background: rgba(0, 0, 0, 0.42) !important;
  color: #ffd874 !important;
  border-color: rgba(240, 180, 41, 0.85) !important;
}

/* The mobile (≤720px) "Login" / hamburger "Menu" pills have their own
   ID-selector !important overrides (white glass pills) defined earlier —
   re-declare with matching #id specificity here, later in source order,
   so the gold/transparent look wins on phones too. */
@media (max-width: 720px) {
  .hero-header #login-btn,
  #mobile-menu-btn {
    background: rgba(0, 0, 0, 0.28) !important;
    background-image: none !important;
    color: #f0b429 !important;
    border: 1.5px solid rgba(240, 180, 41, 0.55) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.18) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
  }

  .hero-header #login-btn:hover,
  .hero-header #login-btn:active,
  #mobile-menu-btn:hover,
  #mobile-menu-btn:active {
    background: rgba(0, 0, 0, 0.42) !important;
    color: #ffd874 !important;
    border-color: rgba(240, 180, 41, 0.85) !important;
    transform: translateY(-1px) !important;
  }
}

/* ── Profile modal — dark theme ── */
[data-theme="dark"] .profile-modal-card {
  background: linear-gradient(160deg, #0d1c35 0%, #091525 100%);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .profile-topbar {
  background: linear-gradient(135deg, #0a1628 0%, #0e2d5a 100%);
}

[data-theme="dark"] .profile-people {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.09);
}

[data-theme="dark"] .profile-people .profile-mentor {
  border-bottom-color: rgba(255, 255, 255, 0.07);
}

[data-theme="dark"] .profile-mentor-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

[data-theme="dark"] .profile-mentor-avatar {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .profile-mentor-kicker {
  color: #4a6a8a;
}

[data-theme="dark"] .profile-mentor-name {
  color: #d8e8ff;
}

[data-theme="dark"] .profile-mentor-contact-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #d8e8ff;
}

[data-theme="dark"] .profile-mentor-contact-btn:hover {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .profile-user-avatar-fallback {
  background: linear-gradient(135deg, #1a3256 0%, #0f2040 100%);
  color: #a8c8f0;
}

[data-theme="dark"] .profile-user-avatar-msg {
  color: #6f8aa8;
}

[data-theme="dark"] .profile-stat-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  border-top-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .profile-stat-card:has(#profile-level)             { border-top-color: #3b82f6; }
[data-theme="dark"] .profile-stat-card:has(#profile-progress)          { border-top-color: #34d399; }
[data-theme="dark"] .profile-subscription-card                         { border-top-color: #fbbf24 !important; }
[data-theme="dark"] .profile-achievements-card                         { border-top-color: #fcd34d !important; }
[data-theme="dark"] .profile-stat-card:has(#profile-lessons-completed) { border-top-color: #2dd4bf; }
[data-theme="dark"] .profile-stat-card:has(#profile-next-unlock)       { border-top-color: #a78bfa; }

[data-theme="dark"] .profile-stat-card h4 {
  color: #6f8aa8;
}

[data-theme="dark"] .profile-stat-card p {
  color: #e8f0ff;
}

[data-theme="dark"] .profile-achievements-progress {
  color: #e8f0ff;
}

[data-theme="dark"] .profile-achievements-list {
  color: #9bb8d8;
}

[data-theme="dark"] .profile-achievement-pill {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: #aac8e8;
}

[data-theme="dark"] .profile-chart-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.09);
}

[data-theme="dark"] .profile-chart-title {
  color: #4a6a8a;
}

[data-theme="dark"] .profile-chart-label {
  color: #6f8aa8;
}

/* ── parent.html dashboard (hero card + sections) — dark theme ── */
[data-theme="dark"] [data-parent-page] .admin-head {
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .parent-hero-card {
  background: linear-gradient(135deg, #17408a, #0f2d63);
  box-shadow: 0 12px 26px rgba(6, 16, 36, 0.5);
}

[data-theme="dark"] .parent-section-title {
  color: #d8e8ff;
}

[data-theme="dark"] .parent-mini-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  /* Colored shadows read as muddy on a dark background - plain black,
     more opaque than the light-theme version, reads as depth instead. */
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .parent-mini-card p {
  color: #e8f0ff;
}

[data-theme="dark"] #parent-mentor-block .profile-mentor-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .parent-section--course .parent-mini-card { border-top-color: #38bdf8; }
[data-theme="dark"] .parent-section--engagement .parent-mini-card { border-top-color: #fbbf24; }

[data-theme="dark"] .parent-mini-bar-track {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] #parent-lessons-bar-fill { color: #38bdf8; }
[data-theme="dark"] #parent-achievements-bar-fill { color: #fbbf24; }

[data-theme="dark"] .parent-combo-secondary {
  color: #8aa4c0 !important;
}

[data-theme="dark"] .parent-combo-divider {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .parent-status-pill {
  background: rgba(255, 255, 255, 0.08);
  color: #9bb8d8;
}

[data-theme="dark"] .parent-status-pill.is-ok {
  background: rgba(52, 211, 153, 0.16);
  color: #34d399;
}

[data-theme="dark"] .parent-status-pill.is-warning {
  background: rgba(251, 191, 36, 0.18);
  color: #fbbf24;
}

[data-theme="dark"] .parent-chip {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}

[data-theme="dark"] #parent-subscription-card.is-warning .parent-combo-primary { color: #fbbf24; }
[data-theme="dark"] #parent-subscription-card.is-urgent .parent-combo-primary  { color: #f87171; }
[data-theme="dark"] #parent-subscription-card.is-warning   { border-top-color: #fbbf24; }
[data-theme="dark"] #parent-subscription-card.is-urgent    { border-top-color: #f87171; }

[data-theme="dark"] .profile-support-label {
  color: #7a98b8;
}

[data-theme="dark"] .profile-support-icon[aria-label="Phone"],
[data-theme="dark"] .profile-support-icon[aria-label="Gmail"] {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.06));
  border-color: rgba(255, 255, 255, 0.16);
}

[data-theme="dark"] .mentor-self-edit {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .mentor-self-edit-title {
  color: #e8f0ff;
}

[data-theme="dark"] .mentor-self-edit-input,
[data-theme="dark"] .mentor-self-edit-textarea {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  color: #d8e8ff;
}

[data-theme="dark"] .mentor-self-edit-input:focus,
[data-theme="dark"] .mentor-self-edit-textarea:focus {
  border-color: rgba(240, 180, 41, 0.6);
  outline: none;
}

[data-theme="dark"] .mentor-self-edit-msg {
  color: #9bb8d8;
}

[data-theme="dark"] .mentor-self-edit-msg.is-error {
  color: #ff8a8a;
}

[data-theme="dark"] .mentor-self-edit-msg.is-success {
  color: #34d399;
}

/* ══════════════════════════════════════════════════════════════════════════════
   ARTICLES — light theme
══════════════════════════════════════════════════════════════════════════════ */

/* ── Articles list page ── */
.articles-list-page .lessons-header h1 {
  font-size: 2.4rem;
}

.article-card-item {
  position: relative;
}

.article-card-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  flex-shrink: 0;
}

/* Two-class selector beats any single .lesson-cover override in media queries */
.lesson-cover.article-card-cover {
  height: auto;
  align-self: stretch;
}

.article-card-icon {
  font-size: 4rem;
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
}

.article-cover-read-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #3ddc84;
  background: rgba(255, 255, 255, 0.7);
  color: #1f7a45;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-cover-read-badge svg {
  width: 13px;
  height: 13px;
}

.article-card-content {
  flex: 1;
  min-width: 0;
  gap: 10px;
}

.article-card-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 4px;
}

.article-read-count-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fcd34d, #f59e0b);
  color: #3d2a04;
  font-size: 0.7rem;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.35);
}

.article-read-count-chip svg {
  width: 11px;
  height: 11px;
}

