/* ==========================================================================
   EDITORIAL FOLIO (Figma node 3:478) + BORDERLESS FANNED DECK
   + QUIET DRAWER + INDEX & BACK NAVIGATION
   ========================================================================== */

.v-folio {
  min-height: 100dvh;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  padding-bottom: 120px;
}

.ef-container {
  width: 100%;
  max-width: 848px;
  margin-inline: auto;
  padding-inline: 24px;
}

.ef-icon {
  display: block;
  flex-shrink: 0;
}

/* ==========================================================================
   TOP BAR (Index + Back)
   ========================================================================== */
.ef-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 34px;
}

/* Lecture completion: a single ring toggle at the right of the top bar
   (localStorage via js/progress.js). */
.ef-complete-toggle {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}

.ef-complete-toggle:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.ef-complete-toggle:focus-visible {
  outline: 2px solid rgb(255 255 255 / 0.5);
  outline-offset: 2px;
}

.ef-complete-ring {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px currentColor;
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

.ef-complete-ring svg {
  opacity: 0;
}

.ef-complete-toggle[aria-pressed="true"] .ef-complete-ring {
  background: rgb(255 255 255 / 0.55);
  box-shadow: none;
  color: #111;
}

.ef-complete-toggle[aria-pressed="true"] .ef-complete-ring svg {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .ef-complete-toggle,
  .ef-complete-ring {
    transition: none;
  }
}

.ef-nav-pill {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: var(--bg-card);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.ef-nav-pill:hover {
  background: var(--bg-btn);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.16);
}

.ef-nav-pill:active { transform: scale(0.97); }

.ef-nav-pill .ef-icon { flex-shrink: 0; }

.ef-nav-pill-label {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ==========================================================================
   FIGMA 20:907-INSPIRED CINEMA LIBRARY & COURSE VIEWS (Cinema Rows / Shelf)
   ========================================================================== */
.cn-page {
  padding-bottom: 96px;
}

.cn-container {
  width: 100%;
  max-width: 1068px;
  margin-inline: auto;
  padding-inline: 24px;
}

.cn-topbar {
  position: relative;
  z-index: 5;
  background: #0f0f0f;
  border-bottom: var(--border-hairline) solid rgb(255 255 255 / 0.06);
}

.cn-topbar-inner {
  width: 100%;
  max-width: 1068px;
  margin-inline: auto;
  padding: 12px 24px;
}

.cn-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cn-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  color: rgb(255 255 255 / 0.92);
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .cn-brand-rest { display: none; }
}

.cn-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: #1a1a1a;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.07);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 140ms ease;
}

.cn-back-btn:hover { background: #262525; }

.cn-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(310px, 56vw);
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  background: #1a1a1a;
  border: 1px solid rgb(255 255 255 / 0.06);
  color: rgb(255 255 255 / 0.55);
}

.cn-search-input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
}

.cn-search-input::placeholder {
  color: rgb(255 255 255 / 0.52);
}

/* Feathered Atmospheric Hero melting smoothly into #000000 left + bottom */
.cn-hero {
  position: relative;
  min-height: 430px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #000;
}

.cn-hero-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cn-hero-art img {
  position: absolute;
  top: 0;
  right: 0;
  width: 78%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
}

.cn-hero-fade-left {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    #000000 0%,
    #000000 24%,
    rgb(0 0 0 / 0.92) 38%,
    rgb(0 0 0 / 0.52) 56%,
    rgb(0 0 0 / 0.14) 76%,
    rgb(0 0 0 / 0.25) 100%
  );
}

.cn-hero-fade-bottom {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    #000000 0%,
    rgb(0 0 0 / 0.78) 18%,
    rgb(0 0 0 / 0.24) 44%,
    rgb(0 0 0 / 0) 70%
  );
}

.cn-hero-content {
  position: relative;
  z-index: 2;
  padding-top: 64px;
  padding-bottom: 52px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.cn-hero-title {
  margin: 0;
  max-width: 560px;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(38px, 5vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  font-weight: 300;
  color: #fff;
  text-wrap: balance;
}

.cn-hero-desc {
  margin: 0;
  max-width: 440px;
  font-family: var(--font-sans);
  font-size: var(--read-sm-size);
  line-height: var(--read-sm-lh);
  letter-spacing: var(--read-ls);
  color: var(--read-color);
  text-wrap: pretty;
}

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

.cn-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: #ffffff;
  color: #0b0b0b;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 140ms ease, transform 140ms ease;
}

.cn-btn-primary:hover:not(:disabled) { opacity: 0.9; }
.cn-btn-primary:active:not(:disabled) { transform: scale(0.97); }
.cn-btn-primary:disabled { opacity: 0.4; cursor: default; }

.cn-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: #212121;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease;
}

.cn-btn-secondary:hover { background: #2e2e2e; }
.cn-btn-secondary:active { transform: scale(0.97); }

/* Unboxed 224x128 Thumbnail Rows directly on #000000 (Figma 20:907) */
.cn-list-section {
  padding-top: 8px;
}

.cn-rows {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cn-row {
  width: 100%;
  padding: 8px;
  margin: -8px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  text-align: start;
  cursor: pointer;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  transition: background-color 150ms ease;
}

.cn-row:hover {
  background: rgb(255 255 255 / 0.045);
}

.cn-row-thumb {
  position: relative;
  width: 224px;
  height: 128px;
  border-radius: 12px;
  overflow: hidden;
  background: #141313;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08);
}

.cn-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms var(--ease-out-cubic);
}

@media (hover: hover) and (pointer: fine) {
  .cn-row:hover .cn-row-thumb img { transform: scale(1.03); }
}

.cn-progress-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: #424242;
}

.cn-progress-fill {
  height: 100%;
  background: var(--accent);
}

.cn-row-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 0;
  min-height: 128px;
}

.cn-row-top {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cn-row-top h2 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.3;
  font-weight: 500;
  color: #fff;
}

.cn-row-top p {
  margin: 0;
  max-width: 460px;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgb(255 255 255 / 0.8);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cn-row-meta {
  font-size: 13px;
  color: rgb(255 255 255 / 0.62);
}

.cn-syllabus-wrap {
  margin-top: 44px;
  padding-top: 32px;
  border-top: var(--border-hairline) solid rgb(255 255 255 / 0.12);
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 800px;
}

.cn-syllabus-wrap--primary {
  margin-top: 8px;
  padding-top: 0;
  border-top: 0;
}


.cn-list-section--shelf {
  padding-top: 0;
}

.cn-list-section--shelf .lib-shelf {
  padding-top: 36px;
}

.cn-empty {
  padding: 28px 0;
  font-size: 14px;
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .cn-hero { min-height: 360px; }
  .cn-hero-art img { width: 100%; opacity: 0.45; }
  .cn-hero-content { padding-top: 44px; padding-bottom: 36px; }
  .cn-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .cn-row-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
  .cn-row-body { min-height: auto; }
}

/* ==========================================================================
   LIBRARY LAYOUT VARIATIONS (Book Shelf, Book Covers, Editorial Cards)
   ========================================================================== */

/* Shared typography helpers */
.lib-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.lib-card-head h2 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--text-primary);
}

.lib-card-arrow {
  display: inline-flex;
  color: rgb(255 255 255 / 0.48);
  flex-shrink: 0;
  transition: transform 160ms var(--ease-out-cubic), color 140ms ease;
}

.lib-card-meta {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-muted);
}

.lib-card-desc,
.lib-split-desc {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-body);
}

/* 1. EDITORIAL CARDS (.lib-cards) — Landmark Card sibling */
.lib-cards {
  padding-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.lib-card {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--bg-card);
  color: inherit;
  text-align: start;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: background-color 150ms ease, box-shadow 160ms ease;
}

.lib-card:hover {
  background: var(--bg-card-hover);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.14);
}

.lib-card-media {
  padding: 20px 20px 0;
  width: 100%;
}

.lib-card-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  outline: 1px solid rgb(255 255 255 / 0.08);
  outline-offset: -1px;
  transition: transform 300ms var(--ease-out-cubic);
}

@media (hover: hover) and (pointer: fine) {
  .lib-card:hover .lib-card-media img { transform: scale(1.012); }
  .lib-card:hover .lib-card-arrow { color: #fff; transform: translateX(3px); }
}

.lib-card-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 2. BOOK COVERS (.lib-posters) — Tall 3:4 monographs with title in bottom scrim */
.lib-posters {
  padding-top: 36px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.lib-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--bg-card);
  overflow: hidden;
  text-align: start;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.09);
  transition: transform 220ms var(--ease-out-cubic), box-shadow 180ms ease;
}

.lib-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 380ms var(--ease-out-cubic);
}

.lib-poster-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgb(0 0 0 / 0.92) 0%,
    rgb(0 0 0 / 0.72) 26%,
    rgb(0 0 0 / 0.28) 54%,
    rgb(0 0 0 / 0) 78%
  );
  pointer-events: none;
}

.lib-poster-text {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 20px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lib-poster-text h2 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.24;
  font-weight: 500;
  color: #fff;
  text-wrap: balance;
}

.lib-poster-text p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: rgb(255 255 255 / 0.72);
}

@media (hover: hover) and (pointer: fine) {
  .lib-poster:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 0 1px rgb(255 255 255 / 0.24), 0 18px 40px rgb(0 0 0 / 0.65);
  }
  .lib-poster:hover img { transform: scale(1.035); }
}

.lib-poster:active { transform: scale(0.985); }

/* 3. BOOK SHELF (.lib-shelf) — Tall 3:4 unboxed covers with clean titles below */
.lib-shelf {
  padding-top: 36px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 20px;
  align-items: start;
}

.lib-book {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: start;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lib-book-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 0.1),
    0 12px 32px rgb(0 0 0 / 0.55);
  transition: transform 240ms var(--ease-out-cubic), box-shadow 180ms ease;
}

.lib-book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 360ms var(--ease-out-cubic);
}

.lib-book-caption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-inline: 2px;
}

.lib-book-caption h2 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.32;
  font-weight: 500;
  color: var(--text-primary);
  text-wrap: balance;
}

.lib-book-caption p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
}

@media (hover: hover) and (pointer: fine) {
  .lib-book:hover .lib-book-cover {
    transform: translateY(-3px);
    box-shadow:
      0 0 0 1px rgb(255 255 255 / 0.24),
      0 18px 42px rgb(0 0 0 / 0.72);
  }
  .lib-book:hover .lib-book-cover img { transform: scale(1.03); }
}

.lib-book:active .lib-book-cover { transform: scale(0.985); }

/* 3. WIDESCREEN GALLERY (.lib-wides) — Edge-to-edge wide plates with bottom-left overlay */
.lib-wides {
  padding-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lib-wide {
  position: relative;
  width: 100%;
  height: 296px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--bg-card);
  overflow: hidden;
  text-align: start;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.09);
  transition: box-shadow 180ms ease;
}

.lib-wide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 380ms var(--ease-out-cubic);
}

.lib-wide-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgb(0 0 0 / 0.9) 0%,
    rgb(0 0 0 / 0.56) 38%,
    rgb(0 0 0 / 0.14) 72%,
    rgb(0 0 0 / 0) 100%
  );
  pointer-events: none;
}

.lib-wide-text {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.lib-wide-meta {
  font-size: 12.5px;
  color: rgb(255 255 255 / 0.72);
}

.lib-wide-text h2 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 26px;
  line-height: 1.14;
  letter-spacing: -0.01em;
  font-weight: 400;
  color: #fff;
}

.lib-wide-text p {
  margin: 0;
  font-size: 14px;
  color: rgb(255 255 255 / 0.78);
}

@media (hover: hover) and (pointer: fine) {
  .lib-wide:hover { box-shadow: 0 0 0 1px rgb(255 255 255 / 0.24); }
  .lib-wide:hover img { transform: scale(1.028); }
}

/* 4. SPLIT ROWS (.lib-splits) — Horizontal cover-left + editorial text-right */
.lib-splits {
  padding-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lib-split {
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: var(--bg-card);
  color: inherit;
  text-align: start;
  cursor: pointer;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  transition: background-color 150ms ease, box-shadow 160ms ease;
}

.lib-split:hover {
  background: var(--bg-card-hover);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.14);
}

.lib-split-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 7px;
  overflow: hidden;
  background: #0b0b0b;
}

.lib-split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms var(--ease-out-cubic);
}

.lib-split-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-right: 8px;
}

@media (hover: hover) and (pointer: fine) {
  .lib-split:hover .lib-split-media img { transform: scale(1.03); }
  .lib-split:hover .lib-card-arrow { color: #fff; transform: translateX(3px); }
}

/* 5. MINIMAL PLATES (.lib-plates) — Unboxed art plates directly on #000000 */
.lib-plates {
  padding-top: 36px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 20px;
}

.lib-plate {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: start;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lib-plate-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08);
  transition: box-shadow 180ms ease;
}

.lib-plate-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms var(--ease-out-cubic);
}

.lib-plate-caption {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lib-plate-caption h2 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.32;
  font-weight: 500;
  color: var(--text-primary);
}

.lib-plate-caption p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
}

@media (hover: hover) and (pointer: fine) {
  .lib-plate:hover .lib-plate-media { box-shadow: 0 0 0 1px rgb(255 255 255 / 0.24); }
  .lib-plate:hover .lib-plate-media img { transform: scale(1.028); }
}

/* 6. CATALOG + HOVER PREVIEW (.lib-catalog) — Scalable index + framed artwork */
.lib-catalog {
  padding-top: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.lib-catalog-list {
  display: flex;
  flex-direction: column;
  border-top: var(--border-hairline) solid rgb(255 255 255 / 0.1);
}

.lib-cat-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 18px 10px;
  border: 0;
  border-bottom: var(--border-hairline) solid rgb(255 255 255 / 0.09);
  background: transparent;
  color: inherit;
  text-align: start;
  cursor: pointer;
  transition: background-color 140ms ease;
}

.lib-cat-row:hover,
.lib-cat-row.is-previewed {
  background: rgb(255 255 255 / 0.04);
}

.lib-cat-thumb {
  display: none;
}

.lib-cat-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.lib-cat-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
}

.lib-cat-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.lib-cat-arrow {
  display: inline-flex;
  color: rgb(255 255 255 / 0.45);
  transition: transform 150ms ease, color 140ms ease;
}

.lib-cat-row:hover .lib-cat-arrow,
.lib-cat-row.is-previewed .lib-cat-arrow {
  color: #fff;
  transform: translateX(3px);
}

.lib-catalog-preview {
  position: sticky;
  top: 32px;
  padding: 14px;
  border-radius: 12px;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lib-catalog-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  background: #0b0b0b;
}

.lib-catalog-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lib-catalog-cap-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.lib-catalog-cap-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .lib-posters,
  .lib-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .lib-wide { height: 224px; }
  .lib-wide-text h2 { font-size: 21px; }
  .lib-split { grid-template-columns: 1fr; gap: 14px; }
  .lib-plates { grid-template-columns: 1fr; gap: 28px; }
  .lib-catalog { grid-template-columns: 1fr; }
  .lib-catalog-preview { display: none; }
  .lib-cat-row { grid-template-columns: 64px minmax(0, 1fr) auto; padding: 14px 4px; }
  .lib-cat-thumb {
    display: block;
    width: 64px;
    height: 48px;
    border-radius: 5px;
    overflow: hidden;
  }
  .lib-cat-thumb img { width: 100%; height: 100%; object-fit: cover; }
}

@media (max-width: 480px) {
  .lib-posters { grid-template-columns: 1fr; }
  .lib-poster { aspect-ratio: 4 / 3; }
}

/* ==========================================================================
   COURSE INDEX PAGE (24 Lectures grouped into 6 Parts)
   ========================================================================== */
.ef-index-groups {
  padding-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.ef-syl-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ef-syl-part-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.ef-syl-part-num {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.ef-syl-part-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.ef-syl-items {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ef-syl-row {
  width: 100%;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-body);
  text-align: start;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color 130ms ease, color 130ms ease;
}

.ef-syl-row.is-ready {
  color: var(--text-primary);
}

.ef-syl-row.is-ready:hover {
  background: rgb(255 255 255 / 0.06);
}

.ef-syl-row.is-upcoming {
  opacity: 0.36;
  cursor: default;
}

.ef-syl-num {
  font-size: 12.5px;
  color: var(--text-muted);
}

.ef-syl-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ef-syl-end {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
}

.ef-syl-done {
  display: inline-grid;
  place-items: center;
  width: 18px;
  margin-right: 10px;
  color: rgb(255 255 255 / 0.55);
}

.ef-syl-done:empty {
  visibility: hidden;
}

.ef-syl-arrow {
  display: inline-flex;
  color: rgb(255 255 255 / 0.55);
  transition: transform 140ms ease, color 140ms ease;
}

.ef-syl-row.is-ready:hover .ef-syl-arrow {
  color: #fff;
  transform: translateX(2px);
}

.ef-syl-soon {
  font-size: 11.5px;
  color: rgb(255 255 255 / 0.45);
}

/* Quiet reading pause row — no colored left border or tinted box */
.ef-syl-milestone {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 4px 14px;
  padding: 12px 0;
  border-top: var(--border-hairline) solid rgb(255 255 255 / 0.08);
  border-bottom: var(--border-hairline) solid rgb(255 255 255 / 0.08);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text-muted);
}

.ef-syl-milestone-icon {
  display: inline-flex;
  align-items: center;
}

/* ==========================================================================
   LECTURE FOOTER PREV/NEXT
   ========================================================================== */
.ef-lecture-footer {
  padding-top: 8px;
}

.ef-footer-grid {
  padding-top: 32px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ef-footer-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border: 0;
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-primary);
  text-align: start;
  cursor: pointer;
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

.ef-footer-next {
  align-items: flex-end;
  text-align: end;
}

.ef-footer-link:hover {
  background: var(--bg-card-hover);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.14);
}

.ef-footer-dir {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.ef-footer-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

/* ==========================================================================
   HEADER, CHAPTERS, & ELEVATED GUIDEBOOK PROSE (Figma node 3:478)
   ========================================================================== */
.ef-header {
  padding: 44px 0 56px;
}

.ef-header .ef-container {
  max-width: calc(var(--read-measure) + 48px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ef-title {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(38px, 4.8vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  font-weight: 300;
  color: var(--text-primary);
}

.ef-lead {
  margin: 0;
  width: 100%;
  font-family: var(--font-sans);
  font-size: var(--read-size);
  line-height: var(--read-lh);
  letter-spacing: var(--read-ls);
  font-weight: 400;
  color: var(--read-color);
  text-wrap: pretty;
}

.ef-spread {
  padding: 0 0 68px;
}

.ef-spread-col {
  max-width: calc(var(--read-wide) + 48px);
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.ef-chapter-divider {
  width: 100%;
  max-width: var(--read-measure);
  margin-inline: auto;
  height: 1px;
  background: var(--divider-subtle);
}

.ef-chapter-block,
.ef-chapter-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

/* Reading column: prose, drawers and questions sit at ~65 chars/line,
   centred inside the wider column that plates and the quiz deck use. */
.ef-chapter-block {
  max-width: var(--read-measure);
  margin-inline: auto;
}

.qz-bottom-section .ef-chapter-block {
  max-width: none;
}

.ef-spread-intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ef-chapter-num {
  display: block;
  font-family: var(--font-manrope);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--text-muted);
}

.ef-spread-intro h2 {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: -0.01em;
  font-weight: 300;
  color: var(--text-primary);
}

.ef-study-prose {
  display: flex;
  flex-direction: column;
  gap: var(--read-gap);
}

.ef-spread-intro p {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--read-size);
  line-height: var(--read-lh);
  letter-spacing: var(--read-ls);
  font-weight: 400;
  color: var(--read-color);
}

/* ==========================================================================
   QUIET DRAWER (Lucide chevron-down SVG, crisp alignment & padding)
   ========================================================================== */
.ef-upd-drawer {
  border-radius: 10px;
  background: var(--bg-card);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.06);
  overflow: hidden;
}

.ef-upd-drawer-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  font-size: 13.5px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  transition: color 140ms ease, background-color 140ms ease;
}

.ef-upd-drawer-summary::-webkit-details-marker { display: none; }

.ef-upd-drawer-summary:hover {
  color: var(--text-primary);
  background: rgb(255 255 255 / 0.03);
}

.ef-upd-drawer-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ef-upd-drawer-icon {
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.ef-upd-drawer-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: rgb(255 255 255 / 0.52);
  flex-shrink: 0;
  transition: transform 200ms var(--ease-out-cubic), color 140ms ease;
}

.ef-upd-drawer-summary:hover .ef-upd-drawer-chevron {
  color: var(--text-primary);
}

.ef-upd-drawer[open] .ef-upd-drawer-chevron {
  transform: rotate(180deg);
  color: var(--text-primary);
}

.ef-upd-drawer-list {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  border-top: var(--border-hairline) solid rgb(255 255 255 / 0.07);
}

.ef-upd-drawer-item {
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-bottom: var(--border-hairline) solid rgb(255 255 255 / 0.06);
}

.ef-upd-drawer-item:last-child {
  padding-bottom: 2px;
  border-bottom: 0;
}

.ef-upd-drawer-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.ef-upd-drawer-old {
  margin: 0;
  font-size: var(--read-xs-size);
  line-height: var(--read-xs-lh);
  letter-spacing: var(--read-ls);
  color: var(--text-muted);
}

.ef-upd-drawer-new {
  margin: 0;
  font-size: var(--read-sm-size);
  line-height: var(--read-sm-lh);
  letter-spacing: var(--read-ls);
  color: var(--read-color);
}

/* Questions to Consider */
.ef-questions-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ef-question-card {
  padding: 20px 22px;
  border-radius: 12px;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ef-question-text {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.55;
  letter-spacing: var(--read-ls);
  color: var(--text-primary);
}

.ef-question-idx {
  color: var(--text-muted);
  margin-right: 4px;
}

.ef-question-details summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 6px;
  background: var(--bg-btn);
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 140ms ease;
}

.ef-question-details summary::-webkit-details-marker { display: none; }
.ef-question-details summary:hover { background: var(--bg-btn-hover); }
.ef-question-details[open] summary .ef-icon-chevron { transform: rotate(180deg); }
.ef-question-details summary .ef-icon-chevron { transition: transform 180ms ease; }

.ef-question-reflection {
  margin: 12px 0 0;
  font-size: var(--read-sm-size);
  line-height: var(--read-sm-lh);
  letter-spacing: var(--read-ls);
  color: var(--read-color);
}

/* ==========================================================================
   LANDMARK CARD + BORDERLESS FANNED DECK
   ========================================================================== */
.ef-visual-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ef-landmark-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
}

.ef-hero-plate {
  display: block;
  width: 100%;
  height: 428px;
  padding: 24px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.ef-hero-plate img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
  outline: 1px solid rgb(255 255 255 / 0.08);
  outline-offset: -1px;
  transition: transform 260ms var(--ease-out-cubic);
}

@media (hover: hover) and (pointer: fine) {
  .ef-hero-plate:hover img {
    transform: scale(1.012);
  }
}

.ef-landmark-text {
  padding: 0 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.ef-landmark-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 600px;
}

.ef-landmark-meta-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ef-meta-lines {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ef-landmark-meta-group h3 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 600;
  color: var(--text-primary);
}

.ef-item-meta {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--read-xs-size);
  line-height: var(--read-xs-lh);
  letter-spacing: var(--read-ls);
  color: var(--text-muted);
}

.ef-item-summary {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--read-sm-size);
  line-height: var(--read-sm-lh);
  letter-spacing: var(--read-ls);
  color: var(--read-color);
}

.ef-plate-btn {
  align-self: flex-start;
  padding: 12px;
  border: 0;
  border-radius: 6px;
  background: var(--bg-btn);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease;
}

.ef-plate-btn:hover { background: var(--bg-btn-hover); }
.ef-plate-btn:active { transform: scale(0.96); }

.ex-fan-wrap {
  padding: 20px 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ex-fan-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 224px;
}

.ex-fan-card {
  position: relative;
  flex: 0 1 228px;
  height: 184px;
  margin-inline: -16px;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: var(--bg-card);
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 0.1),
    0 14px 32px rgb(0 0 0 / 0.65);
  cursor: pointer;
  z-index: var(--fan-z, 1);
  transform: translateY(var(--fan-ty, 0px)) rotate(var(--fan-rot, 0deg));
  transition: transform 280ms var(--ease-out-quint), box-shadow 200ms ease;
}

.ex-fan-card img {
  width: 100%;
  height: 100%;
  border-radius: 5px;
  object-fit: contain;
  background: #0b0b0b;
}

@media (hover: hover) and (pointer: fine) {
  .ex-fan-card:hover {
    z-index: 40;
    transform: translateY(-22px) rotate(0deg) scale(1.05);
    box-shadow:
      0 0 0 1px rgb(255 255 255 / 0.28),
      0 24px 48px rgb(0 0 0 / 0.85);
  }
}

.ex-fan-card:active {
  transform: translateY(-10px) rotate(0deg) scale(1.01);
}

.ex-fan-caption {
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 14px;
  opacity: 0;
  transition: opacity 150ms ease;
}

.ex-fan-caption.is-visible { opacity: 1; }
.ex-fan-active-title { color: var(--text-primary); font-weight: 500; }
.ex-fan-active-year { color: var(--text-muted); font-size: 13px; }

/* ==========================================================================
   INTERACTIVE QUIZ / ACTIVE RECALL SYSTEM (5 Placement & Format Variations)
   ========================================================================== */
.v-folio.has-quiz-picker {
  padding-bottom: 124px;
}

.qz-top-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: var(--bg-btn);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease;
}

.qz-top-pill svg { color: var(--accent); }
.qz-top-pill:hover { background: var(--bg-btn-hover); }
.qz-top-pill:active { transform: scale(0.97); }

/* Variation 3: Read | Quiz segmented control */
.qz-seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 8px;
  background: var(--bg-card);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08);
}

.qz-seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}

.qz-seg-btn[aria-selected="true"] {
  background: var(--bg-btn);
  color: var(--text-primary);
}

.qz-seg-count {
  font-size: 11.5px;
  color: var(--accent);
}

/* Variation 2: Inline Section Check collapsible row */
.qz-inline-drawer {
  margin-top: 6px;
  border-radius: 10px;
  background: #121111;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.07);
  overflow: hidden;
}

.qz-inline-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  transition: color 140ms ease, background-color 140ms ease;
}

.qz-inline-summary::-webkit-details-marker { display: none; }
.qz-inline-summary:hover { color: var(--text-primary); background: rgb(255 255 255 / 0.03); }

.qz-inline-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.qz-inline-icon {
  display: inline-flex;
  color: var(--accent);
}

.qz-inline-drawer[open] .ef-upd-drawer-chevron {
  transform: rotate(180deg);
  color: var(--text-primary);
}

.qz-inline-body {
  padding: 6px 16px 18px;
  border-top: var(--border-hairline) solid rgb(255 255 255 / 0.07);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Shared Quiz Card */
.qz-card {
  padding: 22px 24px;
  border-radius: 12px;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.qz-card--compact {
  padding: 16px 0 4px;
  border-radius: 0;
  background: transparent;
}

.qz-card--compact + .qz-card--compact {
  padding-top: 20px;
  border-top: var(--border-hairline) solid rgb(255 255 255 / 0.07);
}

.qz-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.qz-prompt {
  margin: 0;
  max-width: var(--read-measure);
  font-family: var(--font-sans);
  font-size: 17.5px;
  line-height: 1.5;
  letter-spacing: var(--read-ls);
  font-weight: 500;
  color: var(--text-primary);
}

.qz-media {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qz-media img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 8px;
  background: #0a0a0a;
  outline: 1px solid rgb(255 255 255 / 0.08);
  outline-offset: -1px;
}

.qz-media-cap {
  font-size: 12px;
  color: var(--text-muted);
}

/* Multiple Choice Options */
.qz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qz-opt {
  width: 100%;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 12px 14px;
  border: 0;
  border-radius: 8px;
  background: #211f1f;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.06);
  color: var(--text-body);
  text-align: start;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: var(--read-ls);
  cursor: pointer;
  transition: background-color 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.qz-opt:hover:not(:disabled) {
  background: #2a2727;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.18);
  color: #fff;
}

.qz-opt:disabled { cursor: default; }

.qz-opt-letter {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgb(255 255 255 / 0.07);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}

.qz-opt.is-correct {
  background: rgb(48 164 108 / 0.14);
  box-shadow: 0 0 0 1px rgb(48 164 108 / 0.45);
  color: #fff;
}

.qz-opt.is-correct .qz-opt-letter {
  background: rgb(48 164 108 / 0.28);
  color: #7ee2b8;
}

.qz-opt.is-wrong {
  background: rgb(229 72 77 / 0.13);
  box-shadow: 0 0 0 1px rgb(229 72 77 / 0.4);
  color: #fff;
}

.qz-opt.is-wrong .qz-opt-letter {
  background: rgb(229 72 77 / 0.25);
  color: #ff9592;
}

.qz-opt.is-dim {
  opacity: 0.42;
}

.qz-feedback {
  padding: 14px 16px;
  border-radius: 8px;
  background: #121111;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.qz-feedback-head {
  font-size: 13px;
  font-weight: 600;
  color: #7ee2b8;
}

.qz-feedback.is-wrong .qz-feedback-head {
  color: var(--accent);
}

.qz-feedback p {
  margin: 0;
  max-width: var(--read-measure);
  font-size: var(--read-sm-size);
  line-height: var(--read-sm-lh);
  letter-spacing: var(--read-ls);
  color: var(--read-color);
}
.qz-feedback-actions {
  display: flex;
  margin-top: 8px;
}

/* Open-ended Recall */
.qz-scratchpad {
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 8px;
  background: #100f0f;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  resize: vertical;
}

.qz-scratchpad:focus {
  outline: none;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.26);
}

.qz-scratchpad::placeholder {
  color: rgb(255 255 255 / 0.36);
}

.qz-reveal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 4px;
}

.qz-think-hint {
  font-size: 13px;
  color: var(--text-muted);
}

.qz-reveal-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: var(--bg-btn);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease;
}

.qz-reveal-btn:hover { background: var(--bg-btn-hover); }
.qz-reveal-btn:active { transform: scale(0.97); }

.qz-open-answer {
  padding: 16px 18px;
  border-radius: 8px;
  background: #121111;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qz-open-prose {
  margin: 0;
  max-width: var(--read-measure);
  font-size: var(--read-sm-size);
  line-height: var(--read-sm-lh);
  letter-spacing: var(--read-ls);
  color: var(--read-color);
}

.qz-key-points {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: var(--read-measure);
  font-size: var(--read-xs-size);
  line-height: var(--read-xs-lh);
  letter-spacing: var(--read-ls);
  color: var(--text-muted);
}

.qz-self-check {
  padding-top: 12px;
  border-top: var(--border-hairline) solid rgb(255 255 255 / 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.qz-self-label {
  font-size: 12.5px;
  color: var(--text-muted);
}

.qz-self-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qz-grade-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: var(--bg-btn);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

.qz-grade-btn:hover { background: var(--bg-btn-hover); color: #fff; }

.qz-grade-btn.is-selected-got {
  background: rgb(48 164 108 / 0.22);
  box-shadow: 0 0 0 1px rgb(48 164 108 / 0.5);
  color: #7ee2b8;
}

.qz-grade-btn.is-selected-review {
  background: rgb(236 114 0 / 0.2);
  box-shadow: 0 0 0 1px rgb(236 114 0 / 0.55);
  color: #ffb26b;
}

/* Deck & Modal Controls */
.qz-deck {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.qz-deck-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.qz-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qz-dot {
  width: 24px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.16);
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease;
}

.qz-dot.is-active { background: #fff; }
.qz-dot.is-solid { background: #30a46c; }
.qz-dot.is-missed { background: var(--accent); }

.qz-score {
  font-size: 13px;
  color: var(--text-muted);
}

.qz-deck-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.qz-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: #ffffff;
  color: #0b0b0b;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 140ms ease, transform 140ms ease;
}

.qz-btn-primary:hover { opacity: 0.9; }
.qz-btn-primary:active { transform: scale(0.97); }

.qz-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--bg-btn);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 140ms ease;
}

.qz-btn-ghost:hover:not(:disabled) { background: var(--bg-btn-hover); }
.qz-btn-ghost:disabled { opacity: 0.3; cursor: not-allowed; }

/* Launch Card (Bottom CTA for Top -> Modal) */
.qz-launch-card {
  padding: 24px;
  border-radius: 12px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.qz-launch-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 520px;
}

.qz-launch-copy h2 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 22px;
  line-height: 1.2;
  font-weight: 400;
  color: var(--text-primary);
}

.qz-launch-copy p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* Full Sheet & Summary Card */
.qz-sheet {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.qz-sheet-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.qz-sheet-title {
  margin: 4px 0 0;
  font-family: var(--font-sans);
  font-size: 30px;
  line-height: 1.12;
  font-weight: 400;
  color: var(--text-primary);
}

.qz-sheet-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qz-reset-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 12.5px;
  cursor: pointer;
}

.qz-reset-link:hover { color: #fff; background: var(--bg-btn); }

.qz-sheet-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.qz-summary-card {
  padding: 28px 24px;
  border-radius: 12px;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qz-summary-card h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  color: #fff;
}

.qz-summary-card p {
  margin: 0;
  max-width: var(--read-measure);
  font-size: var(--read-sm-size);
  line-height: var(--read-sm-lh);
  letter-spacing: var(--read-ls);
  color: var(--read-color);
}

.qz-summary-actions {
  margin-top: 6px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================================================
   RESPONSIVE & REDUCED MOTION
   ========================================================================== */
@media (max-width: 720px) {
  .ef-header { padding: 26px 0 40px; }
  .ef-top-bar { margin-bottom: 24px; }
  .ef-spread-col { gap: 40px; }
  .ef-hero-plate { height: 240px; padding: 16px; }
  .ef-landmark-text { padding: 0 16px 18px; }
  .ef-footer-grid { grid-template-columns: 1fr; }
  .ef-footer-next { align-items: flex-start; text-align: start; }
  .ex-fan-wrap { padding: 8px 0 0; gap: 0; }
  .ex-fan-stage {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: auto;
    gap: 10px;
  }
  .ex-fan-card {
    width: 100%;
    height: 136px;
    margin-inline: 0;
    padding: 8px;
    transform: none;
  }
  .ex-fan-caption { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ef-hero-plate img,
  .ex-fan-card,
  .ex-fan-caption,
  .ef-upd-drawer-chevron,
  .ef-syl-arrow {
    transition: none;
  }
}
