/* ==========================================================================
   1. زر لوحة الألوان (THEME BUTTON) - النمط الزجاجي العصري
   ========================================================================== */
.theme-control {
  position: fixed;
  overflow: visible;
  top: 22px;
  right: 362px;
  z-index: 1000;
}

.theme-btn {
  width: 50px;
  height: 42px;
  border-radius: 12px;
  /* نمط Glassmorphism متوافق مع الواجهة البيضاء الجديدة */
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(14, 116, 144, 0.15);
  color: #0e7490; /* اللون الكحلي الهندسي المعتمد */
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.theme-btn:hover {
  background: #0e7490;
  color: #ffffff;
  border-color: #0e7490;
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(14, 116, 144, 0.2);
}

/* ==========================================================================
   2. قائمة اختيار الألوان (THEME MENU)
   ========================================================================== */
.theme-menu {
  position: absolute;
  top: 52px;
  right: 0;
  left: auto;
  display: none;
  flex-wrap: wrap;
  gap: 8px; /* مسافة مريحة وموزعة بشكل هندسي */
  padding: 12px;
  width: 150px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
}

/* الكلاس التزامني لإظهار القائمة بسلاسة */
.theme-menu.show,
.theme-menu.show-theme {
  display: flex;
}

/* ==========================================================================
   3. دوائر الألوان التفاعلية (COLOR DOTS)
   ========================================================================== */
.color {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #ffffff; /* إطار أبيض داخلي ليفصل اللون ويبرزه */
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.color:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.3);
}

/* باليت الألوان المريحة للعين وبدون توهج Cyberpunk الفاقع */
.color.blue      { background: #3b82f6; }
.color.green     { background: #10b981; }
.color.purple    { background: #8b5cf6; }
.color.orange    { background: #f97316; }
.color.red       { background: #ef4444; }
.color.pink      { background: #ec4899; }
.color.yellow    { background: #eab308; }
.color.cyan      { background: #06b6d4; }
.color.lime      { background: #84cc16; }
.color.teal      { background: #14b8a6; }
.color.magenta   { background: #d946ef; }
.color.maroon    { background: #9f1239; }
.color.navy      { background: #1e3a8a; }
.color.gray      { background: #64748b; }
.color.black     { background: #0f172a; }
.color.off       { background: #cbd5e1; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #334155; font-weight: bold; }

/* ==========================================================================
   4. تأثيرات التناغم اللوني للمنصة (THEMES EFFECTS)
   بدلاً من تغطية الصفحة بطبقة تحجب الرؤية، الآن نقوم بصبغ حواف الكروت والعناصر برقة 
   ========================================================================== */
body.theme-blue .main-container, body.theme-blue .containar  { border-top: 4px solid #3b82f6; }
body.theme-green .main-container, body.theme-green .containar { border-top: 4px solid #10b981; }
body.theme-purple .main-container, body.theme-purple .containar { border-top: 4px solid #8b5cf6; }
body.theme-orange .main-container, body.theme-orange .containar { border-top: 4px solid #f97316; }
body.theme-red .main-container, body.theme-red .containar    { border-top: 4px solid #ef4444; }
body.theme-pink .main-container, body.theme-pink .containar   { border-top: 4px solid #ec4899; }
body.theme-yellow .main-container, body.theme-yellow .containar { border-top: 4px solid #eab308; }
body.theme-cyan .main-container, body.theme-cyan .containar   { border-top: 4px solid #06b6d4; }
body.theme-lime .main-container, body.theme-lime .containar   { border-top: 4px solid #84cc16; }
body.theme-teal .main-container, body.theme-teal .containar   { border-top: 4px solid #14b8a6; }
body.theme-magenta .main-container, body.theme-magenta .containar { border-top: 4px solid #d946ef; }
body.theme-maroon .main-container, body.theme-maroon .containar { border-top: 4px solid #9f1239; }
body.theme-navy .main-container, body.theme-navy .containar   { border-top: 4px solid #1e3a8a; }
body.theme-gray .main-container, body.theme-gray .containar   { border-top: 4px solid #64748b; }
body.theme-black .main-container, body.theme-black .containar { border-top: 4px solid #0f172a; }

/* تغيير لون هيدر الفصول ديناميكياً مع الثيم المختار */
body.theme-blue .semester  { background: rgba(59, 130, 246, 0.08); color: #3b82f6; }
body.theme-green .semester { background: rgba(16, 185, 129, 0.08); color: #10b981; }
body.theme-purple .semester{ background: rgba(139, 92, 246, 0.08); color: #8b5cf6; }
body.theme-orange .semester{ background: rgba(249, 115, 22, 0.08); color: #f97316; }
body.theme-red .semester   { background: rgba(239, 68, 68, 0.08); color: #ef4444; }

/* ==========================================================================
   5. الاستجابة مع الشاشات المختلفة (RESPONSIVE FIX)
   ========================================================================== */
@media(max-width: 768px) {
  .theme-control {
    right: 70px; /* لضمان عدم تداخله مع زر القائمة الجانبية الموبايل */
    top: 14px;
  }

  .theme-btn {
    width: 44px;
    height: 38px;
    font-size: 16px;
    border-radius: 10px;
  }

  .theme-menu {
    right: 0;
    left: auto;
    width: 130px;
    gap: 6px;
    padding: 10px;
  }
}

/* ========================================================================
   IUG COMPUTER ENGINEERING — EDITORIAL REDESIGN LAYER
   Shared by the home, year, resource, and study-tool pages. These overrides
   refine the existing interface without changing routes or page behavior.
   ======================================================================== */
:root {
  --ce-ink: #12243a;
  --ce-ink-soft: #263b52;
  --ce-teal: #087e83;
  --ce-teal-soft: #e7f4f2;
  --ce-gold: #c99332;
  --ce-paper: #f6f8f7;
  --ce-line: #dce5e4;
  --ce-ease: cubic-bezier(.2,.75,.25,1);
}

body {
  background-color: var(--bg-body, var(--ce-paper));
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--ce-teal) 68%, white);
  outline-offset: 3px;
}

/* The shared university navigation keeps every existing destination visible. */
.unified-navbar {
  background: color-mix(in srgb, var(--bg-surface, #fff) 94%, transparent);
  border-bottom: 1px solid var(--ce-line);
  box-shadow: 0 4px 18px rgba(18, 36, 58, .045);
}

.unified-navbar.is-scrolled {
  background: color-mix(in srgb, var(--bg-surface, #fff) 96%, transparent);
  border-bottom-color: var(--ce-line);
  box-shadow: 0 10px 26px rgba(18, 36, 58, .09);
}

.navbar-container {
  max-width: 1380px;
}

.brand-title {
  color: var(--ce-ink);
  letter-spacing: .035em;
}

.desktop-subnav {
  border-top: 1px solid color-mix(in srgb, var(--ce-line) 72%, transparent);
  background: var(--bg-surface, #fff);
}

.subnav-container {
  max-width: 1380px;
  gap: .25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--ce-line) transparent;
}

.subnav-link {
  min-height: 42px;
  border-radius: 8px;
  transition: color .2s var(--ce-ease), background .2s var(--ce-ease), transform .2s var(--ce-ease);
}

.subnav-link:hover,
.subnav-link:focus-visible {
  background: var(--ce-teal-soft);
  color: var(--ce-teal);
  transform: translateY(-1px);
}

.subnav-link.active {
  color: var(--ce-teal);
  background: var(--ce-teal-soft);
  box-shadow: inset 0 -2px var(--ce-teal);
}

.sidebar-trigger-btn,
.theme-toggle-btn,
.action-icon-pill {
  border-radius: 10px;
}

/* Keep the wide navigation balanced instead of letting every label expand. */
@media (min-width: 769px) and (max-width: 1440px) {
  .navbar-container {
    height: 62px;
    gap: clamp(.55rem, 1vw, .9rem);
    padding-inline: clamp(.65rem, 1.8vw, 1.2rem);
  }

  .navbar-left-group { gap: .55rem; }
  .brand-logo-link { gap: .45rem; }
  .brand-logo-link svg { width: 32px; height: 32px; }
  .brand-title { font-size: .92rem; letter-spacing: .015em; }
  .brand-sub { font-size: .66rem; }

  .navbar-search-area {
    flex: 1 1 230px;
    min-width: 170px;
    max-width: 340px;
    margin-inline: .15rem;
  }

  .navbar-actions { gap: .35rem; }
  .navbar-actions .action-icon-pill,
  .navbar-actions .action-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
    justify-content: center;
    gap: 0;
    border-radius: 10px;
  }

  .navbar-actions .action-icon-pill > span:not(.count-tag),
  .navbar-actions .action-btn span {
    display: inline-block !important;
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .navbar-actions .theme-toggle-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .navbar-actions .nav-cta-ruby-btn {
    min-height: 38px;
    padding: .45rem .72rem;
    font-size: .76rem;
    white-space: nowrap;
  }

  .subnav-container {
    gap: .15rem;
    padding-block: .25rem;
  }

  .subnav-link {
    min-height: 37px;
    padding-inline: .58rem;
    gap: .3rem;
    font-size: .76rem;
  }
}

@media (min-width: 769px) and (max-width: 1100px) {
  .navbar-search-area { display: none; }
  .navbar-actions .mobile-search-btn { display: inline-flex !important; }
  .navbar-container { gap: .5rem; }
}

body.dark-mode .brand-title { color: var(--text-main); }
body.dark-mode .desktop-subnav { background: var(--bg-surface); border-color: var(--border-default); }
body.dark-mode .subnav-link:hover,
body.dark-mode .subnav-link:focus-visible,
body.dark-mode .subnav-link.active { background: rgba(8,126,131,.18); color: #74d2cb; }
body.dark-mode .unified-navbar,
body.dark-mode .unified-navbar.is-scrolled { border-color: var(--border-default); }

/* Homepage hero: original processor illustration, calmer page surface. */
.hero-epic-section {
  color: var(--ce-ink);
  background:
    radial-gradient(ellipse at 15% 12%, rgba(8,126,131,.10), transparent 36%),
    radial-gradient(ellipse at 85% 90%, rgba(201,147,50,.10), transparent 34%),
    linear-gradient(145deg, #fbfcfa 0%, #eef4f2 100%);
  border-bottom: 1px solid var(--ce-line);
  padding-block: clamp(2.5rem, 5vw, 5rem);
}

.hero-grid-bg-overlay {
  opacity: .35;
  background-image: linear-gradient(to right, rgba(18,36,58,.075) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(18,36,58,.075) 1px, transparent 1px);
  mask-image: radial-gradient(ellipse at 50% 50%, #000 10%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 10%, transparent 78%);
}

.hero-epic-content-grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  position: relative;
  z-index: 1;
  max-width: 1380px;
}

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

.hero-status-pill {
  color: var(--ce-teal);
  background: rgba(255,255,255,.8);
  border-color: rgba(8,126,131,.2);
  box-shadow: 0 5px 18px rgba(18,36,58,.06);
  backdrop-filter: blur(8px);
}

.status-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #168c70;
  box-shadow: 0 0 0 4px rgba(22,140,112,.12);
  animation: statusBreath 2.6s ease-in-out infinite;
}

@keyframes statusBreath { 50% { box-shadow: 0 0 0 7px rgba(22,140,112,.04); } }

.hero-epic-title {
  max-width: 720px;
  color: var(--ce-ink);
  font-size: clamp(2.25rem, 4.4vw, 4.1rem);
  line-height: 1.25;
  letter-spacing: -.035em;
}

.hero-title-highlight {
  color: var(--ce-teal);
  white-space: nowrap;
}

.hero-epic-lead {
  max-width: 660px;
  color: #526477;
  font-size: clamp(1rem, 1.35vw, 1.14rem);
  line-height: 1.95;
}

.hero-cta-button-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .7rem;
  margin-bottom: 2rem;
}

.hero-primary-glow-btn,
.hero-secondary-glass-btn {
  min-height: 50px;
  border-radius: 10px;
  box-shadow: none;
  transition: transform .22s var(--ce-ease), background .22s var(--ce-ease), border-color .22s var(--ce-ease), box-shadow .22s var(--ce-ease);
}

.hero-primary-glow-btn {
  color: #fff;
  background: var(--ce-teal);
  padding-inline: 1.25rem;
  box-shadow: 0 8px 20px rgba(8,126,131,.18);
}

.hero-primary-glow-btn:hover {
  color: #fff;
  background: #066a6e;
  transform: translateY(-2px);
  box-shadow: 0 11px 23px rgba(8,126,131,.24);
  animation: none;
}

.hero-secondary-glass-btn {
  color: var(--ce-ink);
  background: rgba(255,255,255,.72);
  border: 1px solid #d8e2e0;
  padding-inline: 1.05rem;
  backdrop-filter: none;
}

.hero-secondary-glass-btn:hover {
  color: var(--ce-teal);
  background: #fff;
  border-color: rgba(8,126,131,.42);
  transform: translateY(-2px);
}

.hero-quick-metrics-row {
  gap: 0;
  border-color: #d8e2e0;
}

.hero-metric-item {
  min-width: 92px;
  padding-inline: clamp(.65rem, 1.4vw, 1.2rem);
  border-inline-start: 1px solid #d8e2e0;
}

.hero-metric-item:first-child { padding-inline-start: 0; }
.hero-metric-item:last-child { border-inline-start: 0; }
.hero-metric-number { font-size: clamp(1.15rem, 2vw, 1.45rem); }
.hero-metric-label { color: #68798a; }

.hero-centerpiece-visual {
  min-height: clamp(320px, 38vw, 500px);
  border: 0;
  border-radius: 0;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(ellipse at 50% 50%, rgba(9,126,131,.12), transparent 68%);
  box-shadow: none;
}

.hero-centerpiece-visual::before,
.hero-centerpiece-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-centerpiece-visual::before {
  background-image: linear-gradient(180deg, rgba(5,12,23,.04), rgba(5,12,23,.30)),
    linear-gradient(90deg, rgba(5,12,23,.25), transparent 72%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 28px 28px, 28px 28px;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
  mask-image: radial-gradient(ellipse, #000 22%, transparent 76%);
}

.hero-centerpiece-visual::after {
  display: none;
}

.hero-engineer-photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 43%;
  filter: saturate(.92) brightness(.9) contrast(1.02);
  -webkit-mask-image: radial-gradient(ellipse at 50% 48%, #000 42%, rgba(0,0,0,.92) 58%, rgba(0,0,0,.48) 78%, transparent 100%);
  mask-image: radial-gradient(ellipse at 50% 48%, #000 42%, rgba(0,0,0,.92) 58%, rgba(0,0,0,.48) 78%, transparent 100%);
  transform-origin: center;
  z-index: -1;
}

.hero-centerpiece-visual.is-revealed .hero-engineer-photo {
  animation: heroArtworkFadeIn .9s cubic-bezier(.2,.7,.2,1) both;
}

@keyframes heroArtworkFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Image motion for the existing three-scene showcase. */
.reveal-on-scroll.is-revealed .engineer-showcase-visual-frame {
  animation: showcaseFrameSettle .85s cubic-bezier(.2,.7,.2,1) both;
}

@keyframes showcaseFrameSettle {
  from { opacity: .6; }
  to { opacity: 1; }
}

.engineer-showcase-img {
  transition: opacity .32s ease, transform .62s cubic-bezier(.2,.7,.2,1);
}

.reveal-on-scroll.is-revealed .engineer-showcase-img {
  animation: showcaseImageSettle .9s cubic-bezier(.2,.7,.2,1) both,
    showcaseImageDrift 13s ease-in-out .9s infinite alternate;
}

@keyframes showcaseImageSettle {
  from { scale: .96; }
  to { scale: 1; }
}

@keyframes showcaseImageDrift {
  from { scale: 1; }
  to { scale: 1.025; }
}

.hero-centerpiece-visual .floating-hud-badge { display: none; }

/* Distinct, paper-like section rhythm while keeping existing content intact. */
.stats-section,
.academic-tools-section { background: #f0f5f3; }

.engineering-domains-section { background: #fff; }

/* Topic-matched photos give each engineering path a visual cue. */
.domain-card-visual {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: -1.75rem -1.5rem 1.2rem;
  overflow: hidden;
  background: #0b1422;
  border-bottom: 1px solid var(--border-default);
}

.domain-card-visual::after {
  content: '';
  position: absolute;
  inset: 30% 0 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(7,15,27,.48));
}

.domain-card-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .75s cubic-bezier(.2,.7,.2,1), filter .35s ease;
  filter: saturate(.88);
}

.domain-interactive-card:hover .domain-card-visual img {
  transform: none;
  filter: saturate(.88);
}

.domain-interactive-card:hover { transform: none; }

.engineer-showcase-visual-frame:hover { transform: none; }

.engineer-showcase-visual-frame:hover .engineer-showcase-img { transform: none; }

.domain-card-content { position: relative; }

.domain-card-content .domain-icon-box {
  position: relative;
  z-index: 1;
  margin-top: -3.35rem;
  margin-bottom: .85rem;
  margin-inline-start: auto;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 8px 20px rgba(0,0,0,.2);
  backdrop-filter: blur(10px);
}

.academic-years-section,
.community-hub-section { background: var(--bg-body, var(--ce-paper)); }

.section-title-wrap h2,
.section-title-wrap h3 { color: var(--ce-ink); }

.subject-card,
.domain-interactive-card,
.tool-suite-card,
.community-card-item {
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(18,36,58,.055);
  transition: transform .24s var(--ce-ease), border-color .24s var(--ce-ease), box-shadow .24s var(--ce-ease);
}

.subject-card:hover,
.domain-interactive-card:hover,
.tool-suite-card:hover,
.community-card-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(18,36,58,.11);
}

/* Universal Adaptive Engineering Footer */
.engineering-footer {
  background: var(--bg-surface, #12243a);
  color: var(--text-main, #e7edf5);
  border-top: 1px solid var(--border-default, #263b52);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.engineering-footer .footer-brand-title,
.engineering-footer .footer-col-heading {
  color: var(--text-main, #f5f8fc);
}

.engineering-footer .footer-col-heading i {
  color: var(--ce-teal, #74d2cb);
}

.engineering-footer .footer-brand-desc,
.engineering-footer .footer-links-list a,
.engineering-footer .footer-bottom {
  color: var(--text-muted, #c3cfdd);
}

.engineering-footer .footer-links-list a:hover {
  color: var(--ce-teal, #ffd27a);
}

.engineering-footer .footer-bottom {
  border-top: 1px solid var(--border-subtle, rgba(223,235,248,.18));
}

/* Contact Cards in Footer (Adaptive & High-Contrast in Light, Lavender & Dark Themes) */
.contact-link-item {
  background: var(--bg-surface-subtle, #172640);
  border: 1px solid var(--border-default, rgba(153,190,217,.2));
  color: var(--text-main, #f3f7fc);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.contact-link-item:hover {
  border-color: var(--ce-teal, #3aa8e0);
  background: var(--bg-surface-hover, #203451);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.contact-link-item span {
  color: var(--text-muted, #9bb0c4) !important;
  font-weight: 700;
}

.contact-link-item strong {
  color: var(--text-main, #f3f7fc) !important;
  font-weight: 800;
}

/* WhatsApp Phone & Number */
.contact-link-item[href*="wa.me"] strong,
.contact-link-item--whatsapp strong {
  color: var(--text-main, #f3f7fc) !important;
  font-family: var(--font-mono, monospace);
  font-size: 0.9rem;
}

/* PWA App Install Card in Year Pages */
.contact-link-item[onclick*="triggerPwaInstall"],
.contact-link-item--pwa {
  border: 1.5px solid color-mix(in srgb, #10B981 65%, var(--border-default, #263b52)) !important;
  background: color-mix(in srgb, #10B981 12%, var(--bg-surface-subtle, #172640)) !important;
}

.contact-link-item[onclick*="triggerPwaInstall"] span,
.contact-link-item--pwa span {
  color: color-mix(in srgb, #059669 82%, var(--text-main, #172b40)) !important;
  font-weight: 800;
}

.contact-link-item[onclick*="triggerPwaInstall"] strong,
.contact-link-item--pwa strong {
  color: var(--text-main, #f3f7fc) !important;
  font-weight: 900;
}

.contact-link-item[onclick*="triggerPwaInstall"]:hover,
.contact-link-item--pwa:hover {
  border-color: #10B981 !important;
  background: color-mix(in srgb, #10B981 22%, var(--bg-surface-subtle, #172640)) !important;
}

body.dark-mode .hero-epic-section {
  color: var(--text-main);
  background: radial-gradient(ellipse at 15% 12%, rgba(8,126,131,.16), transparent 36%),
    radial-gradient(ellipse at 85% 90%, rgba(201,147,50,.10), transparent 34%),
    linear-gradient(145deg, #0e1a2a, #101d2e);
  border-color: var(--border-default);
}

body.dark-mode .hero-grid-bg-overlay { opacity: .24; }
body.dark-mode .hero-epic-title,
body.dark-mode .section-title-wrap h2,
body.dark-mode .section-title-wrap h3 { color: var(--text-main); }
body.dark-mode .hero-epic-lead { color: #bac8d4; }
body.dark-mode .hero-metric-label { color: #a6b5c1; }
body.dark-mode .hero-metric-item,
body.dark-mode .hero-quick-metrics-row { border-color: var(--border-default); }
body.dark-mode .hero-status-pill { background: rgba(12,26,42,.86); color: #74d2cb; }
body.dark-mode .hero-secondary-glass-btn { color: var(--text-main); background: rgba(255,255,255,.06); border-color: var(--border-default); }
body.dark-mode .hero-secondary-glass-btn:hover { background: rgba(8,126,131,.16); }
body.dark-mode .stats-section,
body.dark-mode .academic-tools-section { background: #101b2a; }
body.dark-mode .engineering-domains-section { background: #0c1523; }

@media (max-width: 992px) {
  .hero-epic-content-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .hero-text-col { text-align: center; }
  .hero-status-pill { justify-content: center; }
  .hero-epic-title, .hero-epic-lead { margin-inline: auto; }
  .hero-cta-button-group, .hero-quick-metrics-row { justify-content: center; }
  .hero-centerpiece-visual { width: min(100%, 680px); margin-inline: auto; }
}

@media (max-width: 600px) {
  .hero-epic-section { padding-block: 2rem 2.5rem; }
  .hero-epic-content-grid { display: flex; flex-direction: column; gap: .85rem; }
  .hero-centerpiece-visual { order: 0; min-height: 180px; }
  .hero-text-col { order: 1; width: 100%; }
  .hero-epic-title { margin-bottom: .15rem; }
  .hero-epic-lead { margin-bottom: .45rem; }
  .hero-cta-button-group { margin-bottom: .25rem; }
  .hero-quick-metrics-row { padding-top: .8rem; }
  .hero-status-pill { font-size: .72rem; line-height: 1.5; }
  .hero-epic-title { font-size: clamp(1.85rem, 8vw, 2.65rem); }
  .hero-epic-lead { font-size: .98rem; line-height: 1.8; }
  .hero-cta-button-group { display: grid; grid-template-columns: 1fr; width: 100%; }
  .hero-cta-button-group > a { width: 100%; }
  .hero-quick-metrics-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); row-gap: .9rem; }
  .hero-metric-item { min-width: 0; border-inline-start: 0; padding-inline: .4rem; }
  .hero-metric-item:nth-child(odd) { border-inline-start: 1px solid #d8e2e0; }
  body.dark-mode .hero-metric-item:nth-child(odd) { border-color: var(--border-default); }
  .hero-centerpiece-visual { min-height: clamp(220px, 62vw, 340px); border-radius: 0; }
  .hero-engineer-photo { object-position: 50% 40%; }
  .hero-centerpiece-visual .floating-hud-badge { display: none; }
}

/* Coordinated blue atmosphere, limited to the five academic year pages. */
body.year-page {
  background-color: #eaf3fa;
  background-image:
    radial-gradient(circle 8.5rem at 7% 22%, rgba(14,165,233,.15) 99%, transparent 100%),
    radial-gradient(circle 13rem at 92% 19%, rgba(8,126,131,.12) 99%, transparent 100%),
    radial-gradient(circle 10rem at 32% 78%, rgba(71,153,215,.12) 99%, transparent 100%),
    radial-gradient(circle 6.5rem at 77% 88%, rgba(201,147,50,.10) 99%, transparent 100%),
    linear-gradient(145deg, #edf6fb 0%, #e5f0f8 52%, #f3f8fb 100%);
  background-attachment: fixed;
}

body.year-page .year-header-hero {
  color: #f5f9fd;
  background:
    radial-gradient(ellipse at 88% 20%, rgba(8,126,131,.32), transparent 42%),
    linear-gradient(120deg, #0c1d33 0%, #123858 58%, #14516a 100%);
  border-bottom-color: rgba(255,255,255,.12);
}

body.year-page .year-hero-title { color: #f5f9fd; }
body.year-page .year-hero-desc { color: #d2e1ee; }

body.year-page .year-hero-badge {
  color: #d3f4f1;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.18);
}

body.year-page .year-hero-badge i { color: #f0c56d; }

body.year-page .sem-pill {
  color: #f1f7fc;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.18);
}

body.year-page .sem-pill .pill-count { color: #bfd2e2; }

body.year-page .sem-pill:hover {
  color: #10283f;
  background: #f7fbff;
  border-color: #74d2cb;
}

body.year-page .sem-pill:hover .pill-count { color: #526477; }

body.dark-mode.year-page {
  background-color: #091525;
  background-image:
    radial-gradient(circle 8.5rem at 7% 22%, rgba(14,165,233,.12) 99%, transparent 100%),
    radial-gradient(circle 13rem at 92% 19%, rgba(8,126,131,.15) 99%, transparent 100%),
    radial-gradient(circle 10rem at 32% 78%, rgba(71,153,215,.10) 99%, transparent 100%),
    radial-gradient(circle 6.5rem at 77% 88%, rgba(201,147,50,.08) 99%, transparent 100%),
    linear-gradient(145deg, #091525 0%, #0b1c30 52%, #101d2e 100%);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal-on-scroll { opacity: 1 !important; transform: none !important; }
}

/* Shared navigation refinements and Quran ticker styling. */
.unified-navbar { width:min(96%,1460px); margin:.5rem auto 0; overflow:clip; border:1px solid color-mix(in srgb,var(--border-default) 82%,transparent); border-radius:18px; box-shadow:0 8px 26px rgba(18,36,58,.08); }
.unified-navbar.is-scrolled { border-color:var(--border-default); box-shadow:0 10px 30px rgba(18,36,58,.12); }
.navbar-actions .contact-navbar-link { color:var(--ce-teal); }
.navbar-actions .contact-navbar-link:hover { background:var(--ce-teal-soft); }
.subnav-container { justify-content:center; scrollbar-width:thin; }
body.dark-mode .unified-navbar,body.dark-mode .unified-navbar.is-scrolled { border-color:var(--border-default); }
#contact { scroll-margin-top:1.5rem; }
@media(max-width:760px) { .unified-navbar { width:calc(100% - .8rem); margin-top:.35rem; border-radius:14px; } }

/* Use the same compact portal language in the navigation drawer. */
.collapsible-sidebar { inset-block: .55rem; width: min(350px, calc(100vw - 1rem)); border:1px solid var(--border-default); border-radius:20px 0 0 20px; }
.sidebar-inner { padding:1.1rem .9rem; }
.sidebar-header { border-bottom-color:color-mix(in srgb,var(--border-default) 72%,transparent); }
.sidebar-section-label { color:var(--ce-teal); letter-spacing:.01em; }
.sidebar-nav-item { min-height:40px; border:1px solid transparent; }
.sidebar-nav-item:hover { background:var(--ce-teal-soft); color:var(--ce-teal); }
.sidebar-nav-item.active { color:#fff; background:linear-gradient(105deg,#218c9b,#176080); }
.sidebar-nav-item.highlight-item { border-color:color-mix(in srgb,var(--ce-teal) 32%,transparent); color:var(--ce-teal); background:color-mix(in srgb,var(--ce-teal-soft) 55%,transparent); }
body.dark-mode .collapsible-sidebar { background:linear-gradient(155deg,#13233a,#0d1727); border-color:rgba(108,168,205,.18); }
body.dark-mode .sidebar-nav-item:hover { color:#a8faf0; background:rgba(55,173,188,.12); }
body.dark-mode .sidebar-nav-item.active { color:#f4fbff; background:linear-gradient(105deg,#207b8c,#185579); }
body.dark-mode .sidebar-nav-item.highlight-item { color:#7ce3d2; background:rgba(53,180,171,.09); }
body.dark-mode .sidebar-section-label { color:#77d8d0; }
@media(max-width:480px) { .collapsible-sidebar { inset-block:.35rem; width:min(340px,calc(100vw - .5rem)); border-radius:17px 0 0 17px; } }

/* Compact four-link navigation with accessible grouped dropdowns. */
.unified-navbar { overflow:visible; }
.navbar-container { min-height:58px; }
.navbar-search-area { display:none !important; }
.navbar-actions > :not(.site-language-toggle) { display:none !important; }
.brand-title { max-width:clamp(135px,18vw,230px); overflow:hidden; font-size:clamp(.62rem,.85vw,.82rem); letter-spacing:.005em; text-overflow:ellipsis; white-space:nowrap; }
.subnav-container { display:flex; align-items:center; justify-content:center; gap:.45rem; overflow:visible; padding:.38rem .7rem; }
.subnav-link { display:inline-flex; align-items:center; justify-content:center; gap:.48rem; padding-inline:.9rem; color:var(--text-muted,#536579); font-weight:800; text-decoration:none; white-space:nowrap; }
.nav-menu-group { position:relative; display:flex; }
.nav-menu-group>summary { list-style:none; cursor:pointer; }
.nav-menu-group>summary::-webkit-details-marker { display:none; }
.nav-menu-group>summary::marker { content:""; }
.nav-menu-chevron { margin-inline-start:.08rem; color:var(--ce-teal); font-size:.62rem; transition:transform .18s ease; }
.nav-menu-group[open] .nav-menu-chevron { transform:rotate(180deg); }
.nav-menu-group.is-current>summary { color:var(--ce-teal); background:var(--ce-teal-soft); box-shadow:inset 0 -2px var(--ce-teal); }
.nav-menu-popover { position:absolute; z-index:1200; top:calc(100% + .42rem); inset-inline-start:0; display:grid; min-width:235px; max-height:min(65vh,440px); gap:.3rem; overflow:auto; padding:.55rem; background:var(--bg-surface,#fff); border:1px solid var(--border-default,#dce5e4); border-radius:14px; box-shadow:0 16px 38px rgba(9,24,42,.2); }
.nav-menu-popover a { display:flex; min-height:38px; align-items:center; gap:.62rem; padding:.45rem .58rem; color:var(--text-main,#17283c); border-radius:9px; font-size:.82rem; font-weight:700; text-decoration:none; }
.nav-menu-popover button { display:flex; width:100%; min-height:38px; align-items:center; gap:.62rem; padding:.45rem .58rem; color:var(--text-main,#17283c); border:0; border-radius:9px; background:transparent; font:700 .82rem var(--font-arabic,system-ui,sans-serif); text-align:start; cursor:pointer; }
.nav-menu-popover a i { width:1.15rem; color:var(--ce-teal); text-align:center; }
.nav-menu-popover a:hover,.nav-menu-popover a:focus-visible,.nav-menu-popover a.active,.nav-menu-popover button:hover,.nav-menu-popover button:focus-visible { color:var(--ce-teal); background:var(--ce-teal-soft); }
.sidebar-nav { display:grid; gap:.55rem; }
.sidebar-nav-group { overflow:hidden; border:1px solid var(--border-default,#dce5e4); border-radius:13px; background:color-mix(in srgb,var(--bg-surface,#fff) 78%,transparent); }
.sidebar-nav-group>summary { display:flex; min-height:43px; align-items:center; gap:.65rem; padding:.55rem .72rem; color:var(--text-main,#15273b); list-style:none; cursor:pointer; font-size:.81rem; font-weight:850; }
.sidebar-nav-group>summary::-webkit-details-marker { display:none; }
.sidebar-nav-group>summary::marker { content:""; }
.sidebar-nav-group>summary>i { display:grid; width:29px; height:29px; place-items:center; color:var(--ce-teal); border-radius:9px; background:var(--ce-teal-soft); }
.sidebar-nav-group>summary>b { display:grid; min-width:22px; height:22px; place-items:center; margin-inline-start:auto; color:var(--text-muted,#637489); border-radius:99px; background:var(--bg-surface-subtle,#edf2f5); font-size:.68rem; }
.sidebar-nav-group[open]>summary { border-bottom:1px solid var(--border-default,#dce5e4); }
.sidebar-links-list { display:grid; gap:.2rem; padding:.38rem; }
.sidebar-nav-item { display:flex; min-height:38px; align-items:center; gap:.65rem; padding:.44rem .56rem; color:var(--text-muted,#536579); border-radius:9px; font-size:.77rem; font-weight:750; text-decoration:none; }
.sidebar-home-link { min-height:42px; margin-bottom:.12rem; border:1px solid var(--border-default,#dce5e4); background:var(--bg-surface-subtle,#edf2f5); }
.sidebar-nav-item>i { width:1.15rem; color:var(--ce-teal); text-align:center; }
.sidebar-nav-item:hover,.sidebar-nav-item.active { color:var(--ce-teal); background:var(--ce-teal-soft); }
.sb-swatches-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:.38rem; justify-items:stretch; }
.sb-swatch-btn,.portal-theme-btn { display:grid; min-width:0; justify-items:center; gap:.18rem; padding:.28rem .12rem; color:var(--text-main,#15273b); border:1px solid var(--border-default,#dce5e4); border-radius:9px; background:var(--bg-surface-subtle,#f1f5f8); cursor:pointer; }
.sb-swatch-btn { width:auto; height:auto; min-width:0; min-height:42px; border-width:1px; transition:border-color .18s ease,box-shadow .18s ease,background .18s ease; }
.sb-swatch-btn:hover,.portal-theme-btn:hover,.sb-swatch-btn.selected,.portal-theme-btn.selected { border-color:var(--theme-highlight,var(--ce-teal)); box-shadow:0 0 0 2px color-mix(in srgb,var(--theme-highlight,var(--ce-teal)) 22%,transparent); }
.theme-preview-dots { display:flex; width:100%; height:15px; overflow:hidden; border:1px solid rgba(128,151,173,.25); border-radius:5px; }
.theme-preview-dots i { flex:1 1 0; }
.sb-swatch-btn small,.portal-theme-btn small { overflow:hidden; width:100%; font-size:.58rem; font-weight:800; line-height:1.2; text-overflow:ellipsis; white-space:nowrap; }
.sb-theme-head { align-items:center; }
body[class*="palette-"] { background-color:var(--bg-body); color:var(--text-main); }
body[class*="palette-"] .unified-navbar,body[class*="palette-"] .desktop-subnav { color:var(--text-main); background:color-mix(in srgb,var(--bg-surface) 94%,transparent); border-color:var(--border-default); }
body[class*="palette-"] .unified-navbar,body[class*="palette-"] .collapsible-sidebar,body[class*="palette-"] .nav-menu-popover { border-color:var(--border-default); }
body[class*="palette-"] .nav-menu-popover a,body[class*="palette-"] .sidebar-nav-group>summary,body[class*="palette-"] .sidebar-nav-item { color:var(--text-main); }
body[class*="palette-"] .brand-title { color:var(--text-main); }
body.palette-dark,body.palette-aurora,body.palette-nebula,body.palette-olive,body.palette-sunset,body.palette-ocean {
  --text-main:#f3f7fc; --text-muted:#b2c2d3; --text-subtle:#8799ad; --text-inverse:#08101c;
  --border-default:rgba(153,190,217,.2); --border-subtle:rgba(255,255,255,.08); --border-strong:rgba(159,204,232,.36);
}
body.palette-dark { --bg-body:#08101c; --bg-surface:#13203a; --bg-surface-glass:rgba(19,32,58,.93); --bg-surface-subtle:#172640; --bg-surface-hover:#203451; --ce-ink:#f3f7fc; --ce-ink-soft:#c2d2e0; --ce-teal:#3aa8e0; --ce-teal-soft:rgba(58,168,224,.14); --ce-gold:#2fc4a4; --ce-paper:#08101c; --ce-line:#263a53; --theme-highlight:#3aa8e0; }
body.palette-light { --bg-body:#eef3f9; --bg-surface:#fff; --bg-surface-glass:rgba(255,255,255,.95); --bg-surface-subtle:#e3ebf3; --bg-surface-hover:#d9e5ef; --text-main:#172b40; --text-muted:#536b80; --text-subtle:#71879b; --text-inverse:#fff; --border-default:#d2deea; --border-subtle:#e1e9f0; --border-strong:#b8cad9; --ce-ink:#172b40; --ce-ink-soft:#334f67; --ce-teal:#0068a9; --ce-teal-soft:#dfedf7; --ce-gold:#0e9384; --ce-paper:#eef3f9; --ce-line:#d2deea; --theme-highlight:#0068a9; }
body.palette-aurora { --bg-body:#0a0620; --bg-surface:#24165a; --bg-surface-glass:rgba(36,22,90,.93); --bg-surface-subtle:#2e2065; --bg-surface-hover:#3b2b78; --ce-ink:#f8f5ff; --ce-ink-soft:#d3c6f4; --ce-teal:#b18cff; --ce-teal-soft:rgba(177,140,255,.15); --ce-gold:#3cf2c8; --ce-paper:#0a0620; --ce-line:#493777; --theme-highlight:#b18cff; }
body.palette-pearl { --bg-body:#f7f1ed; --bg-surface:#fffaf7; --bg-surface-glass:rgba(255,250,247,.95); --bg-surface-subtle:#f1e5df; --bg-surface-hover:#eadbd5; --text-main:#392a2c; --text-muted:#70585c; --text-subtle:#927b7e; --text-inverse:#fff; --border-default:#e7d7d2; --border-subtle:#f0e6e1; --border-strong:#d6b8b4; --ce-ink:#392a2c; --ce-ink-soft:#61464b; --ce-teal:#b4536b; --ce-teal-soft:#f5e4e7; --ce-gold:#c9965f; --ce-paper:#f7f1ed; --ce-line:#e7d7d2; --theme-highlight:#b4536b; }
body.palette-nebula { --bg-body:#120a1e; --bg-surface:#241634; --bg-surface-glass:rgba(36,22,52,.94); --bg-surface-subtle:#30203f; --bg-surface-hover:#402751; --ce-ink:#fbf3ff; --ce-ink-soft:#ddc6eb; --ce-teal:#d77bff; --ce-teal-soft:rgba(215,123,255,.14); --ce-gold:#ff8fa8; --ce-paper:#120a1e; --ce-line:#523962; --theme-highlight:#d77bff; }
body.palette-olive { --bg-body:#06110d; --bg-surface:#16241c; --bg-surface-glass:rgba(22,36,28,.94); --bg-surface-subtle:#202f25; --bg-surface-hover:#2c3e2f; --ce-ink:#f1f7ed; --ce-ink-soft:#cbd7c2; --ce-teal:#9ccc65; --ce-teal-soft:rgba(156,204,101,.15); --ce-gold:#e2b866; --ce-paper:#06110d; --ce-line:#354638; --theme-highlight:#9ccc65; }
body.palette-silver { --bg-body:#d8dfe7; --bg-surface:#f6f8fb; --bg-surface-glass:rgba(246,248,251,.95); --bg-surface-subtle:#e7edf3; --bg-surface-hover:#dbe4ed; --text-main:#1e2d3b; --text-muted:#536575; --text-subtle:#718294; --text-inverse:#fff; --border-default:#c4cfda; --border-subtle:#dbe2e9; --border-strong:#9eafbf; --ce-ink:#1e2d3b; --ce-ink-soft:#43586c; --ce-teal:#0b9be0; --ce-teal-soft:#dceff8; --ce-gold:#7b8ea6; --ce-paper:#d8dfe7; --ce-line:#c4cfda; --theme-highlight:#0b9be0; }
body.palette-sunset { --bg-body:#150c0a; --bg-surface:#2a1711; --bg-surface-glass:rgba(42,23,17,.94); --bg-surface-subtle:#382018; --bg-surface-hover:#4a2b1c; --ce-ink:#fff5ed; --ce-ink-soft:#e5c8b4; --ce-teal:#ff8a4c; --ce-teal-soft:rgba(255,138,76,.15); --ce-gold:#ffd166; --ce-paper:#150c0a; --ce-line:#553323; --theme-highlight:#ff8a4c; }
body.palette-lavender { --bg-body:#f3f0fb; --bg-surface:#fff; --bg-surface-glass:rgba(255,255,255,.95); --bg-surface-subtle:#ebe6f6; --bg-surface-hover:#dfd8f0; --text-main:#302a43; --text-muted:#625a78; --text-subtle:#827a96; --text-inverse:#fff; --border-default:#ded7ec; --border-subtle:#ebe6f2; --border-strong:#c3b8df; --ce-ink:#302a43; --ce-ink-soft:#524a6b; --ce-teal:#7c5cff; --ce-teal-soft:#ece7ff; --ce-gold:#e879a8; --ce-paper:#f3f0fb; --ce-line:#ded7ec; --theme-highlight:#7c5cff; }
body.palette-ocean { --bg-body:#031a1f; --bg-surface:#0b2c33; --bg-surface-glass:rgba(11,44,51,.94); --bg-surface-subtle:#123a42; --bg-surface-hover:#1d4b52; --ce-ink:#efffff; --ce-ink-soft:#bcdadb; --ce-teal:#2dd4bf; --ce-teal-soft:rgba(45,212,191,.14); --ce-gold:#7dd3fc; --ce-paper:#031a1f; --ce-line:#27535a; --theme-highlight:#2dd4bf; }
body.palette-dark,body.palette-aurora,body.palette-nebula,body.palette-olive,body.palette-sunset,body.palette-ocean { --accent-amber:var(--ce-gold); --accent-teal:var(--ce-teal); --accent-emerald:var(--ce-teal); }
body[class*="palette-"] .collapsible-sidebar { color:var(--text-main); background:linear-gradient(155deg,var(--bg-surface),var(--bg-body)); }
body.palette-light .portal-feature-panel,body.palette-pearl .portal-feature-panel,body.palette-silver .portal-feature-panel,body.palette-lavender .portal-feature-panel { color:var(--text-main); border-color:var(--border-default); background:radial-gradient(ellipse at 12% 92%,color-mix(in srgb,var(--ce-teal) 18%,transparent),transparent 43%),linear-gradient(126deg,var(--bg-surface),var(--bg-body)); }
body.palette-light .portal-feature-copy h1,body.palette-pearl .portal-feature-copy h1,body.palette-silver .portal-feature-copy h1,body.palette-lavender .portal-feature-copy h1,body.palette-light .portal-stats-row b,body.palette-pearl .portal-stats-row b,body.palette-silver .portal-stats-row b,body.palette-lavender .portal-stats-row b { color:var(--text-main); }
body.palette-light .portal-feature-copy p,body.palette-pearl .portal-feature-copy p,body.palette-silver .portal-feature-copy p,body.palette-lavender .portal-feature-copy p,body.palette-light .portal-stats-row,body.palette-pearl .portal-stats-row,body.palette-silver .portal-stats-row,body.palette-lavender .portal-stats-row { color:var(--text-muted); }
body.palette-light .portal-welcome-card,body.palette-pearl .portal-welcome-card,body.palette-silver .portal-welcome-card,body.palette-lavender .portal-welcome-card { color:var(--text-main); border-color:var(--border-default); background:linear-gradient(150deg,var(--bg-surface),var(--bg-surface-subtle)); }
body.palette-light .portal-welcome-card h2,body.palette-pearl .portal-welcome-card h2,body.palette-silver .portal-welcome-card h2,body.palette-lavender .portal-welcome-card h2 { color:var(--text-main); }
body.palette-light .portal-welcome-card>p,body.palette-pearl .portal-welcome-card>p,body.palette-silver .portal-welcome-card>p,body.palette-lavender .portal-welcome-card>p,body.palette-light .portal-secondary-link,body.palette-pearl .portal-secondary-link,body.palette-silver .portal-secondary-link,body.palette-lavender .portal-secondary-link { color:var(--text-muted); }
body.palette-light .portal-identity-row span:not(.portal-platform-tag),body.palette-pearl .portal-identity-row span:not(.portal-platform-tag),body.palette-silver .portal-identity-row span:not(.portal-platform-tag),body.palette-lavender .portal-identity-row span:not(.portal-platform-tag) { color:var(--text-muted); }
body.palette-light .portal-platform-tag,body.palette-pearl .portal-platform-tag,body.palette-silver .portal-platform-tag,body.palette-lavender .portal-platform-tag { color:var(--text-main); border-color:var(--border-default); background:var(--bg-surface-subtle); }
body.palette-light .portal-platform-tag i,body.palette-pearl .portal-platform-tag i,body.palette-silver .portal-platform-tag i,body.palette-lavender .portal-platform-tag i { color:var(--ce-teal); }
body.palette-light .portal-eyebrow,body.palette-pearl .portal-eyebrow,body.palette-silver .portal-eyebrow,body.palette-lavender .portal-eyebrow,body.palette-light .portal-open-status,body.palette-pearl .portal-open-status,body.palette-silver .portal-open-status,body.palette-lavender .portal-open-status { color:var(--ce-ink-soft); }
body.palette-light .portal-eyebrow i,body.palette-pearl .portal-eyebrow i,body.palette-silver .portal-eyebrow i,body.palette-lavender .portal-eyebrow i { color:var(--ce-teal); }
body.palette-light .portal-feature-copy h1 em,body.palette-pearl .portal-feature-copy h1 em,body.palette-silver .portal-feature-copy h1 em,body.palette-lavender .portal-feature-copy h1 em { color:var(--ce-teal); }
body.palette-light .portal-destination-card,body.palette-pearl .portal-destination-card,body.palette-silver .portal-destination-card,body.palette-lavender .portal-destination-card { color:var(--text-main); border-color:var(--border-default); background:color-mix(in srgb,var(--ce-teal) 7%,var(--bg-surface)); }
body.palette-light .portal-destination-card:hover,body.palette-pearl .portal-destination-card:hover,body.palette-silver .portal-destination-card:hover,body.palette-lavender .portal-destination-card:hover { color:var(--text-main); border-color:var(--ce-teal); background:color-mix(in srgb,var(--ce-teal) 13%,var(--bg-surface)); }
body.palette-light .portal-destination-card>i:first-child,body.palette-pearl .portal-destination-card>i:first-child,body.palette-silver .portal-destination-card>i:first-child,body.palette-lavender .portal-destination-card>i:first-child { color:var(--ce-teal); background:var(--ce-teal-soft); }
body.palette-light .portal-destination-card small,body.palette-pearl .portal-destination-card small,body.palette-silver .portal-destination-card small,body.palette-lavender .portal-destination-card small { color:var(--text-muted); }
body.palette-light .portal-destination-card .portal-card-arrow,body.palette-pearl .portal-destination-card .portal-card-arrow,body.palette-silver .portal-destination-card .portal-card-arrow,body.palette-lavender .portal-destination-card .portal-card-arrow { color:var(--ce-teal); }
body.palette-light .portal-pulse-line path,body.palette-pearl .portal-pulse-line path,body.palette-silver .portal-pulse-line path,body.palette-lavender .portal-pulse-line path { stroke:var(--ce-teal); filter:none; }
body.palette-light .portal-stats-row a,body.palette-pearl .portal-stats-row a,body.palette-silver .portal-stats-row a,body.palette-lavender .portal-stats-row a { color:var(--ce-teal); }
body.palette-light .portal-welcome-kicker,body.palette-pearl .portal-welcome-kicker,body.palette-silver .portal-welcome-kicker,body.palette-lavender .portal-welcome-kicker { color:var(--ce-teal); }
body.palette-light .portal-safe-note,body.palette-pearl .portal-safe-note,body.palette-silver .portal-safe-note,body.palette-lavender .portal-safe-note { color:var(--text-muted); border-top-color:var(--border-default); }
@media(max-width:760px) { .subnav-container { justify-content:center; flex-wrap:wrap; overflow:visible; } .nav-menu-popover { min-width:min(250px,calc(100vw - 2rem)); max-width:calc(100vw - 2rem); } }
@media(max-width:520px) { .navbar-container { min-height:52px; } .brand-title { max-width:145px; font-size:.59rem; } .subnav-container { gap:.18rem; padding-inline:.35rem; } .subnav-link { min-height:37px; padding-inline:.55rem; font-size:.72rem; } .nav-menu-chevron { font-size:.55rem; } .nav-menu-popover { min-width:min(250px,calc(100vw - 2rem)); } }

/* Quran ayah ticker between the identity and language control. */
.header-ayah-strip {
  display:flex; flex:1 1 320px; min-width:0; max-width:720px; align-items:center; justify-content:center;
  gap:.55rem; margin-inline:.55rem; padding:.32rem .65rem; color:var(--text-main,#17283c);
  border:1px solid color-mix(in srgb,var(--ce-teal,#218c9b) 22%,var(--border-default,#dce5e4));
  border-radius:13px; background:color-mix(in srgb,var(--bg-surface,#fff) 78%,transparent);
}
.header-ayah-copy { display:grid; min-width:0; flex:1 1 auto; gap:.06rem; direction:rtl; text-align:center; }
.header-ayah-text { display:-webkit-box; overflow:hidden; max-width:100%; margin:0; color:var(--text-main,#17283c); font:700 clamp(.92rem,1.1vw,1.05rem)/1.48 "Times New Roman",serif; -webkit-box-orient:vertical; -webkit-line-clamp:2; transition:opacity .18s ease; }
.header-ayah-reference { overflow:hidden; color:var(--text-muted,#657789); font-size:.61rem; font-weight:700; line-height:1.2; text-overflow:ellipsis; white-space:nowrap; }
.header-ayah-ornament { flex:0 0 auto; color:var(--ce-teal,#218c9b); font-size:.92rem; opacity:.86; }
.header-ayah-text.is-changing { opacity:0; }
.subpage-header-actions { position:absolute; z-index:5; top:14px; right:14px; display:flex; align-items:center; gap:.55rem; direction:ltr; }
.subpage-header-actions .toggle-btn { position:static; flex:0 0 44px; width:44px; height:44px; min-width:44px; min-height:44px; margin:0; display:inline-flex; align-items:center; justify-content:center; border-radius:12px; color:var(--text-main,#eaf3fb); border:1px solid color-mix(in srgb,var(--ce-teal,#218c9b) 62%,var(--border-default,#d6e0e9)); background:color-mix(in srgb,var(--bg-surface,#13233a) 88%,transparent); box-shadow:0 5px 18px rgba(6,20,37,.16); cursor:pointer; transition:background .18s ease,border-color .18s ease,transform .18s ease,color .18s ease; }
.subpage-header-actions .toggle-btn i { color:var(--ce-teal,#42c8c1); font-size:1.15rem; transition:color .18s ease; }
.subpage-header-actions .toggle-btn:hover { color:var(--text-main,#fff); border-color:var(--ce-teal,#42c8c1); background:var(--bg-surface-subtle,#203650); transform:translateY(-1px); }
.subpage-header-actions .toggle-btn:hover i { color:var(--text-main,#fff); }
.site-language-toggle--subpage { position:static!important; display:inline-flex; width:auto; min-width:76px; height:44px; min-height:44px; align-items:center; justify-content:center; gap:.42rem; padding:.42rem .72rem; color:var(--text-main,#eaf3fb); border:1px solid color-mix(in srgb,var(--ce-teal,#218c9b) 62%,var(--border-default,#d6e0e9)); border-radius:12px; background:color-mix(in srgb,var(--bg-surface,#13233a) 88%,transparent); box-shadow:0 5px 18px rgba(6,20,37,.16); font:800 .78rem var(--font-arabic,"Cairo",system-ui,sans-serif); white-space:nowrap; cursor:pointer; transition:background .18s ease,border-color .18s ease,transform .18s ease; }
.site-language-toggle--subpage i { color:var(--ce-teal,#42c8c1); font-size:1rem; }
.site-language-toggle--subpage:hover { color:var(--text-main,#fff); border-color:var(--ce-teal,#42c8c1); background:var(--bg-surface-subtle,#203650); transform:translateY(-1px); }
.site-language-toggle--floating { position:fixed!important; z-index:3000; top:14px; left:14px; min-height:40px; min-width:64px; padding:.4rem .7rem; color:var(--text-main,#eaf3fb); border:1px solid var(--border-default,#d6e0e9); border-radius:11px; background:var(--bg-surface,#13233a); box-shadow:0 5px 18px rgba(6,20,37,.2); font:800 .78rem var(--font-arabic,"Cairo",system-ui,sans-serif); cursor:pointer; }
@media(max-width:640px) { .subpage-hero-banner .subpage-back-nav { margin-top:3rem; } }
@media(max-width:760px) {
  .navbar-container { display:grid !important; height:auto !important; min-height:0; grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"brand actions" "ayah ayah"; align-items:center; row-gap:.35rem; padding:.5rem .68rem; }
  .navbar-left-group { grid-area:brand; min-width:0; }
  .navbar-actions { grid-area:actions; margin:0; }
  .navbar-container .navbar-search-area { display:none !important; }
  .header-ayah-strip { grid-area:ayah; width:100%; max-width:none; min-height:43px; margin:.1rem 0 0; padding:.28rem .55rem; }
}
@media(max-width:520px) {
  .header-ayah-strip { min-height:42px; gap:.35rem; }
  .header-ayah-text { font-size:clamp(.9rem,3vw,1rem); }
  .header-ayah-reference { font-size:.58rem; }
}
@media(prefers-reduced-motion:reduce) { .header-ayah-text { transition:none; } }

/* Branded full-frame startup screen with Islamic University of Gaza Campus background */
.ce-entry-splash {
  display: none;
  position: fixed;
  z-index: 2147483000;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  place-items: center;
  color: #f4f9ff;
  background: #060e18 url("iug_campus_splash.jpg") center center / cover no-repeat;
  font-family: var(--font-arabic, "Cairo", system-ui, sans-serif);
  text-align: center;
}

html.ce-entry-pending .ce-entry-splash,
.ce-entry-splash.is-leaving {
  display: grid;
}

html.ce-entry-pending .ce-entry-splash {
  animation: ce-entry-failsafe .8s 8s forwards;
}

/* Cinematic Vignette Overlay to ensure campus photo shines while text stays 100% readable */
.ce-entry-splash::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(
    180deg,
    rgba(6, 14, 24, 0.38) 0%,
    rgba(6, 14, 24, 0.16) 25%,
    rgba(6, 14, 24, 0.48) 60%,
    rgba(4, 10, 18, 0.88) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.ce-entry-splash::after {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(circle at 50% 50%, transparent 42%, rgba(4, 10, 18, 0.52) 100%);
  pointer-events: none;
  z-index: 0;
}

.ce-entry-splash.is-leaving {
  pointer-events: none;
  animation: ce-entry-exit .5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.ce-entry-content {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  width: min(560px, calc(100vw - 2.5rem));
  padding: clamp(1.4rem, 3.5vw, 2.2rem) clamp(1.2rem, 3vw, 2rem);
  background: rgba(8, 18, 32, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: ce-entry-card-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ce-entry-card-in {
  0% { opacity: 0; transform: translateY(22px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.ce-entry-mark {
  position: relative;
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  margin-bottom: 0.9rem;
  color: #85eff1;
  border: 1.5px solid rgba(101, 222, 236, 0.6);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(28, 70, 103, 0.9), rgba(10, 26, 45, 0.95));
  box-shadow: 0 0 0 8px rgba(42, 174, 199, 0.08), 0 0 35px rgba(37, 192, 205, 0.35);
  animation: ce-entry-mark 2.4s ease-in-out infinite;
}

.ce-entry-mark::before,
.ce-entry-mark::after {
  position: absolute;
  inset: -9px;
  content: "";
  border: 1px solid rgba(98, 207, 224, 0.22);
  border-radius: 26px;
  animation: ce-entry-ring 2.7s ease-out infinite;
}

.ce-entry-mark::after {
  animation-delay: 1.3s;
}

.ce-entry-mark svg {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 10px rgba(54, 219, 225, 0.55));
}

.ce-entry-eyebrow {
  margin: 0 0 0.25rem;
  color: #5ce6e6;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.ce-entry-title {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.8rem, 5.5vw, 2.6rem);
  font-weight: 900;
  line-height: 1.25;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 30px rgba(56, 182, 203, 0.25);
}

.ce-entry-subtitle {
  margin: 0.35rem 0 0;
  color: #c9dbe9;
  font-size: clamp(0.82rem, 2.2vw, 0.95rem);
  font-weight: 600;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.ce-entry-progress-wrap {
  width: min(440px, 100%);
  margin-top: 1.6rem;
}

.ce-entry-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
  color: #b8cde0;
  font-size: 0.76rem;
  font-weight: 750;
}

.ce-entry-percent {
  color: #38d6ea;
  font-family: var(--font-mono, monospace);
  font-size: 0.85rem;
  font-weight: 800;
  direction: ltr;
}

.ce-entry-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.ce-entry-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1fa2ff, #12d8fa, #a6ffcb);
  box-shadow: 0 0 16px rgba(18, 216, 250, 0.55);
  transition: width 0.16s linear;
}

.ce-entry-pulse {
  width: min(500px, calc(100vw - 3rem));
  height: 38px;
  margin-top: 0.6rem;
  opacity: 0.75;
}

.ce-entry-pulse svg {
  display: block;
  width: 100%;
  height: 100%;
}

.ce-entry-pulse path {
  fill: none;
  stroke: #32aed4;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 430;
  stroke-dashoffset: 430;
  filter: drop-shadow(0 0 5px rgba(63, 202, 231, 0.55));
  animation: ce-entry-pulse-run 2.6s ease-in-out infinite;
}

.ce-entry-footer {
  margin-top: 1.1rem;
  color: #92b0c9;
  font: 700 0.68rem var(--font-mono, monospace);
  letter-spacing: 0.14em;
  direction: ltr;
}

@keyframes ce-entry-mark {
  50% { transform: translateY(-3px); box-shadow: 0 0 0 10px rgba(42, 174, 199, 0.1), 0 0 45px rgba(37, 192, 205, 0.45); }
}

@keyframes ce-entry-ring {
  0% { transform: scale(0.92); opacity: 0.65; }
  100% { transform: scale(1.22); opacity: 0; }
}

@keyframes ce-entry-pulse-run {
  0% { stroke-dashoffset: 430; }
  70%, 100% { stroke-dashoffset: 0; }
}

@keyframes ce-entry-exit {
  to { opacity: 0; visibility: hidden; transform: scale(1.02); }
}

@keyframes ce-entry-failsafe {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}

@media (max-width: 520px) {
  .ce-entry-content {
    box-sizing: border-box;
    width: min(92vw, 420px);
    padding: 1.4rem 1rem;
    border-radius: 22px;
  }
  .ce-entry-mark { width: 62px; height: 62px; border-radius: 18px; margin-bottom: 0.7rem; }
  .ce-entry-mark svg { width: 32px; height: 32px; }
  .ce-entry-progress-wrap,
  .ce-entry-pulse { width: 100%; }
  .ce-entry-progress-wrap { margin-top: 1.3rem; }
  .ce-entry-pulse { height: 30px; }
  .ce-entry-footer { margin-top: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ce-entry-mark,
  .ce-entry-mark::before,
  .ce-entry-mark::after,
  .ce-entry-pulse path { animation: none; }
  .ce-entry-progress-fill { transition: none; }
}


/* Shared compact language and community actions on the landing and year pages. */
:is(.year-page,.home-page) .site-language-toggle--year {
  position: static !important;
  display: inline-flex;
  min-width: 76px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  padding: 0.38rem 0.68rem;
  color: var(--text-main);
  border: 1px solid color-mix(in srgb, var(--accent-teal) 42%, var(--border-default));
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-surface) 88%, transparent);
  box-shadow: 0 4px 14px rgba(5, 22, 36, 0.12);
  font: 800 0.78rem var(--font-arabic, "Cairo", system-ui, sans-serif);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

:is(.year-page,.home-page) .site-language-toggle--year i {
  color: var(--accent-teal);
  font-size: 1rem;
}

:is(.year-page,.home-page) .site-language-toggle--year:hover {
  color: var(--text-main);
  border-color: var(--accent-teal);
  background: color-mix(in srgb, var(--accent-teal) 12%, var(--bg-surface));
  transform: translateY(-1px);
}

:is(.year-page,.home-page) .site-language-toggle--year:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: 2px;
}

/* Keep the three most-used community tools beside language on year pages. */
:is(.year-page,.home-page) .navbar-actions {
  direction: ltr;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 0.34rem;
  overflow: visible;
  white-space: nowrap;
}

:is(.year-page,.home-page) .navbar-actions > .site-language-toggle--year { order: 0; }
:is(.year-page,.home-page) .navbar-actions > .favorite-navbar-link { order: 1; }
:is(.year-page,.home-page) .navbar-actions > .bot-btn { order: 2; }
:is(.year-page,.home-page) .navbar-actions > .tg-btn { order: 3; }

:is(.year-page,.home-page) .navbar-actions > .favorite-navbar-link,
:is(.year-page,.home-page) .navbar-actions > .bot-btn,
:is(.year-page,.home-page) .navbar-actions > .tg-btn {
  position: relative;
  display: inline-flex !important;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  color: var(--text-main);
  border: 1px solid color-mix(in srgb, var(--ce-teal) 32%, var(--border-default));
  border-radius: 12px;
  background: color-mix(in srgb, var(--ce-teal-soft) 52%, var(--bg-surface));
  box-sizing: border-box;
  text-decoration: none;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

:is(.year-page,.home-page) .navbar-actions > .favorite-navbar-link i { color: var(--accent-amber); }
:is(.year-page,.home-page) .navbar-actions > .bot-btn i,
:is(.year-page,.home-page) .navbar-actions > .tg-btn i { color: var(--ce-teal); }

:is(.year-page,.home-page) .navbar-actions > .favorite-navbar-link:hover,
:is(.year-page,.home-page) .navbar-actions > .bot-btn:hover,
:is(.year-page,.home-page) .navbar-actions > .tg-btn:hover {
  color: var(--ce-teal);
  border-color: var(--ce-teal);
  background: var(--ce-teal-soft);
  transform: translateY(-1px);
}

:is(.year-page,.home-page) .navbar-actions > .bot-btn span:not(.count-tag),
:is(.year-page,.home-page) .navbar-actions > .tg-btn span,
:is(.year-page,.home-page) .navbar-actions > .favorite-navbar-link span:not(.count-tag) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

:is(.year-page,.home-page) .navbar-actions > .favorite-navbar-link .fav-count-badge {
  top: -0.35rem;
  right: -0.35rem;
  min-width: 1rem;
  min-height: 1rem;
  padding: 0.08rem 0.25rem;
  border: 2px solid var(--bg-surface);
  font-size: 0.62rem;
  line-height: 1;
  text-align: center;
}

:is(.year-page,.home-page) .navbar-actions > .favorite-navbar-link:focus-visible,
:is(.year-page,.home-page) .navbar-actions > .bot-btn:focus-visible,
:is(.year-page,.home-page) .navbar-actions > .tg-btn:focus-visible {
  outline: 2px solid var(--ce-teal);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  :is(.year-page,.home-page) .navbar-actions { gap: 0.22rem; padding-inline: 0; }
  :is(.year-page,.home-page) .navbar-actions > .favorite-navbar-link,
  :is(.year-page,.home-page) .navbar-actions > .bot-btn,
  :is(.year-page,.home-page) .navbar-actions > .tg-btn,
  :is(.year-page,.home-page) .site-language-toggle--year {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }
  :is(.year-page,.home-page) .site-language-toggle--year { gap: 0; padding: 0; }
  :is(.year-page,.home-page) .site-language-toggle--year .site-language-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}

@media (max-width: 380px) {
  :is(.year-page,.home-page) .navbar-actions { gap: 0.12rem; }
  :is(.year-page,.home-page) .brand-title { max-width: 82px; }
  :is(.year-page,.home-page) .brand-sub { display: none; }
}

/* Apply the selected 10-color palette consistently across every site page. */
body[class*="palette-"] {
  --accent-amber:var(--ce-gold);
  --accent-amber-hover:color-mix(in srgb,var(--ce-gold) 82%,#101820);
  --accent-amber-glow:color-mix(in srgb,var(--ce-gold) 27%,transparent);
  --accent-teal:var(--ce-teal);
  --accent-emerald:var(--ce-teal);
  --primary-slate:var(--bg-surface);
  --primary-slate-dark:var(--bg-body);
  --primary-slate-light:var(--bg-surface-subtle);
  --bg:var(--bg-body);
  --bg2:var(--bg-surface);
  --bg3:var(--bg-surface-subtle);
  --cyan:var(--ce-teal);
  --cyan-dim:var(--ce-teal);
  --cyan-glow:color-mix(in srgb,var(--ce-teal) 16%,transparent);
  --text:var(--text-main);
  --text-dim:var(--text-muted);
  --border:var(--border-default);
  --whatsapp-ink:#087f5b;
  --whatsapp-wash:rgba(8,127,91,.14);
  --whatsapp-border:rgba(8,127,91,.34);
}

body.palette-dark,body.palette-aurora,body.palette-nebula,body.palette-olive,body.palette-sunset,body.palette-ocean {
  --whatsapp-ink:#35d982;
  --whatsapp-wash:rgba(53,217,130,.16);
  --whatsapp-border:rgba(53,217,130,.42);
}

body[class*="palette-"] .comm-wa-icon,
body[class*="palette-"] .contact-link-icon--whatsapp {
  color:var(--whatsapp-ink)!important;
  background:var(--whatsapp-wash)!important;
  border:1px solid var(--whatsapp-border);
}
body[class*="palette-"] .sb-contact-btn.wa { color:var(--whatsapp-ink); border-color:var(--whatsapp-border); }
body[class*="palette-"] .contact-link-item--whatsapp strong { color:var(--text-main)!important; }
body[class*="palette-"] .contact-link-item--whatsapp span { color:var(--text-muted)!important; }
body[class*="palette-"] .contact-link-icon {
  display:grid;
  width:36px;
  height:36px;
  flex:0 0 36px;
  place-items:center;
  border-radius:var(--radius-sm);
}

@media (max-width:480px) {
  body[class*="palette-"] .contact-link-icon { width:34px; height:34px; flex-basis:34px; }
}

/* Keep the engineering photo clear, still, and blended into the active surface. */
.engineer-showcase-visual-frame,
.engineer-showcase-visual-frame:hover {
  transform:none!important;
  border-color:transparent!important;
  box-shadow:none!important;
  background:transparent;
}
.engineer-showcase-img,
.reveal-on-scroll.is-revealed .engineer-showcase-img,
.engineer-showcase-visual-frame:hover .engineer-showcase-img {
  opacity:1;
  transform:none!important;
  animation:none!important;
  filter:saturate(.96) contrast(1.03);
  -webkit-mask-image:radial-gradient(ellipse at center,#000 72%,rgba(0,0,0,.88) 86%,transparent 100%);
  mask-image:radial-gradient(ellipse at center,#000 72%,rgba(0,0,0,.88) 86%,transparent 100%);
}

/* The standalone study-tools page uses its own CSS variables; map them to the site palette. */
body[class*="palette-"] .study-top-nav {
  background:color-mix(in srgb,var(--bg-surface) 94%,transparent);
  border-color:var(--border-default);
}
body[class*="palette-"] .tab-btn.active,
body[class*="palette-"] .btn-save { color:var(--text-inverse); }
