/* =========================================================================
   ukgogo.co.uk CSS SYSTEM & DESIGN LAYOUT
   ========================================================================= */

:root {
  --brand-navy: #00247D;
  --brand-red: #C8102E;
  --brand-gold: #D4AF37;
  --bg-slate: #f8fafc;
  --text-dark: #0f172a;
  --text-light: #64748b;
  --radius-md: 12px;
  --radius-lg: 16px;
  --font-body: 'Inter', sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-display: 'Cinzel', serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: #f1f5f9;
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Split Double Border System */
.split-double-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 1.75rem;
  background: #ffffff;
}

/* Top half layout frame styling */
.welcome-hero-white.split-double-frame {
  border: 5px solid var(--brand-navy);
  box-shadow: 0 8px 30px rgba(0, 36, 125, 0.08);
}
.welcome-hero-white.split-double-frame .inner-frame-layer {
  position: absolute;
  top: 2.5px; left: 2.5px; right: 2.5px; bottom: 2.5px;
  border: 2.5px solid var(--brand-red);
  border-radius: calc(var(--radius-lg) - 2px);
  pointer-events: none;
}

/* Bottom half layout frame styling */
.ebbinghaus-banner-white.split-double-frame {
  border: 5px solid var(--brand-red);
  box-shadow: 0 8px 30px rgba(200, 16, 46, 0.08);
  margin-top: 1.5rem;
}
.ebbinghaus-banner-white.split-double-frame .inner-frame-layer {
  position: absolute;
  top: 2.5px; left: 2.5px; right: 2.5px; bottom: 2.5px;
  border: 2.5px solid var(--brand-navy);
  border-radius: calc(var(--radius-lg) - 2px);
  pointer-events: none;
}

/* App Header & Navigation */
.app-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.5rem;
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--brand-navy);
}

.text-gold {
  color: var(--brand-gold);
}

.brand-subline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-light);
}

.badge-version {
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
}

.badge-offline-status {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  padding: 1px 6px;
  border-radius: 10px;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.main-nav {
  display: flex;
  gap: 0.5rem;
}

.nav-btn {
  background: transparent;
  border: none;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  background: #f1f5f9;
  color: var(--brand-navy);
}

.nav-btn.active {
  background: rgba(0, 36, 125, 0.08);
  color: var(--brand-navy);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-selector-compact {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
}

.lang-select-compact {
  background: transparent;
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  outline: none;
}

.theme-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 1.1rem;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
}

/* 4-Block Simplified Learner Entrance Portal (HUD) */
.portal-grid-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.portal-card {
  background: #ffffff;
  border: 1px solid rgba(0, 36, 125, 0.1);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 36, 125, 0.03);
}

.portal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 36, 125, 0.08);
  border-color: var(--brand-navy);
}

.portal-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.bg-blue { background: rgba(0, 36, 125, 0.1); color: var(--brand-navy); }
.bg-purple { background: rgba(124, 58, 237, 0.1); color: #7c3aed; }
.bg-red { background: rgba(200, 16, 46, 0.1); color: var(--brand-red); }
.bg-gold { background: rgba(212, 175, 55, 0.15); color: #b45309; }

.portal-card-body h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
}

.portal-guide-subtext {
  font-size: 0.72rem;
  color: var(--text-light);
  line-height: 1.3;
  margin-top: 2px;
}

.portal-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-free { background: #e2fbe8; color: #15803d; }
.badge-premium { background: #fffbeb; color: #b45309; border: 1px solid rgba(212, 175, 55, 0.4); }
.badge-alert { background: #fef2f2; color: #b91c1c; }

/* Main Content Layout */
.main-content {
  max-width: 1280px;
  margin: 1.5rem auto;
  padding: 0 1rem;
}

.tab-view {
  display: none !important;
}

.tab-view.active {
  display: block !important;
}

/* Glass Cards & Containers */
.glass-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 36, 125, 0.08);
  padding: 1.75rem;
  box-shadow: 0 4px 20px rgba(0, 36, 125, 0.03);
}

/* High-Yield Notes Headers */
.cheatsheet-header {
  margin-bottom: 1.5rem;
}

.cs-badge-title h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--brand-navy);
  margin-top: 0.5rem;
}

.cs-desc {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

.badge-red-pulse {
  background: rgba(200, 16, 46, 0.1);
  color: var(--brand-red);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-block;
}

.cs-search-wrapper {
  margin-top: 1rem;
}

.cs-search-input {
  width: 100%;
  padding: 0.8rem 1.2rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.cs-search-input:focus {
  border-color: var(--brand-navy);
}

/* Simplified 3-Cluster Category Filters */
.cs-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.cs-filter-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cs-filter-btn:hover {
  background: #e2e8f0;
}

.cs-filter-btn.active {
  background: var(--brand-navy);
  border-color: var(--brand-navy);
  color: #ffffff;
}

/* Formulaic Memory Chains Node Layout (樹枝/公式鏈) */
.formula-chain-container {
  background: #f8fafc;
  border: 1px solid rgba(0, 36, 125, 0.08);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.formula-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.5rem;
}

.formula-nodes-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.formula-node {
  background: #ffffff;
  border: 1px solid rgba(0, 36, 125, 0.15);
  color: var(--brand-navy);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.formula-arrow {
  color: var(--brand-red);
  font-weight: 700;
  font-size: 0.78rem;
}

/* Mnemonic Card Paywall Lock System (Frosted Glass Overlay) */
.cheatsheet-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.cs-note-card {
  background: #ffffff;
  border: 1px solid rgba(0, 36, 125, 0.08);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.locked-card .cs-content-block,
.locked-card .formula-chain-container,
.locked-card .btn-card-quiz {
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
}

.premium-lock-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
}

.lock-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.lock-icon {
  font-size: 1.8rem;
}

.lock-box h5 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-navy);
}

.lock-box p {
  font-size: 0.72rem;
  color: var(--text-light);
  max-width: 220px;
  line-height: 1.3;
}

.btn-unlock-now {
  background: var(--brand-gold);
  border: none;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 0.25rem;
  transition: transform 0.2s ease;
}

.btn-unlock-now:hover {
  transform: scale(1.05);
}

.note-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.cs-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.tag-day { background: rgba(0, 36, 125, 0.08); color: var(--brand-navy); }
.tag-chapter { background: #f1f5f9; color: #475569; }

.cs-keyword {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

.cs-content-block {
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.cs-row {
  line-height: 1.45;
}

.cs-icon-label {
  font-weight: 700;
  color: #475569;
  margin-right: 4px;
}

.cs-multilingual-box {
  background: #f1f5f9;
  border-radius: 6px;
  padding: 0.5rem;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: #475569;
}

.cs-trap-box {
  background: rgba(200, 16, 46, 0.06);
  border-left: 3px solid var(--brand-red);
  padding: 0.4rem;
  font-size: 0.78rem;
  color: #991b1b;
  border-radius: 0 6px 6px 0;
}

.btn-card-quiz {
  width: 100%;
  background: var(--brand-navy);
  border: none;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  margin-top: auto;
  transition: background 0.2s ease;
}

.btn-card-quiz:hover {
  background: #001b5e;
}

/* Mistakes Vault CSS Section (❌ My Mistakes) */
.mistakes-layout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.empty-mistakes-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-light);
}

.empty-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 0.5rem;
}

.mistake-card {
  background: #ffffff;
  border: 1px solid rgba(200, 16, 46, 0.15);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 4px 12px rgba(200, 16, 46, 0.02);
}

.mistake-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.badge-mistake-tag {
  background: rgba(200, 16, 46, 0.1);
  color: var(--brand-red);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-flagged-tag {
  background: #fffbeb;
  color: #d97706;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.btn-card-action-bar {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.btn-action-small {
  flex-grow: 1;
  padding: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: #ffffff;
}

.btn-retest-red {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: #ffffff;
}

/* Premium Checkout Overlay Details */
.premium-checkout-content {
  max-width: 420px;
}

.premium-badge-icon {
  font-size: 3rem;
  display: block;
}

.premium-features-list {
  text-align: left;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem;
  font-size: 0.8rem;
  color: #334155;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.premium-feature-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.premium-pricing-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.price-old {
  text-decoration: line-through;
  color: #94a3b8;
  font-size: 1rem;
}

.price-new {
  color: var(--brand-navy);
  font-weight: 800;
  font-size: 1.8rem;
}

.price-duration {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 500;
}

/* Modals Core Styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-width: 500px;
  width: 100%;
  animation: modalScale 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 0.5rem;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}

@keyframes modalScale {
  from { transform: scale(0.9) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}


/* NEW PORTAL GRID STYLES */
.portal-grid-massive {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .portal-grid-massive {
    grid-template-columns: 1fr;
  }
}

.portal-card-massive {
  background: #ffffff;
  border: 1px solid rgba(0, 36, 125, 0.1);
  border-radius: 20px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 36, 125, 0.03);
}

.portal-card-massive:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 36, 125, 0.1);
  border-color: var(--brand-navy);
}

.portal-icon-large {
  width: 50px;
  height: 50px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.portal-card-massive h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.portal-card-massive p {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.4;
}

.module-header-nav {
  margin-bottom: 1.5rem;
}

.btn-back-home {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.btn-back-home:hover {
  background: #f1f5f9;
  color: var(--brand-navy);
  border-color: var(--brand-navy);
}

@media (max-width: 1024px) {
  .portal-grid-massive {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .portal-grid-massive {
    grid-template-columns: 1fr;
  }
}

/* Update Portal styling for icon-less text */
.portal-card-massive {
  justify-content: center;
  text-align: center;
  flex-direction: column;
}

.portal-card-body h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--brand-navy);
}

.portal-card-body p {
  font-size: 0.85rem;
  margin: 0;
}

/* FAQ & Key Info Section */
.faq-info-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 36, 125, 0.1);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

@media (max-width: 768px) {
  .faq-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.faq-card {
  padding: 1.5rem;
  background: #ffffff;
  border: 1px solid rgba(0, 36, 125, 0.08);
}

.faq-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--brand-navy);
  margin-bottom: 1.25rem;
  border-bottom: 2px solid rgba(0, 36, 125, 0.1);
  padding-bottom: 0.5rem;
}

.faq-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.95rem;
  color: #334155;
}

.faq-list li {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed #e2e8f0;
}

.faq-list li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.usp-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.usp-list li {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #334155;
  background: #f8fafc;
  padding: 0.75rem;
  border-radius: 8px;
  border-left: 3px solid var(--brand-navy);
}

.usp-list li:last-child {
  margin-bottom: 0;
}

/* =========================================================================
   COMPREHENSIVE DARK THEME STYLING
   ========================================================================= */

body.dark-theme {
  background-color: #0b132b !important;
  color: #e2e8f0 !important;
}

body.dark-theme .app-header {
  background: #111d4a !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.dark-theme .brand-text h1 {
  background: linear-gradient(180deg, #1e40af 0%, #3b82f6 38%, rgba(59, 130, 246, 0.9) 45%, rgba(59, 130, 246, 0.4) 48%, rgba(239, 68, 68, 0.4) 52%, rgba(239, 68, 68, 0.9) 55%, #ef4444 62%, #b91c1c 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  color: transparent !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)) !important;
}

body.dark-theme .portal-card-massive {
  background: #1c2541 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .portal-card-massive:hover {
  border-color: #D4AF37 !important;
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.2) !important;
}

body.dark-theme .portal-card-body h3 {
  color: #60a5fa !important;
}

body.dark-theme .portal-card-body p {
  color: #94a3b8 !important;
}

body.dark-theme .faq-info-section {
  border-top-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-theme .faq-card {
  background: #1c2541 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #e2e8f0 !important;
}

body.dark-theme .faq-card-title {
  color: #60a5fa !important;
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-theme .faq-list {
  color: #cbd5e1 !important;
}

body.dark-theme .faq-list li {
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-theme .usp-list li {
  background: #111d4a !important;
  color: #cbd5e1 !important;
  border-left-color: #D4AF37 !important;
}

body.dark-theme .glass-card {
  background: #1c2541 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #e2e8f0 !important;
}

body.dark-theme .cs-note-card {
  background: #1c2541 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #e2e8f0 !important;
}

body.dark-theme .cs-keyword {
  color: #f8fafc !important;
}

body.dark-theme .formula-node {
  background: #111d4a !important;
  border-color: #3b82f6 !important;
  color: #93c5fd !important;
}

body.dark-theme .btn-back-home {
  background: #1c2541 !important;
  color: #e2e8f0 !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

body.dark-theme .btn-back-home:hover {
  background: #253358 !important;
  color: #ffffff !important;
}

body.dark-theme .test-simulator-card {
  background: #1c2541 !important;
  color: #e2e8f0 !important;
}

body.dark-theme .option-card {
  background: #111d4a !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #e2e8f0 !important;
}

body.dark-theme .option-card:hover {
  border-color: #3b82f6 !important;
}

body.dark-theme .option-card.selected {
  background: #1e3a8a !important;
  border-color: #60a5fa !important;
}

body.dark-theme .modal-content {
  background: #1c2541 !important;
  color: #e2e8f0 !important;
}

body.dark-theme .lang-select-compact {
  background: #1c2541 !important;
  color: #e2e8f0 !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

body.dark-theme .theme-btn {
  background: #1c2541 !important;
  color: #e2e8f0 !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* =========================================================================
   CIRCULAR TRANSPARENT FLOATING HOME BUTTON (MINIMALIST SVG)
   ========================================================================= */

.floating-back-btn {
  position: fixed !important;
  bottom: 2rem !important;
  left: 2rem !important;
  z-index: 99999 !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  background: transparent !important;
  border: 1.8px solid var(--brand-navy) !important;
  color: var(--brand-navy) !important;
  padding: 0 !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(0, 36, 125, 0.12) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.floating-back-btn:hover {
  transform: translateY(-3px) scale(1.08) !important;
  border-color: var(--brand-gold) !important;
  color: var(--brand-gold) !important;
  background: rgba(212, 175, 55, 0.08) !important;
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3) !important;
}

.home-svg-icon {
  display: block;
  stroke: currentColor;
  transition: stroke 0.2s ease;
}

body.dark-theme .floating-back-btn {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.7) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

body.dark-theme .floating-back-btn:hover {
  border-color: var(--brand-gold) !important;
  color: var(--brand-gold) !important;
  background: rgba(212, 175, 55, 0.15) !important;
}

@media (max-width: 768px) {
  .floating-back-btn {
    bottom: 1.25rem !important;
    left: 1.25rem !important;
    width: 42px !important;
    height: 42px !important;
  }
  .home-svg-icon {
    width: 20px;
    height: 20px;
  }
}

/* =========================================================================
   3-TIER BLUE (0-55%) - WHITE (45-55%) - RED (60-100%) TITLE GRADIENT
   ========================================================================= */

.brand-text h1 {
  font-family: var(--font-heading) !important;
  font-size: 1.85rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.5px !important;
  background: linear-gradient(180deg, #001a5e 0%, #00247D 38%, rgba(0, 36, 125, 0.9) 45%, rgba(0, 36, 125, 0.4) 48%, rgba(200, 16, 46, 0.4) 52%, rgba(200, 16, 46, 0.9) 55%, #C8102E 62%, #9e0b22 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  color: transparent !important;
  display: inline-block !important;
  line-height: 1.1 !important;
  cursor: pointer !important;
  filter: drop-shadow(0 1px 2px rgba(0, 36, 125, 0.25)) drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15)) !important;
}

body.dark-theme .brand-text h1 {
  background: linear-gradient(180deg, #1e40af 0%, #3b82f6 38%, rgba(59, 130, 246, 0.9) 45%, rgba(59, 130, 246, 0.4) 48%, rgba(239, 68, 68, 0.4) 52%, rgba(239, 68, 68, 0.9) 55%, #ef4444 62%, #b91c1c 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  color: transparent !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)) !important;
}

/* =========================================================================
   QUICK REVISION CLEANUP & RESPONSIVE GRID ALIGNMENT
   ========================================================================= */

/* Remove background from 10-Min Fast-Track badge */
.badge-red-pulse {
  background: transparent !important;
  color: var(--brand-red) !important;
  border: 1px solid var(--brand-red) !important;
  padding: 0.25rem 0.75rem !important;
  border-radius: 50px !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  display: inline-block !important;
  box-shadow: none !important;
  animation: none !important;
}

body.dark-theme .badge-red-pulse {
  color: #f87171 !important;
  border-color: #f87171 !important;
}

/* Fix cheatsheet grid to distribute evenly */
.cheatsheet-cards-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
  gap: 1.5rem !important;
  width: 100% !important;
  margin-top: 1.5rem !important;
}

.cs-note-card {
  width: 100% !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  margin: 0 !important;
}

@media (max-width: 768px) {
  .cheatsheet-cards-grid {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================================================
   STUDY HANDBOOK BILINGUAL CARDS STYLING
   ========================================================================= */

.reader-integrated-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .reader-integrated-layout {
    grid-template-columns: 1fr;
  }
}

.reader-sidebar {
  padding: 1.25rem;
  position: sticky;
  top: 5.5rem;
}

.reader-sidebar h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--brand-navy);
  margin-bottom: 1rem;
  border-bottom: 2px solid rgba(0, 36, 125, 0.1);
  padding-bottom: 0.5rem;
}

.reader-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.reader-sidebar li {
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: #475569;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.reader-sidebar li:hover {
  background: #f1f5f9;
  color: var(--brand-navy);
}

.reader-sidebar li.active {
  background: rgba(0, 36, 125, 0.08);
  color: var(--brand-navy);
  border-color: rgba(0, 36, 125, 0.25);
  border-left: 4px solid var(--brand-navy);
}

body.dark-theme .reader-sidebar h3 {
  color: #60a5fa;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .reader-sidebar li {
  color: #cbd5e1;
}

body.dark-theme .reader-sidebar li:hover {
  background: #1e293b;
  color: #ffffff;
}

body.dark-theme .reader-sidebar li.active {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.35);
  border-left: 4px solid #60a5fa;
}

.reader-main-area {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.reader-content-header {
  padding: 1.5rem;
}

.reader-content-header h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--brand-navy);
  margin-bottom: 0.35rem;
}

.reader-subheading {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.4;
}

body.dark-theme .reader-content-header h2 {
  color: #60a5fa;
}

body.dark-theme .reader-subheading {
  color: #94a3b8;
}

.reader-cards-stream {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.micro-card-group {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  border: 1px solid rgba(0, 36, 125, 0.1);
}

.group-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.75rem;
}

.tag-chapter-pill {
  background: var(--brand-navy);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 50px;
  text-transform: uppercase;
}

.group-header h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: #0f172a;
}

.micro-card {
  border-radius: 8px;
  padding: 1rem 1.15rem;
  line-height: 1.6;
  font-size: 0.92rem;
}

.micro-card-label {
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 1. Core Concept (Blue/Standard) */
.micro-card.core-concept {
  background: #f0f7ff;
  border-left: 4px solid #00247D;
  color: #0f172a;
}

.micro-card.core-concept .micro-card-label {
  color: #00247D;
}

/* 2. Context Story (Purple/Knowledge) */
.micro-card.context-story {
  background: #f8fafc;
  border-left: 4px solid #64748b;
  color: #334155;
}

.micro-card.context-story .micro-card-label {
  color: #475569;
}

/* 3. Examiner Pitfalls (Amber/Red Warning) */
.micro-card.pitfalls {
  background: #fffbeb;
  border-left: 4px solid #d97706;
  color: #92400e;
}

.micro-card.pitfalls .micro-card-label {
  color: #b45309;
}

/* Dark Mode Overrides for Micro Cards */
body.dark-theme .group-header {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .group-header h3 {
  color: #f8fafc;
}

body.dark-theme .micro-card.core-concept {
  background: rgba(30, 58, 138, 0.25);
  border-left-color: #60a5fa;
  color: #e2e8f0;
}

body.dark-theme .micro-card.core-concept .micro-card-label {
  color: #93c5fd;
}

body.dark-theme .micro-card.context-story {
  background: rgba(15, 23, 42, 0.5);
  border-left-color: #94a3b8;
  color: #cbd5e1;
}

body.dark-theme .micro-card.context-story .micro-card-label {
  color: #cbd5e1;
}

body.dark-theme .micro-card.pitfalls {
  background: rgba(120, 53, 15, 0.25);
  border-left-color: #f59e0b;
  color: #fde68a;
}

body.dark-theme .micro-card.pitfalls .micro-card-label {
  color: #fcd34d;
}

/* =========================================================================
   OFFICIAL FULL-TEXT LINK BANNER & PRINT STYLES
   ========================================================================= */

.reader-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-print-handbook {
  background: #ffffff;
  color: var(--brand-navy);
  border: 1.5px solid var(--brand-navy);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-print-handbook:hover {
  background: var(--brand-navy);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 36, 125, 0.15);
}

body.dark-theme .btn-print-handbook {
  background: #1e293b;
  color: #60a5fa;
  border-color: #60a5fa;
}

body.dark-theme .btn-print-handbook:hover {
  background: #60a5fa;
  color: #0f172a;
}

.official-source-banner {
  margin-top: 1.25rem;
  padding: 0.85rem 1.15rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.official-source-banner .source-icon {
  font-size: 1.35rem;
}

.official-source-banner .source-info {
  flex: 1;
  font-size: 0.88rem;
  color: #475569;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.official-source-banner .source-info strong {
  color: var(--brand-navy);
}

.official-source-banner .source-links {
  display: flex;
  gap: 0.5rem;
}

.source-link-btn {
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-navy);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.source-link-btn:hover {
  border-color: var(--brand-navy);
  color: var(--brand-red);
}

body.dark-theme .official-source-banner {
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .official-source-banner .source-info {
  color: #94a3b8;
}

body.dark-theme .official-source-banner .source-info strong {
  color: #60a5fa;
}

body.dark-theme .source-link-btn {
  background: #1e293b;
  color: #cbd5e1;
  border-color: rgba(255, 255, 255, 0.15);
}

body.dark-theme .source-link-btn:hover {
  color: #60a5fa;
  border-color: #60a5fa;
}

/* Print Optimization */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .app-header, .floating-back-btn, .reader-sidebar, .official-source-banner, .btn-print-handbook {
    display: none !important;
  }
  .reader-integrated-layout {
    grid-template-columns: 1fr !important;
  }
  .glass-card {
    border: 1px solid #cccccc !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
}


/* --- Pure Academic Reader Styling (Strict Blue & Black, Zero Distraction) --- */
.reader-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  transition: border-color 0.2s ease;
}

body.dark-theme .reader-card {
  background: #1e293b;
  border-color: #334155;
}

.reader-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 0.5rem;
  margin-bottom: 0.85rem;
}

body.dark-theme .reader-card-header {
  border-bottom-color: #334155;
}

.reader-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #00247D; /* Pure Blue */
  margin: 0;
}

body.dark-theme .reader-card-title {
  color: #60a5fa;
}

.reader-card-badge {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #00247D;
  background: transparent;
  border: 1px solid #cbd5e1;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}

body.dark-theme .reader-card-badge {
  color: #94a3b8;
  border-color: #475569;
}

.reader-section-block {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #0f172a; /* Pure Black / Dark Slate */
}

body.dark-theme .reader-section-block {
  color: #f1f5f9;
}

.reader-section-block:last-child {
  margin-bottom: 0;
}

.reader-section-block p {
  margin: 0 0 0.5rem 0;
  color: #0f172a;
}

body.dark-theme .reader-section-block p {
  color: #f1f5f9;
}

.reader-section-heading {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: #00247D; /* Pure Blue */
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
  display: block;
}

body.dark-theme .reader-section-heading {
  color: #93c5fd;
}

/* Clear all non-blue/non-black accents */
.block-core, .block-context, .block-pitfall {
  background: transparent !important;
  border-left: none !important;
  padding: 0 !important;
  color: #0f172a !important;
}

body.dark-theme .block-core, 
body.dark-theme .block-context, 
body.dark-theme .block-pitfall {
  color: #f1f5f9 !important;
}

.formula-chain, .formula-pill {
  display: block;
  background: transparent !important;
  border: 1px solid #cbd5e1 !important;
  color: #00247D !important;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  margin-top: 0.5rem;
}

body.dark-theme .formula-chain, 
body.dark-theme .formula-pill {
  border-color: #475569 !important;
  color: #93c5fd !important;
}


/* --- Chapter & Sub-Unit Navigation Menu (Strict Blue & Black) --- */
.reader-sidebar {
  padding: 1.25rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

body.dark-theme .reader-sidebar {
  background: #1e293b;
  border-color: #334155;
}

.sidebar-header {
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

body.dark-theme .sidebar-header {
  border-bottom-color: #334155;
}

.sidebar-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #00247D;
  margin: 0;
}

body.dark-theme .sidebar-header h3 {
  color: #60a5fa;
}

.sidebar-sub-badge {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: #0f172a;
  font-weight: 500;
  margin-top: 0.15rem;
  display: block;
}

body.dark-theme .sidebar-sub-badge {
  color: #94a3b8;
}

.chapter-accordion-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.accordion-group {
  border: 1px solid #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
}

body.dark-theme .accordion-group {
  border-color: #334155;
}

.accordion-ch-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #00247D;
  background: #f8fafc;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}

body.dark-theme .accordion-ch-header {
  background: #0f172a;
  color: #93c5fd;
}

.accordion-group.active .accordion-ch-header {
  background: #00247D;
  color: #ffffff;
}

body.dark-theme .accordion-group.active .accordion-ch-header {
  background: #1e3a8a;
  color: #ffffff;
}

.accordion-sub-list {
  list-style: none;
  padding: 0.35rem 0;
  margin: 0;
  background: #ffffff;
  display: none;
}

body.dark-theme .accordion-sub-list {
  background: #1e293b;
}

.accordion-group.active .accordion-sub-list {
  display: block;
}

.accordion-sub-item {
  padding: 0.4rem 0.75rem 0.4rem 1.25rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: #0f172a;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: all 0.15s ease;
  line-height: 1.35;
}

body.dark-theme .accordion-sub-item {
  color: #cbd5e1;
}

.accordion-sub-item:hover {
  color: #00247D;
  background: #f1f5f9;
  border-left-color: #00247D;
}

body.dark-theme .accordion-sub-item:hover {
  color: #60a5fa;
  background: #0f172a;
  border-left-color: #60a5fa;
}

.accordion-sub-item.active-sub {
  color: #00247D;
  font-weight: 700;
  border-left-color: #00247D;
  background: #f8fafc;
}

body.dark-theme .accordion-sub-item.active-sub {
  color: #93c5fd;
  border-left-color: #93c5fd;
  background: #0f172a;
}


/* --- Membership Tier & Premium Gating Styling (Strict Blue & Black) --- */
.tier-badge-pill {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  border: 1px solid #00247D;
  background: transparent;
  color: #00247D;
  cursor: pointer;
  transition: all 0.15s ease;
}

body.dark-theme .tier-badge-pill {
  border-color: #60a5fa;
  color: #60a5fa;
}

.tier-badge-pill:hover {
  background: #00247D;
  color: #ffffff;
}

body.dark-theme .tier-badge-pill:hover {
  background: #60a5fa;
  color: #0f172a;
}

.premium-locked-box {
  border: 1px dashed #cbd5e1;
  border-radius: 4px;
  padding: 0.75rem 1rem;
  margin-top: 0.65rem;
  background: #f8fafc;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: #64748b;
}

body.dark-theme .premium-locked-box {
  border-color: #475569;
  background: #0f172a;
  color: #94a3b8;
}

.premium-lock-text {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
}

.btn-unlock-inline {
  background: transparent;
  border: 1px solid #00247D;
  color: #00247D;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

body.dark-theme .btn-unlock-inline {
  border-color: #60a5fa;
  color: #60a5fa;
}

.btn-unlock-inline:hover {
  background: #00247D;
  color: #ffffff;
}

/* Membership Upgrade Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #ffffff;
  border: 1px solid #00247D;
  border-radius: 8px;
  width: 90%;
  max-width: 520px;
  padding: 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  font-family: 'Inter', sans-serif;
}

body.dark-theme .modal-card {
  background: #1e293b;
  border-color: #3b82f6;
  color: #f1f5f9;
}

.modal-header {
  border-bottom: 1.5px solid #00247D;
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #00247D;
  margin: 0;
}

body.dark-theme .modal-header h3 {
  color: #60a5fa;
}

.modal-comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.tier-col {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
}

body.dark-theme .tier-col {
  border-color: #475569;
}

.tier-col.featured {
  border: 1.5px solid #00247D;
  background: #f8fafc;
}

body.dark-theme .tier-col.featured {
  border-color: #60a5fa;
  background: #0f172a;
}

.tier-col h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #00247D;
  margin: 0 0 0.5rem 0;
}

body.dark-theme .tier-col h4 {
  color: #60a5fa;
}

.tier-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tier-col li {
  margin-bottom: 0.4rem;
  color: #0f172a;
}

body.dark-theme .tier-col li {
  color: #cbd5e1;
}

.btn-toggle-tier {
  width: 100%;
  background: #00247D;
  color: #ffffff;
  border: none;
  padding: 0.75rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.btn-toggle-tier:hover {
  opacity: 0.9;
}


/* --- Header Breadcrumb Navigation --- */
.header-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 1.25rem;
  padding: 0.25rem 0.65rem;
  background: rgba(0, 36, 125, 0.04);
  border: 1px solid rgba(0, 36, 125, 0.12);
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  vertical-align: middle;
}

body.dark-theme .header-breadcrumb {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  color: #94a3b8;
}

.bc-link {
  color: #00247D;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.15s ease;
}

body.dark-theme .bc-link {
  color: #60a5fa;
}

.bc-link:hover {
  text-decoration: underline;
  color: #C8102E;
}

.bc-separator {
  color: #94a3b8;
  font-size: 0.75rem;
  user-select: none;
}

.bc-current {
  color: #0f172a;
  font-weight: 700;
}

body.dark-theme .bc-current {
  color: #f1f5f9;
}


/* --- Strict Same-Row Header & Breadcrumb Alignment --- */
.brand-logo {
  display: flex !important;
  align-items: center !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 0.75rem !important;
  height: 100% !important;
}

.brand-text {
  display: inline-flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}

.brand-text h1 {
  font-family: var(--font-heading) !important;
  font-size: 1.65rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.5px !important;
  background: linear-gradient(180deg, #001a5e 0%, #00247D 38%, rgba(0, 36, 125, 0.9) 45%, rgba(0, 36, 125, 0.4) 48%, rgba(200, 16, 46, 0.4) 52%, rgba(200, 16, 46, 0.9) 55%, #C8102E 62%, #9e0b22 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  color: transparent !important;
  display: inline-block !important;
  line-height: 1 !important;
  margin: 0 !important;
  cursor: pointer !important;
  filter: drop-shadow(0 1px 2px rgba(0, 36, 125, 0.25)) drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15)) !important;
}

.header-breadcrumb {
  display: inline-flex !important;
  align-items: center !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 0.35rem !important;
  margin: 0 0 0 0.5rem !important;
  padding: 0.2rem 0.6rem !important;
  background: rgba(0, 36, 125, 0.04) !important;
  border: 1px solid rgba(0, 36, 125, 0.12) !important;
  border-radius: 4px !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  color: #64748b !important;
  white-space: nowrap !important;
  align-self: center !important;
}

body.dark-theme .header-breadcrumb {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #94a3b8 !important;
}



/* --- Clean Unboxed Natural Text Breadcrumb --- */
.header-breadcrumb {
  display: inline-flex !important;
  align-items: center !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 0.35rem !important;
  margin: 0 0 0 0.65rem !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  color: #475569 !important;
  white-space: nowrap !important;
  align-self: center !important;
}

body.dark-theme .header-breadcrumb {
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
}

.bc-link {
  color: #475569 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.2rem !important;
  transition: opacity 0.15s ease !important;
}

body.dark-theme .bc-link {
  color: #94a3b8 !important;
}

.bc-link:hover {
  text-decoration: underline !important;
  color: #0f172a !important;
}

body.dark-theme .bc-link:hover {
  color: #ffffff !important;
}

.bc-separator {
  color: #94a3b8 !important;
  font-size: 0.8rem !important;
  margin: 0 0.1rem !important;
  user-select: none !important;
}

.bc-current {
  color: #0f172a !important;
  font-weight: 600 !important;
}

body.dark-theme .bc-current {
  color: #f1f5f9 !important;
}


/* --- Clean Tab View State Management --- */
.tab-view {
  display: none !important;
}

.tab-view.active {
  display: block !important;
}

/* UK GO2 BRAND BADGE & PORTAL */
.brand-badge-ukgo2 {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: #00247D;
  background: #eff6ff;
  font-weight: 800;
  border: 1.5px solid #00247D;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 36, 125, 0.08);
  font-family: var(--font-heading, 'Outfit', sans-serif);
}
.brand-badge-ukgo2:hover {
  background: #00247D;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 36, 125, 0.25);
  transform: translateY(-1px);
}
.brand-badge-ukgo2:active {
  transform: translateY(0);
}
.ukgo2-card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.ukgo2-card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 36, 125, 0.12);
  border-color: #00247D;
}
