/* =============================================
   CERTPREP — MAIN STYLESHEET
   ============================================= */

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

/* --- CONTENT PROTECTION (protect.js) --- */
.ww-no-select .test-container,
.ww-no-select .question-text,
.ww-no-select .options-list,
.ww-no-select .review-list,
.ww-no-select .review-item,
.ww-no-select .practice-explanation,
.ww-no-select .case-study-panel,
.ww-no-select .domain-breakdown {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
/* Keep buttons and interactive elements clickable */
.ww-no-select button,
.ww-no-select a,
.ww-no-select input,
.ww-no-select textarea { -webkit-user-select: auto; user-select: auto; }
/* Watermark prints too — important for print-to-PDF deterrence */
@media print { #ww-watermark { display: block !important; opacity: 0.1; } }

:root {
  --blue:       #0078d4;
  --blue-dark:  #005a9e;
  --blue-light: #e8f4ff;
  --green:      #107c10;
  --green-bg:   #dff6dd;
  --red:        #a4262c;
  --red-bg:     #fde7e9;
  --gray-50:    #f9f9f9;
  --gray-100:   #f3f3f3;
  --gray-200:   #e8e8e8;
  --gray-400:   #999;
  --gray-600:   #555;
  --gray-800:   #222;
  --white:      #ffffff;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,.1);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.12);
  --radius:     10px;
  --radius-sm:  6px;
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
}

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

/* --- LAYOUT --- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

.section { padding: 4rem 0; }
.section-alt { background: var(--gray-50); }

.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header h2 { font-size: 2rem; font-weight: 700; margin-bottom: .5rem; }
.section-header p { color: var(--gray-600); font-size: 1.05rem; }

/* --- NAVBAR --- */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: .4rem;
  text-decoration: none;
}

.logo-icon { color: var(--blue); font-size: 1rem; }

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

.nav-link {
  font-size: .95rem;
  color: var(--gray-600);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-link:hover, .nav-link.active { color: var(--blue); text-decoration: none; }

#auth-btn {
  background: var(--blue);
  color: var(--white);
  padding: .4rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: background var(--transition);
}

#auth-btn:hover { background: var(--blue-dark); text-decoration: none; }

/* Hamburger toggle (hidden on desktop) */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.nav-hamburger:hover { background: var(--gray-100); }

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gray-800);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

/* Animate to X when open */
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
@media (max-width: 768px) {
  .nav-hamburger { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: .25rem;
    z-index: 99;
  }

  .nav-links.open { display: flex; }

  .nav-link {
    display: block;
    padding: .65rem 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--gray-100);
  }
  .nav-link:last-child { border-bottom: none; }

  #auth-btn {
    display: block;
    text-align: center;
    margin-top: .5rem;
    padding: .6rem 1rem;
  }

  /* Keep navbar position relative for the dropdown */
  .navbar { position: sticky; }
  .nav-inner { position: relative; }
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .6rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); color: var(--white); text-decoration: none; }

.btn-secondary {
  background: var(--white);
  color: var(--blue);
  border: 2px solid var(--blue);
}
.btn-secondary:hover { background: var(--blue-light); text-decoration: none; }

.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { background: #7a1d21; }

.btn-lg { padding: .8rem 2rem; font-size: 1.05rem; }
.btn-block { width: 100%; justify-content: center; margin-top: 1rem; }

/* --- HERO --- */
.hero {
  background: linear-gradient(135deg, #0078d4 0%, #005a9e 60%, #003a6c 100%);
  color: var(--white);
  padding: 5rem 1.5rem;
  text-align: center;
}

.hero-inner { max-width: 760px; margin: 0 auto; }

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  color: var(--white);
  padding: .3rem .9rem;
  border-radius: 99px;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .03em;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.2rem;
}

.hero-sub {
  font-size: 1.1rem;
  opacity: .9;
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

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

.hero .btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.6);
}

.hero .btn-secondary:hover { background: rgba(255,255,255,.1); }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,.2);
  padding-top: 2rem;
}

.stat { display: flex; flex-direction: column; align-items: center; }
.stat-num { font-size: 2rem; font-weight: 800; }
.stat-label { font-size: .85rem; opacity: .8; }

/* --- CERT CARDS --- */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.cert-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: .75rem;
  transition: box-shadow var(--transition), transform var(--transition);
}

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

.cert-vendor {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--blue);
}

.cert-card h3 { font-size: 1.1rem; font-weight: 700; line-height: 1.3; }

.cert-card p { font-size: .9rem; color: var(--gray-600); line-height: 1.6; flex: 1; }

.cert-meta {
  display: flex;
  gap: 1rem;
  font-size: .85rem;
  color: var(--gray-600);
  flex-wrap: wrap;
}

.cert-meta span { display: flex; align-items: center; gap: .3rem; }

.cert-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: .75rem;
  border-top: 1px solid var(--gray-100);
  margin-top: .5rem;
}

.cert-price { font-size: 1.3rem; font-weight: 800; color: var(--gray-800); }
.cert-price small { font-size: .75rem; color: var(--gray-400); font-weight: 400; display: block; }

/* --- HOW IT WORKS --- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem;
}

.step { text-align: center; padding: 1rem; }

.step-num {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--blue);
  opacity: .2;
  line-height: 1;
  margin-bottom: .5rem;
}

.step h3 { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.step p { font-size: .9rem; color: var(--gray-600); }

/* --- FOOTER --- */
.footer {
  background: var(--gray-800);
  color: var(--gray-400);
  padding: 2rem 0;
}

.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }

.footer .nav-logo { color: var(--white); }
.footer .logo-icon { color: var(--blue); }
.footer-copy { font-size: .85rem; }
.footer-copy a { color: var(--gray-400); text-decoration: none; }
.footer-copy a:hover { color: var(--white); text-decoration: underline; }

/* --- PAGE HEADER --- */
.page-header {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  padding: 2.5rem 0;
}

.page-header h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: .3rem; }
.page-header p { color: var(--gray-600); }

/* --- DASHBOARD STATS --- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-card-num { font-size: 2.2rem; font-weight: 800; color: var(--blue); }
.stat-card-label { font-size: .85rem; color: var(--gray-600); margin-top: .2rem; }

/* --- EMPTY STATE --- */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h2 { font-size: 1.4rem; margin-bottom: .5rem; }
.empty-state p { color: var(--gray-600); margin-bottom: 1.5rem; }

/* --- LOADING --- */
.loading-spinner { color: var(--gray-400); font-style: italic; padding: 2rem; text-align: center; }

/* =============================================
   TEST PAGE
   ============================================= */

.test-body { background: var(--gray-100); }

.test-navbar {
  background: var(--gray-800);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
}

.test-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.test-navbar .nav-logo { color: var(--white); }

.test-meta { font-size: .9rem; color: rgba(255,255,255,.7); }

.test-timer {
  font-size: 1.1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--white);
  background: rgba(255,255,255,.1);
  padding: .3rem .8rem;
  border-radius: var(--radius-sm);
}

.test-timer.warning { color: #ffd700; }
.test-timer.danger { color: #ff6b6b; animation: pulse 1s infinite; }

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

/* --- PROGRESS BAR --- */
.progress-bar-outer {
  height: 4px;
  background: var(--gray-200);
  position: sticky;
  top: 56px;
  z-index: 99;
}

.progress-bar-inner {
  height: 100%;
  background: var(--blue);
  transition: width .4s ease;
  width: 0%;
}

/* --- TEST LAYOUT --- */
.test-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem 4rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

#question-screen {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 1.5rem;
  align-items: start;
}

.question-main {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  min-width: 0;
}

@media (max-width: 768px) {
  #question-screen {
    grid-template-columns: 1fr;
  }
}

/* --- TEST CARD --- */
.test-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

/* --- INTRO --- */
.test-info-grid {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--blue-light);
  border-radius: var(--radius-sm);
}

.test-info-item { display: flex; align-items: center; gap: .5rem; font-size: .95rem; }
.test-info-icon { font-size: 1.2rem; }

.intro-note {
  color: var(--gray-600);
  font-size: .9rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

/* --- QUESTION --- */
.question-counter {
  font-size: .85rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.question-text {
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  color: var(--gray-800);
}

/* --- OPTIONS --- */
.options-list { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1.5rem; }

.option {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .9rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--white);
  text-align: left;
  width: 100%;
  font-size: .95rem;
  line-height: 1.5;
  color: var(--gray-800);
}

.option:hover { border-color: var(--blue); background: var(--blue-light); }
.option.selected { border-color: var(--blue); background: var(--blue-light); font-weight: 600; }
.option.correct { border-color: var(--green); background: var(--green-bg); }
.option.incorrect { border-color: var(--red); background: var(--red-bg); }

.option-letter {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: var(--gray-100);
  border: 2px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
}

.option.selected .option-letter { background: var(--blue); border-color: var(--blue); color: var(--white); }
.option.correct .option-letter { background: var(--green); border-color: var(--green); color: var(--white); }
.option.incorrect .option-letter { background: var(--red); border-color: var(--red); color: var(--white); }

/* --- QUESTION NAV --- */
.question-nav { display: flex; justify-content: space-between; }

/* --- QUESTION MAP --- */
.question-map-wrap {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 80px;
}

.question-map-wrap h4 { font-size: .85rem; font-weight: 700; margin-bottom: .75rem; color: var(--gray-600); text-transform: uppercase; letter-spacing: .04em; }

.question-map {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .3rem;
  margin-bottom: .75rem;
}

.map-dot {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: var(--gray-200);
  border: none;
  cursor: pointer;
  font-size: .75rem;
  font-weight: 600;
  color: var(--gray-600);
  transition: all var(--transition);
}

.map-dot:hover { background: var(--blue-light); color: var(--blue); }
.map-dot.answered { background: var(--blue); color: var(--white); }
.map-dot.current { background: var(--gray-800); color: var(--white); }

.map-legend { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .75rem; font-size: .8rem; color: var(--gray-600); }
.legend-item { display: flex; align-items: center; gap: .4rem; }

.legend-dot {
  width: 12px; height: 12px;
  border-radius: 3px;
}

.legend-dot.answered { background: var(--blue); }
.legend-dot.current { background: var(--gray-800); }
.legend-dot.unanswered { background: var(--gray-200); border: 1px solid var(--gray-400); }

/* --- RESULTS --- */
.results-card { text-align: center; padding: 1.25rem 1.5rem; }

.result-badge {
  display: inline-block;
  padding: .3rem 1rem;
  border-radius: 99px;
  font-weight: 700;
  font-size: .8rem;
  margin-bottom: .6rem;
}

.result-badge.pass { background: var(--green-bg); color: var(--green); }
.result-badge.fail { background: var(--red-bg); color: var(--red); }

.results-card h1 { font-size: 1.2rem; margin-bottom: .5rem; }

.score-display {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: center;
  gap: .4rem;
  margin: .75rem 0;
}

.score-pct { font-size: 2.6rem; font-weight: 900; color: var(--blue); line-height: 1; }
.score-label { font-size: .85rem; color: var(--gray-600); }

/* --- DOMAIN BREAKDOWN --- */
.domain-breakdown {
  margin: 1rem 0 .25rem;
  text-align: left;
}

.domain-breakdown-title {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-600);
  margin-bottom: .6rem;
}

.domain-row {
  margin-bottom: .65rem;
}

.domain-row-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .35rem;
  flex-wrap: wrap;
  gap: .25rem;
}

.domain-label {
  font-size: .9rem;
  font-weight: 600;
  color: var(--gray-800);
}

.domain-meta {
  font-size: .75rem;
  color: var(--gray-400);
}

.domain-bar-bg {
  height: 10px;
  background: var(--gray-100);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: .25rem;
}

.domain-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .6s ease;
}

.domain-pct {
  font-size: .82rem;
  font-weight: 700;
  text-align: right;
}

.result-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }

/* --- REVIEW SECTION --- */
.review-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--gray-200);
}

.review-item.correct-answer { border-left-color: var(--green); }
.review-item.wrong-answer { border-left-color: var(--red); }

.review-q-num { font-size: .8rem; font-weight: 700; color: var(--gray-400); text-transform: uppercase; margin-bottom: .4rem; }
.review-q-text { font-weight: 500; margin-bottom: .75rem; }

.review-your-answer { font-size: .9rem; margin-bottom: .3rem; }
.review-correct-answer { font-size: .9rem; color: var(--green); font-weight: 600; margin-bottom: .5rem; }
.review-explanation {
  font-size: .88rem;
  color: var(--gray-600);
  background: var(--gray-50);
  padding: .75rem;
  border-radius: var(--radius-sm);
  line-height: 1.6;
}

/* =============================================
   AZ-104 RESOURCES SECTION
   ============================================= */

.az104-section { background: var(--white); }

.section-eyebrow {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--blue);
  margin-bottom: .4rem;
}

/* 3-column grid for test cards */
.az104-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

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

/* Individual test card */
.az104-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

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

.az104-card-num {
  background: var(--blue);
  color: var(--white);
  font-size: 1.6rem;
  font-weight: 900;
  padding: 1rem 1.5rem .75rem;
  line-height: 1;
  opacity: .9;
}

.az104-card-body {
  padding: 1.25rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.az104-vendor {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--blue);
}

.az104-card-body h3 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.az104-card-body p {
  font-size: .875rem;
  color: var(--gray-600);
  line-height: 1.6;
  flex: 1;
}

.az104-card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Buy button */
.btn-buy {
  background: var(--blue);
  color: var(--white);
  padding: .55rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: background var(--transition);
}

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

/* Open button (purchased state) */
.btn-open {
  background: var(--green-bg);
  color: var(--green);
  border: 2px solid var(--green);
  padding: .5rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 700;
  transition: background var(--transition);
  text-decoration: none;
}

.btn-open:hover { background: #c9f0c9; text-decoration: none; }

/* Free sample card styling */
.az104-card-num.free-header {
  background: var(--green);
  font-size: 1.1rem;
  letter-spacing: .05em;
}
.btn-free {
  background: var(--green);
  color: var(--white);
  padding: .55rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: background var(--transition);
  text-decoration: none;
}
.btn-free:hover { background: #0a5e0a; text-decoration: none; }

/* ── Features Grid ──────────────────────────────── */

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.feature-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  font-size: 1.75rem;
  margin-bottom: .75rem;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: .5rem;
}

.feature-card p {
  font-size: .88rem;
  color: var(--gray-600);
  line-height: 1.6;
}

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

/* ── SEO Content Block ──────────────────────────── */

.seo-content {
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

.seo-content p {
  font-size: .95rem;
  line-height: 1.7;
  color: var(--gray-700);
  margin-bottom: 1rem;
}

.seo-content p:last-child { margin-bottom: 0; }

/* ── Domain Overview List ───────────────────────── */

.domains-overview {
  max-width: 720px;
  margin: 0 auto;
}

.domains-overview h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 1rem;
}

.domain-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.domain-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
}

.domain-item-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.domain-item strong {
  display: block;
  font-size: .93rem;
  color: var(--gray-800);
  margin-bottom: .25rem;
}

.domain-item p {
  font-size: .85rem;
  color: var(--gray-600);
  line-height: 1.55;
  margin: 0;
}

/* ── FAQ ────────────────────────────────────────── */

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.faq-item {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}

.faq-item[open] { border-color: var(--blue); }

.faq-question {
  padding: 1rem 1.25rem;
  font-size: .95rem;
  font-weight: 600;
  color: var(--gray-800);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-question::-webkit-details-marker { display: none; }
.faq-question::marker { display: none; content: ''; }

.faq-question::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--gray-400);
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item[open] .faq-question::after {
  content: '\2212';
  color: var(--blue);
}

.faq-answer {
  padding: 0 1.25rem 1rem;
  font-size: .9rem;
  line-height: 1.65;
  color: var(--gray-600);
  margin: 0;
}

/* ── Flashcard Page ──────────────────────────────── */

/* =============================================
   FLASHCARDS — SRS-powered study system
   ============================================= */

.fc-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}
.fc-header { text-align: center; margin-bottom: 24px; }
.fc-header h1 { color: var(--gray-800); font-size: 28px; margin-bottom: 8px; }
.fc-subtitle { color: var(--gray-600); font-size: 15px; }

/* Mode tabs (Study / Browse) */
.fc-mode-tabs {
  display: flex; justify-content: center; gap: 8px; margin-bottom: 16px;
}
.fc-mode-tab {
  padding: 8px 20px; border-radius: 8px; border: 2px solid var(--gray-200);
  background: var(--white); color: var(--gray-600); font-size: 14px;
  font-weight: 600; cursor: pointer; transition: all var(--transition);
}
.fc-mode-tab:hover { border-color: var(--blue); color: var(--blue); }
.fc-mode-tab.active {
  background: var(--blue); color: var(--white); border-color: var(--blue);
}

/* Due badge */
.fc-due-badge {
  text-align: center; font-size: 14px; font-weight: 600;
  color: var(--blue); margin-bottom: 16px;
}
.fc-due-badge.fc-due-done { color: #0a6d3f; }

/* Domain filter tabs */
.fc-tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; margin-bottom: 20px;
}
.fc-tab {
  padding: 6px 14px; border-radius: 20px; border: 1.5px solid var(--gray-200);
  background: var(--white); color: var(--gray-600); font-size: 13px;
  font-weight: 600; cursor: pointer; transition: all var(--transition);
}
.fc-tab:hover { border-color: var(--blue); color: var(--blue); }
.fc-tab.active { background: var(--blue); color: var(--white); border-color: var(--blue); }

/* Progress */
.fc-progress-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 24px;
  font-size: 13px; color: var(--gray-600);
}
.fc-counter { white-space: nowrap; min-width: 90px; }
.fc-progress-bar {
  flex: 1; height: 6px; background: var(--gray-200);
  border-radius: 3px; overflow: hidden;
}
.fc-progress-fill {
  height: 100%; background: var(--blue); border-radius: 3px;
  transition: width 0.3s ease;
}

/* Card area layout */
.fc-card-area {
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  justify-content: center; margin-bottom: 24px;
  min-height: 320px;
}

/* Card status badge (New / Review) */
.fc-card-status {
  display: inline-block; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 10px; border-radius: 10px; margin-bottom: 8px;
}
.fc-status-new { background: #e8f5ee; color: #0a6d3f; }
.fc-status-review { background: #fff3e0; color: #b45309; }

/* Flip card container */
.fc-card-wrapper {
  width: 100%; max-width: 560px;
  perspective: 1000px; cursor: pointer;
  position: relative; text-align: center;
}
.fc-card {
  position: relative; width: 100%; min-height: 280px;
  transition: transform 0.5s ease;
  transform-style: preserve-3d;
  height: auto;
}
.fc-card.flipped { transform: rotateY(180deg); }

.fc-card-front, .fc-card-back {
  position: relative; width: 100%; min-height: 280px;
  backface-visibility: hidden;
  border-radius: var(--radius); padding: 32px 28px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; gap: 16px;
  box-shadow: var(--shadow-md);
}
.fc-card-front {
  background: var(--white); border: 2px solid var(--gray-200);
}
.fc-card-back {
  background: var(--blue-light); border: 2px solid var(--blue);
  transform: rotateY(180deg);
  position: absolute; top: 0; left: 0;
}

.fc-domain-badge {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--blue); background: var(--blue-light);
  padding: 3px 10px; border-radius: 10px;
}
.fc-card-back .fc-domain-badge {
  background: var(--white); color: var(--blue);
}

.fc-card-text {
  font-size: 16px; line-height: 1.6; color: var(--gray-800);
}

.fc-flip-hint {
  font-size: 12px; color: var(--gray-400); margin-top: auto;
}

/* Flip prompt (study mode) */
.fc-flip-prompt {
  font-size: 13px; color: var(--gray-400); text-align: center;
}
.fc-flip-prompt kbd {
  display: inline-block; padding: 2px 7px; border-radius: 4px;
  background: var(--gray-100); border: 1px solid var(--gray-200);
  font-family: inherit; font-size: 12px; color: var(--gray-600);
}

/* Grading buttons (study mode) */
.fc-grading {
  display: flex; justify-content: center; gap: 12px; flex-wrap: wrap;
}
.fc-grade-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px; border-radius: 8px; border: 2px solid var(--gray-200);
  background: var(--white); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
}
.fc-grade-key {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 4px;
  background: var(--gray-100); border: 1px solid var(--gray-200);
  font-size: 11px; font-weight: 700; color: var(--gray-500);
}
.fc-btn-again { color: #dc2626; }
.fc-btn-again:hover { border-color: #dc2626; background: #fef2f2; }
.fc-btn-good { color: var(--blue); }
.fc-btn-good:hover { border-color: var(--blue); background: var(--blue-light); }
.fc-btn-easy { color: #0a6d3f; }
.fc-btn-easy:hover { border-color: #0a6d3f; background: #e8f5ee; }

/* Browse navigation */
.fc-browse-nav {
  display: flex; justify-content: center; gap: 12px;
}
.fc-nav-btn {
  padding: 10px 20px; border-radius: 8px; border: 2px solid var(--gray-200);
  background: var(--white); font-size: 14px; font-weight: 600;
  cursor: pointer; color: var(--gray-600);
  transition: all var(--transition); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.fc-nav-btn:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-light); }

/* Browse action buttons */
.fc-browse-actions {
  display: flex; justify-content: center; gap: 12px; flex-wrap: wrap;
}
.fc-action-btn { font-size: 14px; }

/* Session complete screen */
.fc-complete-card {
  text-align: center; padding: 40px 24px;
  background: var(--white); border-radius: var(--radius);
  border: 2px solid var(--gray-200); box-shadow: var(--shadow-md);
}
.fc-complete-icon { font-size: 48px; margin-bottom: 12px; }
.fc-complete-card h2 {
  font-size: 22px; color: var(--gray-800); margin-bottom: 20px;
}
.fc-complete-stats {
  display: flex; justify-content: center; gap: 24px;
  flex-wrap: wrap; margin-bottom: 20px;
}
.fc-stat-item {
  font-size: 15px; font-weight: 600; padding: 6px 14px;
  border-radius: 8px;
}
.fc-stat-easy { background: #e8f5ee; color: #0a6d3f; }
.fc-stat-good { background: #e0f0ff; color: var(--blue); }
.fc-stat-again { background: #fef2f2; color: #dc2626; }
.fc-complete-next {
  font-size: 14px; color: var(--gray-600); margin-bottom: 20px;
}

/* Mastery panel */
.fc-mastery {
  margin-top: 32px; padding: 24px;
  background: var(--white); border-radius: var(--radius);
  border: 1.5px solid var(--gray-200); box-shadow: var(--shadow-sm);
}
.fc-mastery-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap; gap: 8px;
}
.fc-mastery-title {
  font-size: 16px; font-weight: 700; color: var(--gray-800);
}
.fc-mastery-overall {
  font-size: 13px; color: var(--gray-500); font-weight: 600;
}
.fc-mastery-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
}
.fc-mastery-label {
  font-size: 13px; font-weight: 600; color: var(--gray-600);
  min-width: 160px; white-space: nowrap;
}
.fc-mastery-bar-bg {
  flex: 1; height: 8px; background: var(--gray-100);
  border-radius: 4px; overflow: hidden;
}
.fc-mastery-bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--blue), #818cf8);
  border-radius: 4px; transition: width 0.4s ease;
}
.fc-mastery-pct {
  font-size: 12px; font-weight: 700; color: var(--gray-500);
  min-width: 42px; text-align: right;
}

/* Responsive */
@media (max-width: 640px) {
  .fc-card-area { gap: 12px; }
  .fc-nav-btn { padding: 8px 14px; font-size: 13px; }
  .fc-card-front, .fc-card-back { padding: 24px 20px; min-height: 240px; }
  .fc-card-text { font-size: 15px; }
  .fc-tabs { gap: 6px; }
  .fc-tab { font-size: 12px; padding: 5px 10px; }
  .fc-mastery-label { min-width: 100px; font-size: 11px; }
  .fc-grade-btn { padding: 8px 14px; font-size: 13px; }
  .fc-complete-stats { gap: 12px; }
}

/* ── Bundle Card ─────────────────────────────── */

.bundle-card {
  background: linear-gradient(135deg, #0078d4 0%, #005a9e 100%);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.bundle-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.bundle-left { flex: 1; min-width: 240px; }

.bundle-badge {
  display: inline-block;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.35);
  color: var(--white);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .2rem .7rem;
  border-radius: 99px;
  margin-bottom: .75rem;
}

.bundle-left h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: .4rem;
}

.bundle-left p {
  opacity: .85;
  font-size: .9rem;
  margin-bottom: .75rem;
}

.bundle-includes {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  font-size: .85rem;
  opacity: .8;
}

.bundle-right {
  text-align: center;
  min-width: 200px;
}

.bundle-price {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: .3rem;
}

.bundle-save {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  background: rgba(255,255,255,.25);
  padding: .15rem .5rem;
  border-radius: 99px;
  vertical-align: middle;
  margin-left: .3rem;
}

.bundle-was {
  font-size: .8rem;
  opacity: .65;
  margin-bottom: 1rem;
  text-decoration: line-through;
}

.bundle-buy-btn {
  background: var(--white);
  color: var(--blue-dark);
  border: none;
  white-space: nowrap;
}

.bundle-buy-btn:hover { background: var(--blue-light); color: var(--blue-dark); }

.bundle-owned {
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.15);
  padding: .5rem 1rem;
  border-radius: var(--radius-sm);
  display: inline-block;
}

/* =============================================
   AUTH MODAL
   ============================================= */

body.modal-open { overflow: hidden; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.modal-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  padding: 2rem;
  position: relative;
  transform: translateY(-16px);
  transition: transform .2s ease;
}

.modal-overlay.visible .modal { transform: translateY(0); }

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--gray-400);
  cursor: pointer;
  line-height: 1;
  padding: .2rem .4rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.modal-close:hover { color: var(--gray-800); background: var(--gray-100); }

.modal-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.modal-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: .4rem;
}

.modal-logo .logo-icon { color: var(--blue); }


/* --- Modal tabs --- */
.modal-tabs {
  display: flex;
  border-bottom: 2px solid var(--gray-200);
  margin: 0 -2rem 1.5rem;
  padding: 0 2rem;
}

.modal-tab {
  flex: 1;
  background: none;
  border: none;
  padding: .65rem 0;
  font-size: .95rem;
  font-weight: 500;
  color: var(--gray-400);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition);
}

.modal-tab.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.modal-tab:hover:not(.active) { color: var(--gray-600); }

/* --- Modal panels --- */
.modal-panel { display: block; }
.modal-panel.hidden { display: none; }

/* Generic utility class. Used on any element that needs to be initially
   hidden and toggled via JS (e.g. modal-success, reset-success). */
.hidden { display: none !important; }

/* --- Forms inside modal --- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-bottom: 1rem;
}

.form-group label {
  font-size: .88rem;
  font-weight: 600;
  color: var(--gray-800);
}

.form-hint {
  font-weight: 400;
  color: var(--gray-400);
  font-size: .82rem;
}

.form-group input {
  padding: .6rem .85rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-family: inherit;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

.form-group input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 120, 212, .12);
}

.modal-error {
  font-size: .82rem;
  color: var(--red);
  min-height: 1.2em;
  margin-bottom: .5rem;
}

.modal-success {
  font-size: .9rem;
  color: #0a6d3f;
  background: #e8f5ee;
  border: 1px solid #b7dcc5;
  border-radius: 6px;
  padding: .75rem .9rem;
  margin: 0 0 .75rem 0;
  line-height: 1.4;
}

.modal-lede {
  font-size: .9rem;
  color: var(--gray-600);
  line-height: 1.5;
  margin: 0 0 1rem 0;
}

.modal-footer-link {
  text-align: center;
  margin: .85rem 0 0 0;
  font-size: .85rem;
}

.modal-footer-link a {
  color: var(--blue);
  text-decoration: none;
}

.modal-footer-link a:hover {
  text-decoration: underline;
}

/* Small inline feedback line (e.g. "verification email sent" under resend link).
   Empty-by-default; text gets filled in by JS. */
.modal-success-inline {
  font-size: .8rem;
  color: #0a6d3f;
  text-align: center;
  margin: .25rem 0 .5rem 0;
  min-height: 1em;
}

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
  .hero-stats { gap: 1.5rem; }
  .test-nav-inner { gap: .5rem; }
  .test-meta { display: none; }
  .result-actions { flex-direction: column; }
}

/* --- COMPREHENSIVE MOBILE PASS --- */
@media (max-width: 768px) {
  /* Hero */
  .hero { padding: 3rem 1.25rem; }
  .hero-title { font-size: 1.75rem; }
  .hero-sub { font-size: .95rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 280px; justify-content: center; }
  .hero-stats { gap: 2rem; }
  .stat-num { font-size: 1.6rem; }

  /* Section headers */
  .section { padding: 2.5rem 0; }
  .section-header h2 { font-size: 1.5rem; }
  .section-header p { font-size: .9rem; }

  /* Cert cards grid */
  .cert-grid { grid-template-columns: 1fr; }
  .az104-grid { grid-template-columns: 1fr !important; }

  /* Steps grid */
  .steps-grid { grid-template-columns: 1fr; gap: 1.5rem; }

  /* Stats row */
  .stats-row { flex-direction: column; gap: .75rem; }
  .stat-card { flex: none; width: 100%; }

  /* Bundle card */
  .bundle-inner { flex-direction: column; text-align: center; }
  .bundle-left { min-width: auto; }
  .bundle-right { min-width: auto; width: 100%; }
  .bundle-includes { align-items: center; }

  /* Domain overview items */
  .domain-item { flex-direction: column; gap: .5rem; }
  .domain-item-icon { margin-top: 0; }

  /* FAQ */
  .faq-question { font-size: .9rem; padding: .85rem 1rem; }
  .faq-answer { padding: 0 1rem .85rem; font-size: .85rem; }

  /* SEO content */
  .seo-content p { font-size: .88rem; }

  /* Page header */
  .page-header { padding: 1.5rem; }
  .page-header h1 { font-size: 1.5rem; }
}

/* =============================================
   PRACTICE MODE
   ============================================= */

/* Intro screen: two-button group */
.intro-btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* Practice Mode button (teal/green accent) */
.btn-practice {
  background: #0e7a6e;
  color: var(--white);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.btn-practice:hover { background: #0a5f55; color: var(--white); text-decoration: none; }

/* Small hint below the buttons */
.practice-note {
  text-align: center;
  margin-top: .65rem;
  font-size: .85rem;
  color: var(--gray-400);
}

/* Practice Mode badge in test navbar (replaces timer) */
.practice-badge {
  background: #0e7a6e;
  color: var(--white);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: .35rem .85rem;
  border-radius: 999px;
  align-items: center;
  gap: .4rem;
}

/* Show Answer button inside question */
.btn-show-answer {
  display: block;
  margin-top: 1.25rem;
  background: #fff8e1;
  color: #7c5c00;
  border: 1.5px solid #f0c040;
  border-radius: var(--radius-sm);
  padding: .6rem 1.2rem;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.btn-show-answer:hover { background: #fff3c0; border-color: #d4a800; }

/* Correct answer highlight in practice mode */
.option.practice-correct {
  border-color: #107c10;
  background: #dff6dd;
  color: #0a5c0a;
  cursor: default;
}
.option.practice-correct .option-letter {
  background: #107c10;
  color: var(--white);
}

/* Wrong selection highlight in practice mode */
.option.practice-wrong {
  border-color: var(--red);
  background: var(--red-bg);
  color: var(--red);
  cursor: default;
}
.option.practice-wrong .option-letter {
  background: var(--red);
  color: var(--white);
}

/* Explanation box revealed after Show Answer */
.practice-explanation {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: #f0f7ff;
  border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .93rem;
  line-height: 1.6;
  color: var(--gray-800);
}
.explanation-label {
  font-weight: 700;
  margin-bottom: .6rem;
  color: var(--blue);
  font-size: .9rem;
  letter-spacing: .03em;
}
.expl-main {
  margin: 0 0 .85rem 0;
}
.expl-wrong-section {
  border-top: 1px solid #c8dff8;
  padding-top: .75rem;
  margin-top: .25rem;
}
.expl-wrong-title {
  font-weight: 600;
  font-size: .83rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-500);
  margin: 0 0 .55rem 0;
}
.expl-wrong-item {
  display: flex;
  gap: .6rem;
  align-items: baseline;
  margin-bottom: .45rem;
  font-size: .91rem;
  line-height: 1.5;
}
.expl-wrong-item:last-child {
  margin-bottom: 0;
}
.expl-wrong-letter {
  flex-shrink: 0;
  font-weight: 700;
  color: #c0392b;
  background: #fdecea;
  border-radius: 4px;
  padding: .05rem .35rem;
  font-size: .82rem;
  letter-spacing: .03em;
}
.expl-wrong-text {
  color: var(--gray-700);
}

/* =============================================
   CASE STUDY SCENARIO PANEL
   ============================================= */

.case-study-panel {
  background: #fffbf0;
  border: 1.5px solid #f0c040;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
}

.cs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1.1rem;
  background: #fff8dc;
  border-bottom: 1px solid #f0d060;
  gap: 1rem;
  flex-wrap: wrap;
}

.cs-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}

.cs-title {
  font-weight: 700;
  font-size: .95rem;
  color: #7c5c00;
}

.cs-part {
  font-size: .78rem;
  font-weight: 600;
  color: #a07800;
  background: #ffeea0;
  padding: .15rem .55rem;
  border-radius: 999px;
  white-space: nowrap;
}

.cs-toggle {
  background: none;
  border: 1px solid #d4a800;
  border-radius: var(--radius-sm);
  color: #7c5c00;
  font-size: .78rem;
  font-weight: 600;
  padding: .25rem .7rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition);
}
.cs-toggle:hover { background: #ffeea0; }

.cs-body {
  padding: 1rem 1.25rem;
}

/* Scenario formatted output */
.cs-scenario {
  font-size: .88rem;
  line-height: 1.65;
  color: var(--gray-800);
}

.cs-scenario .cs-section-label {
  font-weight: 700;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #8a6800;
  margin: .75rem 0 .25rem;
}

.cs-scenario .cs-body {
  margin-bottom: .4rem;
  padding: 0;
}

.cs-scenario .cs-bullet,
.cs-scenario .cs-numbered {
  display: list-item;
  margin-left: 1.4rem;
  margin-bottom: .2rem;
  padding: 0;
}

.cs-scenario .cs-bullet { list-style-type: disc; }
.cs-scenario .cs-numbered { list-style-type: decimal; }


/* =============================================
   DOMAIN FOCUS UPSELL (inline section)
   ============================================= */

.domain-upsell-section {
  margin-top: 1.5rem;
  animation: fadeSlideUp .35s ease;
}

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

.upsell-inline-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--blue);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 640px) {
  .upsell-inline-card { grid-template-columns: 1fr; gap: 1.25rem; }
}

/* Left column */
.upsell-inline-left { display: flex; flex-direction: column; gap: .6rem; }

.upsell-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(239, 68, 68, .08);
  border: 1px solid rgba(239, 68, 68, .25);
  color: #ef4444;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .25rem .65rem;
  border-radius: 999px;
  width: fit-content;
}
.upsell-badge-icon { font-size: .9rem; }

.upsell-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
  line-height: 1.3;
}
.upsell-domain-highlight { color: var(--blue); }

.upsell-subtitle {
  color: var(--gray-600);
  font-size: .875rem;
  margin: 0;
}

.upsell-features {
  list-style: none;
  margin: .25rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.upsell-features li {
  font-size: .82rem;
  color: var(--gray-600);
}

/* Right column */
.upsell-inline-right {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.upsell-product-name {
  font-size: .95rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.3;
}
.upsell-product-meta {
  font-size: .78rem;
  color: var(--gray-400);
}
.upsell-product-desc {
  font-size: .82rem;
  color: var(--gray-500);
  line-height: 1.5;
  margin: 0;
}
.upsell-buy-btn {
  width: 100%;
  margin-top: .25rem;
}

.upsell-owned-msg {
  font-size: .9rem;
  font-weight: 600;
  color: var(--green);
  margin-bottom: .5rem;
}

/* =============================================
   DOMAIN TEST CARDS (Dashboard)
   ============================================= */

.domain-test-card {
  border-color: rgba(59, 130, 246, .3);
  position: relative;
  overflow: hidden;
}

.domain-test-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), #818cf8);
}

.domain-test-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: rgba(59, 130, 246, .12);
  border: 1px solid rgba(59, 130, 246, .25);
  color: var(--blue);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .25rem .65rem;
  border-radius: 999px;
  margin-bottom: .75rem;
}

/* Dashboard section sub-heading */
.section-subheading {
  color: var(--gray-400);
  font-size: .9rem;
  margin-top: .25rem;
}
