/* ================================================================
   MIKE'S SCIENCE - Master Stylesheet
   Design: Stwedy-inspired, bold playful educational, blue/dark palette
   ================================================================ */

/* ----- Design Tokens ----- */
:root {
  /* Colors - derived from logo (light blue / dark split) */
  --blue-50: #EDF5FF;
  --blue-100: #D6EAFF;
  --blue-200: #A8D4FF;
  --blue-300: #7ABFFF;
  --blue-400: #5BAEE8;
  --blue-500: #3B8DD4;
  --blue-600: #2671B3;
  --blue-700: #1A5A94;
  --blue-800: #0F3D6B;
  --blue-900: #0A2744;

  /* Accent aliases */
  --accent: #3B8DD4;
  --accent-hover: #2671B3;
  --accent-light: #D6EAFF;
  --accent-pale: #EDF5FF;

  /* Dark palette (from logo's physics chalkboard side) */
  --dark: #1A1D23;
  --dark-soft: #2D3039;
  --dark-muted: #4A5060;

  /* Backgrounds */
  --bg-main: #F5F5F0;
  --bg-card: #FFFFFF;
  --bg-warm: #EEEEE8;
  --bg-blue-soft: rgba(59, 141, 212, 0.08);
  --bg-dark: #1A1D23;

  /* Text */
  --text-primary: #1A1D23;
  --text-body: #3D4250;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;

  /* Borders */
  --border: #E5E7EB;
  --border-light: #F0F0EC;

  /* Feedback - darkened for improved contrast and authority */
  --success: #15803D;
  --success-bg: #E6F8EE;
  --error: #DC2626;
  --error-bg: #FEECEB;
  --warning: #EAB308;
  --warning-bg: #FEF9C3;
  --white: #FFFFFF;

  /* Typography */
  --font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;

  /* Spacing */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 32px;
  --sp-2xl: 48px;
  --sp-3xl: 64px;
  --sp-4xl: 96px;
  --sp-5xl: 128px;

  /* Layout */
  --container-max: 1200px;
  --content-max: 760px;
  --nav-height: 48px;
  --radius: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);

  /* Transitions */
  --ease: 200ms ease;
  --ease-spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}


/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-primary);
  background-color: var(--bg-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--accent-hover); }
button { font-family: inherit; font-size: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
hr { border: none; border-top: 1px solid var(--border-light); margin: var(--sp-xl) 0; }


/* ----- Typography ----- */
h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: 1.15;
  font-weight: 400;
}

h4, h5, h6 {
  font-family: var(--font-body);
  color: var(--text-primary);
  line-height: 1.3;
  font-weight: 600;
}

h1 { font-size: 3rem; letter-spacing: -0.02em; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.125rem; }
p { margin-bottom: var(--sp-md); color: var(--text-body); }
p:last-child { margin-bottom: 0; }
strong { font-weight: 600; color: var(--text-primary); }


/* ----- Layout ----- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--sp-lg);
}

.container-narrow {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--sp-lg);
}

.section {
  padding: var(--sp-3xl) 0;
}

.section-sm {
  padding: var(--sp-2xl) 0;
}

.page-header {
  padding: var(--sp-3xl) 0 var(--sp-xl);
  margin-bottom: var(--sp-xl);
}

.page-header h1 {
  margin-bottom: var(--sp-sm);
}

.page-header p {
  font-size: 1.125rem;
  max-width: 600px;
  color: var(--text-body);
}


/* ----- Navigation (Apple Style - Fixed Navy On Scroll Across All Pages) ----- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(245, 245, 240, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transition: background 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

body:not(.page-home) #main-content {
  padding-top: var(--nav-height);
}

.nav-inner {
  max-width: 100%;
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.nav-logo:hover {
  opacity: 1;
  color: var(--text-primary);
}

.nav-logo span {
  position: relative;
}

.nav-logo span::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0;
  transition: transform 0.26s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.2s ease;
  pointer-events: none;
}

.nav-logo:hover span::after,
.nav-logo:focus-visible span::after {
  transform: scaleX(1);
  opacity: 1;
}

.nav-logo img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a,
.nav-links .nav-link-item {
  position: relative;
  padding: 4px 0;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text-body);
  opacity: 0.8;
  border-radius: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  transition: opacity 0.2s ease, color 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

/* Animated Underline for Top Bar Nav Links */
.nav-links > a::after,
.nav-dropdown-trigger::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0px;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0;
  transition: transform 0.26s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.2s ease;
  pointer-events: none;
}

.nav-links > a:hover::after,
.nav-links > a:focus-visible::after,
.nav-dropdown-trigger:hover::after,
.nav-dropdown-trigger:focus-visible::after,
.nav-item-dropdown:hover .nav-dropdown-trigger::after,
.nav-item-dropdown:focus-within .nav-dropdown-trigger::after {
  transform: scaleX(1);
  opacity: 1;
}

.nav-links a:hover,
.nav-links .nav-link-item:hover {
  color: var(--text-primary);
  opacity: 1;
  background: transparent !important;
}

.nav-links a.active,
.nav-links .nav-link-item.active {
  color: var(--accent);
  opacity: 1;
  background: transparent !important;
}

/* ----- Nav Item Dropdown ----- */
.nav-item-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0 !important;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text-body);
  opacity: 0.8;
  cursor: pointer;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.nav-dropdown-trigger:hover {
  color: var(--text-primary);
  opacity: 1;
}

.dropdown-chevron {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.6;
  margin-top: 1px;
}

.nav-item-dropdown:hover .dropdown-chevron,
.nav-item-dropdown:focus-within .dropdown-chevron {
  transform: rotate(180deg);
}

/* Dropdown Menu Container */
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 190px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.2s;
  z-index: 200;
}

/* Invisible bridge so mouse doesn't lose hover between link and menu */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

.nav-item-dropdown:hover .nav-dropdown-menu,
.nav-item-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Dropdown Item (Title only, same font, slightly bigger) */
.dropdown-item {
  position: relative;
  display: block !important;
  padding: 7px 12px !important;
  font-family: var(--font-body) !important;
  font-size: 0.8125rem !important;
  font-weight: 400 !important;
  letter-spacing: -0.01em !important;
  border-radius: 8px !important;
  color: var(--text-body) !important;
  text-decoration: none !important;
  background: transparent !important;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease !important;
  text-shadow: none !important;
  text-align: left;
}

.dropdown-item:hover,
.dropdown-item:focus-visible {
  background: rgba(0, 0, 0, 0.05) !important;
  color: var(--text-primary) !important;
  text-decoration: none !important;
}

/* Ensure no second line appears on dropdown link container */
.nav-dropdown-menu a::after,
.dropdown-item::after {
  display: none !important;
  content: none !important;
}

/* Single Animated Underline for Dropdown Option Text */
.dropdown-item span {
  position: relative;
  display: inline-block;
}

.dropdown-item span::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1.5px;
  background-color: currentColor;
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0;
  transition: transform 0.26s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.2s ease;
  pointer-events: none;
}

.dropdown-item:hover span::after,
.dropdown-item:focus-visible span::after {
  transform: scaleX(1);
  opacity: 1;
}

.dropdown-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.06);
  margin: 4px 6px;
}

.dropdown-footer-link {
  color: var(--accent) !important;
  font-weight: 500 !important;
  text-decoration: none !important;
}

.dropdown-footer-link:hover,
.dropdown-footer-link:focus-visible {
  color: var(--accent-hover) !important;
  text-decoration: none !important;
}

/* Homepage Hero Dark Dropdown Overrides */
body.page-home .nav .nav-dropdown-menu {
  background: rgba(22, 22, 23, 0.96);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

body.page-home .nav .dropdown-item {
  color: #F5F5F7 !important;
  opacity: 0.85;
}

body.page-home .nav .dropdown-item:hover,
body.page-home .nav .dropdown-item:focus-visible {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #FFFFFF !important;
  opacity: 1;
  text-decoration: none !important;
}

body.page-home .nav .dropdown-divider {
  background: rgba(255, 255, 255, 0.1);
}

body.page-home .nav .dropdown-footer-link {
  color: #A8D4FF !important;
  opacity: 1;
}

/* ================================================================
   MOBILE NAVIGATION & ACCORDION SYSTEM
   ================================================================ */

/* Hamburger Button */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.nav-hamburger:hover {
  background: rgba(0, 0, 0, 0.05);
}

.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, background 0.2s ease;
  transform-origin: center;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Backdrop overlay when mobile menu is open */
.nav-mobile-backdrop {
  position: fixed;
  inset: 0;
  top: var(--nav-height);
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.26s ease, visibility 0.26s;
}

.nav-mobile-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Mobile Nav Drawer */
.nav-mobile {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(100vh - var(--nav-height));
  height: calc(100dvh - var(--nav-height));
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  padding: 12px 18px 48px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.24s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.24s;
}

.nav-mobile.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

body.page-home .nav-mobile {
  background: rgba(11, 17, 32, 0.98);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
}

/* Menu Links List */
.nav-mobile-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-mobile-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  min-height: 46px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

body.page-home .nav-mobile-item {
  color: #F8FAFC;
}

.nav-mobile-item:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--accent);
}

body.page-home .nav-mobile-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #38BDF8;
}

.nav-mobile-item.active {
  color: var(--accent);
  background: rgba(59, 141, 212, 0.08);
  font-weight: 700;
}

body.page-home .nav-mobile-item.active {
  color: #38BDF8;
  background: rgba(56, 189, 248, 0.12);
}

/* Accordion Group */
.nav-mobile-group {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.nav-mobile-parent {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 11px 14px;
  min-height: 46px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

body.page-home .nav-mobile-parent {
  color: #F8FAFC;
}

.nav-mobile-parent:hover {
  background: rgba(0, 0, 0, 0.04);
}

body.page-home .nav-mobile-parent:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-mobile-parent.active {
  color: var(--accent);
}

body.page-home .nav-mobile-parent.active {
  color: #38BDF8;
}

.nav-mobile-badge {
  margin-left: auto;
  margin-right: 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(59, 141, 212, 0.12);
  color: var(--accent);
}

body.page-home .nav-mobile-badge {
  background: rgba(56, 189, 248, 0.15);
  color: #38BDF8;
}

.nav-mobile-chevron {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
  margin-left: 2px;
  flex-shrink: 0;
}

body.page-home .nav-mobile-chevron {
  color: #94A3B8;
}

.nav-mobile-group.open .nav-mobile-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

body.page-home .nav-mobile-group.open .nav-mobile-chevron {
  color: #38BDF8;
}

/* Accordion Sub-Menu */
.nav-mobile-sub {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-left: 16px;
  padding-left: 14px;
  border-left: 2px solid rgba(0, 0, 0, 0.08);
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease, padding 0.22s ease;
}

body.page-home .nav-mobile-sub {
  border-left-color: rgba(255, 255, 255, 0.12);
}

.nav-mobile-group.open .nav-mobile-sub {
  max-height: 420px;
  opacity: 1;
  pointer-events: auto;
  padding-top: 4px;
  padding-bottom: 8px;
}

.nav-mobile-sub-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  min-height: 42px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-body);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

body.page-home .nav-mobile-sub-item {
  color: #94A3B8;
}

.nav-mobile-sub-item:hover {
  color: var(--accent);
  background: rgba(0, 0, 0, 0.04);
}

body.page-home .nav-mobile-sub-item:hover {
  color: #38BDF8;
  background: rgba(255, 255, 255, 0.06);
}

.nav-mobile-sub-item.active {
  color: var(--accent);
  background: rgba(59, 141, 212, 0.08);
  font-weight: 600;
}

body.page-home .nav-mobile-sub-item.active {
  color: #38BDF8;
  background: rgba(56, 189, 248, 0.12);
}

.nav-pill-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.12);
  color: #16A34A;
  margin-left: 8px;
}

body.page-home .nav-pill-tag {
  background: rgba(34, 197, 94, 0.2);
  color: #4ADE80;
}

/* Standout CTA Button */
.nav-mobile-cta {
  margin-top: 4px;
}

.nav-mobile-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  padding: 11px 16px;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #FFFFFF !important;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.nav-mobile-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.36);
  color: #FFFFFF !important;
}

/* Social Channels Strip */
.nav-mobile-socials {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

body.page-home .nav-mobile-socials {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.nav-mobile-socials-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

body.page-home .nav-mobile-socials-label {
  color: #64748B;
}

.nav-mobile-socials-chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.nav-social-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-body);
  text-decoration: none;
  transition: all 0.15s ease;
}

body.page-home .nav-social-chip {
  background: #0E1626;
  border-color: #1F2D47;
  color: #CBD5E1;
}

.nav-social-chip.yt:hover {
  color: #EF4444;
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.06);
}

.nav-social-chip.tt:hover {
  color: var(--text-primary);
  border-color: currentColor;
}

.nav-social-chip.ig:hover {
  color: #E1306C;
  border-color: rgba(225, 48, 108, 0.3);
  background: rgba(225, 48, 108, 0.06);
}


/* ================================================================
   HOMEPAGE EDITORIAL & VIDEO HERO STYLES
   ================================================================ */

/* Homepage Transparent/Dark Apple-Style Overlay Nav */
body.page-home .nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(10, 39, 68, 0.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
}

body.page-home .nav .nav-logo {
  color: #F5F5F7;
  opacity: 0.9;
  text-shadow: none;
}

body.page-home .nav .nav-logo:hover {
  opacity: 1;
}

body.page-home .nav .nav-links a,
body.page-home .nav .nav-links .nav-link-item,
body.page-home .nav .nav-dropdown-trigger {
  color: #F5F5F7 !important;
  opacity: 0.75;
  background: transparent !important;
  text-shadow: none;
}

body.page-home .nav .nav-links a:hover,
body.page-home .nav .nav-links .nav-link-item:hover,
body.page-home .nav .nav-dropdown-trigger:hover {
  background: transparent !important;
  color: #FFFFFF !important;
  opacity: 1;
}

body.page-home .nav .nav-links a.active,
body.page-home .nav .nav-links .nav-link-item.active {
  background: transparent !important;
  color: #FFFFFF !important;
  opacity: 1;
}

body.page-home .nav .nav-hamburger span {
  background: #FFFFFF;
}

/* Universal Scrolled Nav State (Turns Navy Across All Pages) */
.nav.nav-scrolled {
  background: rgba(10, 39, 68, 0.94) !important;
  backdrop-filter: saturate(180%) blur(20px) !important;
  -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
}

.nav.nav-scrolled .nav-logo {
  color: #F5F5F7 !important;
  opacity: 0.95;
}

.nav.nav-scrolled .nav-logo:hover {
  opacity: 1;
}

.nav.nav-scrolled .nav-links a,
.nav.nav-scrolled .nav-links .nav-link-item,
.nav.nav-scrolled .nav-dropdown-trigger {
  color: #F5F5F7 !important;
  opacity: 0.8;
  background: transparent !important;
}

.nav.nav-scrolled .nav-links a:hover,
.nav.nav-scrolled .nav-links .nav-link-item:hover,
.nav.nav-scrolled .nav-dropdown-trigger:hover {
  color: #FFFFFF !important;
  opacity: 1;
  background: transparent !important;
}

.nav.nav-scrolled .nav-links a.active,
.nav.nav-scrolled .nav-links .nav-link-item.active {
  color: #A8D4FF !important;
  opacity: 1;
  background: transparent !important;
}

.nav.nav-scrolled .nav-hamburger span {
  background: #FFFFFF !important;
}

.nav.nav-scrolled .nav-dropdown-menu {
  background: rgba(10, 39, 68, 0.96) !important;
  backdrop-filter: saturate(180%) blur(20px) !important;
  -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5) !important;
}

.nav.nav-scrolled .dropdown-item {
  color: #F5F5F7 !important;
  opacity: 0.85;
}

.nav.nav-scrolled .dropdown-item:hover,
.nav.nav-scrolled .dropdown-item:focus-visible {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #FFFFFF !important;
  opacity: 1;
  text-decoration: none !important;
}

.nav.nav-scrolled .dropdown-divider {
  background: rgba(255, 255, 255, 0.12) !important;
}

.nav.nav-scrolled .dropdown-footer-link {
  color: #A8D4FF !important;
  opacity: 1;
}

/* ----- Hero Editorial (Shaped Video + Copy) ----- */
.hero-editorial {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.22)),
    radial-gradient(ellipse 75% 85% at 20% 50%, #163E66 0%, #0F3255 55%, #0A2744 100%);
}

.hero-clip-defs {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Topographic line texture */
.hero-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    repeating-radial-gradient(ellipse 55% 75% at 100% 100%, rgba(255, 255, 255, 0) 0 17px, rgba(255, 255, 255, 0.12) 17px 18px),
    repeating-radial-gradient(ellipse 40% 55% at 0% 0%, rgba(255, 255, 255, 0) 0 17px, rgba(255, 255, 255, 0.09) 17px 18px);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 100% 100%, #000 0%, transparent 70%),
                      radial-gradient(ellipse 45% 50% at 0% 0%, #000 0%, transparent 70%);
  -webkit-mask-composite: source-over;
  mask-image: radial-gradient(ellipse 60% 60% at 100% 100%, #000 0%, transparent 70%),
              radial-gradient(ellipse 45% 50% at 0% 0%, #000 0%, transparent 70%);
}

.hero-editorial-content {
  position: static;
  max-width: 1560px;
  width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--nav-height) var(--sp-lg) 0;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.3fr);
  gap: 56px;
  align-items: stretch;
  text-align: left;
  color: #FFFFFF;
}

/* Video cropped into a shape */
.hero-shape-wrap {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 58%;
  z-index: 2;
  display: flex;
  filter: drop-shadow(-14px 0 36px rgba(0, 0, 0, 0.35));
}

.hero-shape {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 520px;
  clip-path: url(#heroShapeClip);
  -webkit-clip-path: url(#heroShapeClip);
  background: #3B5269;
  overflow: hidden;
}

/* Subtle scrim so nav links stay legible over the video */
.hero-shape::after {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 120px;
  background: linear-gradient(180deg, rgba(10, 39, 68, 0.65) 0%, rgba(10, 39, 68, 0) 100%);
  pointer-events: none;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.hero-hex-row {
  position: absolute;
  right: 24px;
  bottom: 22px;
  display: flex;
  gap: 8px;
  z-index: 2;
  pointer-events: none;
}

.hero-hex {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 66px;
  color: #FFFFFF;
  background: rgba(10, 39, 68, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  pointer-events: none;
  cursor: default;
  user-select: none;
}

.hero-hex:hover {
  background: rgba(10, 39, 68, 0.92);
  transform: none;
}

.hero-hex svg {
  width: 26px;
  height: 26px;
}

.hero-copy {
  position: relative;
  z-index: 3;
  min-width: 0;
  order: -1;
  align-self: center;
  padding: 48px 0;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #D6EAFF;
  margin-bottom: 26px;
  padding: 8px 16px 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-align: left;
}

.hero-kicker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3B8DD4;
  box-shadow: 0 0 0 0 rgba(59, 141, 212, 0.7);
  animation: heroDotPulse 2.2s ease-out infinite;
}

@keyframes heroDotPulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 141, 212, 0.65); }
  70% { box-shadow: 0 0 0 10px rgba(59, 141, 212, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 141, 212, 0); }
}

.hero-editorial-content h1 {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  font-size: clamp(2.5rem, 4.8vw, 4.25rem);
  line-height: 1.1;
  font-weight: 700;
  font-style: normal;
  color: #FFFFFF;
  margin-bottom: 24px;
  letter-spacing: -0.025em;
  text-align: left;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}

.hero-line {
  display: block;
}

.hero-accent {
  color: #FFFFFF;
  font-weight: 700;
}

.hero-editorial-content .hero-tagline,
.hero-tagline {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  font-weight: 500;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92) !important;
  max-width: 560px;
  margin: 0;
  text-align: left;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.hero-features {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 44px 0 0;
  padding: 0;
}

.hero-features a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.hero-features a strong {
  color: #7ABFFF;
  font-weight: 700;
}

.hero-features a:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(122, 191, 255, 0.55);
  transform: translateY(-2px);
}

/* Entrance animation */
.hero-kicker, .hero-editorial-content h1, .hero-line, .hero-tagline, .hero-actions, .hero-features, .hero-shape-wrap {
  opacity: 0;
  transform: translateY(22px);
  animation: heroRise 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-shape-wrap { transform: translateX(28px); animation-name: heroSlideIn; animation-duration: 1.1s; }
@keyframes heroSlideIn {
  to { opacity: 1; transform: translateX(0); }
}
.hero-kicker { animation-delay: 0.05s; }
.hero-editorial-content h1, .hero-line { animation-delay: 0.15s; }
.hero-line.hero-accent { animation-delay: 0.25s; }
.hero-tagline { animation-delay: 0.35s; }
.hero-actions { animation-delay: 0.48s; }
.hero-features { animation-delay: 0.62s; }

@keyframes heroRise {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-kicker, .hero-editorial-content h1, .hero-line, .hero-tagline, .hero-actions, .hero-features, .hero-shape-wrap {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .hero-kicker-dot { animation: none; }
}

@media (max-width: 960px) {
  .hero-editorial-content {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 108px;
    padding-bottom: 110px;
  }
  .hero-shape-wrap { position: relative; width: auto; inset: auto; }
  .hero-shape { flex: none; min-height: 0; aspect-ratio: 1.3 / 1; }
  .hero-copy { order: 0; }
  .hero-editorial-content h1 { font-size: clamp(2.5rem, 8vw, 3.75rem); }
}

@media (max-width: 480px) {
  .hero-hex { width: 44px; height: 50px; }
  .hero-hex svg { width: 20px; height: 20px; }
  .hero-hex-row { left: 14px; bottom: 12px; gap: 6px; }
}

.hero-editorial-content .hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0;
}

.btn-hero-primary {
  position: relative;
  background: linear-gradient(180deg, #3B8DD4 0%, #2563EB 100%);
  color: #FFFFFF !important;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 12px 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1),
              0 4px 16px rgba(37, 99, 235, 0.45),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-hero-primary:hover {
  background: linear-gradient(180deg, #4A9BE2 0%, #1D4ED8 100%);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1),
              0 8px 24px rgba(37, 99, 235, 0.55),
              inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-hero-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4),
              inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-hero-secondary {
  position: relative;
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF !important;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 12px 26px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.45);
  color: #FFFFFF !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-hero-secondary:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.1);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 4;
  margin: 0;
  pointer-events: none;
  animation: scrollHintPulse 2s ease-in-out infinite;
}

@keyframes scrollHintPulse {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.65; }
  50% { transform: translate(-50%, 6px); opacity: 1; }
}

/* ----- Editorial Statement / Philosophy Section ----- */
.editorial-statement-section {
  background: #FFFFFF;
  padding: 44px 0 40px;
  border-bottom: 1px solid var(--border-light);
}

.editorial-kicker-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}

.editorial-kicker {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue-600);
}

.editorial-statement-title {
  font-family: 'Playfair Display', 'Cormorant Garamond', 'DM Serif Display', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.6rem, 2.7vw, 2.35rem);
  line-height: 1.4;
  color: var(--text-primary);
  max-width: 1140px;
  margin: 0 auto;
  letter-spacing: -0.01em;
}

.editorial-statement-title .statement-highlight {
  background: #bae6fd;
  color: #032b53;
  padding: 2px 10px 4px;
  border-radius: 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ----- Section Headers (Editorial standard) ----- */
.editorial-section-header {
  max-width: 680px;
  margin: 0 auto 56px;
}

.editorial-section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  color: var(--text-primary);
  line-height: 1.15;
  margin: 10px 0 14px;
}

.editorial-section-subtitle {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ----- The 3 Core Learning Pathways (Zig-Zag) ----- */
.editorial-pillars-section {
  background: #FBFBF9;
  padding: 96px 0;
}

.editorial-pillars-list {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.editorial-pillar-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.editorial-pillar-row.editorial-pillar-row-practice,
.editorial-pillar-row-practice {
  grid-template-columns: 32% 68%;
  gap: 40px;
}

.editorial-pillar-row.pillar-row-reverse .pillar-content {
  order: 2;
}

.editorial-pillar-row.pillar-row-reverse .pillar-visual {
  order: 1;
}

.pillar-num {
  font-family: var(--font-display);
  font-size: 3.5rem;
  line-height: 1;
  color: var(--blue-500);
  display: block;
  margin-bottom: 12px;
}

.pillar-title {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.pillar-streak-wrap {
  margin-top: -4px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
}

.pillar-desc {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-body);
  margin-bottom: 20px;
}

.pillar-features {
  list-style: none;
  margin-bottom: 28px;
}

.pillar-features li {
  font-size: 0.9375rem;
  color: var(--text-body);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  line-height: 1.5;
}

.pillar-bullet {
  color: #000000;
  font-size: 1.125rem;
  line-height: 1.2;
  font-weight: 700;
  flex-shrink: 0;
}

.pillar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-editorial-primary {
  background: #FFFFFF;
  color: #000000 !important;
  min-width: 310px;
  padding: 14px 38px;
  border-radius: 0 !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 800;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border: 2px solid #000000;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none !important;
}

.btn-editorial-primary:hover {
  background: #000000;
  color: #FFFFFF !important;
  border-color: #000000;
  padding-left: 50px;
  padding-right: 50px;
  letter-spacing: 0.18em;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

.btn-editorial-dark {
  background: #000000;
  color: #FFFFFF !important;
  min-width: 310px;
  padding: 14px 38px;
  border-radius: 0 !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 800;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border: 2px solid #000000;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none !important;
  box-sizing: border-box;
}

.btn-editorial-dark:hover {
  background: #FFFFFF;
  color: #000000 !important;
  border-color: #000000;
  padding-left: 50px;
  padding-right: 50px;
  letter-spacing: 0.18em;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

.btn-editorial-outline {
  background: #FFFFFF;
  color: var(--text-primary) !important;
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-editorial-outline:hover {
  border-color: var(--text-muted);
  color: var(--text-primary) !important;
  background: var(--bg-warm);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.pillar-image-frame {
  position: relative;
  border-radius: 44px 0px 44px 0px;
  overflow: hidden;
  border: 2px solid #000000;
  box-shadow: 12px 12px 0px #000000;
  aspect-ratio: 16/11;
  background: #000000;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.pillar-image-frame:hover {
  transform: translate(-3px, -3px);
  box-shadow: 16px 16px 0px #000000;
}

.editorial-pillar-row.pillar-row-reverse .pillar-image-frame {
  border-radius: 0px 44px 0px 44px;
  box-shadow: -12px 12px 0px #000000;
}

.editorial-pillar-row.pillar-row-reverse .pillar-image-frame:hover {
  transform: translate(3px, -3px);
  box-shadow: -16px 16px 0px #000000;
}

.pillar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease, filter 0.35s ease;
}

.pillar-image-frame:hover .pillar-img {
  transform: scale(1.05);
}

.pillar-practice-frame {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border);
}

/* ----- Featured Units Showcase ----- */
.editorial-featured-section {
  background: #FFFFFF;
  padding: 96px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.featured-units-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.featured-unit-card {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.featured-unit-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(10, 39, 68, 0.12);
  border-color: var(--blue-300);
}

.featured-unit-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #EAEAE6;
}

.featured-unit-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.featured-unit-card:hover .featured-unit-img {
  transform: scale(1.06);
}

.featured-unit-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
}

.featured-unit-tag {
  background: rgba(10, 39, 68, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #FFFFFF;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
}

.featured-unit-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.featured-unit-meta {
  font-size: 0.8125rem;
  color: var(--blue-600);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.featured-unit-content h3 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.25;
}

.featured-unit-content p {
  font-size: 0.875rem;
  color: var(--text-body);
  line-height: 1.55;
  margin-bottom: 16px;
  flex-grow: 1;
}

.featured-unit-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--blue-600);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s ease;
}

.featured-unit-card:hover .featured-unit-link {
  gap: 8px;
  color: var(--blue-700);
}

/* ----- Social Channels Banner Section ----- */
.editorial-social-section {
  background: #FBFBF9;
  padding: 88px 0;
}

/* ----- Meet Mike Bio Section ----- */
.editorial-bio-section {
  background: #F5F5F0;
  padding: 96px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.editorial-bio-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 56px;
  align-items: center;
}

.bio-portrait-placeholder {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 32px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.bio-avatar-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--blue-50);
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--blue-200);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(59, 141, 212, 0.2);
}

.bio-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bio-portrait-name {
  font-family: var(--font-display);
  font-size: 1.75rem;
  display: block;
  color: var(--text-primary);
}

.bio-portrait-title {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
}

.about-social-grid.bio-portrait-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 20px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  width: 100%;
  max-width: 100%;
  flex-wrap: nowrap;
}

.bio-portrait-social .about-social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.bio-portrait-social .about-social-card:hover {
  transform: translateY(-4px);
}

.bio-portrait-social .about-social-icon {
  width: 54px;
  height: 54px;
  min-width: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.bio-portrait-social .about-social-icon svg {
  width: 28px;
  height: 28px;
}

.bio-portrait-social .about-social-card:hover .about-social-icon {
  transform: scale(1.1);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

.bio-portrait-social .about-social-handle {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.editorial-bio-heading {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--text-primary);
  margin: 8px 0 16px;
}

.editorial-bio-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--blue-700);
  margin-bottom: 20px;
  padding-left: 16px;
  border-left: 3px solid var(--blue-500);
  line-height: 1.4;
}

.editorial-bio-text {
  font-size: 1.0625rem;
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: 16px;
}

.editorial-bio-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.editorial-bio-actions .btn {
  width: 290px;
  min-width: 290px;
  height: 52px;
  box-sizing: border-box;
  padding: 0 20px;
  text-align: center;
}

@media (max-width: 680px) {
  .editorial-bio-actions .btn {
    width: 100%;
    min-width: 0;
  }
}

/* ----- Key Stats Counter Bar ----- */
.editorial-stats-section {
  background: var(--blue-900);
  color: #FFFFFF;
  padding: 64px 0;
}

.editorial-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-card {
  padding: 12px;
}

.stat-card .stat-number {
  font-family: var(--font-display);
  font-size: 3rem;
  color: #FFFFFF;
  display: block;
  line-height: 1;
}

.stat-card .stat-label {
  font-size: 0.875rem;
  color: var(--blue-200);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-top: 10px;
  display: block;
}

/* ----- Reviews Section & In-Place Review Creator ----- */
.editorial-reviews-section {
  background: #FFFFFF;
  padding: 96px 0;
}

.reviews-section-container {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 40px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.reviews-header-block {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
}

.reviews-header-left {
  max-width: 600px;
}

.reviews-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blue-600);
  background: var(--blue-50);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 10px;
}

.reviews-header-left h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.2;
}

.reviews-header-left p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.reviews-summary-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-main);
  padding: 12px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.rating-big-score {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.rating-summary-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rating-count-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Star Rating Display (Gold filled and gray outline) */
.star-rating-display {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.star-display-svg {
  transition: transform 0.15s ease;
}

.star-display-svg.filled {
  fill: #F59E0B;
  stroke: #D97706;
  stroke-width: 1px;
}

.star-display-svg.empty {
  fill: transparent;
  stroke: #D1D5DB;
  stroke-width: 1.5px;
}

/* ----- In-Place Inline Review Creator Card ----- */
.inline-review-form-card {
  background: #F8FAFC;
  border: 1.5px solid var(--blue-200);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 36px;
  box-shadow: 0 8px 24px rgba(59, 141, 212, 0.08);
  animation: slideDownReviewForm 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDownReviewForm {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.inline-review-form-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.inline-review-form-header h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.form-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.form-close-x {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.form-close-x:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.06);
}

/* Star Rating Border Picker */
.star-picker-group {
  text-align: center;
  background: #FFFFFF;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.star-rating-picker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 8px 0;
}

.star-pick-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: transform 0.15s ease;
}

.star-pick-btn:hover {
  transform: scale(1.18);
}

.star-pick-btn .star-svg {
  width: 36px;
  height: 36px;
  fill: transparent;
  stroke: #9CA3AF;
  stroke-width: 1.8px;
  transition: all 0.15s ease;
}

/* 5 Borders initially; fills in on active or hover */
.star-pick-btn.active .star-svg,
.star-pick-btn.hovered .star-svg {
  fill: #F59E0B;
  stroke: #D97706;
}

.star-pick-btn:not(.active):not(.hovered) .star-svg {
  fill: transparent;
  stroke: #9CA3AF;
}

.star-label-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--blue-700);
  margin-top: 4px;
}

.required-star {
  color: #DC2626;
  font-weight: bold;
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: #FFFFFF;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 141, 212, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 96px;
}

.form-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

/* ----- Form Consent & Checkbox Styles ----- */
.form-consent-group {
  margin-top: 16px;
  margin-bottom: 18px;
}

.form-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.84375rem;
  line-height: 1.5;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.form-checkbox {
  width: 17px;
  height: 17px;
  min-width: 17px;
  min-height: 17px;
  margin-top: 2px;
  border-radius: 0;
  accent-color: var(--blue-500);
  cursor: pointer;
}

.form-checkbox-label a {
  color: var(--blue-500);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

.form-checkbox-label a:hover {
  color: var(--blue-600, #0369a1);
}

[data-theme="dark"] .form-checkbox-label {
  color: #94A3B8;
}

[data-theme="dark"] .form-checkbox-label a {
  color: #38BDF8;
}

[data-theme="dark"] .form-checkbox-label a:hover {
  color: #7DD3FC;
}


/* Reviews Cards Grid */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.review-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.review-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(10, 39, 68, 0.08);
  border-color: var(--blue-200);
}

.review-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--blue-700);
  font-weight: 700;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--blue-200);
}

.review-author-meta {
  flex-grow: 1;
}

.review-author-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.verified-pill {
  font-size: 0.6875rem;
  font-weight: 600;
  background: #DCFCE7;
  color: #15803D;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.review-author-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.review-date {
  font-size: 0.75rem;
  color: var(--text-light);
  flex-shrink: 0;
}

.review-card-rating {
  margin: 2px 0;
}

.review-card-body p {
  font-size: 0.875rem;
  color: var(--text-body);
  line-height: 1.6;
  font-style: italic;
}

.reviews-empty-state {
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-main);
  border-radius: 14px;
  border: 1px dashed var(--border);
}

.empty-star-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.reviews-empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  margin-bottom: 6px;
}

.reviews-empty-state p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 18px;
}

.reviews-cta-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .reviews-section-container {
    padding: 24px 18px;
  }
  .form-row-2col {
    grid-template-columns: 1fr;
  }
  .reviews-header-block {
    flex-direction: column;
    align-items: flex-start;
  }
  .reviews-summary-card {
    width: 100%;
    justify-content: space-between;
  }
  .reviews-grid {
    grid-template-columns: 1fr;
  }
}

/* ----- Video Cards Showcase ----- */
.editorial-videos-section {
  background: #FBFBF9;
  padding: 96px 0;
  border-top: 1px solid var(--border-light);
}

.editorial-videos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.video-showcase-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}

.video-showcase-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 32px rgba(10, 39, 68, 0.1);
  border-color: #ff0000;
}

.video-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  overflow: hidden;
}

.video-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.95;
  transition: opacity 0.3s, transform 0.4s ease;
}

.video-showcase-card:hover .video-thumb-img {
  opacity: 1;
  transform: scale(1.04);
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  background: rgba(255, 0, 0, 0.92);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}

.video-showcase-card:hover .video-play-btn {
  transform: translate(-50%, -50%) scale(1.12);
  background: #ff0000;
}

.video-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.video-card-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.video-card-info h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.3;
}

.video-card-info p {
  font-size: 0.875rem;
  color: var(--text-body);
  line-height: 1.5;
  margin-bottom: 14px;
  flex-grow: 1;
}

.video-card-link {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #ff0000;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ----- Live Video Impact CTA Banner ----- */
.editorial-live-cta-section {
  position: relative;
  overflow: hidden;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #0A2744;
}

.cta-bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
}

.cta-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 39, 68, 0.68) 0%, rgba(10, 39, 68, 0.88) 100%);
  z-index: 2;
}

.cta-content-wrap {
  position: relative;
  z-index: 3;
  padding: 96px 24px;
}

.cta-kicker {
  display: inline-block;
  color: var(--blue-300);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.cta-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  color: #FFFFFF;
  margin-bottom: 16px;
  line-height: 1.12;
}

.cta-title em {
  font-style: italic;
  color: var(--blue-200);
}

.cta-desc {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.125rem;
  max-width: 620px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.cta-btn-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ----- Visual Gallery Strip (6 Tiles) ----- */
.editorial-gallery-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  height: 160px;
  overflow: hidden;
  background: #000;
}

.gallery-tile {
  overflow: hidden;
  height: 100%;
}

.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.3s;
  opacity: 0.9;
}

.gallery-tile:hover img {
  transform: scale(1.12);
  opacity: 1;
}

/* Media Queries for Editorial sections */
@media (max-width: 1024px) {
  .editorial-pillar-row {
    gap: 36px;
  }
  .featured-units-grid,
  .editorial-videos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .editorial-bio-grid {
    grid-template-columns: 1fr;
  }
  .bio-portrait-placeholder {
    max-width: 360px;
    margin: 0 auto;
  }
  .editorial-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
  .editorial-gallery-strip {
    grid-template-columns: repeat(3, 1fr);
    height: 240px;
  }
}

@media (max-width: 768px) {
  .editorial-pillar-row {
    grid-template-columns: 1fr !important;
    gap: 28px;
  }
  .editorial-pillar-row.pillar-row-reverse .pillar-content {
    order: 1;
  }
  .editorial-pillar-row.pillar-row-reverse .pillar-visual {
    order: 2;
  }
  .featured-units-grid,
  .editorial-videos-grid {
    grid-template-columns: 1fr;
  }
  .editorial-gallery-strip {
    grid-template-columns: repeat(2, 1fr);
    height: 200px;
  }
}


/* ----- Standard Hero (Other Pages / Fallback) ----- */
.hero {
  position: relative;
  padding: var(--sp-4xl) 0 var(--sp-3xl);
  text-align: center;
  overflow: hidden;
}

/* Decorative blobs - organic shapes like the Stwedy template, using logo blue */
.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -80px;
  width: 450px;
  height: 450px;
  background: var(--blue-200);
  border-radius: 62% 38% 70% 30% / 45% 55% 45% 55%;
  opacity: 0.3;
  z-index: 0;
  animation: blobFloat 12s ease-in-out infinite alternate;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: -60px;
  width: 350px;
  height: 350px;
  background: var(--blue-300);
  border-radius: 40% 60% 55% 45% / 55% 40% 60% 45%;
  opacity: 0.15;
  z-index: 0;
  animation: blobFloat 10s ease-in-out 2s infinite alternate-reverse;
}

@keyframes blobFloat {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); }
  100% { transform: translate(30px, -20px) rotate(8deg) scale(1.05); }
}

.hero > .container { position: relative; z-index: 1; }

.hero-logo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto var(--sp-lg);
  box-shadow: 0 4px 24px rgba(59, 141, 212, 0.25);
  border: 3px solid var(--white);
}

.hero h1 {
  font-size: 3.5rem;
  line-height: 1.08;
  margin-bottom: var(--sp-md);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-tagline {
  font-size: 1.25rem;
  color: var(--text-body);
  margin-bottom: var(--sp-xl);
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: var(--sp-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* Floating subject pills (decorative) */
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-sm);
  margin-top: var(--sp-2xl);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-body);
  box-shadow: var(--shadow-sm);
  transition: transform var(--ease-spring), box-shadow var(--ease);
}

.hero-pill:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}


/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  line-height: 1.4;
  cursor: pointer;
}

.btn-primary {
  background: var(--dark);
  color: var(--white);
  border: 1px solid var(--dark);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08),
              inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.btn-primary:hover {
  background: var(--blue-700);
  border-color: var(--blue-700);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 90, 148, 0.25);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.btn-secondary:hover {
  border-color: var(--text-muted);
  background: var(--bg-warm);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.btn-accent {
  background: linear-gradient(180deg, var(--blue-500) 0%, var(--blue-600) 100%);
  color: var(--white);
  border: 1px solid var(--blue-600);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08),
              0 2px 8px rgba(59, 141, 212, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn-accent:hover {
  background: linear-gradient(180deg, var(--blue-600) 0%, var(--blue-700) 100%);
  border-color: var(--blue-700);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(59, 141, 212, 0.4);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8125rem;
  border-radius: 6px;
}

.btn-lg {
  padding: 13px 26px;
  font-size: 0.9375rem;
  border-radius: 10px;
}


/* ----- Badges ----- */
.badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.71875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 5px;
}

.badge-active {
  background: var(--accent-light);
  color: var(--accent-hover);
}

.badge-coming {
  background: var(--warning-bg);
  color: #92400E;
}


/* ----- Course Listings ----- */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--sp-md);
}

.course-item {
  background: var(--bg-card);
  padding: var(--sp-lg);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: transform var(--ease-spring), box-shadow var(--ease);
}

.course-item-content h3 {
  font-size: 1.25rem;
  margin-bottom: var(--sp-xs);
}

.course-item-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

a.course-item {
  text-decoration: none;
  color: inherit;
}

a.course-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

a.course-item h3 { color: var(--text-primary); }

.course-item-coming {
  opacity: 0.55;
}

.course-item-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  flex-shrink: 0;
}


/* ----- Course Page (Unit/Lesson List) ----- */
.course-description {
  font-size: 1.125rem;
  color: var(--text-body);
  max-width: 640px;
  margin-bottom: var(--sp-xl);
}

.unit-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.unit-item {
  scroll-margin-top: calc(var(--nav-height, 56px) + 24px);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.unit-item.unit-highlighted {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 141, 212, 0.25), var(--shadow-md);
}

.unit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-lg);
  cursor: pointer;
  user-select: none;
  transition: background var(--ease);
}

.unit-header:hover { background: var(--accent-pale); }

.unit-header h3 {
  font-size: 1.125rem;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.unit-number {
  color: var(--accent);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8125rem;
  background: var(--accent-pale);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
}

.unit-toggle {
  font-size: 0.875rem;
  color: var(--text-light);
  transition: transform var(--ease);
}

.unit-item.open .unit-toggle { transform: rotate(180deg); }

.lesson-list {
  display: none;
  border-top: 1px solid var(--border-light);
}

.unit-item.open .lesson-list { display: block; }

.lesson-link {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 14px var(--sp-lg) 14px calc(var(--sp-lg) + var(--sp-md));
  font-size: 0.9375rem;
  color: var(--text-body);
  text-decoration: none;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--ease), color var(--ease);
}

.lesson-link:last-child { border-bottom: none; }
.lesson-link:hover { background: var(--accent-pale); color: var(--accent-hover); }

.lesson-link-number {
  font-size: 0.8125rem;
  color: var(--text-light);
  min-width: 24px;
  font-weight: 600;
}


/* ----- Lesson Page ----- */
.lesson-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  font-size: 0.8125rem;
  color: var(--text-light);
  margin-bottom: var(--sp-lg);
  flex-wrap: wrap;
}

.lesson-breadcrumb a { color: var(--text-muted); }
.lesson-breadcrumb a:hover { color: var(--accent); }
.lesson-breadcrumb .sep { color: var(--border); }

.lesson-title {
  font-size: 2rem;
  margin-bottom: var(--sp-xs);
}

.lesson-subtitle {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: var(--sp-xl);
  font-weight: 500;
}


/* ----- Tabs ----- */
.tabs {
  margin-bottom: var(--sp-xl);
}

.tab-list {
  display: flex;
  gap: var(--sp-xs);
  margin-bottom: var(--sp-xl);
  padding: 4px;
  background: var(--bg-warm);
  border-radius: var(--radius-pill);
  width: fit-content;
}

.tab-btn {
  padding: 10px 24px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--ease);
}

.tab-btn:hover { color: var(--text-primary); }

.tab-btn.active {
  color: var(--text-primary);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }


/* ----- Lesson Content ----- */
.lesson-content h2 {
  margin-top: var(--sp-xl);
  margin-bottom: var(--sp-md);
  padding-bottom: var(--sp-sm);
  border-bottom: 2px solid var(--accent-light);
  font-size: 1.625rem;
}

.lesson-content h2:first-child { margin-top: 0; }

.lesson-content h3 {
  margin-top: var(--sp-lg);
  margin-bottom: var(--sp-sm);
  font-size: 1.25rem;
}

.lesson-content p {
  margin-bottom: var(--sp-md);
  line-height: 1.75;
}

.lesson-content ul,
.lesson-content ol {
  margin-bottom: var(--sp-md);
  padding-left: var(--sp-lg);
}

.lesson-content ul { list-style: disc; }
.lesson-content ol { list-style: decimal; }

.lesson-content li {
  margin-bottom: var(--sp-sm);
  color: var(--text-body);
  line-height: 1.65;
}

.lesson-content .example {
  background: var(--accent-pale);
  border-left: 4px solid var(--accent);
  padding: var(--sp-lg);
  margin: var(--sp-lg) 0;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.lesson-content .example-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent-hover);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-sm);
}

.lesson-content .note {
  background: var(--accent-pale);
  padding: var(--sp-lg);
  margin: var(--sp-lg) 0;
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  border: 1px solid var(--accent-light);
}

/* KaTeX display math spacing */
.lesson-content .katex-display {
  margin: var(--sp-lg) 0;
}


/* ----- Formula List ----- */
.formula-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--sp-md);
}

.formula-item {
  padding: var(--sp-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.formula-name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent-hover);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--sp-sm);
}

.formula-math {
  margin-bottom: var(--sp-sm);
}

.formula-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: var(--sp-xs);
}

.formula-vars {
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding-left: var(--sp-md);
  list-style: none;
}

.formula-vars li { margin-bottom: 2px; }

.formula-vars li::before {
  content: "·";
  margin-right: var(--sp-sm);
  color: var(--accent);
}

.formula-empty {
  text-align: center;
  padding: var(--sp-2xl);
  color: var(--text-muted);
  font-size: 0.9375rem;
}


.yt-embed-wrapper {
  margin: var(--sp-lg) 0 var(--sp-xl);
}

.yt-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 0;
  border-radius: var(--radius-xl);
  background: #0a0a0a;
  box-shadow: var(--shadow-md);
}

.yt-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.yt-embed-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 8px 14px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.yt-embed-link {
  color: #dc2626;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.yt-embed-link:hover {
  text-decoration: underline;
}


/* ----- Practice Engine ----- */
.practice-container {
  max-width: 700px;
}

.practice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-lg);
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.practice-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-warm);
  border-radius: var(--radius-pill);
  margin-bottom: var(--sp-xl);
  overflow: hidden;
}

.practice-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-pill);
  transition: width 300ms ease;
}

.question-text {
  font-size: 1.0625rem;
  color: var(--text-primary);
  margin-bottom: var(--sp-lg);
  line-height: 1.7;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-lg);
}

.choice {
  display: flex;
  align-items: center;
  gap: var(--sp-md, 14px);
  padding: 13px var(--sp-lg, 18px);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg, 10px);
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-body);
  background: var(--bg-card);
}

.choice:hover:not(.disabled):not(.selected) {
  border-color: #94A3B8;
  background: var(--bg-card);
  transform: none;
}

.choice.selected {
  border-color: #334155;
  background: var(--bg-card);
  transform: none;
}

.choice.correct {
  border-color: var(--border);
  background: var(--bg-card);
}

.choice.incorrect {
  border-color: var(--border);
  background: var(--bg-card);
}

.choice.disabled {
  pointer-events: none;
  transform: none;
}

.choice-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  border: 1.5px solid #CBD5E1;
  background: #F8FAFC;
  color: #475569;
  font-weight: 700;
  font-size: 0.8125rem;
  padding: 0;
  margin-right: 6px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.choice:hover:not(.disabled):not(.selected) .choice-label {
  background: #E2E8F0;
  border-color: #94A3B8;
  color: #0F172A;
}

.choice.selected .choice-label {
  background: #0F172A;
  border-color: #0F172A;
  color: #FFFFFF;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
}

.choice.correct .choice-label {
  background: var(--success);
  border-color: var(--success);
  color: #FFFFFF;
}

.choice.incorrect .choice-label {
  background: var(--error);
  border-color: var(--error);
  color: #FFFFFF;
}

.choice-text {
  flex: 1;
  min-width: 0;
}

/* Daily Section aliases for backward compatibility */
.daily-section .choice {
  align-items: center;
}

.practice-feedback {
  padding: 14px 0 6px;
  background: transparent;
  border: none;
  border-radius: 0;
  margin-bottom: var(--sp-lg);
  font-size: 0.9375rem;
}

.practice-feedback-correct {
  background: transparent;
  border: none;
}

.practice-feedback-correct .feedback-label {
  color: var(--success);
  font-weight: 700;
  font-size: 1.05rem;
}

.practice-feedback-incorrect {
  background: transparent;
  border: none;
}

.practice-feedback-incorrect .feedback-label {
  color: var(--error);
  font-weight: 700;
  font-size: 1.05rem;
}

.feedback-explanation {
  margin-top: 6px;
  color: var(--text-body);
  line-height: 1.6;
}

.practice-controls {
  display: flex;
  gap: var(--sp-md);
}

.practice-results {
  text-align: center;
  padding: var(--sp-3xl) 0;
}

.practice-results h3 {
  margin-bottom: var(--sp-md);
}

.results-score {
  font-size: 3.5rem;
  font-family: var(--font-display);
  color: var(--accent);
  margin-bottom: var(--sp-sm);
}

.results-detail {
  font-size: 1rem;
  color: var(--text-body);
  margin-bottom: var(--sp-xl);
}

/* Daily Results Card */
.daily-results-view {
  padding: 32px 20px;
  text-align: center;
}

.daily-congrats-heading {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.daily-accuracy-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  font-size: 1.05rem;
  color: var(--text-body);
  margin-bottom: 12px;
}

.daily-accuracy-stat .daily-accuracy-label {
  font-weight: 500;
  color: var(--text-muted);
}

.daily-accuracy-stat .daily-accuracy-percent {
  font-weight: 800;
  color: var(--success);
  font-size: 1.25rem;
}

.daily-results-subtext {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.daily-comeback-hint {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 10px;
}

.practice-empty {
  text-align: center;
  padding: var(--sp-3xl) var(--sp-lg);
  color: var(--text-muted);
}

.practice-empty h3 {
  margin-bottom: var(--sp-sm);
}

.practice-empty p {
  color: var(--text-muted);
}


/* ----- Daily Practice ----- */
.daily-section {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--sp-xl);
  box-shadow: var(--shadow-sm);
}

.daily-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-lg);
  text-align: center;
}

.daily-header.daily-header-centered {
  justify-content: center;
  text-align: center;
}

.daily-date {
  font-size: 0.9375rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.daily-streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  font-size: 0.95rem;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #C2410C;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  transition: color 0.25s ease;
}

.daily-streak-badge strong {
  font-weight: 700;
  color: #9A3412;
}

.daily-streak-badge.completed-today {
  color: #059669;
  background: transparent;
  border: none;
  box-shadow: none;
}

.daily-streak-badge.completed-today strong {
  color: #047857;
}


/* ----- Mock Exam Intro / Start Page ----- */
.exam-intro-container {
  padding: 48px 20px 80px;
  max-width: 960px;
  margin: 0 auto;
}

.exam-intro-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 44px 48px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

.exam-intro-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-pale);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}

.exam-intro-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.25;
}

.exam-intro-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 32px;
}

.exam-sections-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

.section-overview-card {
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 24px;
}

.sec-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.sec-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-primary);
  background: #e2e8f0;
  padding: 3px 8px;
  border-radius: 4px;
}

.sec-weight {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent);
}

.section-overview-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.sec-details-list {
  margin: 0;
  padding-left: 20px;
  font-size: 0.875rem;
  color: var(--text-body);
  line-height: 1.7;
}

.exam-policies-box {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 36px;
}

.exam-policies-box h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
  text-decoration: underline;
  text-underline-offset: 4px;
  margin-bottom: 16px;
}

.policy-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-body, #334155);
}

.policy-item:last-child {
  margin-bottom: 0;
}

.policy-icon {
  font-size: 1.125rem;
  line-height: 1.2;
}

.policy-bullet {
  font-size: 1.125rem;
  line-height: 1.4;
  color: var(--text-muted, #64748b);
  font-weight: 700;
  flex-shrink: 0;
}

.policy-text strong {
  color: var(--text-primary, #0f172a);
}

.exam-intro-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ----- Mock Exam Interface & Testing Suite ----- */
.exam-container {
  min-height: calc(100vh - var(--nav-height));
  background: var(--bg-alt, #fafaf9);
}

.exam-top-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.exam-header-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.exam-title-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.exam-section-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.exam-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-outline-danger {
  background: transparent;
  color: #dc2626;
  border: 1.5px solid #fca5a5;
  font-weight: 600;
}

.btn-outline-danger:hover {
  background: #fef2f2;
  border-color: #dc2626;
}

.exam-timer {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-warm);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  letter-spacing: 0.04em;
}

.exam-timer.warning {
  color: #dc2626;
  background: #fef2f2;
  border-color: #fca5a5;
  animation: timerPulse 1s infinite alternate;
}

@keyframes timerPulse {
  from { opacity: 1; }
  to { opacity: 0.65; }
}

.exam-body {
  display: flex;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.exam-main {
  flex: 1;
  min-width: 0;
}

.exam-question-card {
  position: relative;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 10px);
  padding: 28px 32px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  margin-bottom: 20px;
}

.exam-question-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  padding-right: 56px;
}

.exam-q-number-pill {
  font-size: 0.8125rem;
  font-weight: 700;
  background: var(--text-primary);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.exam-unit-pill {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-warm);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

/* Vertical Bookmark Banner */
.exam-bookmark-banner {
  position: absolute;
  top: 0;
  right: 28px;
  z-index: 10;
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 7px;
  background: #E2E8F0;
  border: none;
  border-top: 3px solid rgba(0, 0, 0, 0.12);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 9px), 0 100%);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  cursor: pointer;
  color: #64748B;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              height 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.25s ease,
              color 0.2s ease,
              filter 0.25s ease;
  user-select: none;
  text-decoration: none;
  margin: 0;
  outline: none;
}

.exam-bookmark-banner:hover {
  height: 48px;
  transform: translateY(2px);
  background: #CBD5E1;
  color: #1E293B;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.15));
}

.exam-bookmark-banner:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.exam-bookmark-banner.is-bookmarked {
  height: 60px;
  transform: translateY(0);
  background: linear-gradient(180deg, #FBBF24 0%, #F59E0B 100%);
  border-top: 3px solid #D97706;
  color: #78350F;
  filter: drop-shadow(0 4px 10px rgba(245, 158, 11, 0.42));
  animation: bookmarkBannerDrop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.exam-bookmark-banner.is-bookmarked:hover {
  height: 63px;
  transform: translateY(2px);
  filter: drop-shadow(0 6px 14px rgba(245, 158, 11, 0.5));
}

@keyframes bookmarkBannerDrop {
  0% {
    height: 44px;
    transform: translateY(-6px);
  }
  60% {
    height: 64px;
    transform: translateY(3px);
  }
  100% {
    height: 60px;
    transform: translateY(0);
  }
}

.exam-bookmark-banner .banner-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  pointer-events: none;
}

.exam-bookmark-banner .banner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.exam-bookmark-banner:hover .banner-icon {
  transform: scale(1.1);
}

.exam-bookmark-banner.is-bookmarked .banner-icon {
  transform: scale(1.15);
}

.exam-bookmark-banner .banner-text {
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
}

@media (max-width: 640px) {
  .exam-question-card {
    padding: 20px 18px;
  }
  .exam-question-header {
    padding-right: 48px;
  }
  .exam-bookmark-banner {
    right: 14px;
    width: 40px;
    height: 40px;
  }
  .exam-bookmark-banner:hover {
    height: 44px;
  }
  .exam-bookmark-banner.is-bookmarked {
    height: 54px;
  }
  .exam-bookmark-banner.is-bookmarked:hover {
    height: 56px;
  }
}

.exam-stimulus-box {
  background: #f8fafc;
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-body);
}

.stimulus-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}

.exam-stem-box {
  background: #f0fdf4;
  border-left: 4px solid #16a34a;
  padding: 16px 20px;
  border-radius: 4px;
  margin-bottom: 24px;
  font-size: 0.9375rem;
  line-height: 1.65;
  font-weight: 500;
}

.exam-prompt-text {
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.65;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.exam-choices-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exam-choice-item {
  display: flex;
  align-items: center;
  gap: var(--sp-md, 14px);
  padding: 13px var(--sp-lg, 18px);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg, 10px);
  background: var(--bg-card, #ffffff);
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-body);
}

.exam-choice-item:hover:not(.selected) {
  border-color: #94A3B8;
  background: var(--bg-card, #ffffff);
  transform: none;
}

.exam-choice-item.selected {
  border-color: #334155;
  background: var(--bg-card, #ffffff);
  transform: none;
  box-shadow: none;
}

.exam-choice-radio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  border: 1.5px solid #CBD5E1;
  background: #F8FAFC;
  color: #475569;
  font-weight: 700;
  font-size: 0.8125rem;
  padding: 0;
  margin-right: 6px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.exam-choice-item:hover:not(.selected) .exam-choice-radio {
  background: #E2E8F0;
  border-color: #94A3B8;
  color: #0F172A;
}

.exam-choice-item.selected .exam-choice-radio {
  background: #0F172A;
  border-color: #0F172A;
  color: #FFFFFF;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
}

.exam-choice-content {
  flex: 1;
  min-width: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-primary);
  padding-top: 0;
}

.exam-bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.exam-status-summary {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Sidebar Navigator */
.exam-sidebar {
  width: 270px;
  flex-shrink: 0;
}

.exam-sidebar-card {
  position: sticky;
  top: calc(var(--nav-height) + 20px);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.exam-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.exam-sidebar-header h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.palette-stat {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.exam-palette-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 2px;
}

.exam-q-btn {
  position: relative;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text-body);
  cursor: pointer;
  transition: all 0.12s ease;
}

.exam-q-btn:hover {
  border-color: var(--accent);
}

.exam-q-btn.current {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
  font-weight: 700;
}

.exam-q-btn.answered {
  background: #1e293b;
  color: #ffffff;
  border-color: #1e293b;
}

.exam-q-btn.answered.current {
  background: var(--accent);
  border-color: var(--accent);
}

.flag-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #f59e0b;
  pointer-events: none;
}

.palette-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 3px;
  vertical-align: middle;
}

.legend-dot.current-dot { border: 1.5px solid var(--accent); background: transparent; }
.legend-dot.answered-dot { background: #1e293b; }
.legend-dot.flagged-dot {
  background: #f59e0b;
  border-radius: 50%;
  width: 17px;
  height: 17px;
}

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

/* FRQ Specifics */
.exam-frq-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.frq-parts-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.frq-part-card {
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 18px 20px;
  background: #fbfbfb;
}

.frq-part-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.frq-part-label {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
}

.frq-part-pts {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
}

.frq-part-prompt {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.frq-textarea {
  width: 100%;
  min-height: 130px;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.6;
  background: #ffffff;
  resize: vertical;
  transition: border-color 0.15s ease;
}

.frq-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.frq-nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.frq-nav-item {
  text-align: left;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.frq-nav-item:hover {
  border-color: var(--accent);
}

.frq-nav-item.current {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
  background: #f8fafc;
}

.frq-nav-item.answered {
  background: #f0fdf4;
  border-color: #86efac;
}

.frq-nav-item.flagged {
  border-color: #f59e0b;
}

.frq-nav-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.frq-nav-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.frq-nav-progress {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 4px;
}

/* ----- Exam Results & Scoring Dashboard ----- */
.exam-results-container {
  padding: 40px 20px 80px;
  max-width: 1080px;
}

.results-hero-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 36px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  margin-bottom: 28px;
}

.results-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.results-hero-info h1 {
  font-size: 1.875rem;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.results-subtitle {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* 3 Projected AP Score Cards Grid */
.projected-scores-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}

@media (max-width: 900px) {
  .projected-scores-grid {
    grid-template-columns: 1fr;
  }
}

.score-projection-card {
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.score-projection-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.score-projection-card.composite-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 2px solid #34d399;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12);
}

.card-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.card-tag.frq-tag {
  color: #2563eb;
}

.card-tag.composite-tag {
  color: #059669;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 4px;
}

.score-projection-body {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.score-badge-circle {
  width: 58px;
  height: 58px;
  min-width: 58px;
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.875rem;
  font-weight: 800;
  font-family: var(--font-display);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.score-badge-circle.composite-badge {
  width: 64px;
  height: 64px;
  min-width: 64px;
  font-size: 2.125rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.score-badge-circle.score-5 { background: linear-gradient(135deg, #10b981, #047857); }
.score-badge-circle.score-4 { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.score-badge-circle.score-3 { background: linear-gradient(135deg, #f59e0b, #b45309); }
.score-badge-circle.score-2 { background: linear-gradient(135deg, #f97316, #c2410c); }
.score-badge-circle.score-1 { background: linear-gradient(135deg, #ef4444, #b91c1c); }

.score-projection-info {
  flex: 1;
}

.score-projection-headline {
  font-size: 0.9375rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.score-projection-headline strong {
  font-size: 1.125rem;
}

.score-projection-status {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.score-projection-status.composite-status {
  color: #065f46;
  font-weight: 700;
}

.score-projection-metric {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.score-projection-metric .metric-val {
  font-weight: 700;
  color: var(--text-primary);
}

.score-projection-metric .metric-val.composite-val {
  font-size: 1.0625rem;
  color: #047857;
  font-weight: 800;
}

.score-projection-metric .metric-sub {
  font-size: 0.75rem;
  display: block;
  color: var(--text-muted);
  margin-top: 2px;
}

.score-benchmark-bar {
  display: flex;
  gap: 4px;
  background: rgba(0,0,0,0.04);
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 0.6875rem;
  justify-content: space-between;
}

.bm-chip {
  padding: 2px 5px;
  border-radius: 3px;
  color: var(--text-muted);
  font-weight: 600;
}

.bm-chip.active {
  background: var(--text-primary);
  color: #ffffff;
  font-weight: 700;
}

.score-projection-card.composite-card .bm-chip.active {
  background: #059669;
}

/* Results Tabs */
.results-tab-bar {
  display: flex;
  gap: 12px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}

.results-tab-btn {
  padding: 12px 20px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.results-tab-btn:hover {
  color: var(--text-primary);
}

.results-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.review-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.filter-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.filter-chip {
  font-size: 0.8125rem;
  font-weight: 600;
  background: #ffffff;
  border: 1.5px solid var(--border);
  color: var(--text-body);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-chip:hover {
  border-color: var(--accent);
}

.filter-chip.active {
  background: var(--text-primary);
  color: #ffffff;
  border-color: var(--text-primary);
}

/* MCQ Review Cards */
.mcq-review-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.review-question-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.review-question-card.is-correct {
  border-left: 5px solid var(--success);
}

.review-question-card.is-incorrect {
  border-left: 5px solid var(--error);
}

.review-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.review-q-badge {
  font-size: 0.8125rem;
  font-weight: 700;
  background: #f1f5f9;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.review-unit-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-warm);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.review-flag-tag {
  font-size: 0.75rem;
  color: #b45309;
  background: #fef3c7;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-weight: 600;
}

.review-result-tag {
  margin-left: auto;
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.review-result-tag.correct { background: #d1fae5; color: #065f46; }
.review-result-tag.incorrect { background: #fee2e2; color: #991b1b; }

.review-choices-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.review-choice-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: #ffffff;
  font-size: 0.9375rem;
}

.review-choice-item.correct-answer {
  background: #f0fdf4;
  border-color: #16a34a;
  font-weight: 600;
}

.review-choice-item.user-incorrect {
  background: #fef2f2;
  border-color: #dc2626;
  text-decoration: line-through;
}

.choice-letter {
  font-weight: 700;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.choice-body { flex: 1; }

.choice-mark {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.choice-mark.correct-mark { background: #dcfce7; color: #166534; }
.choice-mark.wrong-mark { background: #fee2e2; color: #991b1b; }

.review-explanation-box {
  background: #f8fafc;
  border-radius: 6px;
  padding: 16px;
  margin-top: 14px;
  font-size: 0.875rem;
  line-height: 1.6;
}

.explanation-title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.distractor-box {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

.distractor-title {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin-bottom: 4px;
}

.distractor-item {
  font-size: 0.8125rem;
  color: var(--text-body);
  margin-bottom: 3px;
}

/* FRQ Self-Grading */
.frq-self-grade-intro {
  background: #eff6ff;
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.intro-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.intro-content h3 {
  font-size: 1.0625rem;
  color: #1e40af;
  margin-bottom: 4px;
}

.intro-content p {
  font-size: 0.875rem;
  color: #1e3a8a;
  margin: 0;
  line-height: 1.55;
}

/* FRQ Question Navigator Filter Bar */
.frq-grading-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.grading-nav-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-muted);
}

.frq-nav-pill-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.frq-filter-pill {
  font-size: 0.8125rem;
  font-weight: 600;
  background: #ffffff;
  border: 1.5px solid var(--border);
  color: var(--text-body);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.frq-filter-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.frq-filter-pill.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.frq-filter-pill .pill-pts {
  font-size: 0.75rem;
  opacity: 0.85;
}

.frq-quick-actions {
  display: flex;
  gap: 8px;
}

.frq-grading-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.frq-grading-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 32px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.frq-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 16px;
  flex-wrap: wrap;
}

.frq-title-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.frq-num-badge {
  font-size: 0.8125rem;
  font-weight: 800;
  background: #f1f5f9;
  color: var(--text-primary);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.frq-title-left h3 {
  font-size: 1.1875rem;
  color: var(--text-primary);
  margin: 0;
}

.frq-pts-badge {
  font-size: 0.875rem;
  background: #f0fdf4;
  color: #065f46;
  border: 1px solid #bbf7d0;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.frq-stem-text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-body);
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
  white-space: pre-line;
}

.frq-part-grading-block {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1.5px solid var(--border-light);
}

.frq-part-grading-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.part-prompt-bar {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.part-badge {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--text-primary);
}

.part-pts-avail {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent);
}

.part-prompt-content {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  width: 100%;
  margin-top: 2px;
}

.frq-side-by-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.student-response-col, .model-response-col {
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 0.875rem;
  line-height: 1.6;
}

.student-response-col {
  background: #f8fafc;
  border: 1px solid var(--border);
}

.model-response-col {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.col-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.student-response-col .col-title { color: var(--text-muted); }
.model-response-col .col-title { color: #166534; }

.model-response-content {
  white-space: pre-line;
}

.student-response-content {
  white-space: pre-line;
}

/* Scoring Requirements Criteria Box */
.scoring-criteria-box {
  background: #fdfdfd;
  border: 1.5px solid #d1fae5;
  background: #f0fdf4;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 14px;
}

.criteria-box-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: #065f46;
  margin-bottom: 8px;
}

.criteria-icon {
  font-weight: 800;
}

.criteria-bullet-list {
  margin: 0;
  padding-left: 20px;
  font-size: 0.84375rem;
  color: #064e3b;
  line-height: 1.55;
}

.criteria-bullet-list li {
  margin-bottom: 4px;
}

/* Notes / Traps Box */
.common-mistakes-box {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.8125rem;
  color: #92400e;
  margin-bottom: 14px;
}

.mistakes-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.common-mistakes-box ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.5;
}

/* Interactive Point Award Controls */
.point-award-control {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.point-award-header {
  font-size: 0.875rem;
  color: var(--text-primary);
}

.point-award-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.point-btn {
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: #f8fafc;
  color: var(--text-body);
  cursor: pointer;
  transition: all 0.15s ease;
}

.point-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #ffffff;
}

.point-btn.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.results-footer-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 36px;
}

/* MCQ-Only Notice Card */
.frq-skipped-notice-card {
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  border-left: 5px solid var(--accent);
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.notice-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.notice-body h4 {
  font-size: 1.0625rem;
  color: #1e40af;
  margin-bottom: 4px;
}

.notice-body p {
  font-size: 0.875rem;
  color: #1e3a8a;
  margin: 0;
  line-height: 1.55;
}

.primary-focus-card {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px var(--accent-pale), 0 6px 16px rgba(0,0,0,0.06) !important;
}

.score-badge-circle.score-muted {
  background: #94a3b8;
  color: #f1f5f9;
}

/* Section I Completion Modal */
.exam-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeInModal 0.2s ease-out;
}

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

.exam-modal-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  text-align: center;
  animation: popInCard 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popInCard {
  from { transform: scale(0.94) translateY(8px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #f1f5f9;
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}

.exam-modal-card h3 {
  font-size: 1.375rem;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.modal-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-stat-box {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 12px;
}

.modal-stat-box.has-unanswered .modal-stat-num {
  color: #dc2626;
}

.modal-stat-num {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-stat-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.modal-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  background: #fffbeb;
  border: 1px solid #fef3c7;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 24px;
  text-align: left;
}

.modal-actions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-opt-btn {
  width: 100%;
  padding: 12px 18px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  border: 1.5px solid transparent;
}

.modal-opt-btn.primary-opt {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.modal-opt-btn.primary-opt:hover {
  background: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}

.modal-opt-btn.skip-opt {
  background: #f0fdf4;
  color: #065f46;
  border-color: #86efac;
}

.modal-opt-btn.skip-opt:hover {
  background: #dcfce7;
  border-color: #34d399;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.opt-title {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.opt-sub {
  font-size: 0.75rem;
  opacity: 0.85;
}

.frq-rubric {
  background: var(--bg-warm);
  padding: var(--sp-lg);
  border-radius: var(--radius-lg);
  margin-top: var(--sp-md);
}

.frq-rubric h4 { margin-bottom: var(--sp-sm); }

/* ----- Official Reference Sheet Card & Exam Button ----- */
.official-ref-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 32px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.official-ref-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
}

.ref-card-icon {
  font-size: 2.25rem;
  width: 56px;
  height: 56px;
  min-width: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
}

.ref-card-body {
  flex: 1;
}

.ref-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: #eff6ff;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 6px;
}

.ref-card-body h3 {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.ref-card-body p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

.ref-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 140px;
}

.ref-card-actions .btn {
  text-align: center;
  justify-content: center;
}

.exam-ref-btn {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

@media (max-width: 768px) {
  .official-ref-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 16px;
  }
  .ref-card-actions {
    flex-direction: row;
    width: 100%;
  }
  .ref-card-actions .btn {
    flex: 1;
  }
}


/* ----- Forms ----- */
.form-group {
  margin-bottom: var(--sp-lg);
}

.form-label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--sp-sm);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px var(--sp-md);
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--ease);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-pale);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.6;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: var(--sp-xs);
}

.form-message {
  padding: var(--sp-lg);
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  margin-bottom: var(--sp-lg);
}

.form-message-success {
  background: var(--success-bg);
  color: #166534;
  border: 2px solid var(--success);
}


/* ----- AP Prep Section ----- */
.prep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-md);
}

.prep-card {
  display: block;
  padding: var(--sp-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform var(--ease-spring), box-shadow var(--ease);
}

.prep-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.prep-card h3 {
  font-size: 1.125rem;
  margin-bottom: var(--sp-xs);
  color: var(--text-primary);
}

.prep-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.prep-study-tips-section {
  margin-top: 56px;
}

.study-tips-divider {
  width: 100%;
  max-width: 660px;
  height: 1px;
  background: var(--border, #E5E7EB);
  margin: 18px 0 28px;
}


/* ----- Resources ----- */
#formulas-explained,
#college-board-info {
  scroll-margin-top: 84px;
}

.resource-group {
  margin-bottom: var(--sp-xl);
}

.resource-group h3 {
  margin-bottom: var(--sp-md);
  padding-bottom: var(--sp-sm);
  border-bottom: 2px solid var(--accent-light);
}

.resource-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.resource-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-md);
  padding: var(--sp-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform var(--ease-spring), box-shadow var(--ease);
}

.resource-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #93c5fd;
}

.resource-item h4 {
  font-size: 1rem;
  margin-bottom: 4px;
  transition: color 0.15s ease, text-decoration 0.15s ease;
}

.resource-item:hover h4,
.resource-item:focus h4 {
  color: #2563eb !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

.resource-item p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.college-board-heading-link {
  text-decoration: none !important;
  color: inherit !important;
  display: inline-block;
}

.college-board-heading-link h2 {
  transition: color 0.15s ease, text-decoration 0.15s ease;
}

.college-board-heading-link:hover h2,
.college-board-heading-link:hover {
  color: #2563eb !important;
  text-decoration: underline !important;
  text-underline-offset: 4px;
}


/* ----- About Page ----- */
.about-content {
  max-width: 660px;
}

.about-content p {
  font-size: 1.0625rem;
  line-height: 1.8;
  margin-bottom: var(--sp-lg);
}

.about-content h2 {
  margin-top: var(--sp-2xl);
  margin-bottom: var(--sp-md);
  font-size: 1.75rem;
}


/* ----- Lesson Navigation (Prev/Next) ----- */
.lesson-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-md);
  margin-top: var(--sp-2xl);
  padding-top: var(--sp-xl);
  border-top: 2px solid var(--border-light);
}

.lesson-nav a {
  font-size: 0.9375rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--sp-md);
  border-radius: var(--radius-lg);
  transition: background var(--ease);
}

.lesson-nav a:hover {
  color: var(--accent);
  background: var(--accent-pale);
}

.lesson-nav-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  display: block;
  margin-bottom: 2px;
}

.lesson-nav-title {
  color: var(--text-primary);
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 1.0625rem;
}


/* ----- Homepage Sections ----- */
.home-section {
  padding: var(--sp-2xl) 0;
}

.home-section + .home-section {
  padding-top: var(--sp-3xl);
}

.home-section h2 {
  margin-bottom: var(--sp-lg);
  font-size: 2rem;
}

.home-about-text {
  max-width: 620px;
  font-size: 1.0625rem;
  line-height: 1.8;
}

.home-about-text p {
  margin-bottom: var(--sp-md);
}


/* ----- Stats Section (Stwedy-inspired) ----- */
.stats-row {
  display: flex;
  gap: var(--sp-2xl);
  margin-top: var(--sp-xl);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}


/* ----- Footer ----- */
.footer {
  background: var(--dark);
  padding: var(--sp-3xl) 0 var(--sp-xl);
  margin-top: var(--sp-4xl);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--sp-lg);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.3fr 1fr;
  gap: var(--sp-xl);
}

.footer-brand h3 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  margin-bottom: var(--sp-sm);
  color: var(--white);
}

.footer-brand p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.55;
  margin-bottom: var(--sp-md);
}

.footer-social-strip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.2s ease;
}

.social-icon-btn:hover {
  transform: translateY(-2px);
  color: #ffffff;
}

.social-icon-btn.yt-btn:hover {
  background: #ff0000;
  border-color: #ff0000;
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.35);
}

.social-icon-btn.insta-btn:hover {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(220, 39, 67, 0.35);
}

.social-icon-btn.tiktok-btn:hover {
  background: #000000;
  border-color: #00f2fe;
  box-shadow: 0 4px 12px rgba(0, 242, 254, 0.35);
}

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
  margin-bottom: var(--sp-md);
}

.footer-col a {
  display: block;
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.7);
  padding: 4px 0;
  transition: color var(--ease);
}

.footer-col a:hover { color: var(--white); }

/* ----- Footer Accessibility Panel & Bottom Bar ----- */
.footer-accessibility-panel {
  max-width: var(--container-max);
  margin: 36px auto 0;
  padding: 0 var(--sp-lg);
}

.footer-accessibility-inner {
  display: block;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  padding: 18px 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: background 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}

.footer-accessibility-inner:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.24);
}

.footer-accessibility-inner:hover .footer-a11y-heading {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-accessibility-inner:focus-visible {
  outline: 2px solid #7ABFFF;
  outline-offset: 2px;
}

.footer-accessibility-inner:focus-visible .footer-a11y-heading {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-a11y-content {
  width: 100%;
}

.footer-a11y-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.footer-a11y-heading {
  color: #FFFFFF;
  transition: color 0.15s ease;
}

.footer-a11y-standard {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0;
  padding: 1px 7px;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #7ABFFF;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-a11y-text {
  font-size: 0.84375rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
  margin: 0;
}

.footer-bottom {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 20px var(--sp-lg) 0;
  margin-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.45);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom-copy {
  color: rgba(255, 255, 255, 0.45);
}

.footer-bottom-links {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.footer-bottom-links a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8125rem;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-bottom-links a:hover {
  color: #38BDF8;
}

@media (max-width: 640px) {
  .footer-accessibility-inner {
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* ----- Accessibility Statement Dedicated Page ----- */
.a11y-page-wrapper {
  max-width: 880px;
}

.a11y-box {
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-radius: 0;
  padding: 40px 44px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

@media (max-width: 640px) {
  .a11y-box {
    padding: 24px 20px;
  }
}

.a11y-box-section {
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.a11y-box-section:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.a11y-box-section h2 {
  font-size: 1.3125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.a11y-box-section p {
  font-size: 0.96875rem;
  color: var(--text-body);
  line-height: 1.65;
  margin-bottom: 16px;
}

.a11y-box-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.a11y-box-bullets li {
  position: relative;
  padding-left: 28px;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-body);
}

.a11y-box-bullets li::before {
  content: "•";
  position: absolute;
  left: 8px;
  top: -1px;
  font-size: 1.25rem;
  color: var(--blue-600);
  line-height: 1.6;
}

.a11y-box-bullets strong {
  color: var(--text-primary);
}

.a11y-box-bullets code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  background: var(--blue-50);
  color: var(--blue-700);
  padding: 2px 6px;
  border-radius: 0;
}

.a11y-contact-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 20px 0 16px;
}

.a11y-timestamp {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 18px;
  margin-bottom: 0 !important;
  font-style: italic;
}


/* ----- Social Media Showcase Cards (Homepage) ----- */
.social-promo-banner {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl, 16px);
  padding: 36px 40px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.social-promo-header {
  max-width: 680px;
  margin-bottom: 28px;
}

.social-promo-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-pale);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
}

.social-promo-header h2 {
  font-size: 1.75rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.social-promo-header p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.social-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.social-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 14px;
  padding: 24px;
  border: 1.5px solid var(--border);
  background: #fbfbfb;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.social-card:hover {
  transform: translateY(-4px);
  background: #ffffff;
}

/* YouTube Card */
.social-card.yt-card {
  border-color: #fecdd3;
  background: linear-gradient(180deg, #fff5f5 0%, #ffffff 100%);
}
.social-card.yt-card:hover {
  border-color: #ff0000;
  box-shadow: 0 8px 24px rgba(255, 0, 0, 0.12);
}

/* Instagram Card */
.social-card.insta-card {
  border-color: #fbcfe8;
  background: linear-gradient(180deg, #fdf2f8 0%, #ffffff 100%);
}
.social-card.insta-card:hover {
  border-color: #db2777;
  box-shadow: 0 8px 24px rgba(219, 39, 119, 0.12);
}

/* TikTok Card */
.social-card.tiktok-card {
  border-color: #cbd5e1;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}
.social-card.tiktok-card:hover {
  border-color: #0f172a;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.social-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.social-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-icon-box.yt-icon {
  background: #fee2e2;
  color: #ff0000;
}

.social-icon-box.insta-icon {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: #ffffff;
}

.social-icon-box.tiktok-icon {
  background: #0f172a;
  color: #00f2fe;
}

.social-handle {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(0,0,0,0.04);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.social-card-body h3 {
  font-size: 1.1875rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.social-card-body p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 20px;
}

.social-card-action {
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.social-card-action.yt-action { color: #dc2626; }
.social-card-action.insta-action { color: #c026d3; }
.social-card-action.tiktok-action { color: #0f172a; }

/* ----- About Page Social Cards ----- */
.about-social-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  margin: 32px 0 40px;
  width: 100%;
  max-width: 660px;
  flex-wrap: wrap;
}

.about-social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  text-decoration: none;
  text-align: center;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-social-card:hover {
  transform: translateY(-5px);
}

.about-social-icon {
  width: 84px;
  height: 84px;
  min-width: 84px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.about-social-icon svg {
  width: 50px;
  height: 50px;
}

.about-social-card:hover .about-social-icon {
  transform: scale(1.1);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.about-yt .about-social-icon { background: #fee2e2; color: #ff0000; }
.about-insta .about-social-icon { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #ffffff; }
.about-tiktok .about-social-icon { background: #0f172a; color: #00f2fe; }

.about-social-handle {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
}

.about-social-card:hover .about-social-handle {
  color: var(--primary, #0284c7);
}
.about-social-card.about-yt:hover .about-social-handle { color: #dc2626; }
.about-social-card.about-insta:hover .about-social-handle { color: #db2777; }
.about-social-card.about-tiktok:hover .about-social-handle { color: #0f172a; }

@media (max-width: 600px) {
  .about-social-grid {
    gap: 28px;
  }
  .about-social-icon {
    width: 68px;
    height: 68px;
    min-width: 68px;
    border-radius: 18px;
  }
  .about-social-icon svg {
    width: 40px;
    height: 40px;
  }
  .about-social-handle {
    font-size: 0.9375rem;
  }
}

@media (max-width: 900px) {
  .social-cards-grid {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

/* ----- Chemical & Mathematical Typography (Superscripts / Subscripts) ----- */
sup {
  font-size: 0.75em;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
  top: -0.5em;
  font-feature-settings: 'sups';
}

sub {
  font-size: 0.75em;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
  bottom: -0.25em;
  font-feature-settings: 'subs';
}

/* ----- Reviews Showcase Section (Homepage) ----- */
.reviews-section-container {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl, 16px);
  padding: 36px 40px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.reviews-header-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.reviews-header-left {
  max-width: 580px;
}

.reviews-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #b45309;
  background: #fef3c7;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
}

.reviews-header-left h2 {
  font-size: 1.75rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.reviews-header-left p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0;
}

.reviews-summary-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
  border: 1.5px solid #fde68a;
  border-radius: 12px;
  padding: 16px 20px;
}

.rating-big-score {
  font-size: 2.25rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: #b45309;
  line-height: 1;
}

.rating-summary-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rating-count-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.review-card {
  background: #fafaf9;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.review-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  background: #ffffff;
}

.review-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #1e40af 100%);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.review-author-meta {
  flex: 1;
}

.review-author-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.verified-pill {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #065f46;
  background: #d1fae5;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
}

.review-author-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.review-date {
  font-size: 0.75rem;
  color: var(--text-light);
}

.review-card-rating {
  margin-bottom: 12px;
}

.star-rating-display {
  display: inline-flex;
  gap: 2px;
  font-size: 1.0625rem;
  color: #f59e0b;
}

.star-icon.filled {
  color: #f59e0b;
}

.star-icon.empty {
  color: #d1d5db;
}

.review-card-body p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-body);
  font-style: italic;
  margin: 0;
}

.reviews-empty-state {
  text-align: center;
  padding: 40px 20px;
  background: #fafaf9;
  border-radius: 12px;
  border: 1.5px dashed var(--border);
  margin-bottom: 20px;
}

.empty-star-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.reviews-empty-state h3 {
  font-size: 1.1875rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.reviews-empty-state p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-body);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #ffffff;
}

.reviews-cta-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
  font-size: 0.9375rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ----- Interactive Review Modal & Star Rating Picker ----- */
.review-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeInModal 0.2s ease-out;
}

.review-modal-card {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  animation: popInCard 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 18px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-header-icon {
  font-size: 2.25rem;
  text-align: center;
  margin-bottom: 8px;
}

.review-modal-card h3 {
  font-size: 1.375rem;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.modal-sub {
  font-size: 0.875rem;
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.star-rating-picker {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 2.25rem;
  margin-bottom: 6px;
}

.star-pick-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #d1d5db;
  transition: transform 0.1s ease, color 0.1s ease;
  line-height: 1;
  padding: 0 4px;
}

.star-pick-btn:hover,
.star-pick-btn.hovered,
.star-pick-btn.active {
  color: #f59e0b;
  transform: scale(1.15);
}

.star-label-text {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #b45309;
}

.form-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* Exam Review Prompt Card */
.exam-review-prompt-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1.5px solid #fde68a;
  border-radius: 12px;
  padding: 20px 24px;
  margin: 32px 0 20px;
}

.prompt-card-icon {
  font-size: 2rem;
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(180, 83, 9, 0.15);
}

.prompt-card-body {
  flex: 1;
}

.prompt-card-body h4 {
  font-size: 1.0625rem;
  color: #92400e;
  margin-bottom: 4px;
}

.prompt-card-body p {
  font-size: 0.875rem;
  color: #78350f;
  margin: 0;
}

@media (max-width: 768px) {
  .reviews-section-container {
    padding: 24px 20px;
  }
  .reviews-header-block {
    flex-direction: column;
    align-items: flex-start;
  }
  .reviews-summary-card {
    width: 100%;
    justify-content: space-between;
  }
  .exam-review-prompt-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ----- Utility Classes ----- */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--sp-sm); }
.mb-md { margin-bottom: var(--sp-md); }
.mb-lg { margin-bottom: var(--sp-lg); }
.mb-xl { margin-bottom: var(--sp-xl); }
.mt-lg { margin-top: var(--sp-lg); }
.mt-xl { margin-top: var(--sp-xl); }

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.choice:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ----- Form Controls & File Security Styles ----- */
.required-star {
  color: #DC2626;
  font-weight: 700;
}

.form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--text-primary);
  background-color: #FFFFFF;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.form-select:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 141, 212, 0.15);
}

.form-file-input {
  padding: 8px 12px;
  cursor: pointer;
  background: #FAFAFA;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.45;
}

.file-validation-feedback {
  margin-top: 10px;
}

.file-status-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FEE2E2;
  border: 1px solid #FCA5A5;
  color: #991B1B;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.84375rem;
  font-weight: 500;
  animation: fadeIn 0.2s ease-in-out;
}

.file-status-error svg {
  flex-shrink: 0;
  color: #DC2626;
}

.file-status-success {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #DCFCE7;
  border: 1px solid #86EFAC;
  color: #14532D;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.84375rem;
  animation: fadeIn 0.2s ease-in-out;
}

.file-status-success svg {
  flex-shrink: 0;
  color: #16A34A;
}

.btn-clear-file {
  background: none;
  border: none;
  color: #15803D;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s ease;
}

.btn-clear-file:hover {
  color: #DC2626;
}

.form-message {
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 0.9375rem;
  margin-top: 18px;
  animation: fadeIn 0.2s ease-in-out;
}

.form-message-success {
  background: #DCFCE7;
  border: 1px solid #86EFAC;
  color: #14532D;
}

.form-message-error {
  background: #FEE2E2;
  border: 1px solid #FCA5A5;
  color: #991B1B;
}

.upload-security-banner {
  margin-top: 64px;
  margin-bottom: 48px;
  padding: 20px 24px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-left: 4px solid var(--blue-600);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.security-banner-icon {
  width: 76px;
  height: 76px;
  min-width: 76px;
  min-height: 76px;
  background: var(--blue-50);
  border: 1.5px solid var(--blue-200);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-700);
  flex-shrink: 0;
}

.security-banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.security-banner-text h4 {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  text-align: center;
}

.security-banner-text p {
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
  text-align: center;
}

.security-banner-text code {
  background: #E2E8F0;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.6rem;
  color: #0F172A;
}


/* ----- Responsive ----- */

/* Tablet */
@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-xl);
  }

  .exam-sidebar { width: 180px; }

  .hero h1 { font-size: 2.75rem; }

  .stats-row { gap: var(--sp-xl); }
}

/* Small tablet / large phone */
@media (max-width: 768px) {
  :root {
    --sp-3xl: 48px;
    --sp-2xl: 32px;
    --nav-height: 48px;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }

  /* Nav: hide desktop links, show hamburger */
  .nav-inner { padding: 0 16px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  /* Hero */
  .hero { padding: var(--sp-3xl) 0 var(--sp-2xl); }
  .hero h1 { font-size: 2.25rem; }
  .hero-tagline { font-size: 1.0625rem; }
  .hero-logo { width: 64px; height: 64px; }

  .hero::before { width: 300px; height: 300px; right: -100px; top: -40px; }
  .hero::after { width: 250px; height: 250px; left: -80px; }

  /* Tabs */
  .tab-btn { padding: 8px 16px; font-size: 0.8125rem; }
  .tab-list { width: 100%; }

  /* Exam */
  .exam-body { flex-direction: column; }
  .exam-sidebar { width: 100%; }
  .exam-sidebar-card { position: static; }
  .exam-palette-grid, .exam-q-nav { grid-template-columns: repeat(10, 1fr); max-height: none; }
  .frq-side-by-side { grid-template-columns: 1fr; }
  .exam-sections-overview { grid-template-columns: 1fr; }
  .exam-intro-card { padding: 28px 22px; }

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--sp-lg);
  }

  /* Prep grid */
  .prep-grid { grid-template-columns: 1fr; }

  /* Course grid */
  .course-grid { grid-template-columns: 1fr; }

  /* Stats */
  .stats-row { gap: var(--sp-lg); }
  .stat-number { font-size: 2rem; }

  /* Formulas */
  .formula-list { grid-template-columns: 1fr; }

  .home-section h2 { font-size: 1.625rem; }
}

/* Phone */
@media (max-width: 480px) {
  :root {
    --sp-lg: 16px;
  }

  .container,
  .container-narrow {
    padding: 0 var(--sp-md);
  }

  .hero h1 { font-size: 1.875rem; }
  .hero { padding: var(--sp-2xl) 0 var(--sp-xl); }
  .hero-editorial-content { padding-bottom: 110px; }
  .hero-kicker { font-size: 0.6875rem; letter-spacing: 0.14em; }
  .hero-editorial-content .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-editorial-content .hero-actions a { width: 100%; }
  .btn-editorial-primary, .btn-editorial-dark { min-width: 0; width: 100%; max-width: 100%; }
  .hero-pills { gap: 6px; }
  .hero-pill { font-size: 0.75rem; padding: 6px 12px; }

  .lesson-title { font-size: 1.5rem; }
  .lesson-breadcrumb { font-size: 0.75rem; }

  .unit-header { padding: var(--sp-md); }
  .lesson-link { padding: 12px var(--sp-md); }

  .choice { padding: 12px var(--sp-md); font-size: 0.875rem; }

  .exam-palette-grid, .exam-q-nav { grid-template-columns: repeat(6, 1fr); }
  .exam-q-btn { width: 34px; height: 34px; font-size: 0.75rem; }

  .tab-list {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  .page-header { padding: var(--sp-2xl) 0 var(--sp-lg); }
  .page-header h1 { font-size: 1.75rem; }

  .stats-row { flex-wrap: wrap; }
}

/* ──────────────────────────────────────
   YouTube Embed & Video Player Styles
   ────────────────────────────────────── */
.yt-embed-wrapper {
  margin-bottom: var(--sp-2xl, 32px);
  background: #0f172a;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.yt-embed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.875rem;
  color: #94a3b8;
}

.yt-embed-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.yt-thumb-wrap {
  position: relative;
  width: 92px;
  height: 52px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.yt-header-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.yt-thumb-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(239, 68, 68, 0.9);
  color: #ffffff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  padding-left: 2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.yt-embed-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.yt-embed-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 440px;
}

.yt-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ef4444;
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: fit-content;
}

.yt-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  background: #000000;
}

.yt-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.yt-embed-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 8px 16px;
  background: rgba(15, 23, 42, 0.95);
  font-size: 0.875rem;
  color: #cbd5e1;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.yt-embed-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  background: #ef4444;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.8125rem;
  border-radius: 6px;
  text-decoration: none !important;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.15s ease;
}

.yt-embed-link:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.yt-embed-sublink {
  color: #38bdf8 !important;
  font-weight: 500;
  text-decoration: none !important;
  font-size: 0.8125rem;
}

.yt-embed-sublink:hover {
  text-decoration: underline !important;
}

/* Multi-Video Playlist Selector */
.yt-multivideo-wrapper {
  margin-bottom: var(--sp-2xl, 32px);
  background: #0b1120;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px;
  box-shadow: 0 12px 32px -6px rgba(0, 0, 0, 0.3);
}

.yt-playlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.yt-playlist-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f8fafc;
  font-weight: 600;
  font-size: 0.9375rem;
}

.yt-playlist-hint {
  font-size: 0.8125rem;
  color: #94a3b8;
}

.yt-playlist-chips {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 14px;
  scrollbar-width: thin;
}

.yt-playlist-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 0.8125rem;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
  font-family: inherit;
}

.yt-playlist-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.yt-playlist-chip.active {
  background: #ef4444;
  border-color: #dc2626;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.chip-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.yt-playlist-chip.active .chip-num {
  background: rgba(255, 255, 255, 0.25);
}

.chip-thumb {
  width: 44px;
  height: 25px;
  border-radius: 4px;
  object-fit: cover;
  background: #000;
}

.yt-playlist-panel {
  display: none;
}

.yt-playlist-panel.active {
  display: block;
}

.yt-multivideo-wrapper .yt-embed-wrapper {
  margin-bottom: 0;
  border: none;
  box-shadow: none;
}

/* Badge for unit lists */
.lesson-video-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 2px 8px;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

/* Featured Exam Video Walkthroughs in AP Prep & Courses */
.prep-videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--sp-lg, 24px);
  margin-top: var(--sp-lg, 24px);
}

.prep-video-card {
  display: flex;
  flex-direction: column;
}

.course-exam-walkthroughs-banner {
  margin-top: 36px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 680px) {
  .yt-embed-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .yt-embed-header .yt-embed-link {
    width: 100%;
    justify-content: center;
  }
  .yt-embed-title {
    max-width: 220px;
  }
  .prep-videos-grid {
    grid-template-columns: 1fr;
  }
}

/* ──────────────────────────────────────
   External Resources & Tools Directory
   ────────────────────────────────────── */
.external-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 36px;
  margin-top: 44px;
  margin-bottom: 60px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 2px solid #000000;
  border-radius: 0;
  padding: 34px 32px;
  box-shadow: 6px 6px 0px #000000;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.tool-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 10px 10px 0px #000000;
}

.tool-card-body {
  flex: 1;
  margin-bottom: 28px;
}

.tool-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.tool-desc {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-body);
  margin: 0;
}

.tool-card-footer {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
}

.btn-tool-launch {
  min-width: 0 !important;
  width: 100%;
  padding: 13px 22px !important;
  font-size: 0.8125rem !important;
  letter-spacing: 0.14em !important;
  display: flex;
}

.tool-button-spacer {
  height: 48px;
  width: 100%;
  display: block;
}

.btn-tool-launch:hover {
  padding-left: 30px !important;
  padding-right: 30px !important;
}

@media (max-width: 768px) {
  .external-tools-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* Daily Practice Anchor Clearance */
#daily-practice {
  scroll-margin-top: 90px;
}

/* Course Page Bottom Split: Left = Mock Exam CTA, Right = FRQ Video Walkthrough */
.course-bottom-split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-top: 60px;
  margin-bottom: 64px;
}

.course-bottom-split-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.course-bottom-split-right {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.course-bottom-video-title {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-heading, #0f172a);
  margin: 0 0 14px 0;
  line-height: 1.35;
}

.course-bottom-split-right .yt-embed-wrapper {
  margin-bottom: 0;
}

@media (max-width: 680px) {
  .course-bottom-split-section {
    grid-template-columns: 1fr;
    gap: 64px;
    align-items: stretch;
  }
}

.course-bottom-exam-section {
  margin-top: 48px;
  margin-bottom: 56px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.course-bottom-exam-desc {
  font-size: 0.9375rem;
  color: #4A5060;
  line-height: 1.6;
  max-width: 520px;
  margin: 0;
}

.btn-editorial-arrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #000000;
  color: #FFFFFF !important;
  min-width: 310px;
  padding: 16px 52px 16px 36px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 800;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-decoration: none !important;
  border-radius: 0 !important;
  border: 2px solid #000000 !important;
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 50%, calc(100% - 24px) 100%, 0 100%);
  -webkit-clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 50%, calc(100% - 24px) 100%, 0 100%);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  white-space: nowrap;
}

.btn-editorial-arrow:hover {
  background: #1A5A94 !important;
  border-color: #1A5A94 !important;
  color: #FFFFFF !important;
  padding-left: 44px;
  padding-right: 64px;
  letter-spacing: 0.18em;
  transform: translateX(6px);
  filter: drop-shadow(0 10px 24px rgba(26, 90, 148, 0.35));
}

@media (max-width: 768px) {
  .btn-editorial-arrow {
    width: 100%;
    min-width: 0;
  }
}

/* ================================================================
   DARK MODE - Deep Midnight / Slate Theme System
   ================================================================ */

:root[data-theme="dark"],
html[data-theme="dark"],
html.dark,
body[data-theme="dark"],
body.dark,
[data-theme="dark"] {
  /* Core Slate / Midnight Palette */
  --bg-main: #0B1120 !important;
  --bg-card: #111A2E !important;
  --bg-warm: #0E1626 !important;
  --bg-blue-soft: rgba(56, 189, 248, 0.12) !important;
  --bg-dark: #070B14 !important;

  --text-primary: #F8FAFC !important;
  --text-body: #CBD5E1 !important;
  --text-muted: #94A3B8 !important;
  --text-light: #64748B !important;

  --border: #1F2D47 !important;
  --border-light: #162238 !important;

  --accent: #38BDF8 !important;
  --accent-hover: #7DD3FC !important;
  --accent-light: rgba(56, 189, 248, 0.18) !important;
  --accent-pale: rgba(56, 189, 248, 0.08) !important;

  --success: #34D399 !important;
  --success-bg: rgba(52, 211, 153, 0.14) !important;
  --error: #F87171 !important;
  --error-bg: rgba(248, 113, 113, 0.14) !important;
  --warning: #FBBF24 !important;
  --warning-bg: rgba(251, 191, 36, 0.14) !important;
  --white: #111A2E !important;
}

html[data-theme="dark"],
html[data-theme="dark"] body,
html.dark body,
body[data-theme="dark"],
body.dark,
[data-theme="dark"] body {
  background-color: #0B1120 !important;
  color: #CBD5E1 !important;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
body[data-theme="dark"] h1,
body[data-theme="dark"] h2,
body[data-theme="dark"] h3,
body[data-theme="dark"] h4,
body[data-theme="dark"] h5,
body[data-theme="dark"] h6 {
  color: #F8FAFC !important;
}

[data-theme="dark"] p,
body[data-theme="dark"] p {
  color: #CBD5E1;
}

[data-theme="dark"] strong,
body[data-theme="dark"] strong {
  color: #FFFFFF;
}

/* ----- Navigation Dark Mode ----- */
[data-theme="dark"] .nav {
  background: rgba(11, 17, 32, 0.94) !important;
  border-bottom: 1px solid #1F2D47 !important;
}

[data-theme="dark"] .nav-logo {
  color: #F8FAFC !important;
}

[data-theme="dark"] .nav-links a,
[data-theme="dark"] .nav-links .nav-link-item {
  color: #CBD5E1 !important;
  opacity: 0.9;
}

[data-theme="dark"] .nav-links a:hover,
[data-theme="dark"] .nav-links .nav-link-item:hover,
[data-theme="dark"] .nav-links a.active,
[data-theme="dark"] .nav-links .nav-link-item.active {
  color: #38BDF8 !important;
  opacity: 1;
}

[data-theme="dark"] .nav-dropdown-trigger {
  color: #CBD5E1 !important;
}

[data-theme="dark"] .nav-dropdown-trigger:hover {
  color: #38BDF8 !important;
}

[data-theme="dark"] .nav-dropdown-menu {
  background: #111A2E !important;
  border: 1px solid #1F2D47 !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6) !important;
}

[data-theme="dark"] .dropdown-item {
  color: #CBD5E1 !important;
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus-visible {
  background: #17233D !important;
  color: #38BDF8 !important;
}

[data-theme="dark"] .dropdown-divider {
  background: #1F2D47 !important;
}

[data-theme="dark"] .dropdown-footer-link {
  color: #38BDF8 !important;
}

[data-theme="dark"] .nav-hamburger span {
  background-color: #F8FAFC !important;
}

[data-theme="dark"] .nav-hamburger:hover {
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .nav-mobile {
  background: rgba(11, 17, 32, 0.98) !important;
  border-bottom: 1px solid #1F2D47 !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.7) !important;
}

[data-theme="dark"] .nav-mobile-item {
  color: #F8FAFC !important;
}

[data-theme="dark"] .nav-mobile-item:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #38BDF8 !important;
}

[data-theme="dark"] .nav-mobile-item.active {
  color: #38BDF8 !important;
  background: rgba(56, 189, 248, 0.12) !important;
}

[data-theme="dark"] .nav-mobile-parent {
  color: #F8FAFC !important;
}

[data-theme="dark"] .nav-mobile-parent:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}

[data-theme="dark"] .nav-mobile-parent.active {
  color: #38BDF8 !important;
}

[data-theme="dark"] .nav-mobile-chevron {
  color: #94A3B8 !important;
}

[data-theme="dark"] .nav-mobile-group.open .nav-mobile-chevron {
  color: #38BDF8 !important;
}

[data-theme="dark"] .nav-mobile-badge {
  background: rgba(56, 189, 248, 0.15) !important;
  color: #38BDF8 !important;
}

[data-theme="dark"] .nav-mobile-sub {
  border-left-color: rgba(255, 255, 255, 0.12) !important;
}

[data-theme="dark"] .nav-mobile-sub-item {
  color: #94A3B8 !important;
}

[data-theme="dark"] .nav-mobile-sub-item:hover {
  color: #38BDF8 !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

[data-theme="dark"] .nav-mobile-sub-item.active {
  color: #38BDF8 !important;
  background: rgba(56, 189, 248, 0.12) !important;
  font-weight: 600 !important;
}

[data-theme="dark"] .nav-pill-tag {
  background: rgba(34, 197, 94, 0.2) !important;
  color: #4ADE80 !important;
}

[data-theme="dark"] .nav-mobile-socials {
  border-top-color: #1F2D47 !important;
}

[data-theme="dark"] .nav-mobile-socials-label {
  color: #64748B !important;
}

[data-theme="dark"] .nav-social-chip {
  background: #0E1626 !important;
  border-color: #1F2D47 !important;
  color: #CBD5E1 !important;
}

[data-theme="dark"] .nav-mobile-search-badge {
  background: none !important;
  border: none !important;
  color: #64748B !important;
}

/* ================================================================
   Theme Toggle Switch (Left-to-Right / Right-to-Left Sliding Toggle)
   ================================================================ */

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 2px 4px;
  margin-left: 8px;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 9999px;
  outline: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s ease;
}

.theme-toggle-btn:focus-visible {
  outline: 2px solid var(--accent, #3b82f6);
  outline-offset: 3px;
}

.theme-toggle-btn:active {
  transform: scale(0.96);
}

.theme-toggle-track {
  position: relative;
  width: 52px;
  height: 28px;
  border-radius: 9999px;
  background: #e2e8f0;
  border: 1.5px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  box-sizing: border-box;
  transition: background-color 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.theme-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.theme-toggle-icon-sun {
  color: #f59e0b;
}

.theme-toggle-icon-moon {
  color: #94a3b8;
}

.theme-toggle-thumb {
  position: absolute;
  top: 1.5px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(0);
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
              background-color 0.28s ease,
              border-color 0.28s ease,
              box-shadow 0.28s ease;
}

.theme-toggle-thumb .theme-icon-sun {
  display: inline-flex;
  color: #d97706;
}

.theme-toggle-thumb .theme-icon-moon {
  display: none;
  color: #facc15;
}

/* Hover */
.theme-toggle-btn:hover .theme-toggle-track {
  border-color: #94a3b8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ──────────────────────────────────────
   Active Dark Mode: Thumb slides left-to-right (23px)
   ────────────────────────────────────── */
[data-theme="dark"] .theme-toggle-track,
body[data-theme="dark"] .theme-toggle-track,
.theme-toggle-btn.theme-toggle-dark .theme-toggle-track {
  background: #1e293b !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3) !important;
}

[data-theme="dark"] .theme-toggle-thumb,
body[data-theme="dark"] .theme-toggle-thumb,
.theme-toggle-btn.theme-toggle-dark .theme-toggle-thumb {
  transform: translateX(23px) !important;
  background: #0f172a !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 8px rgba(56, 189, 248, 0.5) !important;
}

[data-theme="dark"] .theme-toggle-thumb .theme-icon-sun,
body[data-theme="dark"] .theme-toggle-thumb .theme-icon-sun,
.theme-toggle-btn.theme-toggle-dark .theme-toggle-thumb .theme-icon-sun {
  display: none !important;
}

[data-theme="dark"] .theme-toggle-thumb .theme-icon-moon,
body[data-theme="dark"] .theme-toggle-thumb .theme-icon-moon,
.theme-toggle-btn.theme-toggle-dark .theme-toggle-thumb .theme-icon-moon {
  display: inline-flex !important;
}

[data-theme="dark"] .theme-toggle-icon-moon,
body[data-theme="dark"] .theme-toggle-icon-moon {
  color: #38bdf8;
}

[data-theme="dark"] .theme-toggle-icon-sun,
body[data-theme="dark"] .theme-toggle-icon-sun {
  color: #64748b;
}

/* Home Page specific transparent nav styling */
body.page-home .nav:not(.scrolled) .theme-toggle-track {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

body.page-home .nav:not(.scrolled) .theme-toggle-thumb {
  background: #ffffff;
}

body.page-home .nav:not(.scrolled) .theme-toggle-icon-moon {
  color: rgba(255, 255, 255, 0.65);
}

[data-theme="dark"] body.page-home .nav:not(.scrolled) .theme-toggle-track,
body.page-home[data-theme="dark"] .nav:not(.scrolled) .theme-toggle-track {
  background: rgba(15, 23, 42, 0.85) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.45) !important;
}

/* Mobile drawer theme toggle row */
.nav-mobile-theme-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 14px;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  cursor: pointer;
}

.nav-mobile-theme-wrap .mobile-theme-mode-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

[data-theme="dark"] .nav-mobile-theme-wrap {
  background: #181b21;
  border-color: rgba(255, 255, 255, 0.1);
}

/* Dark mode hero background transformation */
[data-theme="dark"] .hero-editorial,
body[data-theme="dark"] .hero-editorial {
  background:
    radial-gradient(ellipse 85% 90% at 20% 50%, #081326 0%, #040914 60%, #02040A 100%) !important;
}

/* Responsive Nav Breakpoint consistency */
.nav-mobile-actions {
  display: none;
  align-items: center;
  gap: 8px;
}

@media (max-width: 900px) {
  .nav-mobile-actions {
    display: flex;
  }
  .theme-toggle-btn.nav-desktop-only {
    display: none;
  }
  .nav-hamburger {
    display: flex;
  }
  .nav-links {
    display: none;
  }
}

/* ----- Homepage Sections Dark Mode ----- */
[data-theme="dark"] .editorial-statement-section {
  background: #080D1A !important;
  border-color: #1F2D47 !important;
}

[data-theme="dark"] .editorial-pillars-section {
  background: #0B1120 !important;
}

[data-theme="dark"] .pillar-title {
  color: #F8FAFC !important;
}

[data-theme="dark"] .pillar-desc {
  color: #CBD5E1 !important;
}

[data-theme="dark"] .pillar-features li {
  color: #CBD5E1 !important;
}

[data-theme="dark"] .pillar-bullet {
  color: #38BDF8 !important;
}

[data-theme="dark"] .pillar-practice-frame {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45) !important;
}

[data-theme="dark"] .pillar-image-frame {
  border-color: #1F2D47 !important;
  box-shadow: 12px 12px 0px #030712 !important;
}

[data-theme="dark"] .editorial-pillar-row.pillar-row-reverse .pillar-image-frame {
  box-shadow: -12px 12px 0px #030712 !important;
}

[data-theme="dark"] .editorial-featured-section {
  background: #080E1C !important;
  border-top: 1px solid #1F2D47 !important;
  border-bottom: 1px solid #1F2D47 !important;
}

[data-theme="dark"] .editorial-section-title {
  color: #F8FAFC !important;
}

[data-theme="dark"] .editorial-section-subtitle {
  color: #94A3B8 !important;
}

[data-theme="dark"] .featured-unit-card,
body[data-theme="dark"] .featured-unit-card {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
}

[data-theme="dark"] .featured-unit-image-wrap,
body[data-theme="dark"] .featured-unit-image-wrap {
  background: #0E1626 !important;
}

[data-theme="dark"] .featured-unit-content h3 {
  color: #F8FAFC !important;
}

[data-theme="dark"] .featured-unit-content p {
  color: #CBD5E1 !important;
}

[data-theme="dark"] .featured-unit-link {
  color: #38BDF8 !important;
}

[data-theme="dark"] .editorial-bio-section {
  background: #0B1120 !important;
}

[data-theme="dark"] .editorial-bio-heading {
  color: #F8FAFC !important;
}

[data-theme="dark"] .editorial-bio-quote {
  color: #7DD3FC !important;
}

[data-theme="dark"] .editorial-bio-text {
  color: #CBD5E1 !important;
}

[data-theme="dark"] .editorial-bio-card {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
  box-shadow: 12px 12px 0px #030712 !important;
}

[data-theme="dark"] .bio-portrait-placeholder,
body[data-theme="dark"] .bio-portrait-placeholder {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
  color: #CBD5E1 !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45) !important;
}

[data-theme="dark"] .about-social-row a {
  border-color: #1F2D47 !important;
  background: #17233D !important;
  color: #CBD5E1 !important;
}

[data-theme="dark"] .about-social-row a:hover {
  border-color: #38BDF8 !important;
  color: #38BDF8 !important;
}

/* Homepage Social Media Promo Section */
[data-theme="dark"] .social-promo-banner,
body[data-theme="dark"] .social-promo-banner {
  background: #0E1626 !important;
  border-color: #1F2D47 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .social-card,
body[data-theme="dark"] .social-card {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
}

[data-theme="dark"] .social-card:hover {
  background: #17233D !important;
}

[data-theme="dark"] .social-card.yt-card {
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.14) 0%, #111A2E 100%) !important;
  border-color: rgba(220, 38, 38, 0.35) !important;
}

[data-theme="dark"] .social-card.insta-card {
  background: linear-gradient(180deg, rgba(219, 39, 119, 0.14) 0%, #111A2E 100%) !important;
  border-color: rgba(219, 39, 119, 0.35) !important;
}

[data-theme="dark"] .social-card.tiktok-card {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.1) 0%, #111A2E 100%) !important;
  border-color: #1F2D47 !important;
}

[data-theme="dark"] .social-card-body h3 {
  color: #F8FAFC !important;
}

[data-theme="dark"] .social-card-body p {
  color: #CBD5E1 !important;
}

[data-theme="dark"] .social-card-action {
  border-top-color: #1F2D47 !important;
}

[data-theme="dark"] .social-card-action.yt-action { color: #F87171 !important; }
[data-theme="dark"] .social-card-action.insta-action { color: #F472B6 !important; }
[data-theme="dark"] .social-card-action.tiktok-action { color: #38BDF8 !important; }

[data-theme="dark"] .prompt-card-icon {
  background: #0E1626 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4) !important;
}

/* Reviews Dark Mode */
[data-theme="dark"] .editorial-reviews-section {
  background: #080E1C !important;
  border-top: 1px solid #1F2D47 !important;
  border-bottom: 1px solid #1F2D47 !important;
}

[data-theme="dark"] .review-card {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
}

[data-theme="dark"] .review-card-text {
  color: #CBD5E1 !important;
}

[data-theme="dark"] .review-author-name {
  color: #F8FAFC !important;
}

[data-theme="dark"] .review-author-role {
  color: #94A3B8 !important;
}

[data-theme="dark"] .review-creator-card {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
}

[data-theme="dark"] .inline-review-form-card,
body[data-theme="dark"] .inline-review-form-card {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45) !important;
}

[data-theme="dark"] .star-picker-group,
body[data-theme="dark"] .star-picker-group {
  background: #0E1626 !important;
  border-color: #1F2D47 !important;
}

[data-theme="dark"] .review-modal-card,
body[data-theme="dark"] .review-modal-card {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
  color: #CBD5E1 !important;
}

/* ----- Daily Practice Dark Mode ----- */
[data-theme="dark"] .daily-q-box,
[data-theme="dark"] .daily-practice-card {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
}

[data-theme="dark"] .daily-q-title {
  color: #F8FAFC !important;
}

[data-theme="dark"] .daily-choice,
[data-theme="dark"] .choice,
body[data-theme="dark"] .choice {
  background: #0E1626 !important;
  border-color: #1F2D47 !important;
  color: #CBD5E1 !important;
}

[data-theme="dark"] .daily-choice:hover,
[data-theme="dark"] .choice:hover:not(.disabled):not(.selected),
body[data-theme="dark"] .choice:hover:not(.disabled):not(.selected) {
  background: #17233D !important;
  border-color: #38BDF8 !important;
}

[data-theme="dark"] .daily-choice.selected,
[data-theme="dark"] .choice.selected,
body[data-theme="dark"] .choice.selected {
  background: rgba(56, 189, 248, 0.16) !important;
  border-color: #38BDF8 !important;
  color: #7DD3FC !important;
}

[data-theme="dark"] .daily-explanation {
  background: #0E1626 !important;
  border-color: #1F2D47 !important;
  color: #CBD5E1 !important;
}

[data-theme="dark"] .choice-label,
body[data-theme="dark"] .choice-label,
[data-theme="dark"] .daily-section .choice-label {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
  color: #CBD5E1 !important;
}

[data-theme="dark"] .choice:hover:not(.disabled):not(.selected) .choice-label,
body[data-theme="dark"] .choice:hover:not(.disabled):not(.selected) .choice-label,
[data-theme="dark"] .daily-section .choice:hover:not(.disabled):not(.selected) .choice-label {
  background: #17233D !important;
  border-color: #38BDF8 !important;
  color: #38BDF8 !important;
}

[data-theme="dark"] .choice.selected .choice-label,
body[data-theme="dark"] .choice.selected .choice-label,
[data-theme="dark"] .daily-section .choice.selected .choice-label {
  background: #38BDF8 !important;
  border-color: #38BDF8 !important;
  color: #0B1120 !important;
}

[data-theme="dark"] .btn-outline,
body[data-theme="dark"] .btn-outline {
  border-color: #1F2D47 !important;
  color: #CBD5E1 !important;
}

[data-theme="dark"] .btn-outline:hover,
body[data-theme="dark"] .btn-outline:hover {
  border-color: #38BDF8 !important;
  color: #38BDF8 !important;
  background: #17233D !important;
}

[data-theme="dark"] .btn-editorial-outline,
body[data-theme="dark"] .btn-editorial-outline {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
  color: #CBD5E1 !important;
}

[data-theme="dark"] .btn-editorial-outline:hover,
body[data-theme="dark"] .btn-editorial-outline:hover {
  background: #17233D !important;
  border-color: #38BDF8 !important;
  color: #38BDF8 !important;
}

/* ----- Course & Lessons Dark Mode ----- */
[data-theme="dark"] .course-item,
body[data-theme="dark"] .course-item,
[data-theme="dark"] .course-card,
body[data-theme="dark"] .course-card {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
  color: #CBD5E1 !important;
}

[data-theme="dark"] .course-item:hover,
body[data-theme="dark"] .course-item:hover,
[data-theme="dark"] .course-card:hover,
body[data-theme="dark"] .course-card:hover {
  border-color: #38BDF8 !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45) !important;
}

[data-theme="dark"] .course-item h3,
body[data-theme="dark"] .course-item h3,
[data-theme="dark"] .course-item-content h3,
[data-theme="dark"] .course-card h3 {
  color: #F8FAFC !important;
}

[data-theme="dark"] .course-item p,
body[data-theme="dark"] .course-item p,
[data-theme="dark"] .course-item-content p,
[data-theme="dark"] .course-card p {
  color: #CBD5E1 !important;
}

[data-theme="dark"] .course-item-coming,
body[data-theme="dark"] .course-item-coming {
  background: #0E1626 !important;
  border-color: #1F2D47 !important;
  opacity: 0.8;
}

[data-theme="dark"] .course-item-meta {
  color: #94A3B8 !important;
}

/* Units Accordion */
[data-theme="dark"] .unit-item,
body[data-theme="dark"] .unit-item,
[data-theme="dark"] .unit-card,
body[data-theme="dark"] .unit-card {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
}

[data-theme="dark"] .unit-item.unit-highlighted,
body[data-theme="dark"] .unit-item.unit-highlighted {
  border-color: #38BDF8 !important;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25) !important;
}

[data-theme="dark"] .unit-header,
body[data-theme="dark"] .unit-header {
  background: #111A2E !important;
  border-bottom-color: #1F2D47 !important;
  color: #F8FAFC !important;
}

[data-theme="dark"] .unit-header:hover,
body[data-theme="dark"] .unit-header:hover {
  background: #17233D !important;
}

[data-theme="dark"] .unit-header h3 {
  color: #F8FAFC !important;
}

[data-theme="dark"] .unit-number {
  color: #38BDF8 !important;
}

[data-theme="dark"] .unit-toggle {
  color: #94A3B8 !important;
}

[data-theme="dark"] .lesson-list,
body[data-theme="dark"] .lesson-list {
  background: #0E1626 !important;
  border-top-color: #1F2D47 !important;
}

[data-theme="dark"] .lesson-link,
body[data-theme="dark"] .lesson-link,
[data-theme="dark"] .lesson-item,
body[data-theme="dark"] .lesson-item {
  color: #CBD5E1 !important;
  border-top-color: #162238 !important;
}

[data-theme="dark"] .lesson-link:hover,
body[data-theme="dark"] .lesson-link:hover,
[data-theme="dark"] .lesson-item:hover,
body[data-theme="dark"] .lesson-item:hover {
  background: #17233D !important;
  color: #38BDF8 !important;
}

[data-theme="dark"] .lesson-link-number {
  color: #64748B !important;
}

[data-theme="dark"] .lesson-link-title,
[data-theme="dark"] .lesson-title {
  color: #CBD5E1 !important;
}

[data-theme="dark"] .lesson-link:hover .lesson-link-title {
  color: #38BDF8 !important;
}

[data-theme="dark"] .lesson-video-badge {
  background: rgba(56, 189, 248, 0.15) !important;
  color: #38BDF8 !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
}

[data-theme="dark"] .lesson-content {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
  color: #CBD5E1 !important;
}

[data-theme="dark"] .lesson-content h1,
[data-theme="dark"] .lesson-content h2,
[data-theme="dark"] .lesson-content h3,
[data-theme="dark"] .lesson-content h4 {
  color: #F8FAFC !important;
}

[data-theme="dark"] .lesson-content p,
[data-theme="dark"] .lesson-content li {
  color: #CBD5E1 !important;
}

[data-theme="dark"] .lesson-content strong {
  color: #FFFFFF !important;
}

[data-theme="dark"] .lesson-sidebar {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
}

[data-theme="dark"] .lesson-sidebar-item {
  color: #94A3B8 !important;
  border-left-color: transparent !important;
}

[data-theme="dark"] .lesson-sidebar-item:hover,
[data-theme="dark"] .lesson-sidebar-item.active {
  background: #17233D !important;
  color: #38BDF8 !important;
  border-left-color: #38BDF8 !important;
}

[data-theme="dark"] .lesson-nav {
  border-top-color: #1F2D47 !important;
}

[data-theme="dark"] .lesson-nav a {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
  color: #CBD5E1 !important;
}

[data-theme="dark"] .lesson-nav a:hover {
  background: #17233D !important;
  border-color: #38BDF8 !important;
  color: #38BDF8 !important;
}

/* AP Prep Dark Mode */
[data-theme="dark"] .prep-card,
body[data-theme="dark"] .prep-card {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
  color: #CBD5E1 !important;
}

[data-theme="dark"] .prep-card:hover,
body[data-theme="dark"] .prep-card:hover {
  border-color: #38BDF8 !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45) !important;
}

[data-theme="dark"] .prep-card h3 {
  color: #F8FAFC !important;
}

[data-theme="dark"] .prep-card p {
  color: #CBD5E1 !important;
}

[data-theme="dark"] .prep-video-card,
body[data-theme="dark"] .prep-video-card {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
}

[data-theme="dark"] .prep-walkthroughs-section,
[data-theme="dark"] .prep-study-tips-section {
  border-color: #1F2D47 !important;
}

[data-theme="dark"] .study-tips-divider {
  background: #1F2D47 !important;
}

/* Practice Questions */
[data-theme="dark"] .practice-card {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
}

[data-theme="dark"] .practice-choice {
  background: #0E1626 !important;
  border-color: #1F2D47 !important;
  color: #CBD5E1 !important;
}

[data-theme="dark"] .practice-choice:hover {
  background: #17233D !important;
  border-color: #38BDF8 !important;
}

[data-theme="dark"] .practice-choice.selected {
  background: rgba(56, 189, 248, 0.16) !important;
  border-color: #38BDF8 !important;
  color: #7DD3FC !important;
}

/* ----- Mock Exam Section Dark Mode ----- */
[data-theme="dark"] .exam-container {
  background: #0B1120 !important;
}

[data-theme="dark"] .exam-top-bar {
  background: #111A2E !important;
  border-bottom-color: #1F2D47 !important;
}

[data-theme="dark"] .exam-title-badge {
  background: #17233D !important;
  color: #38BDF8 !important;
}

[data-theme="dark"] .exam-section-title {
  color: #F8FAFC !important;
}

[data-theme="dark"] .exam-timer {
  background: #0E1626 !important;
  border-color: #1F2D47 !important;
  color: #38BDF8 !important;
}

[data-theme="dark"] .exam-question-card {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
}

[data-theme="dark"] .exam-stimulus-box {
  background: #0E1626 !important;
  border-left-color: #38BDF8 !important;
}

[data-theme="dark"] .stimulus-tag {
  color: #38BDF8 !important;
}

[data-theme="dark"] .stimulus-text,
[data-theme="dark"] .exam-prompt-text {
  color: #F8FAFC !important;
}

[data-theme="dark"] .exam-choice-item {
  background: #0E1626 !important;
  border-color: #1F2D47 !important;
  color: #CBD5E1 !important;
}

[data-theme="dark"] .exam-choice-item:hover {
  background: #17233D !important;
  border-color: #38BDF8 !important;
}

[data-theme="dark"] .exam-choice-item.selected {
  background: rgba(56, 189, 248, 0.16) !important;
  border-color: #38BDF8 !important;
  color: #F8FAFC !important;
}

[data-theme="dark"] .exam-choice-radio {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
  color: #CBD5E1 !important;
}

[data-theme="dark"] .exam-choice-item:hover:not(.selected) .exam-choice-radio {
  background: #17233D !important;
  border-color: #38BDF8 !important;
  color: #38BDF8 !important;
}

[data-theme="dark"] .exam-choice-item.selected .exam-choice-radio {
  background: #38BDF8 !important;
  border-color: #38BDF8 !important;
  color: #0B1120 !important;
}

[data-theme="dark"] .exam-sidebar-card {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
}

[data-theme="dark"] .exam-sidebar-header h4 {
  color: #F8FAFC !important;
}

[data-theme="dark"] .exam-q-btn {
  background: #0E1626 !important;
  border-color: #1F2D47 !important;
  color: #CBD5E1 !important;
}

[data-theme="dark"] .exam-q-btn:hover {
  border-color: #38BDF8 !important;
  color: #38BDF8 !important;
}

[data-theme="dark"] .exam-q-btn.answered {
  background: #1F2D47 !important;
  border-color: #334155 !important;
  color: #FFFFFF !important;
}

[data-theme="dark"] .exam-q-btn.current {
  border-color: #38BDF8 !important;
  box-shadow: 0 0 0 2px #38BDF8 !important;
}

[data-theme="dark"] .exam-bookmark-banner,
html.dark .exam-bookmark-banner {
  background: #1E293B !important;
  border-top-color: #334155 !important;
  color: #94A3B8 !important;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4)) !important;
}

[data-theme="dark"] .exam-bookmark-banner:hover,
html.dark .exam-bookmark-banner:hover {
  background: #334155 !important;
  color: #F8FAFC !important;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.5)) !important;
}

[data-theme="dark"] .exam-bookmark-banner.is-bookmarked,
html.dark .exam-bookmark-banner.is-bookmarked {
  background: linear-gradient(180deg, #FCD34D 0%, #F59E0B 100%) !important;
  border-top-color: #B45309 !important;
  color: #451A03 !important;
  filter: drop-shadow(0 4px 14px rgba(251, 191, 36, 0.55)) !important;
}

[data-theme="dark"] .exam-bookmark-banner.is-bookmarked:hover,
html.dark .exam-bookmark-banner.is-bookmarked:hover {
  filter: drop-shadow(0 6px 18px rgba(251, 191, 36, 0.65)) !important;
}

[data-theme="dark"] .exam-intro-card,
body[data-theme="dark"] .exam-intro-card {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
  color: #CBD5E1 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .exam-bottom-nav,
body[data-theme="dark"] .exam-bottom-nav {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
}

[data-theme="dark"] .results-hero-card,
body[data-theme="dark"] .results-hero-card {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
  color: #CBD5E1 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .filter-chip,
body[data-theme="dark"] .filter-chip {
  background: #0E1626 !important;
  border-color: #1F2D47 !important;
  color: #CBD5E1 !important;
}

[data-theme="dark"] .filter-chip:hover,
[data-theme="dark"] .filter-chip.active {
  background: #17233D !important;
  border-color: #38BDF8 !important;
  color: #38BDF8 !important;
}

[data-theme="dark"] .review-question-card,
body[data-theme="dark"] .review-question-card {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
  color: #CBD5E1 !important;
}

[data-theme="dark"] .review-choice-item,
body[data-theme="dark"] .review-choice-item {
  background: #0E1626 !important;
  border-color: #1F2D47 !important;
  color: #CBD5E1 !important;
}

[data-theme="dark"] .review-choice-item.correct-answer {
  background: rgba(52, 211, 153, 0.15) !important;
  border-color: #34D399 !important;
  color: #F8FAFC !important;
}

[data-theme="dark"] .review-choice-item.wrong-selected {
  background: rgba(248, 113, 113, 0.15) !important;
  border-color: #F87171 !important;
  color: #F8FAFC !important;
}

[data-theme="dark"] .frq-filter-pill,
body[data-theme="dark"] .frq-filter-pill {
  background: #0E1626 !important;
  border-color: #1F2D47 !important;
  color: #CBD5E1 !important;
}

[data-theme="dark"] .frq-filter-pill:hover,
[data-theme="dark"] .frq-filter-pill.active {
  background: #17233D !important;
  border-color: #38BDF8 !important;
  color: #38BDF8 !important;
}

[data-theme="dark"] .frq-grading-card,
body[data-theme="dark"] .frq-grading-card {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
  color: #CBD5E1 !important;
}

[data-theme="dark"] .common-mistakes-box {
  background: rgba(251, 191, 36, 0.12) !important;
  border-left-color: #FBBF24 !important;
  color: #FDE68A !important;
}

[data-theme="dark"] .point-award-control {
  background: #0E1626 !important;
  border-color: #1F2D47 !important;
}

[data-theme="dark"] .point-btn {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
  color: #CBD5E1 !important;
}

[data-theme="dark"] .point-btn:hover {
  background: #17233D !important;
  border-color: #38BDF8 !important;
  color: #38BDF8 !important;
}

[data-theme="dark"] .point-btn.selected {
  background: #38BDF8 !important;
  border-color: #38BDF8 !important;
  color: #0B1120 !important;
}

[data-theme="dark"] .exam-modal-card {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
  color: #CBD5E1 !important;
}

[data-theme="dark"] .modal-note {
  background: rgba(251, 191, 36, 0.12) !important;
  border-color: rgba(251, 191, 36, 0.25) !important;
  color: #FDE68A !important;
}

[data-theme="dark"] .choice-letter {
  background: #1E293B !important;
  color: #CBD5E1 !important;
}

[data-theme="dark"] .exam-instructions-card,
[data-theme="dark"] .exam-summary-card {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
  color: #CBD5E1 !important;
}

[data-theme="dark"] .exam-policy-box {
  background: #0E1626 !important;
  border-color: #1F2D47 !important;
}

[data-theme="dark"] .exam-actions-bar {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
}

[data-theme="dark"] .frq-part-card {
  background: #0E1626 !important;
  border-color: #1F2D47 !important;
}

[data-theme="dark"] .frq-textarea {
  background: #111A2E !important;
  border-color: #334155 !important;
  color: #F8FAFC !important;
}

[data-theme="dark"] .frq-nav-item {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
  color: #CBD5E1 !important;
}

/* ----- Resources & External Tools Dark Mode ----- */
[data-theme="dark"] .official-ref-card {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
}

[data-theme="dark"] .official-ref-card h3 {
  color: #F8FAFC !important;
}

[data-theme="dark"] .official-ref-card p {
  color: #CBD5E1 !important;
}

[data-theme="dark"] .formula-item,
body[data-theme="dark"] .formula-item,
[data-theme="dark"] .formula-card {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
}

[data-theme="dark"] .formula-name,
[data-theme="dark"] .formula-card-title {
  color: #F8FAFC !important;
}

[data-theme="dark"] .formula-desc,
[data-theme="dark"] .formula-card-desc {
  color: #CBD5E1 !important;
}

[data-theme="dark"] .formula-math,
[data-theme="dark"] .formula-math-display {
  background: #0E1626 !important;
  border-color: #1F2D47 !important;
  color: #F8FAFC !important;
}

[data-theme="dark"] .resource-group h3 {
  color: #F8FAFC !important;
}

[data-theme="dark"] .resource-item {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
}

[data-theme="dark"] .resource-item h4 {
  color: #F8FAFC !important;
}

[data-theme="dark"] .resource-item p {
  color: #CBD5E1 !important;
}

[data-theme="dark"] .tool-card {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
}

[data-theme="dark"] .tool-title {
  color: #F8FAFC !important;
}

[data-theme="dark"] .tool-desc {
  color: #CBD5E1 !important;
}

/* ----- Forms & About Dark Mode ----- */
[data-theme="dark"] .form-input,
[data-theme="dark"] .form-textarea,
[data-theme="dark"] .form-select {
  background: #0E1626 !important;
  border-color: #334155 !important;
  color: #F8FAFC !important;
}

[data-theme="dark"] .form-input:focus,
[data-theme="dark"] .form-textarea:focus,
[data-theme="dark"] .form-select:focus {
  border-color: #38BDF8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25) !important;
}

[data-theme="dark"] .form-label {
  color: #F8FAFC !important;
}

[data-theme="dark"] .contact-card {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
}

[data-theme="dark"] .about-philosophy-card,
[data-theme="dark"] .about-values-card {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
}

/* ----- KaTeX Formula Readability in Dark Mode ----- */
[data-theme="dark"] .katex {
  color: #F1F5F9 !important;
}

[data-theme="dark"] .katex-display {
  color: #F1F5F9 !important;
}

/* ----- Footer Dark Mode ----- */
[data-theme="dark"] .footer {
  background: #070B14 !important;
  border-top-color: #1F2D47 !important;
}

[data-theme="dark"] .footer-brand p {
  color: #94A3B8 !important;
}

[data-theme="dark"] .footer-col h4 {
  color: #F8FAFC !important;
}

[data-theme="dark"] .footer-col a {
  color: #94A3B8 !important;
}

[data-theme="dark"] .footer-col a:hover {
  color: #38BDF8 !important;
}

/* ----- Accessibility Dark Mode ----- */
[data-theme="dark"] .footer-accessibility-inner {
  background: #080D1A !important;
  border-color: #1F2D47 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .footer-a11y-icon-box {
  background: rgba(56, 189, 248, 0.12) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
  color: #38BDF8 !important;
}

[data-theme="dark"] .footer-a11y-title span {
  color: #F8FAFC !important;
}

[data-theme="dark"] .footer-a11y-standard {
  background: #111A2E !important;
  border-color: #1F2D47 !important;
  color: #38BDF8 !important;
}

[data-theme="dark"] .footer-a11y-text {
  color: #94A3B8 !important;
}

[data-theme="dark"] .footer-a11y-btn {
  background: rgba(56, 189, 248, 0.12) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
  color: #38BDF8 !important;
}

[data-theme="dark"] .footer-a11y-btn:hover {
  background: #0284C7 !important;
  border-color: #0284C7 !important;
  color: #FFFFFF !important;
}

[data-theme="dark"] .footer-a11y-sublink {
  color: #94A3B8 !important;
}

[data-theme="dark"] .footer-a11y-sublink:hover {
  color: #F8FAFC !important;
}

[data-theme="dark"] .footer-bottom {
  border-top-color: #1E293B !important;
  color: #64748B !important;
}

[data-theme="dark"] .footer-bottom-copy {
  color: #64748B !important;
}

[data-theme="dark"] .footer-bottom-links a {
  color: #94A3B8 !important;
}

[data-theme="dark"] .footer-bottom-links a:hover {
  color: #38BDF8 !important;
}

[data-theme="dark"] .a11y-box {
  background: #0E1626 !important;
  border-color: #1F2D47 !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .a11y-box-section {
  border-bottom-color: #1F2D47 !important;
}

[data-theme="dark"] .a11y-box-section h2 {
  color: #F8FAFC !important;
}

[data-theme="dark"] .a11y-box-section p {
  color: #CBD5E1 !important;
}

[data-theme="dark"] .a11y-box-bullets li {
  color: #CBD5E1 !important;
}

[data-theme="dark"] .a11y-box-bullets strong {
  color: #F8FAFC !important;
}

[data-theme="dark"] .a11y-box-bullets li::before {
  color: #38BDF8 !important;
}

[data-theme="dark"] .a11y-box-bullets code {
  background: rgba(56, 189, 248, 0.15) !important;
  color: #38BDF8 !important;
}

[data-theme="dark"] .a11y-timestamp {
  color: #64748B !important;
}

/* ================================================================
   FULL SITE SEARCH - Modal Command Palette & Dedicated Search Page
   ================================================================ */

/* ----- Nav Search Trigger (Desktop) ----- */
.nav-search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.04);
  border: 1.5px solid var(--border);
  border-radius: 0;
  padding: 5px 10px 5px 12px;
  min-width: 140px;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-left: 6px;
  outline: none;
}

.nav-search-trigger:hover {
  background: #FFFFFF;
  border-color: var(--blue-400);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(59, 141, 212, 0.15);
}

.nav-search-icon {
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.nav-search-trigger:hover .nav-search-icon {
  color: var(--accent);
}

.nav-search-text {
  font-size: 0.8125rem;
  line-height: 1;
}

.nav-search-kbd {
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: none;
  padding: 0;
  font-size: 0.75rem;
  font-family: inherit;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1;
  opacity: 0.85;
}

/* Home Page Header Overlay State */
body.page-home .nav:not(.scrolled) .nav-search-trigger {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.85);
}

body.page-home .nav:not(.scrolled) .nav-search-trigger .nav-search-icon {
  color: rgba(255, 255, 255, 0.8);
}

body.page-home .nav:not(.scrolled) .nav-search-trigger .nav-search-kbd {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.75);
}

body.page-home .nav:not(.scrolled) .nav-search-trigger:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: #FFFFFF;
  color: #FFFFFF;
}

/* Nav Mobile Search Icon Button */
.nav-search-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-body);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.nav-search-icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.06);
}

body.page-home .nav:not(.scrolled) .nav-search-icon-btn {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
}

/* Mobile Drawer Search Bar */
.nav-mobile-search-row {
  padding: 12px 16px 8px;
}

.nav-mobile-search-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-main);
  border: 1.5px solid var(--border);
  border-radius: 0;
  padding: 10px 14px;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease;
}

.nav-mobile-search-trigger:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.nav-mobile-search-badge {
  margin-left: auto;
  font-size: 0.75rem;
  font-family: inherit;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 500;
  opacity: 0.85;
}

/* ----- Modal Backdrop & Palette Container ----- */
body.search-modal-open {
  overflow: hidden !important;
}

.search-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 16px 24px;
  animation: searchFadeIn 0.15s ease-out;
}

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

.search-modal-container {
  width: 100%;
  max-width: 660px;
  background: #FFFFFF;
  border-radius: 0;
  box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.3), 0 0 0 1.5px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: searchSlideDown 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes searchSlideDown {
  from { transform: translateY(-16px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Search Input Header */
.search-input-header {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: #FFFFFF;
  position: relative;
}

.search-input-icon {
  color: var(--blue-500);
  display: flex;
  align-items: center;
  margin-right: 12px;
  flex-shrink: 0;
}

.search-input-field {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1.0625rem;
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
  min-width: 0;
}

.search-input-field::placeholder {
  color: var(--text-light);
}

.search-clear-btn {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  margin-right: 6px;
  border-radius: 0;
}

.search-close-btn {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 0;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-muted);
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.search-close-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

/* Category Filter Bar - Connected Rectangular Segments */
.search-categories-bar {
  display: flex;
  gap: 0;
  padding: 0;
  background: var(--bg-main);
  border-bottom: 1.5px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}

.search-categories-bar::-webkit-scrollbar {
  display: none;
}

.search-cat-pill {
  background: transparent;
  border: none;
  border-right: 1px solid var(--border);
  border-radius: 0;
  padding: 9px 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.search-cat-pill:last-child {
  border-right: none;
}

.search-cat-pill:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
}

.search-cat-pill.active {
  background: var(--blue-500);
  border-color: var(--blue-500);
  color: #FFFFFF;
  box-shadow: none;
}

/* Results List */
.search-results-wrapper {
  max-height: 420px;
  overflow-y: auto;
  padding: 8px 10px;
}

.search-results-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.search-result-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 0;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

.search-result-item:hover,
.search-result-item.selected {
  background: var(--blue-50);
  border-color: var(--blue-200);
}

.search-item-icon-box {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 0;
  background: #FFFFFF;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  color: var(--blue-600);
  flex-shrink: 0;
}

.search-result-item:hover .search-item-icon-box,
.search-result-item.selected .search-item-icon-box {
  background: var(--blue-500);
  border-color: var(--blue-500);
  color: #FFFFFF;
}

.search-item-info {
  flex: 1;
  min-width: 0;
}

.search-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.search-item-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-badge {
  display: inline-block;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 1px 6px;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.search-item-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-match {
  background: rgba(59, 141, 212, 0.18);
  color: var(--blue-800);
  font-weight: 700;
  padding: 0 2px;
  border-radius: 0;
}

.search-external-badge {
  font-size: 1rem;
  color: var(--text-light);
  margin-left: 8px;
}

/* Empty / Starter States - Continuous Network of Connected Rectangles */
.search-empty-state {
  padding: 24px 18px 28px;
  text-align: center;
}

.search-quick-links-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.search-quick-tags {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1.5px solid var(--border);
  border-radius: 0;
  max-width: 620px;
  margin: 0 auto;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

@media (max-width: 640px) {
  .search-quick-tags {
    grid-template-columns: repeat(2, 1fr);
  }
}

.search-tag-pill {
  background: #FFFFFF;
  border: none;
  border-radius: 0;
  padding: 13px 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-body);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.15s ease;
  position: relative;
  min-height: 46px;
}

.search-tag-pill:hover {
  background: #F1F5F9;
  color: #0F172A;
  box-shadow: inset 0 0 0 1.5px #334155;
  z-index: 2;
  transform: none;
}

.search-no-results {
  padding: 36px 20px;
  text-align: center;
}

.search-no-results-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.search-no-results h4 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.search-no-results p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.search-more-results-row {
  padding: 10px 14px 4px;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.search-more-results-link {
  font-size: 0.84375rem;
  font-weight: 600;
  color: var(--blue-600);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.search-more-results-link:hover {
  color: var(--blue-800);
}

/* Modal Footer Hints */
.search-footer-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: var(--bg-main);
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.search-hint-shortcuts {
  display: flex;
  gap: 14px;
}

.search-hint-shortcuts kbd {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  margin-right: 4px;
  color: var(--text-body);
}

.search-see-all {
  color: var(--blue-600);
  text-decoration: none;
  font-weight: 600;
}

.search-see-all:hover {
  text-decoration: underline;
}

/* ----- Dedicated Search Page Styles ----- */
.search-page-box {
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  padding: 24px 28px 36px;
}

.search-page-input-header {
  border: 1.5px solid var(--border);
  border-radius: 0;
  margin-bottom: 16px;
  padding: 12px 18px;
}

.search-page-input-header:focus-within {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 141, 212, 0.15);
}

.search-page-categories-bar {
  background: transparent;
  padding: 0 0 16px 0;
}

.search-page-result-item {
  border: 1px solid var(--border);
  margin-bottom: 8px;
  background: #FFFFFF;
}

.search-page-result-item:hover {
  border-color: var(--blue-300);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

/* ================================================================
   SEARCH DARK MODE OVERRIDES ([data-theme="dark"])
   ================================================================ */
[data-theme="dark"] .nav-search-trigger {
  background: #0E1626;
  border-color: #1F2D47;
  color: #94A3B8;
}

[data-theme="dark"] .nav-search-trigger:hover {
  background: #111A2E;
  border-color: #38BDF8;
  color: #F8FAFC;
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.2);
}

[data-theme="dark"] .nav-search-icon {
  color: #64748B;
}

[data-theme="dark"] .nav-search-trigger:hover .nav-search-icon {
  color: #38BDF8;
}

[data-theme="dark"] .nav-search-kbd {
  background: transparent !important;
  border: none !important;
  color: #64748B !important;
}

[data-theme="dark"] .nav-search-trigger:hover .nav-search-kbd {
  color: #94A3B8 !important;
}

[data-theme="dark"] .nav-search-icon-btn {
  background: #111A2E;
  border-color: #1F2D47;
  color: #94A3B8;
}

[data-theme="dark"] .nav-search-icon-btn:hover {
  border-color: #38BDF8;
  color: #38BDF8;
}

[data-theme="dark"] .nav-mobile-search-trigger {
  background: #0E1626;
  border-color: #1F2D47;
  color: #94A3B8;
}

[data-theme="dark"] .nav-mobile-search-trigger:hover {
  border-color: #38BDF8;
  color: #F8FAFC;
}

[data-theme="dark"] .search-modal-container {
  background: #0B1120;
  box-shadow: 0 25px 70px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px #1F2D47;
}

[data-theme="dark"] .search-input-header {
  background: #0B1120;
  border-bottom-color: #1F2D47;
}

[data-theme="dark"] .search-input-field {
  color: #F8FAFC;
}

[data-theme="dark"] .search-input-field::placeholder {
  color: #475569;
}

[data-theme="dark"] .search-clear-btn:hover {
  background: #111A2E;
  color: #F8FAFC;
}

[data-theme="dark"] .search-close-btn {
  background: #111A2E;
  border-color: #1F2D47;
  color: #94A3B8;
}

[data-theme="dark"] .search-close-btn:hover {
  color: #F8FAFC;
  border-color: #38BDF8;
}

[data-theme="dark"] .search-categories-bar {
  background: #080D1A;
  border-bottom-color: #1F2D47;
}

[data-theme="dark"] .search-cat-pill {
  background: transparent;
  border: none;
  border-right: 1px solid #1F2D47;
  border-radius: 0;
  color: #94A3B8;
}

[data-theme="dark"] .search-cat-pill:last-child {
  border-right: none;
}

[data-theme="dark"] .search-cat-pill:hover {
  color: #F8FAFC;
  background: #111A2E;
}

[data-theme="dark"] .search-cat-pill.active {
  background: #0284C7;
  border-color: #0284C7;
  color: #FFFFFF;
}

[data-theme="dark"] .search-result-item:hover,
[data-theme="dark"] .search-result-item.selected {
  background: #111A2E;
  border-color: #1F2D47;
}

[data-theme="dark"] .search-item-icon-box {
  background: #0E1626;
  border-color: #1F2D47;
  color: #38BDF8;
  border-radius: 0;
}

[data-theme="dark"] .search-result-item:hover .search-item-icon-box,
[data-theme="dark"] .search-result-item.selected .search-item-icon-box {
  background: #0284C7;
  border-color: #38BDF8;
  color: #FFFFFF;
}

[data-theme="dark"] .search-item-title {
  color: #F8FAFC;
}

[data-theme="dark"] .search-item-badge {
  background: #0E1626;
  border-color: #1F2D47;
  color: #94A3B8;
  border-radius: 0;
}

[data-theme="dark"] .search-item-subtitle {
  color: #64748B;
}

[data-theme="dark"] .search-match {
  background: rgba(56, 189, 248, 0.25);
  color: #38BDF8;
}

[data-theme="dark"] .search-quick-tags {
  background: #1F2D47;
  border-color: #1F2D47;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .search-tag-pill {
  background: #111A2E;
  border: none;
  border-radius: 0;
  color: #94A3B8;
}

[data-theme="dark"] .search-tag-pill:hover {
  background: #1E293B;
  color: #F8FAFC;
  box-shadow: inset 0 0 0 1.5px #64748B;
  z-index: 2;
}

.search-page-box {
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .search-page-box {
  background: #0B1120;
  border-color: #1F2D47;
}

[data-theme="dark"] .search-page-input-header {
  background: #0B1120;
  border-bottom-color: #1F2D47;
}

[data-theme="dark"] .search-no-results h4 {
  color: #F8FAFC;
}

[data-theme="dark"] .search-more-results-row {
  border-top-color: #1F2D47;
}

[data-theme="dark"] .search-more-results-link {
  color: #38BDF8;
}

[data-theme="dark"] .search-footer-hint {
  background: #080D1A;
  border-top-color: #1F2D47;
  color: #64748B;
}

[data-theme="dark"] .search-hint-shortcuts kbd {
  background: #111A2E;
  border-color: #1F2D47;
  color: #94A3B8;
}

[data-theme="dark"] .search-see-all {
  color: #38BDF8;
}

[data-theme="dark"] .search-page-box {
  background: #0B1120;
  border-color: #1F2D47;
}

[data-theme="dark"] .search-page-input-header {
  background: #0E1626;
  border-color: #1F2D47;
}

[data-theme="dark"] .search-page-input-header:focus-within {
  border-color: #38BDF8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

[data-theme="dark"] .search-page-result-item {
  background: #111A2E;
  border-color: #1F2D47;
}

[data-theme="dark"] .search-page-result-item:hover {
  border-color: #38BDF8;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* ================================================================
   SCROLL BACK TO TOP BUTTON
   ================================================================ */

.back-to-top-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--blue-600);
  color: #FFFFFF;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 20px rgba(38, 113, 179, 0.35), 0 2px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.9);
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.25s,
              background 0.2s ease,
              box-shadow 0.2s ease;
  outline: none;
}

.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top-btn:hover {
  background: var(--blue-500);
  transform: translateY(0) scale(1);
  box-shadow: 0 4px 16px rgba(38, 113, 179, 0.35);
}

.back-to-top-btn:active {
  transform: translateY(0) scale(0.96);
}

.back-to-top-btn svg {
  transition: transform 0.2s ease;
}

.back-to-top-btn:hover svg {
  transform: none;
}

@media (max-width: 768px) {
  .back-to-top-btn {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }
}

/* Back to Top Dark Mode */
[data-theme="dark"] .back-to-top-btn,
body[data-theme="dark"] .back-to-top-btn {
  background: #0284C7 !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  color: #FFFFFF !important;
  box-shadow: 0 6px 24px rgba(2, 132, 199, 0.45), 0 0 12px rgba(56, 189, 248, 0.25) !important;
}

[data-theme="dark"] .back-to-top-btn:hover,
body[data-theme="dark"] .back-to-top-btn:hover {
  background: #38BDF8 !important;
  color: #070B14 !important;
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.6) !important;
}

/* Footer Back to top Link */
.footer-back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.65) !important;
  font-weight: 600;
  transition: color 0.15s ease;
}

.footer-back-to-top:hover {
  color: #38BDF8 !important;
}

/* Nav Mobile Theme Row & Button */
.nav-mobile-theme-row {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.nav-mobile-theme-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: var(--bg-main);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md, 8px);
  padding: 10px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-body);
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-mobile-theme-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

[data-theme="dark"] .nav-mobile-theme-btn {
  background: #0E1626;
  border-color: #1F2D47;
  color: #F8FAFC;
}

.nav-mobile-theme-btn .theme-icon-sun {
  display: none;
  color: #FBBF24;
}

.nav-mobile-theme-btn .theme-icon-moon {
  display: inline-flex;
  color: var(--text-body);
}

[data-theme="dark"] .nav-mobile-theme-btn .theme-icon-sun {
  display: inline-flex !important;
}

[data-theme="dark"] .nav-mobile-theme-btn .theme-icon-moon {
  display: none !important;
}

/* Additional Dark Mode Homepage & Stats Overrides */
[data-theme="dark"] .editorial-stats-section {
  background: #070B14 !important;
  border-top: 1px solid #1F2D47 !important;
  border-bottom: 1px solid #1F2D47 !important;
}

[data-theme="dark"] .stat-card .stat-number {
  color: #F8FAFC !important;
}

[data-theme="dark"] .stat-card .stat-label {
  color: #38BDF8 !important;
}

[data-theme="dark"] .reviews-section-container {
  background: #111A2E !important;
  border: 1px solid #1F2D47 !important;
}

[data-theme="dark"] .video-showcase-card {
  background: #111A2E !important;
  border: 1px solid #1F2D47 !important;
}

/* ================================================================
   LOADING ANIMATIONS & SKELETON LOADERS
   ================================================================ */

/* 1. Global Route Top Progress Bar */
#global-loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #3B8DD4 0%, #38BDF8 50%, #60A5FA 100%);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7), 0 0 5px rgba(59, 141, 212, 0.5);
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: width 0.3s cubic-bezier(0.1, 0.9, 0.2, 1), opacity 0.25s ease;
}

#global-loading-bar.active {
  opacity: 1;
}

#global-loading-bar.finished {
  width: 100% !important;
  opacity: 0;
}

/* 2. Page Content Entrance Animation */
@keyframes pageContentFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-enter {
  animation: pageContentFadeIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@media (prefers-reduced-motion: reduce) {
  .page-enter {
    animation: none !important;
  }
  #global-loading-bar {
    display: none !important;
  }
  .atom-ring {
    animation: none !important;
  }
}

/* 3. Science Orbital Atom Loading Spinner */
.science-atom-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 36px 20px;
  text-align: center;
}

.atom-orbit-wrapper {
  position: relative;
  width: 64px;
  height: 64px;
  perspective: 600px;
}

.atom-nucleus {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  margin-left: -7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #60A5FA, #2563EB);
  box-shadow: 0 0 14px rgba(59, 141, 212, 0.8), 0 0 6px #38BDF8;
  animation: nucleusPulse 1.8s ease-in-out infinite alternate;
}

.atom-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: #38BDF8;
  border-right-color: rgba(56, 189, 248, 0.35);
  box-sizing: border-box;
}

.atom-ring-1 {
  transform: rotateZ(0deg) rotateX(65deg);
  animation: atomSpin1 1.2s linear infinite;
}

.atom-ring-2 {
  transform: rotateZ(60deg) rotateX(65deg);
  animation: atomSpin2 1.2s linear infinite;
  animation-delay: -0.4s;
  border-top-color: #3B8DD4;
}

.atom-ring-3 {
  transform: rotateZ(120deg) rotateX(65deg);
  animation: atomSpin3 1.2s linear infinite;
  animation-delay: -0.8s;
  border-top-color: #60A5FA;
}

@keyframes atomSpin1 {
  0% { transform: rotateZ(0deg) rotateX(65deg) rotateZ(0deg); }
  100% { transform: rotateZ(0deg) rotateX(65deg) rotateZ(360deg); }
}

@keyframes atomSpin2 {
  0% { transform: rotateZ(60deg) rotateX(65deg) rotateZ(0deg); }
  100% { transform: rotateZ(60deg) rotateX(65deg) rotateZ(360deg); }
}

@keyframes atomSpin3 {
  0% { transform: rotateZ(120deg) rotateX(65deg) rotateZ(0deg); }
  100% { transform: rotateZ(120deg) rotateX(65deg) rotateZ(360deg); }
}

@keyframes nucleusPulse {
  0% { transform: scale(0.9); box-shadow: 0 0 8px rgba(59, 141, 212, 0.6); }
  100% { transform: scale(1.15); box-shadow: 0 0 18px rgba(56, 189, 248, 0.9), 0 0 8px #60A5FA; }
}

.atom-loading-text {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

[data-theme="dark"] .atom-loading-text {
  color: #F8FAFC;
}

.atom-loading-subtext {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: -6px;
  max-width: 320px;
}

/* 4. Button Loading Spinner */
.btn.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.88;
  cursor: not-allowed;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  border-top-color: #FFFFFF;
  animation: btnSpin 0.75s linear infinite;
  flex-shrink: 0;
}

.btn-secondary .btn-spinner,
.btn-outline .btn-spinner {
  border-color: rgba(59, 141, 212, 0.25);
  border-top-color: var(--accent);
}

@keyframes btnSpin {
  to { transform: rotate(360deg); }
}

/* 5. Skeleton Shimmer Loading Cards */
.skeleton-shimmer {
  background: linear-gradient(
    90deg,
    rgba(226, 232, 240, 0.6) 0%,
    rgba(241, 245, 249, 0.95) 50%,
    rgba(226, 232, 240, 0.6) 100%
  );
  background-size: 200% 100%;
  animation: skeletonShimmerWave 1.6s ease-in-out infinite;
  border-radius: 6px;
}

[data-theme="dark"] .skeleton-shimmer {
  background: linear-gradient(
    90deg,
    rgba(30, 41, 59, 0.6) 0%,
    rgba(51, 65, 85, 0.85) 50%,
    rgba(30, 41, 59, 0.6) 100%
  );
  background-size: 200% 100%;
}

@keyframes skeletonShimmerWave {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  padding: 20px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

[data-theme="dark"] .skeleton-card {
  background: #111A2E;
  border-color: #1F2D47;
}

.skeleton-line {
  height: 14px;
  border-radius: 4px;
}

.skeleton-line.short { width: 35%; }
.skeleton-line.medium { width: 65%; }
.skeleton-line.long { width: 90%; }
.skeleton-title { height: 22px; width: 50%; }
.skeleton-badge { height: 20px; width: 70px; border-radius: 999px; }

/* 6. Success Checkmark Pulse Animation */
@keyframes checkmarkPop {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.anim-checkmark-pop {
  animation: checkmarkPop 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ──────────────────────────────────────
   Cookie Consent Banner
   ────────────────────────────────────── */
.cookie-consent-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 960px;
  margin: 0 auto;
  z-index: 9990;
  pointer-events: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-consent-banner.visible {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}

.cookie-consent-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 22px;
  background: #ffffff;
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.cookie-consent-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.cookie-consent-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookie-consent-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-500, #0284c7);
  flex-shrink: 0;
}

.cookie-consent-title {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text-primary, #0f172a);
  letter-spacing: -0.01em;
}

.cookie-consent-text {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-muted, #64748b);
  margin: 0;
}

.cookie-consent-text a {
  color: var(--blue-500, #0284c7);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

.cookie-consent-text a:hover {
  color: var(--blue-600, #0369a1);
}

.cookie-consent-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-btn {
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.cookie-btn-essential {
  background: transparent;
  color: var(--text-primary, #0f172a);
  border: 1.5px solid var(--border, #cbd5e1);
}

.cookie-btn-essential:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: #475569;
}

.cookie-btn-accept {
  background: var(--blue-500, #0284c7);
  color: #ffffff;
  border: 1.5px solid var(--blue-500, #0284c7);
}

.cookie-btn-accept:hover {
  background: #0369a1;
  border-color: #0369a1;
}

.cookie-close-btn {
  background: transparent;
  border: 1.5px solid transparent;
  color: var(--text-muted, #64748b);
  font-size: 1.35rem;
  line-height: 1;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 0;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cookie-close-btn:hover {
  color: var(--text-primary, #0f172a);
  border-color: var(--border, #cbd5e1);
}

@media (max-width: 768px) {
  .cookie-consent-banner {
    bottom: 12px;
    left: 12px;
    right: 12px;
  }
  .cookie-consent-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px;
  }
  .cookie-consent-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
  }
}

/* Dark Mode Overrides */
[data-theme="dark"] .cookie-consent-inner {
  background: #0E1626 !important;
  border-color: #1F2D47 !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .cookie-consent-icon {
  color: #38BDF8 !important;
}

[data-theme="dark"] .cookie-consent-title {
  color: #F1F5F9 !important;
}

[data-theme="dark"] .cookie-consent-text {
  color: #94A3B8 !important;
}

[data-theme="dark"] .cookie-consent-text a {
  color: #38BDF8 !important;
}

[data-theme="dark"] .cookie-consent-text a:hover {
  color: #7DD3FC !important;
}

[data-theme="dark"] .cookie-btn-essential {
  color: #E2E8F0 !important;
  border-color: #334155 !important;
  background: transparent !important;
}

[data-theme="dark"] .cookie-btn-essential:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: #64748B !important;
}

[data-theme="dark"] .cookie-btn-accept {
  background: #0284C7 !important;
  border-color: #0284C7 !important;
  color: #FFFFFF !important;
}

[data-theme="dark"] .cookie-btn-accept:hover {
  background: #0369A1 !important;
  border-color: #0369A1 !important;
}

[data-theme="dark"] .cookie-close-btn {
  color: #94A3B8 !important;
}

[data-theme="dark"] .cookie-close-btn:hover {
  color: #FFFFFF !important;
  border-color: #334155 !important;
}

/* ================================================================
   Video Embeds & Privacy-First Consent Gate
   ================================================================ */

.yt-embed-wrapper {
  margin: 24px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border, #e2e8f0);
  background: #000000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.yt-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  background: #000000;
}

.yt-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.yt-embed-footer {
  padding: 10px 16px;
  background: #0a1120;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.yt-embed-sublink {
  font-size: 0.8125rem;
  color: #94a3b8;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.yt-embed-sublink:hover {
  color: #38bdf8;
  text-decoration: underline;
}

/* Privacy Consent Gated Placeholder */
.yt-embed-wrapper.yt-consent-gated {
  background: #0B132B;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.yt-consent-placeholder {
  position: relative;
  width: 100%;
  min-height: 320px;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.yt-consent-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(12px) brightness(0.35);
  transform: scale(1.1);
}

.yt-consent-backdrop-dim {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(11, 19, 43, 0.7) 0%, rgba(11, 19, 43, 0.94) 100%);
}

.yt-consent-overlay {
  position: relative;
  z-index: 2;
  max-width: 520px;
  padding: 24px;
  text-align: center;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.yt-consent-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.yt-consent-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.35;
}

.yt-consent-text {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #cbd5e1;
}

.yt-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 6px;
}

.yt-consent-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.yt-consent-actions .btn-primary {
  background: #0284c7;
  color: #ffffff;
  border: 1.5px solid #0284c7;
}

.yt-consent-actions .btn-primary:hover {
  background: #0369a1;
  border-color: #0369a1;
}

.yt-consent-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.yt-consent-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
}

/* ================================================================
   Mobile-Friendly & Touch Screen Enhancements
   ================================================================ */

/* 1. Global Viewport & Horizontal Overflow Defense */
html, body, #app {
  max-width: 100vw;
  overflow-x: hidden;
}

img, video, canvas, svg {
  max-width: 100%;
  height: auto;
}

pre, code {
  max-width: 100%;
  word-break: break-word;
}

/* 2. KaTeX & Math Formulas Overflow Protection on Phones */
.katex-display,
.lesson-content .katex-display {
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 6px 0 !important;
  margin: 16px 0 !important;
}

.katex {
  max-width: 100%;
}

/* 3. Responsive Tables */
table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
}

.table-wrapper,
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 20px;
}

/* 4. Active Recall / Problem of the Day (Mobile Stack for 32% / 68% Split) */
@media (max-width: 900px) {
  .editorial-pillar-row,
  .editorial-pillar-row.editorial-pillar-row-practice,
  .editorial-pillar-row-practice {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  .editorial-pillar-row .pillar-visual,
  .editorial-pillar-row .pillar-content {
    width: 100% !important;
  }
}

/* 5. Touch Target & Input Usability (iOS Auto-Zoom Bug Fix) */
@media (max-width: 768px) {
  /* Prevent iOS Safari 16px auto-zoom glitch */
  .form-input,
  .form-textarea,
  .form-select,
  .search-input-field {
    font-size: 16px !important;
  }

  /* WCAG Compliant Touch Targets (minimum 44px) */
  .nav-hamburger {
    min-width: 44px !important;
    min-height: 44px !important;
  }

  .theme-toggle-btn {
    min-width: 38px !important;
    min-height: 38px !important;
  }

  .choice {
    min-height: 46px;
    padding: 12px 14px;
  }

  .tab-btn {
    min-height: 42px;
  }

  .cookie-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* 6. Search Palette Modal on Mobile */
@media (max-width: 640px) {
  .search-modal-backdrop {
    padding: 12px 8px 16px !important;
    align-items: flex-start !important;
  }

  .search-modal-container {
    max-height: 92vh !important;
    border-radius: 8px !important;
  }

  .search-input-header {
    padding: 12px 14px !important;
  }

  .search-item-info {
    min-width: 0;
  }

  .search-item-title,
  .search-item-subtitle {
    word-break: break-word;
  }

  /* Video Consent Facade on Small Phones */
  .yt-consent-placeholder {
    min-height: 220px !important;
    aspect-ratio: 16 / 9 !important;
  }

  .yt-consent-overlay {
    padding: 14px 10px !important;
    gap: 8px !important;
  }

  .yt-consent-title {
    font-size: 0.95rem !important;
  }

  .yt-consent-text {
    font-size: 0.75rem !important;
  }

  .yt-consent-actions {
    width: 100% !important;
    flex-direction: column !important;
  }

  .yt-consent-actions .btn {
    width: 100% !important;
    min-height: 42px !important;
    justify-content: center !important;
  }
}

/* 7. Extra Small Phones (<= 480px) */
@media (max-width: 480px) {
  .container,
  .container-narrow {
    padding: 0 14px !important;
  }

  .daily-section {
    padding: 18px 14px !important;
  }

  .daily-header {
    flex-direction: column !important;
    gap: 8px !important;
  }

  .hero-editorial-content {
    padding-top: 88px !important;
    padding-bottom: 64px !important;
  }

  .cookie-consent-banner {
    bottom: 8px !important;
    left: 8px !important;
    right: 8px !important;
  }

  .cookie-consent-actions {
    grid-template-columns: 1fr !important;
    width: 100% !important;
  }

  .cookie-btn {
    width: 100% !important;
    min-height: 44px !important;
  }

  .cookie-close-btn {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
  }
}

/* 8. Micro Screens (< 360px like iPhone SE 1st Gen) */
@media (max-width: 360px) {
  .nav-logo span {
    font-size: 0.75rem !important;
    letter-spacing: 0.04em !important;
  }
}

/* ================================================================
   Custom 404 Error Page (Inspired by New Arc & Studio Aesthetics)
   ================================================================ */

.error-404-section {
  min-height: calc(100vh - var(--nav-height));
  padding: 60px 0 96px;
  background: radial-gradient(circle at 50% 20%, rgba(59, 141, 212, 0.08) 0%, transparent 65%), var(--bg-main);
  position: relative;
  overflow: hidden;
}

.error-404-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 1. Status Pill Badge */
.error-404-badge-row {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.error-404-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.error-badge-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  animation: pulse404 2s infinite ease-in-out;
}

@keyframes pulse404 {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 7px rgba(245, 158, 11, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

.error-badge-text {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
}

/* 2. Giant Typography Display */
.error-404-hero {
  text-align: center;
  margin-bottom: 36px;
}

.error-404-giant-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(5.5rem, 15vw, 10rem);
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: var(--text-primary);
  user-select: none;
  margin-bottom: 12px;
}

.error-digit {
  display: inline-block;
  background: linear-gradient(180deg, var(--text-primary) 20%, var(--blue-700) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.error-orbit-zero {
  position: relative;
  display: inline-block;
  margin: 0 4px;
}

.error-core-zero {
  display: inline-block;
  background: linear-gradient(180deg, var(--blue-500) 0%, var(--blue-700) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.error-orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 2px dashed rgba(59, 141, 212, 0.45);
  pointer-events: none;
}

.error-orbit-1 {
  width: 130%;
  height: 60%;
  transform: translate(-50%, -50%) rotate(-30deg);
  animation: spinOrbit1 14s linear infinite;
}

.error-orbit-2 {
  width: 60%;
  height: 130%;
  transform: translate(-50%, -50%) rotate(25deg);
  border-style: dotted;
  border-color: rgba(139, 92, 246, 0.45);
  animation: spinOrbit2 20s linear infinite;
}

@keyframes spinOrbit1 {
  0% { transform: translate(-50%, -50%) rotate(-30deg); }
  100% { transform: translate(-50%, -50%) rotate(330deg); }
}

@keyframes spinOrbit2 {
  0% { transform: translate(-50%, -50%) rotate(25deg); }
  100% { transform: translate(-50%, -50%) rotate(-335deg); }
}

.error-404-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin-top: 20px;
  margin-bottom: 14px;
  line-height: 1.15;
  text-wrap: balance;
}

.error-404-desc {
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.125rem;
  color: var(--text-body);
  line-height: 1.65;
}

.error-404-hero-actions {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.error-missing-path {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--blue-50);
  color: var(--blue-700);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--blue-200);
  word-break: break-all;
}

/* 3. Interactive Molecular Canvas Card */
.error-canvas-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 10px 32px rgba(10, 39, 68, 0.06);
  overflow: hidden;
  margin-bottom: 32px;
  transition: border-color 0.3s;
}

.error-canvas-card:hover {
  border-color: var(--blue-300);
}

.error-canvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: rgba(248, 250, 252, 0.85);
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
  gap: 12px;
}

.error-canvas-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.error-canvas-icon {
  font-size: 1.25rem;
  color: var(--blue-600);
}

.error-canvas-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78125rem;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
}

.error-canvas-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.error-canvas-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-body);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.error-canvas-btn:hover {
  background: var(--blue-50);
  border-color: var(--blue-300);
  color: var(--blue-700);
  transform: translateY(-1px);
}

.error-canvas-btn.active {
  background: var(--blue-600);
  border-color: var(--blue-600);
  color: #ffffff;
}

.error-btn-accent {
  background: linear-gradient(135deg, var(--blue-50) 0%, rgba(236, 72, 153, 0.08) 100%);
  border-color: var(--blue-200);
}

.error-canvas-body {
  position: relative;
  width: 100%;
  height: 330px;
  background: radial-gradient(circle at 50% 50%, rgba(237, 245, 255, 0.45) 0%, rgba(255, 255, 255, 0.9) 100%);
  cursor: crosshair;
}

.error-mol-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.error-canvas-overlay-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.78125rem;
  font-weight: 500;
  color: var(--text-muted);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  pointer-events: none;
  white-space: nowrap;
}

/* 4. Curriculum Quick Search Panel */
.error-404-search-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px 28px;
  margin-bottom: 28px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.error-search-label {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.error-search-form {
  display: flex;
  gap: 12px;
}

.error-search-input-wrap {
  position: relative;
  flex: 1;
}

.error-search-svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.error-search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-main);
  font-size: 0.9375rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.error-search-input:focus {
  background: var(--bg-card);
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 141, 212, 0.18);
}

.error-search-btn {
  white-space: nowrap;
  padding: 0 24px;
}

.error-quick-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.chips-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 600;
}

.error-chip {
  padding: 4px 12px;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  color: var(--text-body);
  cursor: pointer;
  transition: all 0.15s ease;
}

.error-chip:hover {
  background: var(--blue-50);
  border-color: var(--blue-300);
  color: var(--blue-700);
  transform: translateY(-1px);
}

/* 5. Random Science Fact Shuffler Card */
.error-fact-card {
  background: linear-gradient(135deg, rgba(59, 141, 212, 0.08) 0%, rgba(99, 102, 241, 0.06) 100%);
  border: 1px solid rgba(59, 141, 212, 0.22);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 48px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.error-fact-badge {
  align-self: flex-start;
  font-size: 0.71875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--blue-600);
  color: #ffffff;
}

.error-fact-text {
  font-size: 1.0625rem;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
  transition: opacity 0.15s ease;
}

.error-fact-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 6px;
}

.error-fact-btn {
  font-size: 0.8125rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.shuffle-icon {
  font-size: 1.1rem;
}

/* 6. Safe Laboratory Stations Grid */
.error-stations-section {
  margin-bottom: 48px;
}

.error-stations-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.error-stations-subtitle {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 22px;
}

.error-stations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.error-station-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
}

.error-station-card:hover {
  transform: translateY(-4px);
  border-color: var(--blue-400);
  box-shadow: 0 12px 28px rgba(10, 39, 68, 0.08);
}

.station-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  background: var(--blue-50);
}

.station-chem { background: rgba(16, 185, 129, 0.12); }
.station-formula { background: rgba(139, 92, 246, 0.12); }
.station-daily { background: rgba(245, 158, 11, 0.12); }
.station-exam { background: rgba(239, 68, 68, 0.12); }
.station-recall { background: rgba(59, 141, 212, 0.12); }

.station-info {
  flex: 1;
  min-width: 0;
}

.station-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.station-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

.station-arrow {
  color: var(--text-light);
  font-size: 1.1rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.error-station-card:hover .station-arrow {
  transform: translateX(4px);
  color: var(--blue-600);
}

/* 7. Final Action Button */
.error-final-action {
  text-align: center;
  margin-top: 24px;
}

.error-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 1rem;
  border-radius: var(--radius-pill);
}

/* ================================================================
   Dark Mode Support for 404 Page ([data-theme="dark"] / .dark)
   ================================================================ */

[data-theme="dark"] .error-404-section,
html.dark .error-404-section {
  background: radial-gradient(circle at 50% 20%, rgba(59, 141, 212, 0.15) 0%, transparent 70%), #0B111E;
}

[data-theme="dark"] .error-404-badge,
html.dark .error-404-badge {
  background: #151D2F;
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .error-digit,
html.dark .error-digit {
  background: linear-gradient(180deg, #F8FAFC 20%, #93C5FD 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .error-core-zero,
html.dark .error-core-zero {
  background: linear-gradient(180deg, #60A5FA 0%, #3B82F6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .error-404-title,
html.dark .error-404-title,
[data-theme="dark"] .error-stations-title,
html.dark .error-stations-title,
[data-theme="dark"] .error-search-label,
html.dark .error-search-label {
  color: #F8FAFC;
}

[data-theme="dark"] .error-404-desc,
html.dark .error-404-desc {
  color: #94A3B8;
}

[data-theme="dark"] .error-missing-path,
html.dark .error-missing-path {
  background: rgba(30, 58, 138, 0.35);
  color: #93C5FD;
  border-color: rgba(147, 197, 253, 0.25);
}

[data-theme="dark"] .error-canvas-card,
html.dark .error-canvas-card,
[data-theme="dark"] .error-404-search-panel,
html.dark .error-404-search-panel,
[data-theme="dark"] .error-station-card,
html.dark .error-station-card {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .error-canvas-header,
html.dark .error-canvas-header {
  background: #0F172A;
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .error-canvas-btn,
html.dark .error-canvas-btn {
  background: #1E293B;
  border-color: rgba(255, 255, 255, 0.1);
  color: #E2E8F0;
}

[data-theme="dark"] .error-canvas-btn:hover,
html.dark .error-canvas-btn:hover {
  background: #334155;
  color: #FFFFFF;
}

[data-theme="dark"] .error-canvas-body,
html.dark .error-canvas-body {
  background: radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.95) 0%, #0B111E 100%);
}

[data-theme="dark"] .error-canvas-overlay-hint,
html.dark .error-canvas-overlay-hint {
  background: rgba(15, 23, 42, 0.88);
  border-color: rgba(255, 255, 255, 0.12);
  color: #94A3B8;
}

[data-theme="dark"] .error-search-input,
html.dark .error-search-input {
  background: #0F172A;
  border-color: rgba(255, 255, 255, 0.12);
  color: #F8FAFC;
}

[data-theme="dark"] .error-chip,
html.dark .error-chip {
  background: #1E293B;
  border-color: rgba(255, 255, 255, 0.08);
  color: #CBD5E1;
}

[data-theme="dark"] .error-fact-card,
html.dark .error-fact-card {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.3) 0%, rgba(88, 28, 135, 0.25) 100%);
  border-color: rgba(147, 197, 253, 0.2);
}

[data-theme="dark"] .error-fact-text,
html.dark .error-fact-text {
  color: #E2E8F0;
}

[data-theme="dark"] .station-title,
html.dark .station-title {
  color: #F8FAFC;
}

[data-theme="dark"] .station-desc,
html.dark .station-desc {
  color: #94A3B8;
}

/* ================================================================
   Mobile Responsiveness for 404 Page
   ================================================================ */

@media (max-width: 900px) {
  .error-stations-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .error-404-section {
    padding: 40px 0 64px;
  }

  .error-canvas-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .error-canvas-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .error-canvas-body {
    height: 270px;
  }

  .error-search-form {
    flex-direction: column;
  }

  .error-search-btn {
    width: 100%;
    padding: 12px 18px;
  }

  .error-stations-grid {
    grid-template-columns: 1fr;
  }

  .error-canvas-overlay-hint {
    font-size: 0.72rem;
    padding: 4px 10px;
  }
}


/* ================================================================
   Admin Route Guard & Dashboard Styles
   ================================================================ */

.admin-gate-section {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  background: radial-gradient(circle at 50% 20%, rgba(239, 68, 68, 0.05) 0%, transparent 60%), var(--bg-main);
}

.admin-gate-container {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

.admin-gate-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.06);
  text-align: center;
}

.admin-gate-badge-row {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.admin-gate-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #b91c1c;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-gate-icon {
  font-size: 2.75rem;
  margin-bottom: 12px;
}

.admin-gate-title {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.admin-gate-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 24px;
}

.admin-login-form {
  margin-top: 16px;
}

/* Admin Dashboard Section */
.admin-dashboard-section {
  min-height: calc(100vh - var(--nav-height));
  padding: 48px 0 80px;
  background: var(--bg-main);
}

.admin-dashboard-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.admin-dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.admin-dash-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.admin-dash-desc {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin: 0;
}

.admin-dash-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 26px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.admin-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
}

.admin-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.admin-card-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

.security-checklist-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.security-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-body);
  line-height: 1.45;
}

.security-check-row .check-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

/* Dark Mode Overrides for Admin */
[data-theme="dark"] .admin-gate-card,
html.dark .admin-gate-card,
[data-theme="dark"] .admin-card,
html.dark .admin-card {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .admin-gate-section,
html.dark .admin-gate-section,
[data-theme="dark"] .admin-dashboard-section,
html.dark .admin-dashboard-section {
  background: #0B111E;
}

[data-theme="dark"] .admin-gate-title,
html.dark .admin-gate-title,
[data-theme="dark"] .admin-dash-title,
html.dark .admin-dash-title,
[data-theme="dark"] .admin-card-title,
html.dark .admin-card-title {
  color: #F8FAFC;
}

[data-theme="dark"] .admin-review-item,
html.dark .admin-review-item {
  background: #0F172A !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

@media (max-width: 900px) {
  .admin-dash-grid {
    grid-template-columns: 1fr;
  }
}

/* ================================================================
   Courses Page - Split Layout & Right-Side Image Showcase
   ================================================================ */

.courses-page-container {
  padding-top: var(--sp-lg, 24px);
  padding-bottom: var(--sp-3xl, 64px);
}

.courses-page-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 48px;
  align-items: start;
}

@media (min-width: 1200px) {
  .courses-page-layout {
    grid-template-columns: 1fr 420px;
    gap: 60px;
  }
}

.courses-page-main {
  min-width: 0;
}

.courses-page-sidebar {
  display: block;
}

.courses-sidebar-sticky {
  position: sticky;
  top: calc(var(--nav-height, 68px) + 24px);
}

.courses-sidebar-image-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  box-shadow: 0 16px 40px rgba(10, 39, 68, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.courses-sidebar-image-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 48px rgba(10, 39, 68, 0.12);
}

.courses-sidebar-img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  max-height: 600px;
  object-fit: cover;
  display: block;
}

.courses-sidebar-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 20px 18px;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.72) 40%, rgba(15, 23, 42, 0.92) 100%);
  color: #ffffff;
}

.courses-sidebar-tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 3px 9px;
  border-radius: var(--radius-pill, 9999px);
  margin-bottom: 6px;
}

.courses-sidebar-tagline {
  font-size: 0.875rem;
  line-height: 1.4;
  color: #e2e8f0;
  margin: 0;
  font-weight: 500;
}

@media (max-width: 991px) {
  .courses-page-layout {
    display: flex;
    flex-direction: column;
    gap: 36px;
  }

  .courses-page-sidebar {
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
  }

  .courses-sidebar-sticky {
    position: static;
  }
}

[data-theme="dark"] .courses-sidebar-image-card,
html.dark .courses-sidebar-image-card {
  background: #181b21;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

