[hidden] { display: none !important; }

/* Simple, clean styling (no frameworks) */
:root {
  --bg: #0b1220;
  --card: #101a33;
  --text: #e9eefc;
  --muted: #a7b4d6;
  --border: rgba(255,255,255,0.10);
  --primary: #4f7cff;
  --danger: #ff4f63;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(1200px 800px at 20% 0%, #152652 0%, var(--bg) 60%);
  color: var(--text);
  line-height: 1.45;
}

code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.15);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 5;
}

/* Trial/Student view uses the full hero card without a sticky top bar */
body.student-mode .topbar { display: none; }
.brand { font-weight: 700; letter-spacing: .2px; }
.container { max-width: 1400px; margin: 22px auto; padding: 0 16px; }

.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}

h1 { margin: 0 0 10px; font-size: 24px; }
h2 { margin: 18px 0 10px; font-size: 18px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
  margin: 14px 0;
}
@media (max-width: 820px) {
  .grid { grid-template-columns: 1fr; }
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 13px; color: var(--muted); }
.field small { font-size: 12px; }
.field input, .field select {
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  outline: none;
}
.field input:focus, .field select:focus { border-color: rgba(79,124,255,0.7); }

.field.compact { width: 160px; }

#resultsTopBar {
  margin-bottom: 14px; /* space below the button row */
}

.row { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }

.spacer { flex: 1; }

button {
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
}
button.primary { background: rgba(79,124,255,0.22); border-color: rgba(79,124,255,0.65); }
button.danger  { background: rgba(255,79,99,0.18); border-color: rgba(255,79,99,0.6); }
button.ghost   { background: rgba(0,0,0,0.10); }

button.warn {
  background: rgba(255, 215, 0, 0.14);
  border-color: rgba(255, 215, 0, 0.55);
  color: rgba(255, 215, 0, 0.95);
}
button.warn:hover {
  background: rgba(255, 215, 0, 0.18);
  border-color: rgba(255, 215, 0, 0.70);
}

.notice {
  margin-top: 12px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.20);
  padding: 12px;
  border-radius: 10px;
}

/* Results: Breakdown title bigger + divider */
.breakdownNotice strong {
  display: block;                 /* makes the divider span full width */
  font-size: 22px;                /* adjust size here */
  font-weight: 800;
  color: #fff;                    /* white */

  padding-bottom: 10px;           /* space above divider */
  margin-bottom: 10px;            /* space below divider */
  border-bottom: 1px solid var(--border); /* subtle divider */
}

.examHeader {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.kicker {
  font-size: clamp(16px, 2.2vw, 22px);
  font-weight: 700;
  color: #fff;
}
.titleLine { display: flex; gap: 12px; align-items: baseline; }
.progress { font-weight: 650; }
.timer { font-variant-numeric: tabular-nums; color: var(--muted); }

.questionBlock { padding: 6px 0 10px; }
.qText { font-size: 18px; white-space: pre-wrap; }
.qImage {
  margin-top: 10px;
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* Options list */
.options { display: grid; gap: 8px; margin: 12px 0; }

/* Row = letter OUTSIDE + pill INSIDE */
.optionRow {
  display: flex;
  align-items: center; /* vertical alignment fixed */
  gap: 10px;
}

/* Letter column (outside pill) */
.optLetter {
  width: 1.6em;
  font-weight: 700;
  opacity: 0.85;
  text-align: center;
}

/* Pill */
.option {
  flex: 1;
  display: flex;
  gap: 10px;
  align-items: center; /* align checkbox/radio + text */
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.14);
}

/* nicer UX on hover */
.option:hover {
  border-color: rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.18);
}

/* ✅ Make CHECKBOX look like RADIO (both circular) */
.option input[type="checkbox"],
.option input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;

  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 auto;

  border: 2px solid rgba(255,255,255,0.45);
  border-radius: 999px;
  background: rgba(0,0,0,0.25);

  display: grid;
  place-content: center;
  cursor: pointer;
}

.option input[type="checkbox"]::before,
.option input[type="radio"]::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--primary);
  transform: scale(0);
  transition: transform 120ms ease-in-out;
}

.option input[type="checkbox"]:checked::before,
.option input[type="radio"]:checked::before {
  transform: scale(1);
}

.option input:focus-visible {
  outline: 2px solid rgba(79,124,255,0.85);
  outline-offset: 2px;
}

.option label { cursor: pointer; flex: 1; }

/* Fill-in-the-blank input inside options area */
.options .field {
  margin: 0;
  width: 100%;
}
.options .field input {
  width: 100%;
}

.navRow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
/* Results: make the Breakdown box span both columns */
#summary > .breakdownNotice {
  grid-column: 1 / -1;
}

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

.kpi {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: rgba(0,0,0,0.18);
}
.kpi .big { font-size: 34px; font-weight: 800; }
.kpi .label { color: var(--muted); font-size: 13px; }

.review {
  display: grid;
  /* Explicit 1-column track that can shrink (prevents grid overflow on long content) */
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.reviewItem {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: rgba(0,0,0,0.18);

  /* Performance: skip rendering off-screen cards until you scroll to them */
  content-visibility: auto;
  contain-intrinsic-size: 520px;

  /* Allow the card itself to shrink inside the grid without forcing horizontal overflow */
  min-width: 0;
  max-width: 100%;

  /* Prevent long lines (incl. copied NBSPs / long equations) from overflowing the card */
  overflow-wrap: anywhere;
}

.reviewQuestion {
  margin-top: 6px;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.reviewQuestion strong {
  display: inline;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Results page: question identifier line (domain • subarea • Q#) */
.reviewMeta {
  font-size: 22px;            /* change this to whatever you want */
  font-weight: 700;
  color: #fff;

  padding-bottom: 10px;       /* space between text and divider */
  margin-bottom: 12px;        /* space after divider */
  border-bottom: 1px solid var(--border); /* subtle divider line */
}

/* If your HTML still uses: class="reviewMeta muted" */
.reviewMeta.muted {
  color: #fff;
}

.badge {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  margin-right: 8px;
  color: var(--muted);
}
.badge.ok { border-color: rgba(79,255,179,0.5); color: rgba(79,255,179,0.9); }
.badge.no { border-color: rgba(255,79,99,0.55); color: rgba(255,79,99,0.92); }

/* Results tag colors */
.badge.yellow {
  border-color: rgba(255, 215, 0, 0.55);
  color: rgba(255, 215, 0, 0.95);
}

.badge.green {
  border-color: rgba(79, 255, 179, 0.55);
  color: rgba(79, 255, 179, 0.95);
}

.badge.orange {
  border-color: rgba(255, 159, 64, 0.60);
  color: rgba(255, 159, 64, 0.95);
}

/* Review sections (Results page) */
.reviewSection {
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.14);
}

.reviewSectionTitle {
  margin-bottom: 8px;
}

.reviewSectionContent {
  color: var(--text);
}

.reviewSection.answerSection {
  background: rgba(255, 215, 0, 0.06);
  border-color: rgba(255, 215, 0, 0.18);
}

.reviewSection.correctSection {
  background: rgba(79, 255, 179, 0.06);
  border-color: rgba(79, 255, 179, 0.18);
}

.reviewSection.explanationSection {
  background: rgba(255, 159, 64, 0.06);
  border-color: rgba(255, 159, 64, 0.18);
}

/* ✅ Put "Your answer" + "Correct" values to the RIGHT of their badges */
.reviewSection.answerSection,
.reviewSection.correctSection {
  display: grid;
  /* Allow the right column to shrink/wrap instead of overflowing */
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  column-gap: 14px;
}

/* ✅ Answer section: keep answer text on the LEFT and put the manual grading toggle on the RIGHT */
.reviewSection.answerSection .reviewSectionContent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.reviewSection.answerSection .answerText {
  flex: 1 1 auto;
  min-width: 0;
}


.reviewSectionContent {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* MathJax output doesn't like aggressive word-breaking.
   Keep math layout intact while still letting surrounding text wrap. */
mjx-container, mjx-container * {
  overflow-wrap: normal !important;
  word-break: normal !important;
  white-space: normal !important;
}

/* Manual grading toggle (Results page)
   Used for fill-in-the-blank questions when you want to count an answer as correct. */
.manualCorrectToggle {
  margin-top: 0;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  user-select: none;
  white-space: nowrap;
}


.manualCorrectToggle input {
  transform: translateY(1px);
}

.manualCorrectHint {
  margin-top: 8px;
}

.reviewSection.answerSection .reviewSectionTitle,
.reviewSection.correctSection .reviewSectionTitle {
  margin-bottom: 0; /* remove stacked spacing */
}

.reviewSection.answerSection .reviewSectionContent,
.reviewSection.correctSection .reviewSectionContent {
  margin: 0;
}

/* Explanation dropdown (Results page) */
.reviewSection.explanationSection details {
  width: 100%;
}

.reviewSection.explanationSection details > summary {
  list-style: none;            /* Firefox */
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}

/* Hide the default marker (Chrome/Safari) */
.reviewSection.explanationSection details > summary::-webkit-details-marker {
  display: none;
}

/* Hide marker (Firefox) */
.reviewSection.explanationSection details > summary::marker {
  content: "";
}

/* Custom arrow on the RIGHT */
.reviewSection.explanationSection details > summary::after {
  content: "▸";
  margin-left: auto;
  opacity: 0.85;
  transition: transform 120ms ease-in-out;
}

/* Rotate arrow when open */
.reviewSection.explanationSection details[open] > summary::after {
  transform: rotate(90deg);
}

.reviewMeta {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.footer { text-align: center; padding: 22px 10px; }

 /* Hide advanced setup controls (student mode) */
 body.student-mode .dev-only {
   display: none !important;
 }

/* =============================
   Landing / Setup hero layout
   (matches the ONE-SIMULATION trial splash screen)
   ============================= */

#setup.landing {
  padding: 44px;
  border-radius: 22px;
  overflow: hidden;
  position: relative;
}

#setup.landing > * {
  position: relative;
  z-index: 1;
}

#setup.landing::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 420px at 18% 18%, rgba(120, 160, 255, 0.16), transparent 60%),
    radial-gradient(700px 520px at 82% 36%, rgba(255, 120, 150, 0.09), transparent 62%),
    radial-gradient(900px 620px at 50% 110%, rgba(0, 200, 255, 0.10), transparent 58%);
  opacity: 0.9;
  pointer-events: none;
}

#setup.landing > * {
  position: relative;
  z-index: 1;
}

.landingHeader {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.landingTitle {
  font-size: clamp(44px, 5vw, 72px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.04;
}

.landingSubtitle {
  font-size: clamp(36px, 4.2vw, 60px);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-top: 6px;
  line-height: 1.06;
}

.landingPowered {
  margin-top: 14px;
  font-style: italic;
  font-weight: 700;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.88);
}

.landingPowered .naexWord {
  font-weight: 900;
}

.landingLogo {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 18px 50px rgba(0,0,0,0.35);
}

.landingShowcase {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  /* Slightly shrink the 3 horizontal placeholders to create breathing room on the right
     for the tall (4th) mock, matching the guide layout. */
  padding-right: 90px;
}

 /* Each showcase block is a positioning context */
 .showcaseItem{
   position: relative;

   --mock-w: 100%;
   display: flex;
   flex-direction: column;
   align-items: center; /* ✅ valid + keeps layout stable */
 }

 .showcaseMock {
   position: relative;   /* ✅ add */
   overflow: hidden;     /* ✅ add */

   width: 100%;
   aspect-ratio: 16 / 9;
   border-radius: 14px;
   background: rgba(255, 255, 255, 0.04);
   border: 1px solid rgba(255, 255, 255, 0.11);
   box-shadow: 0 18px 60px rgba(0,0,0,0.38), inset 0 0 0 1px rgba(0,0,0,0.22);
 }
 
 .showcaseImg{
   position: absolute;
   inset: 0;
   width: 100%;
   height: 100%;
   object-fit: cover;
   display: block;
 }

/* Tall overlay mock (4th illustration): intended for the “Step-by-Step Solutions”
   block. It overlaps the top-right showcase and extends down toward the footer
   (matching the guide layout). */
.showcaseMockTall {
  position: absolute;
  /* Slight vertical offset so it sits “stacked” on top of the wide mock */
  top: 110px;
  /* Pull into the card's right padding so it can sit closer to the edge */
  right: -90px;

  width: 62%;
  aspect-ratio: 9 / 16;

  z-index: 3;

  /* A bit stronger shadow so it reads as the front layer */
  box-shadow: 0 24px 70px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(0,0,0,0.25);
}

 .showcaseCaption {
   margin-top: 14px;
   width: 100%;
   text-align: left;

   padding-left: 14px;          /* ✅ adds the “margin” you want */
   padding-right: 14px;         /* optional: nicer if it wraps */

   font-size: 16px;
   font-weight: 750;
   line-height: 1.15;
   color: rgba(255, 255, 255, 0.92);
 }

.landingFooter {
  margin-top: 104px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  position: relative;
  z-index: 4;
}

.trialHeading {
  font-size: 46px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.trialText {
  margin-top: 8px;
  font-size: 24px;
  font-weight: 750;
  line-height: 1.18;
  color: rgba(255, 255, 255, 0.94);
}

.trialStrong {
  font-weight: 900;
}

.trialEmail {
  font-style: italic;
  font-weight: 800;
}

.landingCTA {
  margin-top: 22px;
}

#setup.landing .heroStart {
  padding: 18px 30px;
  border-radius: 16px;
  font-size: 22px;
  font-weight: 850;
  min-width: 280px;
}

 /* ✅ Bottom-right endorsement text (these classes DO exist in your HTML) */
 .landingFootRight{
   margin-left: auto;  /* keeps the block on the far right */
   transform: translateX(-10px);  /* ✅ move RIGHT — tweak this number */
 }

 .endorsement{
   text-align: right;  /* right-align the 2 lines */
   font-size: 14px;
   font-weight: 900;
   line-height: 1.18;
   color: rgba(255, 255, 255, 0.94);
 }

/* Keep the dynamic status note subtle on the landing screen */
#setup.landing #singleAttemptNote {
  margin-top: 14px;
  max-width: 620px;
  opacity: 0.95;
}

@media (max-width: 980px) {
  #setup.landing { padding: 26px; }
  .landingShowcase{
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* keep horizontal */
    padding-right: 90px; /* keep same breathing room as desktop (or your desktop value) */
  }
  .landingFooter { flex-direction: column; align-items: flex-start; }
  .landingFootRight{ width: 100%; } /* gives endorsement room to align to the right edge */
  .endorsement{ text-align: right; }
  #setup.landing .heroStart { width: 100%; min-width: 0; }

  /* On narrow screens, stack the tall mock below the horizontal mock so it
     doesn't overflow off the right side. */
  .showcaseMockTall{
    position: absolute;   /* keep overlay */
    top: 110px;           /* use your desktop values */
    right: -90px;         /* use your desktop values */
    width: 62%;
    margin-top: 0;
  }
}
