/* ============================================================
   Editorial Application Shell
   Extends the landing's editorial system (Design D) INTO the app
   with a density gradient: browse (this file, Tier 2) is editorial-
   functional; deeper tiers (dashboard, practice) get progressively
   denser/calmer in later passes.
   Palette + fonts are inherited from landing.css (Cormorant Garamond
   + Inter, cream/navy/red/gold); hex fallbacks included so this file
   is safe on its own.
   SCOPE: `body.ep-app` — toggled in navigation.js showSection() for the
   editorial browse/review tiers (currently examTypesSection + subjectsSection).
   Un-migrated screens never get the class, so they keep the dark theme.
   ============================================================ */

body.ep-app {
  background: var(--ep-paper, #F7F0E3) !important;
  color: var(--ep-navy, #0B2948) !important;
}

/* remove leftover dark-theme decoration (animated particles + blur blobs) */
body.ep-app .particles,
body.ep-app > .fixed.inset-0 { display: none !important; }

/* brand mark: crest on editorial views, flag stays on un-migrated dark views */
.app-crest { display: none; }
body.ep-app .app-flag { display: none; }
body.ep-app .app-crest { display: block; }

/* ----- Editorial header ----- */
body.ep-app .app-header {
  background: var(--ep-paper, #F7F0E3) !important;
  border-bottom: 1px solid rgba(185, 130, 40, .6);
  min-height: 72px;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
/* brand: bigger, so the inner header still reads "this is ExamPede" */
#appBrandHome { cursor: pointer; }
body.ep-app .app-crest { width: 30px; height: auto; }
body.ep-app .app-header .gradient-text {
  font-family: "Cormorant Garamond", Georgia, serif;
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--ep-navy, #0B2948);
  font-weight: 600;
  font-size: 28px;
  line-height: 1;
}
/* drop the "Philippine Exam Review Platform" subtitle in the header */
body.ep-app .app-header h1 + p { display: none; }
/* drop the "Home" breadcrumb — the clickable logo is the home route */
body.ep-app #breadcrumb { display: none !important; }
/* utility icon buttons -> quiet outlined, larger 40px hit target.
   Target the 4 real icons by id — a broad [id$="Btn"] rule would un-hide
   the auth-state buttons (#logoutBtn) and the mobile menu toggle. */
body.ep-app .app-header #notificationBtn,
body.ep-app .app-header #searchBtn,
body.ep-app .app-header #askAnythingBtn,
body.ep-app .app-header #settingsBtn {
  background: transparent !important;
  color: var(--ep-navy, #0B2948);
  border: 1px solid rgba(11, 41, 72, .18);
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body.ep-app .app-header #notificationBtn:hover,
body.ep-app .app-header #searchBtn:hover,
body.ep-app .app-header #askAnythingBtn:hover,
body.ep-app .app-header #settingsBtn:hover {
  color: var(--ep-red, #C6242B);
  border-color: var(--ep-red, #C6242B);
}
/* F3 header-overflow fix: the `display: inline-flex` above outranks Tailwind's
   responsive `.hidden` (id vs class specificity), so the phone hiding must be
   restated here or the icons re-appear on editorial views and push the header
   past the viewport (measured 452px wide at 390px). Phones use the hamburger
   menu (which carries Settings/ASK) instead. */
@media (max-width: 767px) {
  body.ep-app .app-header #notificationBtn,
  body.ep-app .app-header #searchBtn,
  body.ep-app .app-header #askAnythingBtn,
  body.ep-app .app-header #settingsBtn { display: none; }
}
/* Log in is a secondary text action — reviewing is primary, so it is NOT the red button */
body.ep-app #loginRegisterBtn {
  background: transparent !important;
  border: 0 !important;
  color: var(--ep-navy, #0B2948) !important;
  font-weight: 600;
}
body.ep-app #loginRegisterBtn:hover {
  background: transparent !important;
  color: var(--ep-red, #C6242B) !important;
}

/* ----- Page shell (shared by exam-types + subjects) ----- */
body.ep-app main > section {
  max-width: 1180px;
  margin-inline: auto;
}
/* Back links (smoke round 1 #2/#3): own the full geometry — the old rule only set
   color, leaving Tailwind's px-3 indent floating the arrow off the content's left
   edge and utility classes owning icon/text alignment. Negative left margin is
   optical: the arrow tip sits ON the content edge (main's px-4 gutter absorbs it).
   [id^="backTo"] also covers the bottom twin #backToCategoriesBottom. */
body.ep-app [id^="backTo"] {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 12px;
  margin: 0 0 14px -12px;
  border-radius: 5px;
  color: rgba(11, 41, 72, .7);
  font-family: var(--ep-sans, Inter, system-ui, sans-serif);
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
}
body.ep-app [id^="backTo"] svg {
  width: 16px;
  height: 16px;
  flex: none;
}
body.ep-app [id^="backTo"]:hover { color: var(--ep-red, #C6242B); }
body.ep-app [id^="backTo"]:focus-visible {
  outline: 2px solid var(--ep-red, #C6242B);
  outline-offset: 3px;
}
/* the bottom twin sits AFTER the card grid, not before the title */
body.ep-app #backToCategoriesBottom { margin: 30px 0 0 -12px; }
/* Left-align the SECTION heading like the landing, add the red rule.
   Scoped to #examTypesSection (smoke round 1 #6 root cause): the old bare
   `body.ep-app .text-center` reached into every OVERLAY opened above the Explore
   pages — practice loading/summary, the auth modal — force-left-aligning their
   Tailwind text-center markup and painting navy-on-dark low-contrast paragraph
   text. Overlays now render identically over editorial and dark views. */
body.ep-app #examTypesSection .text-center {
  text-align: left;
  margin-bottom: 30px;
}
body.ep-app #examTypesSection .text-center h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  color: var(--ep-navy, #0B2948);
  font-weight: 600;
  font-size: clamp(34px, 4vw, 46px);
  line-height: 1.02;
  margin-bottom: 0;
}
body.ep-app #examTypesSection .text-center h3::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  background: var(--ep-red, #C6242B);
  border-radius: 2px;
  margin-top: 14px;
}
body.ep-app #examTypesSection .text-center p {
  color: rgba(11, 41, 72, .7);
  margin-top: 14px;
  font-size: 15px;
}

/* ----- Cards (editorial paper) — used by exam AND subject grids ----- */
.ep-appcard {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--ep-paper, #F7F0E3);
  border: 1px solid rgba(11, 41, 72, .16);
  border-radius: 7px;
  padding: 22px 22px 20px 26px;
  color: var(--ep-navy, #0B2948);
  box-shadow: 0 5px 18px rgba(11, 41, 72, .045);
  text-align: left;
  cursor: pointer;
  width: 100%;
  min-height: 158px;
  position: relative;
  font-family: var(--ep-sans, Inter, system-ui, sans-serif);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.ep-appcard::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  width: 2px;
  height: 30px;
  background: var(--ep-gold, #B98228);
}
.ep-appcard:hover {
  transform: translateY(-2px);
  border-color: rgba(198, 36, 43, .5);
  box-shadow: 0 9px 24px rgba(11, 41, 72, .075);
}
.ep-appcard:focus-visible {
  outline: 2px solid var(--ep-red, #C6242B);
  outline-offset: 3px;
}
.ep-appcard-ic { display: inline-flex; }
.ep-appcard-ic svg { width: 30px; height: 30px; color: var(--ep-navy, #0B2948); }
.ep-appcard-title {
  font-weight: 600;
  font-size: 17px;
  line-height: 1.24;
  color: var(--ep-navy, #0B2948);
}
.ep-appcard-meta {
  font-size: 13px;
  line-height: 1.4;
  color: rgba(11, 41, 72, .75);
}
/* push the CTA to the bottom so it lines up across cards of differing title length */
.ep-appcard-foot { margin-top: auto; padding-top: 8px; }
.ep-appcard-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ep-red, #C6242B);
  font-weight: 650;
}
.ep-appcard-cta svg { width: 16px; height: 16px; }
/* Coming Soon: legible, not dimmed into oblivion */
.ep-appcard.is-soon {
  cursor: not-allowed;
  background: rgba(11, 41, 72, .025);
  border-color: rgba(11, 41, 72, .12);
  box-shadow: none;
}
.ep-appcard.is-soon::before { background: rgba(11, 41, 72, .22); }
.ep-appcard.is-soon:hover { transform: none; border-color: rgba(11, 41, 72, .12); box-shadow: none; }
.ep-appcard-soon {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(11, 41, 72, .6);
  font-weight: 500;
}
.ep-appcard-soon svg { width: 16px; height: 16px; }

/* --- Directory-card richer content (Explore redesign Task 4): gold badge chip for a
   genuine short acronym (examBadge policy), or a bolder gold bar when there's no badge;
   an audience line; and a ≤3-name area preview clamped to 2 lines. --- */
.ep-appcard-badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  padding: 3px 10px;
  border: 1px solid var(--ep-gold, #B98228);
  border-radius: 999px;
  background: rgba(185, 130, 40, .12);
  /* Navy, not gold, text: gold-on-paper at this size measures ~2.95:1 (fails WCAG AA
     4.5:1) — see .ep-cats-eyebrow for the same known-quiet combo used deliberately for
     decorative labels. This badge is sometimes the ONLY place the acronym appears on the
     card (e.g. LEPT — the title shows the verified full name instead), so it needs to
     read clearly rather than match that decorative precedent. Gold stays the accent via
     the border/tint; navy-on-tint measures ~12:1. */
  color: var(--ep-navy, #0B2948);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
}
/* No badge on this card (examBadge returned 'bar') — the base 2px rule (line 143) reads
   too quiet as the card's only accent, so it's deliberately bolder here. Later in source
   order than .ep-appcard::before so it wins at equal specificity. */
.ep-appcard--bar::before {
  width: 4px;
  height: 32px;
  top: 22px;
  border-radius: 0 2px 2px 0;
}
.ep-appcard-who { font-size: 12.5px; line-height: 1.4; color: var(--ep-navy, #0B2948); }
.ep-appcard-areas {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding-top: 10px;
  border-top: 1px solid rgba(11, 41, 72, .18);
  font-size: 12.5px;
  line-height: 1.4;
  color: rgba(11, 41, 72, .68);
}

@media (prefers-reduced-motion: reduce) {
  .ep-appcard { transition: none; }
  .ep-appcard:hover { transform: none; }
}

/* ============================================================
   Topic-selection modal (unified responsive layout, Tier 2)
   ============================================================ */
#topicSelectionModal { height: 100vh; height: 100dvh; }

.ep-modal-panel {
  background: var(--ep-paper, #F7F0E3);
  color: var(--ep-navy, #0B2948);
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: var(--ep-sans, Inter, system-ui, sans-serif);
}
@media (min-width: 640px) {
  #topicSelectionModal:not(.hidden) { display: flex; align-items: center; justify-content: center; background: rgba(11,41,72,.5); padding: 16px; }
  .ep-modal-panel { height: auto; max-height: 90vh; max-width: 42rem; width: 100%; border-radius: 16px; box-shadow: 0 20px 50px rgba(11,41,72,.25); }
}

.ep-modal-head {
  display: flex; justify-content: space-between; align-items: center;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(11,41,72,.12);
  padding: calc(16px + env(safe-area-inset-top, 0px)) calc(16px + env(safe-area-inset-right, 0px)) 16px calc(16px + env(safe-area-inset-left, 0px));
}
@media (min-width: 640px) { .ep-modal-head { padding: 20px 24px; } }
.ep-modal-title { font-family: var(--ep-serif, Georgia, serif); font-weight: 600; font-size: 19px; color: var(--ep-navy, #0B2948); margin: 0; }
.ep-modal-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 8px;
  color: rgba(11,41,72,.6); background: transparent; border: 0; cursor: pointer;
}
.ep-modal-close:hover { color: var(--ep-red, #C6242B); }

.ep-modal-body {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 14px;
  padding-top: 16px; padding-bottom: 16px;
  padding-left: calc(16px + env(safe-area-inset-left, 0px));
  padding-right: calc(16px + env(safe-area-inset-right, 0px));
}
.ep-modal-sub { font-size: 13px; color: rgba(11,41,72,.7); margin: 0; }

.ep-settings-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(11,41,72,.03); border: 1px solid rgba(11,41,72,.12); border-radius: 8px;
  padding: 12px 14px;
}
.ep-settings-label { font-size: 13px; font-weight: 600; color: var(--ep-navy, #0B2948); }

/* Feedback-mode radios (owner 2026-08-23): "Check your answers" — After each
   question / At the end of the test. Stacked on the right of the settings row. */
.ep-feedback-choices { display: flex; flex-flow: row wrap; gap: 6px 16px; justify-content: flex-end; }
.ep-radio { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ep-navy, #0B2948); cursor: pointer; min-height: 24px; }
.ep-radio input[type="radio"] { width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--ep-red, #C6242B); }
.ep-radio input[type="radio"]:focus-visible { outline: 2px solid var(--ep-gold, #B98228); outline-offset: 2px; }
.ep-settings-select { font-size: 13px; padding: 8px 10px; border: 1px solid rgba(11,41,72,.25); border-radius: 6px; background: white; color: var(--ep-navy, #0B2948); min-height: 44px; }

/* Show answers → segmented (2026-08-26 setup redesign). Restyles the existing
   radios into two full-width segments; the radio inputs still drive the choice, so
   startPracticeSession's read is unchanged. Selected state via :has (modern browsers;
   degrades to the radio dot otherwise). */
.ep-settings-row[role="radiogroup"] { flex-direction: column; align-items: stretch; gap: 10px; }
.ep-settings-row[role="radiogroup"] .ep-feedback-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; justify-content: stretch; }
.ep-settings-row[role="radiogroup"] .ep-radio {
  justify-content: center; gap: 8px; min-height: 44px; padding: 10px 12px; font-weight: 600;
  border: 1px solid rgba(11,41,72,.2); border-radius: 8px; background: #fff;
}
.ep-settings-row[role="radiogroup"] .ep-radio:has(input:checked) {
  border-color: var(--ep-red, #C6242B); background: rgba(198,36,43,.07); color: var(--ep-red, #C6242B);
}

/* Number of questions → segmented (2026-08-26 setup redesign). Two segments
   mirroring the "Check your answers" control; the hidden #questionCount select
   stays the value source. Disabled = the tier's daily budget can't afford that
   size (allowedSetSizes). Rendered/synced by updatePracticeGateUi. */
.ep-settings-row:has(#questionCountSeg) { flex-wrap: wrap; }
.ep-count-seg { display: grid; grid-template-columns: repeat(2, minmax(72px, 1fr)); gap: 8px; }
.ep-count-seg.hidden { display: none; }
.ep-count-opt {
  min-height: 44px; padding: 8px 14px; font-size: 15px; font-weight: 700; cursor: pointer;
  border: 1px solid rgba(11,41,72,.2); border-radius: 8px; background: #fff; color: var(--ep-navy, #0B2948);
  transition: border-color .12s, background .12s, color .12s;
}
.ep-count-opt:hover:not([disabled]) { border-color: rgba(198,36,43,.5); }
.ep-count-opt.is-active { border-color: var(--ep-red, #C6242B); background: rgba(198,36,43,.07); color: var(--ep-red, #C6242B); }
.ep-count-opt:focus-visible { outline: 2px solid var(--ep-gold, #B98228); outline-offset: 2px; }
.ep-count-opt[disabled] { opacity: .4; cursor: not-allowed; }

/* Daily-gate note → gold info box (2026-08-26). Full-width under the picker;
   .is-warn = budget spent (the conversion nudge to register / go Premium). */
.ep-gate-note {
  flex-basis: 100%; margin: 0; font-size: 12.5px; line-height: 1.4;
  padding: 8px 10px; border-radius: 8px;
  background: rgba(185,130,40,.1); border: 1px solid rgba(185,130,40,.35); color: var(--ep-gold-deep, #8A6118);
}
.ep-gate-note.is-warn {
  background: rgba(185,130,40,.16); border-color: rgba(185,130,40,.55); font-weight: 600;
}

/* Question pool (PREMIUM history filter) — 3c-2 dropdown restyle (2026-08-26):
   a settings row ("Questions from · PREMIUM" label + a select-look trigger)
   whose expanded body drops down as a white panel. Same disclosure mechanics
   (aria-expanded + hidden body); still ships collapsed, so the Start Review
   button never drops below the fold (owner requirement). */
.ep-pool-section { margin-top: 10px; }
.ep-pool-head { flex-wrap: wrap; }   /* reuses the .ep-settings-row box */
.ep-pool-select {
  display: flex; align-items: center; gap: 8px; max-width: 62%;
  background: #fff; border: 1px solid rgba(11,41,72,.25); border-radius: 6px;
  padding: 8px 12px; min-height: 44px; cursor: pointer;
  font-size: 13px; color: var(--ep-navy, #0B2948);
  transition: border-color .12s;
}
.ep-pool-select:hover { border-color: rgba(11,41,72,.45); }
.ep-pool-select:focus-visible { outline: 2px solid var(--ep-gold, #B98228); outline-offset: 2px; }
.ep-pool-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .06em; padding: 2px 8px;
  border-radius: 99px; background: rgba(185,130,40,.15); border: 1px solid rgba(185,130,40,.45);
  color: #7a5a1e; flex-shrink: 0; margin-left: 6px;
}
.ep-pool-summary { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-pool-chevron { color: rgba(11,41,72,.5); flex-shrink: 0; transition: transform .15s; }
.ep-pool-select[aria-expanded="true"] .ep-pool-chevron { transform: rotate(180deg); }
/* The dropped-down panel: white, bordered, softly lifted off the ivory body. */
.ep-pool-body {
  margin-top: 6px; display: flex; flex-direction: column; gap: 6px;
  background: #fff; border: 1px solid rgba(11,41,72,.18); border-radius: 8px;
  padding: 10px; box-shadow: 0 6px 16px rgba(11,41,72,.08);
}
.ep-pool-row {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  background: white; border: 1px solid rgba(11,41,72,.12); border-radius: 8px;
  padding: 9px 12px; min-height: 44px;
}
.ep-pool-row input[type="checkbox"] { width: 17px; height: 17px; flex-shrink: 0; accent-color: var(--ep-red, #C6242B); }
.ep-pool-row input[type="checkbox"]:focus-visible { outline: 2px solid var(--ep-gold, #B98228); outline-offset: 2px; }
.ep-pool-row-text { display: flex; flex-direction: column; min-width: 0; }
.ep-pool-row-label { font-size: 13px; font-weight: 600; color: var(--ep-navy, #0B2948); }
.ep-pool-row-sub { font-size: 11.5px; color: rgba(11,41,72,.55); }
.ep-pool-count { margin-left: auto; font-size: 12px; color: rgba(11,41,72,.6); font-variant-numeric: tabular-nums; }
.ep-pool-matchline { font-size: 12px; color: rgba(11,41,72,.7); margin: 2px 2px 0; }
/* Disabled Start must be visibly disabled (loading / gate states). */
.ep-modal-btn-start:disabled { opacity: .5; cursor: not-allowed; }

/* K2C (Key to Correction) modal — the on-screen answer key for a printout
   (tier map §4). Not selectable; the modal root carries no-print. */
.k2c-guard { user-select: none; -webkit-user-select: none; }
.k2c-item { padding: 10px 0; border-bottom: 1px solid rgba(11,41,72,.12); }
.k2c-item:last-child { border-bottom: none; }
.k2c-num { font-weight: 700; margin: 0 0 4px; }
.k2c-stem { font-size: 13.5px; opacity: .85; }
.k2c-why { font-size: 12.5px; margin-top: 4px; opacity: .8; }
/* Options under each answer (snapshot rows carry them). The correct one is
   marked with a "Correct" tag + green, never colour alone. Dark-on-ivory. */
.k2c-opts { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 3px; }
.k2c-opts li { font-size: 13px; color: rgba(11,41,72,.82); display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.k2c-opt-label { font-weight: 700; color: rgba(11,41,72,.6); min-width: 1.3em; }
.k2c-opt--correct { color: #14663a; font-weight: 600; }
.k2c-opt--correct .k2c-opt-label { color: #14663a; }
.k2c-opt-tag { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #14663a;
  border: 1px solid rgba(20,102,58,.4); border-radius: 999px; padding: 1px 7px; }

.ep-selectall-row {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(185,130,40,.08); border: 1px solid rgba(185,130,40,.3); border-radius: 8px;
  padding: 11px 14px;
}
.ep-selectall-label { font-size: 13px; font-weight: 600; color: #7a5a1e; }
/* Proper tri-state checkbox (was a switch) -- native :indeterminate rendering
   (a dash) needs no extra CSS, same accent-color language as the topic-item
   checkboxes below it for visual consistency. */
.ep-toggle-wrap { position: relative; display: inline-flex; cursor: pointer; width: 44px; height: 44px; align-items: center; justify-content: center; }
#selectAllTopics { width: 18px; height: 18px; accent-color: var(--ep-red, #C6242B); cursor: pointer; }
#selectAllTopics:disabled { opacity: .5; cursor: not-allowed; }

.ep-selection-summary { font-size: 13px; font-weight: 600; color: var(--ep-red, #C6242B); margin: 0; }
/* Original .45 alpha measured ~2.64:1 against the panel's real background
   (rgb(247,240,227), a cream/paper tone -- not pure white), failing WCAG
   AA's 4.5:1 for normal text. .7 measures ~5.34:1 against that same real
   background (see Task 6 accessibility re-audit; .65 was tried first but
   only reached ~4.59:1, too close to the threshold to be a safe margin). */
.ep-selection-summary.is-zero { color: rgba(11,41,72,.7); font-weight: 500; }

/* Subjects header (2026-08-26 setup redesign): "Subjects  N selected   Clear all",
   replacing the gold Select-all toggle (kept hidden as the driver). */
.ep-subjects-head { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; }
.ep-subjects-title { font-size: 13px; font-weight: 700; color: var(--ep-navy, #0B2948); }
.ep-subjects-head .ep-selection-summary { font-weight: 500; }
.ep-subjects-clear { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--ep-red, #C6242B); background: none; border: 0; cursor: pointer; padding: 4px 2px; min-height: 32px; }
.ep-subjects-clear:hover { text-decoration: underline; text-underline-offset: 2px; }
.ep-subjects-clear:focus-visible { outline: 2px solid var(--ep-gold, #B98228); outline-offset: 2px; }

.ep-topics-list { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 520px) { .ep-topics-list { grid-template-columns: 1fr 1fr; } }
/* Vertical padding intentionally lives on min-height + child alignment, not
   on the container's own padding-top/bottom: padding here would sit outside
   the flex content box and be untappable dead space (confirmed via a real
   click simulation during the Task 6 touch-target audit -- tapping the
   row's top/bottom padding silently did nothing). Horizontal padding is
   unaffected and stays on the container. */
.ep-topic-item {
  display: flex; align-items: stretch; gap: 10px;
  padding: 0 12px; min-height: 44px;
  border: 1px solid rgba(11,41,72,.14); border-radius: 8px;
  font-size: 13px; color: var(--ep-navy, #0B2948);
}
.ep-topic-item input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--ep-red, #C6242B); flex-shrink: 0; align-self: center; }
.ep-topic-item input[type="checkbox"]:disabled + label { opacity: .5; }
/* display:flex + align-items:center (inner) lets the label's own box
   stretch (via the container's align-items:stretch) to the row's full
   height while keeping its text vertically centered -- this is what makes
   the label's *clickable* area match the visible 44px row instead of just
   its text's line-height. The -1px vertical margin reclaims the 2px eaten
   by the row's own 1px top/bottom border (flex items stretch to the
   container's content box, which excludes the border), so the label's hit
   box reaches the full 44px instead of 42px. */
.ep-topic-item label { flex: 1; cursor: pointer; display: flex; align-items: center; margin: -1px 0; }

/* Mix grouped view (2026-08-26): compact collapsible area-rows in place of a long
   flat subject list. The master (checkbox) selects the whole area; the name button
   expands its leaves. Overrides the 2-col grid to a vertical stack. */
.ep-topics-list.is-grouped { display: flex; flex-direction: column; gap: 8px; }
.ep-area-group { border: 1px solid rgba(11,41,72,.16); border-radius: 8px; background: rgba(11,41,72,.02); }
.ep-area-row { display: flex; align-items: stretch; gap: 10px; padding: 0 12px; min-height: 46px; }
.ep-area-master { width: 18px; height: 18px; accent-color: var(--ep-red, #C6242B); flex-shrink: 0; align-self: center; cursor: pointer; }
.ep-area-master:focus-visible { outline: 2px solid var(--ep-gold, #B98228); outline-offset: 2px; }
.ep-area-toggle {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: none; border: 0; cursor: pointer; padding: 0; text-align: left;
  font-size: 13.5px; font-weight: 700; color: var(--ep-navy, #0B2948);
}
.ep-area-toggle:focus-visible { outline: 2px solid var(--ep-gold, #B98228); outline-offset: 2px; border-radius: 6px; }
.ep-area-name { flex: 1; }
.ep-area-meta {
  font-size: 11px; font-weight: 700; color: rgba(11,41,72,.6);
  background: rgba(11,41,72,.06); border-radius: 999px; padding: 2px 8px; min-width: 22px; text-align: center;
}
.ep-area-chev { color: rgba(11,41,72,.5); transition: transform .15s; font-size: 12px; }
.ep-area-group.is-open .ep-area-chev { transform: rotate(180deg); }
/* :not([hidden]) so the hidden attribute (collapsed) still wins over display:grid. */
.ep-area-leaves:not([hidden]) { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 2px 12px 12px 40px; }
@media (min-width: 520px) { .ep-area-leaves:not([hidden]) { grid-template-columns: 1fr 1fr; } }

.ep-random-note { display: flex; gap: 10px; background: rgba(185,130,40,.08); border: 1px solid rgba(185,130,40,.3); border-radius: 8px; padding: 12px 14px; flex-shrink: 0; }
.ep-random-note-ic { font-size: 18px; }
.ep-random-note-title { font-size: 12px; font-weight: 600; color: #7a5a1e; margin: 0 0 2px; }
/* #8a6a28 measured ~4.12:1 against this note's real tinted background
   (rgba(185,130,40,.08) over the panel's actual cream bg, not white --
   caught during the Task 6 accessibility re-audit's contrast re-check).
   #755a22 measures ~5.29:1 against the same background. */
.ep-random-note-text { font-size: 12px; color: #755a22; margin: 0; }

.ep-modal-foot {
  flex-shrink: 0; display: flex; gap: 10px;
  border-top: 1px solid rgba(11,41,72,.12);
  padding-top: 14px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  padding-left: calc(16px + env(safe-area-inset-left, 0px));
  padding-right: calc(16px + env(safe-area-inset-right, 0px));
}
@media (min-width: 640px) { .ep-modal-foot { padding-bottom: 20px; } }

.ep-modal-btn { flex: 1; min-height: 44px; padding: 11px; border-radius: 8px; font-weight: 650; font-size: 13px; white-space: nowrap; text-align: center; border: 1px solid transparent; cursor: pointer; }
.ep-modal-btn-cancel { background: transparent; border-color: rgba(11,41,72,.25); color: var(--ep-navy, #0B2948); }
.ep-modal-btn-start { background: var(--ep-red, #C6242B); border-color: var(--ep-red, #C6242B); color: white; }
.ep-modal-btn-start:disabled { background: rgba(11,41,72,.15); border-color: rgba(11,41,72,.15); color: rgba(11,41,72,.4); cursor: not-allowed; }

/* --- Full coverage body (Explore redesign Task 7): numbered, read-only area
   accordions. Every canonical leaf renders — D9 forbids hiding one for a zero or
   unknown question count, so there is no filtering here and nothing to click except
   the native <summary> (area header). `<summary>` defaults to `display: list-item`,
   which is what makes its native disclosure marker render at all — the row layout
   below is therefore flex ONLY from the desktop breakpoint up (where the marker is
   deliberately hidden); on mobile the head stays in its default flow so the native
   marker keeps working as the primary "tap to expand" affordance. --- */
.ep-cov-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 1024px) {
  .ep-cov-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .ep-cov-grid--2 { grid-template-columns: repeat(2, 1fr); }
}

.ep-area {
  background: #FCF7EC;
  color: var(--ep-navy, #0B2948);
  border: 1px solid rgba(11, 41, 72, .18);
  border-radius: 7px;
  padding: 24px 26px;
  box-shadow: 0 5px 18px rgba(11, 41, 72, .045);
  font-family: var(--ep-sans, Inter, system-ui, sans-serif);
  text-align: left;
}
.ep-area-head { cursor: pointer; padding: 8px 0; }
.ep-area-head:focus-visible { outline: 2px solid var(--ep-red, #C6242B); outline-offset: 3px; }
.ep-area-no {
  margin-right: 8px;
  font-family: var(--ep-serif, Georgia, serif);
  font-weight: 600;
  font-size: .85rem;
  color: var(--ep-gold, #B98228);
  font-variant-numeric: tabular-nums;
}
.ep-area-name { font-family: var(--ep-serif, Georgia, serif); font-weight: 600; font-size: 1.2rem; }
.ep-area-cnt { display: block; margin-top: 2px; font-size: .8rem; color: rgba(11, 41, 72, .68); }
@media (min-width: 768px) {
  /* Desktop render opens every area at once (Task 7), so the accordion reads as a
     plain list there: switch the head to a flex row and hide the marker. */
  .ep-area-head {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
    list-style: none;
  }
  .ep-area-head::-webkit-details-marker { display: none; }
  .ep-area-no { margin-right: 0; }
  .ep-area-cnt { display: inline; margin-top: 0; margin-left: auto; }
}

.ep-area-subj { margin-top: 14px; line-height: 1.55; }
.ep-area-subj + .ep-area-subj { padding-top: 14px; border-top: 1px dashed rgba(11, 41, 72, .22); }
.ep-subj-name { margin: 0; font-weight: 600; }
.ep-subj-topics { margin: 4px 0 0; max-width: 60ch; font-size: 12px; color: rgba(11, 41, 72, .72); }
/* Informational marker, not a control — no fill, no hover state, not interactive. */
.ep-noq {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(11, 41, 72, .72);
  border: 1px solid rgba(185, 130, 40, .45);
  border-radius: 999px;
  vertical-align: middle;
}

/* --- Coverage header (Explore redesign Task 6): compact, honest exam-page header.
   Replaces the old centered title + exam-info panel + Quick Review banner — one
   left-aligned column, readable measure, light paper layer only. --- */
.ep-cov-head { max-width: 62ch; text-align: left; margin-bottom: 36px; }
.ep-cov-eyebrow {
  margin: 0;
  font-family: var(--ep-sans, Inter, system-ui, sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  /* deep gold — meaningful page label, AA on paper (triage A18) */
  color: var(--ep-gold-deep, #8A6118);
}
.ep-cov-title {
  margin: 12px 0 0;
  font-family: var(--ep-serif, Georgia, serif);
  font-weight: 600;
  font-size: 1.8rem;
  line-height: 1.25;
  color: var(--ep-navy, #0B2948);
}
.ep-cov-sub {
  margin: 10px 0 0;
  font-family: var(--ep-sans, Inter, system-ui, sans-serif);
  font-size: 14px;
  line-height: 1.55;
  color: rgba(11, 41, 72, .72);
}
.ep-cov-stats {
  margin: 16px 0 0;
  font-family: var(--ep-sans, Inter, system-ui, sans-serif);
  font-size: 13px;
  color: rgba(11, 41, 72, .68);
}
.ep-cov-admin {
  margin: 20px 0 0;
  padding: 14px 0;
  border-top: 1px solid rgba(11, 41, 72, .18);
  border-bottom: 1px solid rgba(11, 41, 72, .18);
  font-family: var(--ep-sans, Inter, system-ui, sans-serif);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ep-navy, #0B2948);
}
@media (min-width: 640px) {
  .ep-cov-title { font-size: 2.1rem; }
}

/* --- Start Reviewing wizard (launch slice 1) --- */
#reviewWizardModal { height: 100vh; height: 100dvh; }
#reviewWizardModal:not(.hidden) { display: flex; align-items: center; justify-content: center; background: rgba(11,41,72,.5); padding: 16px; }
#reviewWizardModal .ep-modal-head { background: var(--ep-navy, #0B2948); border-bottom: 0; border-top-left-radius: 16px; border-top-right-radius: 16px; }
#reviewWizardModal .ep-modal-title { color: var(--em-ink, #F7F0E3); }
#reviewWizardModal .ep-modal-close { color: rgba(247, 240, 227, .7); }
#reviewWizardModal .ep-modal-close:hover { color: var(--ep-red, #C6242B); }

/* --- Practice-session wizard shell (2026-08-26 redesign, owner mockup) -----------
   Navy header carrying a 3-step tracker (Exam · Coverage · Setup), ivory body.
   Reuses the .ep-modal-panel / .ep-modal-* frame; only adds the tracker + body type. */
#reviewWizardModal .ep-modal-head.psw-head { flex-direction: column; align-items: stretch; gap: 12px; }
.psw-head-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#reviewWizardModal .ep-modal-title { font-size: 20px; }
.psw-steps { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; list-style: none; margin: 0; padding: 0; }
.psw-step { display: flex; align-items: center; gap: 8px; }
.psw-num { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid rgba(247,240,227,.32);
  color: rgba(247,240,227,.6); display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.psw-label { font-size: 13px; font-weight: 600; color: rgba(247,240,227,.6); }
.psw-step.is-done .psw-num { border-color: rgba(247,240,227,.5); color: var(--ep-paper, #F7F0E3); }
.psw-step.is-done .psw-label { color: rgba(247,240,227,.82); }
.psw-step.is-active .psw-num { border-color: var(--ep-gold, #B98228); color: var(--ep-gold, #B98228); }
.psw-step.is-active .psw-label { color: var(--ep-paper, #F7F0E3); }
.psw-sep { width: 5px; height: 5px; border-radius: 50%; background: rgba(247,240,227,.3); }
.psw-h { font-family: var(--ep-serif, Georgia, serif); font-weight: 600; font-size: 22px; line-height: 1.2;
  color: var(--ep-navy, #0B2948); margin: 2px 0 4px; }
.psw-h:focus { outline: none; }
.psw-sub { font-size: 13.5px; color: rgba(11,41,72,.7); margin: 0 0 18px; }
.psw-field { display: flex; flex-direction: column; gap: 8px; }
.psw-select { width: 100%; min-height: 48px; padding: 12px 14px; font-size: 15px; border-radius: 8px; }
/* Disabled Continue reads as a faded red (mockup), not muted grey. */
#reviewWizardModal .ep-modal-btn-start:disabled { background: rgba(198,36,43,.38); border-color: transparent; color: rgba(255,255,255,.92); }

/* Coverage step (2): selected-exam pill + area cards + the Mixed card. */
.psw-selexam { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.psw-selexam-lbl { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(11,41,72,.55); }
.psw-selexam-pill { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: var(--ep-gold-deep, #8A6118);
  border: 1px solid rgba(185,130,40,.5); border-radius: 999px; padding: 2px 10px; background: rgba(185,130,40,.08); }
.psw-cov-cards { display: flex; flex-direction: column; gap: 10px; margin-top: 2px; }
.psw-cov-card { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  background: #fff; border: 1px solid rgba(11,41,72,.14); border-radius: 12px; padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(11,41,72,.04); transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease; }
.psw-cov-card:hover { border-color: rgba(11,41,72,.3); box-shadow: 0 6px 18px rgba(11,41,72,.1); }
.psw-cov-card:active { transform: scale(.995); }
.psw-cov-card:focus-visible { outline: 2px solid var(--ep-red, #C6242B); outline-offset: 2px; }
.psw-cov-ic { flex: none; width: 44px; height: 44px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.psw-cov-ic--gened { background: rgba(11,41,72,.08); color: var(--ep-navy, #0B2948); }
.psw-cov-ic--profed { background: rgba(185,130,40,.15); color: var(--ep-gold-deep, #8A6118); }
.psw-cov-ic--spec { background: rgba(45,140,80,.14); color: #2c7a4e; }
.psw-cov-ic--default { background: rgba(11,41,72,.08); color: var(--ep-navy, #0B2948); }
.psw-cov-ic--mix { background: rgba(185,130,40,.18); color: var(--ep-gold-deep, #8A6118); }
.psw-cov-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.psw-cov-name { font-family: var(--ep-serif, Georgia, serif); font-size: 16.5px; font-weight: 600; color: var(--ep-navy, #0B2948); }
.psw-cov-sub { font-size: 12.5px; line-height: 1.4; color: rgba(11,41,72,.62); }
.psw-cov-count { flex: none; font-size: 12.5px; font-weight: 600; color: rgba(11,41,72,.55); white-space: nowrap; }
.psw-cov-go { flex: none; color: rgba(11,41,72,.4); display: inline-flex; }
.psw-cov-card:hover .psw-cov-go { color: var(--ep-red, #C6242B); }
.psw-cov-mix { background: rgba(185,130,40,.08); border-color: rgba(185,130,40,.35); }
.psw-cov-mix:hover { border-color: rgba(185,130,40,.6); box-shadow: 0 6px 18px rgba(185,130,40,.15); }
.psw-cov-mix .psw-cov-name { color: var(--ep-gold-deep, #8A6118); }
.psw-or { display: flex; align-items: center; text-align: center; gap: 12px; margin: 14px 0; color: rgba(11,41,72,.45); font-size: 12px; }
.psw-or::before, .psw-or::after { content: ""; flex: 1; height: 1px; background: rgba(11,41,72,.15); }
.psw-cov-loading, .psw-cov-empty { font-size: 13px; color: rgba(11,41,72,.6); padding: 8px 2px; margin: 0; }

/* Setup box (Step 3) wears the same navy header as the wizard; its step tracker is
   shown only when reached from the wizard (JS toggles #topicWizardSteps). */
.ep-modal-head.psw-head { flex-direction: column; align-items: stretch; gap: 12px; }
#topicSelectionModal .ep-modal-head.psw-head { background: var(--ep-navy, #0B2948); border-bottom: 0; }
#topicSelectionModal .ep-modal-head.psw-head .ep-modal-title { color: var(--ep-paper, #F7F0E3); }
#topicSelectionModal .ep-modal-head.psw-head .ep-modal-close { color: rgba(247,240,227,.7); }
#topicSelectionModal .ep-modal-head.psw-head .ep-modal-close:hover { color: var(--ep-red, #C6242B); }
@media (min-width: 640px) { #topicSelectionModal .ep-modal-head.psw-head { border-top-left-radius: 16px; border-top-right-radius: 16px; } }

/* The wizard is a compact CONTENT-height modal (one dropdown / a short group list),
   not the full-height sheet the subject picker uses — overrides .ep-modal-panel's
   mobile height:100% so it doesn't fill the whole phone. */
#reviewWizardModal .ep-modal-panel { height: auto; max-height: 90dvh; width: 100%; max-width: 42rem; border-radius: 16px; margin: auto; }

/* Subject-stats modal ("How are you doing?" card on the dashboard): a centered card
   at all widths (not the mobile full-height sheet), same treatment as the wizard. */
#subjectStatsModal:not(.hidden) { display: flex; align-items: center; justify-content: center; background: rgba(11, 41, 72, .5); padding: 16px; }
#subjectStatsModal .ep-modal-panel { height: auto; max-height: 90dvh; width: 100%; max-width: 42rem; border-radius: 16px; margin: auto; }
.ep-wizard-step { display: block; }
.ep-wizard-groups { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.ep-wizard-group-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 44px; padding: 12px 16px;
  background: rgba(11, 41, 72, .05); border: 1px solid rgba(11, 41, 72, .2);
  border-radius: 10px; color: var(--ep-navy, #0B2948); cursor: pointer; text-align: left;
  transition: background .15s ease, border-color .15s ease;
}
.ep-wizard-group-btn:hover { background: rgba(11, 41, 72, .1); border-color: rgba(11, 41, 72, .4); }
.ep-wizard-group-btn:focus-visible { outline: 2px solid var(--ep-red, #C6242B); outline-offset: 3px; }
.ep-wizard-group-name { font-weight: 600; }
.ep-wizard-group-meta { font-size: .82rem; opacity: .7; white-space: nowrap; }
.ep-wizard-wholeexam {
  display: block; width: 100%; margin-top: 14px; padding: 10px; min-height: 44px;
  background: transparent; border: 0; color: var(--ep-navy, #0B2948); opacity: .85;
  font-size: .9rem; text-decoration: underline; cursor: pointer;
}
.ep-wizard-wholeexam:hover { opacity: 1; color: var(--ep-red, #C6242B); }
.ep-wizard-loading, .ep-wizard-empty { font-size: .9rem; color: var(--ep-navy, #0B2948); opacity: .8; margin: 8px 0; }

/* --- Directory-card acronym subtitle (Plan 3 Task 5) --- */
.ep-appcard-sub { display: block; font-size: .78rem; line-height: 1.35; color: rgba(11, 41, 72, .68); margin-top: -6px; }

/* --- Category strip enrichment (Plan 3 Task 5): spelled-out descriptions --- */
/* Modifier on #epCategoryStrip: mobile = one swipeable row; sm+ = a 2×2 grid
   (overrides landing.css's 4-across, which the longer descriptions outgrow). */
.ep-cats--desc .ep-cats-in { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ep-cats--desc .ep-cat { flex: 0 0 250px; border-bottom: 0; }
.ep-cats--desc .ep-cat-ac { font-size: 12.5px; line-height: 1.45; }
@media (min-width: 640px) {
  .ep-cats--desc .ep-cats-in { display: grid; grid-template-columns: repeat(2, 1fr); overflow-x: visible; }
  .ep-cats--desc .ep-cat { flex: none; padding: 22px 24px; }
  .ep-cats--desc .ep-cat:nth-child(-n+2) { border-bottom: 1px solid var(--ep-line, rgba(11, 41, 72, .14)); }
}

/* --- Category section (Explore redesign, Task 1): the strip becomes a headed
   card section. Base .ep-cats (hairline border-top/bottom + paper bg) and
   .ep-wrap still come from landing.css; everything below is scoped under
   .ep-cats--cards so the .ep-cats--desc strip rules above stay untouched. --- */
.ep-cats--cards .ep-wrap { padding-top: 44px; padding-bottom: 48px; }
.ep-cats-head { max-width: 640px; margin-bottom: 26px; }
.ep-cats-head .ep-cats-eyebrow {
  margin: 0;
  font-family: var(--ep-sans, Inter, system-ui, sans-serif);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  /* deep gold: this is a real section heading, not decoration — base gold on
     paper fails AA at this size (review triage A18) */
  color: var(--ep-gold-deep, #8A6118);
}
.ep-cats-sub {
  margin-top: 10px;
  font-family: var(--ep-serif, Georgia, serif);
  font-size: 20px;
  line-height: 1.4;
  color: var(--ep-navy, #0B2948);
}
.ep-cats-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .ep-cats--cards .ep-wrap { padding-top: 54px; padding-bottom: 58px; }
  .ep-cats-grid { grid-template-columns: 1fr 1fr; }
}

.ep-catcard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 24px 26px;
  background: #FCF7EC;
  border: 1px solid rgba(11, 41, 72, .18);
  border-radius: 7px;
  position: relative;
  text-align: left;
  cursor: pointer;
  font-family: var(--ep-sans, Inter, system-ui, sans-serif);
  box-shadow: 0 5px 18px rgba(11, 41, 72, .045);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.ep-catcard::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  width: 2px;
  height: 30px;
  background: var(--ep-gold, #B98228);
}
.ep-catcard:hover {
  transform: translateY(-2px);
  border-color: rgba(198, 36, 43, .5);
  box-shadow: 0 9px 24px rgba(11, 41, 72, .075);
}
.ep-catcard:focus-visible {
  outline: 2px solid var(--ep-red, #C6242B);
  outline-offset: 3px;
}
.ep-catcard-name {
  font-family: var(--ep-serif, Georgia, serif);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.25;
  color: var(--ep-navy, #0B2948);
}
.ep-catcard-who {
  font-size: 14px;
  line-height: 1.45;
  color: rgba(11, 41, 72, .72);
}
.ep-catcard-inc {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(11, 41, 72, .72);
}
.ep-catcard-inc span:first-child { font-weight: 700; color: var(--ep-navy, #0B2948); }
.ep-catcard-inc span:last-child { font-style: italic; opacity: .85; }
.ep-catcard-go {
  margin-top: 4px;
  font-weight: 650;
  font-size: 14px;
  color: var(--ep-red, #C6242B);
}
@media (prefers-reduced-motion: reduce) {
  .ep-catcard { transition: none; }
  .ep-catcard:hover { transform: none; }
}

/* --- Descent into focus (spec §11), Plan 2 Task 5 --- */
/* Setup modal = navy-header / cream-body hybrid: the strong dark cue while choosing
   subjects. Scoped to #topicSelectionModal so other .ep-modal-head modals stay light.
   The .ep-modal-sub lives in the cream body, so it keeps navy-on-cream (not overridden). */
#topicSelectionModal .ep-modal-head { background: var(--ep-navy, #0B2948); border-bottom: 0; }
#topicSelectionModal .ep-modal-title { color: var(--em-ink, #F7F0E3); }
#topicSelectionModal .ep-modal-close { color: rgba(247, 240, 227, .7); }
#topicSelectionModal .ep-modal-close:hover { color: var(--ep-red, #C6242B); }

/* Short stage transitions so the cream -> dark descent feels intentional, not jarring.
   Honors prefers-reduced-motion (no animation when the user asks for less). */
@keyframes ep-stage-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes ep-modal-in { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  #examTypesSection:not(.hidden),
  #subjectsSection:not(.hidden) { animation: ep-stage-in 170ms ease-out; }
  #topicSelectionModal:not(.hidden) #topicModalPanel { animation: ep-modal-in 180ms ease-out; }
}

/* --- End-of-Explore CTA + exam-level-zero state (Explore redesign Task 8) --- */
.ep-endcta {
  background: #FCF7EC;
  border: 1px solid rgba(11, 41, 72, .18);
  border-radius: 7px;
  padding: 32px 26px;
  margin-top: 48px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}
.ep-endcta-q {
  margin: 0;
  font-family: var(--ep-serif, Georgia, serif);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.3;
  color: var(--ep-navy, #0B2948);
}
.ep-endcta-s {
  margin: 0;
  font-family: var(--ep-sans, Inter, system-ui, sans-serif);
  font-size: 14px;
  line-height: 1.5;
  color: rgba(11, 41, 72, .72);
  max-width: 45ch;
}
#exploreStartBtn {
  margin-top: 4px;
  min-width: 240px;
}
.ep-endcta-alt {
  background: transparent;
  border: 0;
  color: var(--ep-red, #C6242B);
  font-family: var(--ep-sans, Inter, system-ui, sans-serif);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 4px;
  transition: color .15s ease;
}
.ep-endcta-alt:hover {
  color: var(--ep-red-2, #A61D23);
}
.ep-endcta-alt:focus-visible {
  outline: 2px solid var(--ep-red, #C6242B);
  outline-offset: 3px;
}

/* Hidden attribute override (Task 8 cascade fix): .ep-btn in landing.css declares
   `display: inline-flex` (author origin, 0,1,0 specificity), which outranks the
   user-agent `[hidden] { display: none }` rule. These scoped id+attribute selectors
   (1,0,1 specificity) restore the native hidden behavior for toggled CTA elements. */
#exploreStartBtn[hidden],
#exploreAnotherBtn[hidden] {
  display: none;
}

/* --- Navy "Explore exams by category" band on the landing (2026-08-24) ---
   Ties the paper landing to the navy Explore chooser + dashboard. Full-bleed
   navy; 4 centered columns (gold icon · serif title · description · gold link)
   with gold-hairline dividers. Reuses the .ep-catcard structure + category-btn. */
.ep-cats--band { background: var(--ep-navy); }
.ep-cats--band .ep-wrap { padding-top: 40px; padding-bottom: 44px; }
.ep-cats--band .ep-cats-head { max-width: none; margin-bottom: 20px; }
.ep-cats--band .ep-cats-eyebrow { color: var(--ep-gold); }
.ep-cats--band .ep-cats-grid { grid-template-columns: 1fr; gap: 0; }
.ep-cats--band .ep-catcard {
  background: transparent; border: 0; border-radius: 0; box-shadow: none;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 8px; padding: 22px 18px; cursor: pointer;
}
.ep-cats--band .ep-catcard::before { display: none; }
.ep-cats--band .ep-catcard:hover { transform: none; box-shadow: none; }
.ep-cats--band .ep-catcard-ic { color: var(--ep-gold); display: inline-flex; margin-bottom: 2px; }
.ep-cats--band .ep-catcard-name { font-family: var(--ep-serif); color: var(--ep-paper); font-size: 20px; font-weight: 600; }
.ep-cats--band .ep-catcard-who { color: rgba(247, 240, 227, .72); font-size: 13.5px; line-height: 1.5; max-width: 30ch; }
.ep-cats--band .ep-catcard-go { color: var(--ep-gold); font-weight: 700; font-size: 13.5px; margin-top: 4px; }
.ep-cats--band .ep-catcard:hover .ep-catcard-go { text-decoration: underline; text-underline-offset: 3px; }
.ep-cats--band .ep-catcard:focus-visible { outline: 2px solid var(--ep-gold); outline-offset: -4px; }
/* Mobile (<640px): gold hairline between the stacked cards — the horizontal echo of
   the vertical column dividers used at >=640px / >=960px. Overridden by those queries. */
.ep-cats--band .ep-catcard { border-top: 1px solid rgba(185, 130, 40, .26); }
.ep-cats--band .ep-catcard:first-child { border-top: 0; }
@media (min-width: 640px) {
  .ep-cats--band .ep-cats-grid { grid-template-columns: 1fr 1fr; }
  .ep-cats--band .ep-catcard { border-top: 1px solid rgba(185, 130, 40, .26); }
  .ep-cats--band .ep-catcard:nth-child(-n+2) { border-top: 0; }
  .ep-cats--band .ep-catcard:nth-child(odd) { border-right: 1px solid rgba(185, 130, 40, .26); }
}
@media (min-width: 960px) {
  .ep-cats--band .ep-cats-grid { grid-template-columns: repeat(4, 1fr); }
  .ep-cats--band .ep-catcard { border-top: 0; border-right: 0; }
  .ep-cats--band .ep-catcard:not(:first-child) { border-left: 1px solid rgba(185, 130, 40, .26); }
}

/* --- "Why ExamPede" — 3 themed columns of features (2026-08-24) --- */
.ep-why-building { display: none; }
.ep-why-sub { max-width: 60ch; color: var(--ep-ink-soft, #4C566B); font-size: 14px; line-height: 1.55; margin: 12px 0 0; }
.ep-why-cols { display: grid; grid-template-columns: 1fr; gap: 20px 44px; margin-top: 26px; }
@media (min-width: 900px) { .ep-why-cols { grid-template-columns: repeat(3, 1fr); } }
.ep-why-coltitle { font-family: var(--ep-sans); font-size: 11.5px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ep-gold-deep, #8A6118); margin: 0 0 4px; }
.ep-why-row { display: flex; gap: 13px; align-items: flex-start; padding: 14px 0;
  border-top: 1px solid var(--ep-line, #E4D6BC); }
.ep-why-col .ep-why-row:first-of-type { border-top: 0; }
.ep-why-ic { flex: none; color: var(--ep-navy, #0B2948); display: inline-flex; margin-top: 1px; }
.ep-why-ic--gold { color: var(--ep-gold-deep, #8A6118); }
.ep-why-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ep-why-t { font-family: var(--ep-sans); font-weight: 700; font-size: 14.5px; color: var(--ep-navy, #0B2948); }
.ep-why-d { font-size: 13px; line-height: 1.5; color: var(--ep-ink-soft, #4C566B); }
