/* ── IELTS Cue Cards — library + detail page ─────────────────────
   Lives under Speaking. Two surfaces:
     1. Library  — grid of 55 cards across 5 topic categories
     2. Detail   — single card: cue card + tip + sample + vocab + Part 1/3

   Visual language: dark cocoa shell, cream paper insets for the cue
   card and sample answer, honey accents, Source Serif 4 italic for
   titles. Decorative ornaments and hero numerals between sections to
   keep the page feeling editorial rather than database-listy.
   ─────────────────────────────────────────────────────────────── */

/* ═══════════════════════════════════════════════════════════════════
   LIBRARY PAGE
   ═══════════════════════════════════════════════════════════════════ */

.cc-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
  position: relative;
}

/* Hero header — large title + stats. */
.cc-head {
  position: relative;
  padding: 3rem 0 0;
  margin-bottom: 1rem;
}
.cc-head-eyebrow {
  position: relative;
  font-family: 'Inter', sans-serif;
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ielts-honey, #D9A268);
  margin-bottom: 1rem;
}
.cc-head-title {
  position: relative;
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  color: var(--ielts-ink, #F2E6CC);
  letter-spacing: -.015em;
  line-height: 1.05;
  margin: 0 0 1.2rem;
}
.cc-head-stats {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.2rem;
  padding: 1.2rem 0 0;
  border-top: 1px solid rgba(242, 230, 204, 0.10);
  margin-top: 1.2rem;
  max-width: 620px;
}
.cc-head-stat { display: flex; flex-direction: column; gap: .15rem; }
.cc-head-stat-n {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: 1.4rem;
  color: var(--ielts-honey, #D9A268);
  font-variant-numeric: oldstyle-nums;
  line-height: 1;
}
.cc-head-stat-l {
  font-size: .7rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ielts-ink-soft, #B6A484);
  font-weight: 600;
}

/* Filter chips — sits naturally in the page flow, no background block. */
.cc-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  padding: 1.5rem 0 .5rem;
}
.cc-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem 1.05rem;
  background: transparent;
  border: 1px solid rgba(242, 230, 204, 0.16);
  border-radius: 999px;
  color: var(--ielts-ink-soft, #B6A484);
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .005em;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .12s;
}
.cc-chip:hover {
  border-color: rgba(217, 162, 104, 0.5);
  color: var(--ielts-ink, #F2E6CC);
  transform: translateY(-1px);
}
.cc-chip.is-active {
  background: linear-gradient(180deg, rgba(217, 162, 104, 0.22), rgba(217, 162, 104, 0.14));
  border-color: rgba(217, 162, 104, 0.55);
  color: var(--ielts-honey, #D9A268);
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(217, 162, 104, 0.12);
}
.cc-chip-count {
  font-size: .72rem;
  opacity: .65;
  font-variant-numeric: tabular-nums;
}
.cc-chip-icon {
  width: 12px;
  height: 12px;
  margin-right: .05rem;
}

/* Category sections — decorative divider above each. */
.cc-section {
  margin-top: 3rem;
}
.cc-section:first-of-type { margin-top: 2.2rem; }

.cc-section-divider {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin: 0 0 1.5rem;
}
.cc-section-divider::before,
.cc-section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(217, 162, 104, 0.35) 50%, transparent 100%);
}
.cc-section-divider-mark {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  color: var(--ielts-honey, #D9A268);
  opacity: .55;
  font-size: 1.1rem;
  line-height: 1;
}

.cc-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.3rem;
}
.cc-section-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1.7rem;
  color: var(--ielts-ink, #F2E6CC);
  letter-spacing: -.005em;
  margin: 0;
}
.cc-section-count {
  font-size: .75rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ielts-ink-soft, #B6A484);
  opacity: .75;
}

/* Card grid — 3 columns × 4 rows (12 per category at full capacity).
   Collapses to 2 columns mid-width, 1 column on phones. */
.cc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
}
@media (max-width: 900px) { .cc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cc-grid { grid-template-columns: 1fr; } }

/* Tile — cream paper card sitting on the cocoa desk. Same physical
   material as the detail-page paper insets, so the library feels like
   a stack of index cards laid out for the student to pick from. */
.cc-tile {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: .85rem 1rem .8rem;
  background: var(--ielts-paper, #F5EBD3);
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.50  0 0 0 0 0.32  0 0 0 0 0.16  0 0 0 0.04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  border: 1px solid rgba(31, 24, 18, 0.08);
  border-radius: 11px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .14s, box-shadow .2s;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.16),
    0 6px 16px -12px rgba(0, 0, 0, 0.40);
}
.cc-tile::before {
  /* Top accent stripe — appears on hover */
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--ielts-honey, #D9A268), transparent);
  opacity: 0;
  transition: opacity .25s;
}
.cc-tile:hover {
  background: #F8EFD9;
  border-color: rgba(217, 162, 104, 0.5);
  transform: translateY(-4px);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.2),
    0 16px 36px -18px rgba(0, 0, 0, 0.55);
}
.cc-tile:hover::before { opacity: 1; }

/* Tile number — small italic numeral above the title. */
.cc-tile-num {
  display: inline-block;
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: .85rem;
  color: var(--ielts-honey, #D9A268);
  line-height: 1;
  letter-spacing: .01em;
}

.cc-tile-title {
  flex: 1;
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: .98rem;
  color: var(--ielts-paper-ink, #1F1812);
  line-height: 1.28;
  letter-spacing: -.005em;
  padding-right: 1.8rem; /* leave room for the bookmark in the corner */
}

/* Bookmark button — floating top-right of the tile. Outline by default,
   filled honey when saved. */
.cc-tile-save {
  position: absolute;
  top: .55rem;
  right: .55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: rgba(31, 24, 18, 0.32);
  cursor: pointer;
  transition: color .15s, background .15s, transform .15s;
  z-index: 2;
}
.cc-tile-save:hover {
  color: var(--ielts-honey, #D9A268);
  background: rgba(217, 162, 104, 0.10);
  transform: translateY(-1px);
}
.cc-tile-save.is-saved {
  color: var(--ielts-honey, #D9A268);
}
.cc-tile-save svg { width: 14px; height: 14px; }
.cc-tile-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-top: .15rem;
  padding-top: .4rem;
  border-top: 1px solid rgba(31, 24, 18, 0.10);
}
.cc-tile-meta {
  font-size: .65rem;
  color: rgba(31, 24, 18, 0.5);
  letter-spacing: .05em;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  font-weight: 600;
}
.cc-tile-arrow {
  width: 13px;
  height: 13px;
  color: rgba(181, 122, 46, 1);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .2s, transform .2s;
}
.cc-tile:hover .cc-tile-arrow { opacity: 1; transform: translateX(0); }

/* ═══════════════════════════════════════════════════════════════════
   DETAIL PAGE — wider than library text columns, with editorial flair
   ═══════════════════════════════════════════════════════════════════ */

.cc-detail-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem 6rem;
}

/* Top bar — back link on the left, save button on the right. */
.cc-detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
}

.cc-back {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .55rem .35rem 0;
  background: transparent;
  border: none;
  color: var(--ielts-ink-soft, #B6A484);
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  text-decoration: none;
  letter-spacing: .005em;
  transition: color .15s, transform .15s;
  cursor: pointer;
  width: max-content;
}
.cc-back:hover {
  color: var(--ielts-honey, #D9A268);
  transform: translateX(-2px);
}

/* Detail hero — big italic title with a category pill in the eyebrow,
   plus a floating decorative card number anchored to the bottom-right
   of the head so it never gets cut off. No overflow:hidden — the
   numeral can sit naturally within (or just at the edge of) the head. */
.cc-detail-head {
  position: relative;
  padding: 1.4rem 0 3.5rem;
}
.cc-detail-num-bg {
  position: absolute;
  right: -.5rem;
  bottom: 0;
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(6.5rem, 13vw, 10rem);
  color: var(--ielts-honey, #D9A268);
  opacity: 0.10;
  line-height: 0.82;
  letter-spacing: -.04em;
  pointer-events: none;
  user-select: none;
  font-variant-numeric: oldstyle-nums;
}
.cc-detail-eyebrow-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.cc-detail-category {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .7rem;
  background: rgba(217, 162, 104, 0.14);
  border: 1px solid rgba(217, 162, 104, 0.35);
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: .65rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ielts-honey, #D9A268);
}
.cc-detail-category-icon { width: 11px; height: 11px; }
.cc-detail-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: .68rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ielts-ink-soft, #B6A484);
}
/* Save button — sits in the top bar opposite the back link. */
.cc-detail-save {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  flex-shrink: 0;
  padding: .5rem .85rem;
  background: rgba(242, 230, 204, 0.05);
  border: 1px solid rgba(217, 162, 104, 0.30);
  border-radius: 999px;
  color: var(--ielts-ink-soft, #B6A484);
  font-family: 'Inter', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s, transform .15s;
}
.cc-detail-save:hover {
  color: var(--ielts-honey, #D9A268);
  border-color: rgba(217, 162, 104, 0.55);
  background: rgba(217, 162, 104, 0.12);
  transform: translateY(-1px);
}
.cc-detail-save.is-saved {
  color: var(--ielts-honey, #D9A268);
  border-color: rgba(217, 162, 104, 0.55);
  background: rgba(217, 162, 104, 0.14);
}
.cc-detail-save svg { width: 16px; height: 16px; }

.cc-detail-title {
  position: relative;
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  color: var(--ielts-ink, #F2E6CC);
  letter-spacing: -.015em;
  line-height: 1.1;
  margin: 0;
}

/* Editorial section divider — used between major content blocks.
   Centered ornament, two flanking lines, all honey-tinted. */
.cc-section-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 3rem 0 1.4rem;
}
.cc-section-label::before,
.cc-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217, 162, 104, 0.32), transparent);
}
.cc-section-label-text {
  font-family: 'Inter', sans-serif;
  font-size: .68rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ielts-honey, #D9A268);
  opacity: .85;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Cream paper inset — the centrepiece visual. Used for cue card and
   sample answer. Has subtle paper grain texture via SVG noise. */
.cc-paper {
  background: var(--ielts-paper, #F5EBD3);
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.50  0 0 0 0 0.32  0 0 0 0 0.16  0 0 0 0.05 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  color: var(--ielts-paper-ink, #1F1812);
  border-radius: 14px;
  padding: 2rem 2.2rem;
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.18),
    0 2px 0 rgba(245, 235, 211, 0.04),
    0 18px 40px -22px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(31, 24, 18, 0.04);
  font-family: 'Inter', sans-serif;
  line-height: 1.55;
  position: relative;
}

/* Cue card paper — flanked by decorative quotation marks */
.cc-cuecard {
  position: relative;
}
.cc-cuecard::before,
.cc-cuecard::after {
  position: absolute;
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: 4.5rem;
  color: var(--ielts-honey, #D9A268);
  opacity: .22;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}
.cc-cuecard::before {
  content: '\201C';
  top: -.4rem;
  left: -.3rem;
}
.cc-cuecard::after {
  content: '\201D';
  bottom: -1.5rem;
  right: -.3rem;
}
@media (max-width: 720px) {
  .cc-cuecard::before, .cc-cuecard::after { display: none; }
}

.cc-cuecard-prompt {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--ielts-paper-ink, #1F1812);
  margin: 0 0 1.2rem;
  letter-spacing: -.005em;
  line-height: 1.35;
}
.cc-cuecard-leadin {
  font-size: .92rem;
  font-weight: 600;
  color: rgba(31, 24, 18, 0.7);
  margin-bottom: .5rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .72rem;
}
.cc-cuecard-bullets {
  margin: 0;
  padding-left: 1.4rem;
  list-style: none;
}
.cc-cuecard-bullets li {
  font-size: 1.02rem;
  color: rgba(31, 24, 18, 0.88);
  padding: .25rem 0;
  line-height: 1.5;
  position: relative;
}
.cc-cuecard-bullets li::before {
  content: '◆';
  position: absolute;
  left: -1.4rem;
  top: .35rem;
  font-size: .55rem;
  color: var(--ielts-honey, #D9A268);
  opacity: .75;
}

/* Examiner tip — bordered callout, more visually distinct now. */
.cc-tip {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 1rem;
  align-items: start;
  margin-top: 1.6rem;
  padding: 1.1rem 1.3rem;
  background: linear-gradient(180deg, rgba(217, 162, 104, 0.10), rgba(217, 162, 104, 0.05));
  border: 1px solid rgba(217, 162, 104, 0.28);
  border-left: 3px solid var(--ielts-honey, #D9A268);
  border-radius: 10px;
}
.cc-tip-label {
  font-family: 'Inter', sans-serif;
  font-size: .62rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ielts-honey, #D9A268);
  padding-top: .2rem;
}
.cc-tip-body {
  font-size: .98rem;
  color: var(--ielts-ink, #F2E6CC);
  line-height: 1.55;
  letter-spacing: .005em;
}

/* Sample answer block — wider paper with subtle paper grain. */
.cc-sample {}
.cc-sample-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.3rem;
  padding-bottom: .95rem;
  border-bottom: 1px solid rgba(31, 24, 18, 0.10);
}
.cc-sample-eyebrow {
  font-size: .68rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(181, 122, 46, 1);
  font-variant-numeric: tabular-nums;
}
.cc-sample-toggle {
  display: inline-flex;
  background: rgba(31, 24, 18, 0.07);
  border-radius: 999px;
  padding: 3px;
  font-family: 'Inter', sans-serif;
}
.cc-sample-toggle button {
  background: transparent;
  border: none;
  padding: .35rem .85rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .005em;
  color: rgba(31, 24, 18, 0.55);
  cursor: pointer;
  border-radius: 999px;
  transition: background .15s, color .15s;
}
.cc-sample-toggle button:hover { color: rgba(31, 24, 18, 0.85); }
.cc-sample-toggle button.is-active {
  background: var(--ielts-paper-ink, #1F1812);
  color: var(--ielts-paper, #F5EBD3);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.cc-sample-body {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.12rem;
  color: var(--ielts-paper-ink, #1F1812);
  line-height: 1.7;
  letter-spacing: -.002em;
}
.cc-sample-body[hidden] { display: none; }
.cc-sample-bullets {
  margin: 0;
  padding-left: 1.5rem;
  list-style: none;
}
.cc-sample-bullets li {
  padding: .3rem 0;
  font-size: 1.04rem;
  line-height: 1.5;
  position: relative;
  font-style: normal;
  font-family: 'Inter', sans-serif;
}
.cc-sample-bullets li::before {
  content: '·';
  position: absolute;
  left: -1.1rem;
  top: 0;
  color: var(--ielts-honey, #D9A268);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1;
}
.cc-bullets-note {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(31, 24, 18, 0.15);
  font-size: .82rem;
  font-style: italic;
  color: rgba(31, 24, 18, 0.55);
  letter-spacing: .005em;
  font-family: 'Source Serif 4', Georgia, serif;
}

/* Shared paper-card shadow — used for Vocabulary tiles, Part 1 list,
   Part 3 items, and Pager. Keeps the "physical document" metaphor
   consistent across the whole detail page. */

/* Vocabulary — cream paper mini-cards, 2-col grid. */
.cc-vocab-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
@media (max-width: 640px) { .cc-vocab-grid { grid-template-columns: 1fr; } }

.cc-vocab-item {
  position: relative;
  padding: 1.1rem 1.25rem 1rem;
  background: var(--ielts-paper, #F5EBD3);
  border: 1px solid rgba(31, 24, 18, 0.08);
  border-radius: 10px;
  transition: background .18s, border-color .18s, transform .12s, box-shadow .18s;
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.15),
    0 6px 16px -12px rgba(0, 0, 0, 0.4);
}
.cc-vocab-item:hover {
  background: #F8EFD9;
  border-color: rgba(181, 122, 46, 0.40);
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.18),
    0 10px 22px -12px rgba(0, 0, 0, 0.5);
}
.cc-vocab-item::before {
  content: '"';
  position: absolute;
  top: -.2rem;
  left: .6rem;
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: 2.2rem;
  color: rgba(181, 122, 46, 0.4);
  line-height: 1;
  pointer-events: none;
}
.cc-vocab-phrase {
  display: block;
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: 1.08rem;
  color: rgba(181, 122, 46, 1);
  font-weight: 500;
  letter-spacing: -.005em;
  margin-bottom: .4rem;
}
.cc-vocab-gloss {
  display: block;
  font-size: .87rem;
  color: rgba(31, 24, 18, 0.68);
  line-height: 1.5;
  font-family: 'Inter', sans-serif;
}

/* Part 1 questions — cream paper list, like a printed warm-up sheet. */
.cc-part1-list {
  counter-reset: cc-part1;
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--ielts-paper, #F5EBD3);
  border: 1px solid rgba(31, 24, 18, 0.08);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.16),
    0 8px 20px -12px rgba(0, 0, 0, 0.4);
}
.cc-part1-list li {
  counter-increment: cc-part1;
  position: relative;
  padding: 1.05rem 1.5rem 1.05rem 3.4rem;
  font-size: 1.02rem;
  color: var(--ielts-paper-ink, #1F1812);
  line-height: 1.5;
  letter-spacing: .005em;
  border-bottom: 1px solid rgba(31, 24, 18, 0.08);
  font-family: 'Inter', sans-serif;
}
.cc-part1-list li:last-child { border-bottom: none; }
.cc-part1-list li::before {
  content: counter(cc-part1);
  position: absolute;
  left: 1.4rem;
  top: 1.05rem;
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: 1.15rem;
  color: rgba(181, 122, 46, 1);
  font-variant-numeric: oldstyle-nums;
}

/* Part 3 — cream paper accordion. Each Q&A pair feels like a folded
   sheet that opens to reveal the model answer underneath. */
.cc-part3-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.cc-part3-item {
  border: 1px solid rgba(31, 24, 18, 0.08);
  border-radius: 12px;
  background: var(--ielts-paper, #F5EBD3);
  overflow: hidden;
  transition: border-color .2s, background .2s, box-shadow .2s, transform .15s;
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.15),
    0 6px 16px -12px rgba(0, 0, 0, 0.38);
}
.cc-part3-item:hover {
  border-color: rgba(181, 122, 46, 0.30);
  transform: translateY(-1px);
}
.cc-part3-item.is-open {
  background: #F8EFD9;
  border-color: rgba(181, 122, 46, 0.45);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.18),
    0 12px 26px -12px rgba(0, 0, 0, 0.5);
}
.cc-part3-q {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1.1rem 1.35rem;
  background: transparent;
  border: none;
  text-align: left;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--ielts-paper-ink, #1F1812);
  line-height: 1.45;
  cursor: pointer;
  letter-spacing: .005em;
}
.cc-part3-q-num {
  flex-shrink: 0;
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: 1.3rem;
  font-variant-numeric: oldstyle-nums;
  color: rgba(181, 122, 46, 1);
  min-width: 1.5rem;
}
.cc-part3-q-text { flex: 1; }
.cc-part3-q-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: rgba(31, 24, 18, 0.4);
  transition: transform .25s, color .15s;
}
.cc-part3-item:hover .cc-part3-q-icon { color: rgba(31, 24, 18, 0.65); }
.cc-part3-item.is-open .cc-part3-q-icon {
  transform: rotate(180deg);
  color: rgba(181, 122, 46, 1);
}
.cc-part3-a {
  padding: .25rem 1.35rem 1.3rem 4.1rem;
  font-size: 1rem;
  color: rgba(31, 24, 18, 0.82);
  line-height: 1.65;
  letter-spacing: .002em;
  font-family: 'Source Serif 4', Georgia, serif;
  position: relative;
}
.cc-part3-a::before {
  content: '';
  position: absolute;
  left: 1.7rem;
  top: 0;
  bottom: 1.3rem;
  width: 2px;
  background: linear-gradient(180deg, rgba(181, 122, 46, 1) 0%, rgba(181, 122, 46, 0) 100%);
  opacity: .6;
  border-radius: 1px;
}
.cc-part3-a[hidden] { display: none; }

/* Pager — Previous / Next as cream paper cards. */
.cc-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 4rem;
  padding-top: 2.2rem;
  border-top: 1px solid rgba(242, 230, 204, 0.10);
}
.cc-pager-link {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: 1.25rem 1.4rem;
  background: var(--ielts-paper, #F5EBD3);
  border: 1px solid rgba(31, 24, 18, 0.08);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: background .2s, border-color .2s, transform .15s, box-shadow .2s;
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.15),
    0 6px 16px -12px rgba(0, 0, 0, 0.38);
}
.cc-pager-link:hover {
  background: #F8EFD9;
  border-color: rgba(181, 122, 46, 0.40);
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.18),
    0 10px 22px -12px rgba(0, 0, 0, 0.5);
}
.cc-pager-link.is-next { text-align: right; align-items: flex-end; }
.cc-pager-link.is-disabled {
  visibility: hidden;
  pointer-events: none;
}
.cc-pager-label {
  font-size: .65rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(181, 122, 46, 1);
}
.cc-pager-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ielts-paper-ink, #1F1812);
  line-height: 1.3;
  letter-spacing: -.005em;
}
@media (max-width: 640px) {
  .cc-pager { grid-template-columns: 1fr; }
  .cc-pager-link.is-next { text-align: left; align-items: flex-start; }
}

/* Empty / fallback */
.cc-empty {
  text-align: center;
  padding: 5rem 1rem;
  color: var(--ielts-ink-soft, #B6A484);
  font-style: italic;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.1rem;
}

/* Mobile tightening */
@media (max-width: 620px) {
  .cc-page, .cc-detail-page { padding-left: 1rem; padding-right: 1rem; }
  .cc-paper { padding: 1.4rem 1.5rem; border-radius: 12px; }
  .cc-cuecard-prompt { font-size: 1.25rem; }
  .cc-sample-body { font-size: 1.02rem; }
  .cc-head-stats { gap: 1rem 1.5rem; }
}

/* ═══════════════════════════════════════════════════════════════════
   SPEAKING SUBJECT HOME — Practice tools section
   Sits between the page header and the lesson phases. Surfaces the
   two practice tools (Cue Cards live, AI Coach coming soon) as a pair
   of large entry cards so students don't need to know about the nav
   dropdown to find them.
   ═══════════════════════════════════════════════════════════════════ */
.sp-tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
@media (max-width: 720px) {
  .sp-tools-grid { grid-template-columns: 1fr; }
}

/* Active tool — cream paper card, matches the cue-card visual language. */
.sp-tool-card {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  padding: 1.7rem 1.8rem 1.5rem;
  background: var(--ielts-paper, #F5EBD3);
  border: 1px solid rgba(31, 24, 18, 0.08);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s, box-shadow .2s;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.18),
    0 10px 24px -16px rgba(0, 0, 0, 0.45);
  min-height: 200px;
}
.sp-tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--ielts-honey, #D9A268), transparent);
  opacity: 0;
  transition: opacity .25s;
}
.sp-tool-card:hover {
  background: #F8EFD9;
  border-color: rgba(217, 162, 104, 0.5);
  transform: translateY(-3px);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.2),
    0 16px 32px -16px rgba(0, 0, 0, 0.55);
}
.sp-tool-card:hover::before { opacity: 1; }

.sp-tool-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: .65rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(181, 122, 46, 1);
}
.sp-tool-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: 1.7rem;
  color: var(--ielts-paper-ink, #1F1812);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -.01em;
}
.sp-tool-desc {
  font-size: .96rem;
  color: rgba(31, 24, 18, 0.7);
  line-height: 1.55;
  flex: 1;
  font-family: 'Inter', sans-serif;
}
.sp-tool-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding-top: .9rem;
  border-top: 1px solid rgba(31, 24, 18, 0.10);
}
.sp-tool-cta {
  font-family: 'Inter', sans-serif;
  font-size: .82rem;
  letter-spacing: .005em;
  font-weight: 600;
  color: rgba(181, 122, 46, 1);
}
.sp-tool-badge {
  font-size: .62rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  font-weight: 700;
  padding: .25rem .65rem;
  border-radius: 999px;
  background: rgba(217, 162, 104, 0.18);
  color: rgba(181, 122, 46, 1);
  border: 1px solid rgba(181, 122, 46, 0.35);
}

/* Disabled tool — dark transparent, visually distinct from active. */
.sp-tool-card.is-disabled {
  background: rgba(245, 235, 211, 0.04);
  border: 1px solid rgba(242, 230, 204, 0.10);
  cursor: default;
  box-shadow: none;
}
.sp-tool-card.is-disabled::before { display: none; }
.sp-tool-card.is-disabled:hover {
  background: rgba(245, 235, 211, 0.04);
  border-color: rgba(242, 230, 204, 0.10);
  transform: none;
  box-shadow: none;
}
.sp-tool-card.is-disabled .sp-tool-eyebrow {
  color: var(--ielts-ink-soft, #B6A484);
  opacity: .8;
}
.sp-tool-card.is-disabled .sp-tool-title {
  color: var(--ielts-ink, #F2E6CC);
  opacity: .75;
}
.sp-tool-card.is-disabled .sp-tool-desc {
  color: var(--ielts-ink-soft, #B6A484);
  opacity: .8;
}
.sp-tool-card.is-disabled .sp-tool-foot {
  border-top-color: rgba(242, 230, 204, 0.10);
}
.sp-tool-card.is-disabled .sp-tool-cta {
  color: var(--ielts-ink-soft, #B6A484);
  opacity: .7;
}
.sp-tool-card.is-disabled .sp-tool-badge {
  background: rgba(242, 230, 204, 0.06);
  color: var(--ielts-ink-soft, #B6A484);
  border-color: rgba(242, 230, 204, 0.18);
}

/* ─────────────────────────────────────────────────────────────────────
   Practice mode — CTA, sticky timer bar, scratch notes
   Activated by .is-practice on .cc-detail-page (#cc-detail-root)
   ───────────────────────────────────────────────────────────────────── */

/* CTA — sits between the hero and the cue card */
.cc-practice-cta {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  width: 100%;
  margin: 0.4rem 0 1.8rem;
  padding: 1.1rem 1.4rem;
  background: linear-gradient(135deg, rgba(217, 162, 104, 0.16), rgba(217, 162, 104, 0.05));
  border: 1px solid rgba(217, 162, 104, 0.42);
  border-radius: 14px;
  color: var(--ielts-ink, #F2E6CC);
  font-family: 'Inter', sans-serif;
  text-align: left;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.cc-practice-cta:hover {
  background: linear-gradient(135deg, rgba(217, 162, 104, 0.22), rgba(217, 162, 104, 0.08));
  border-color: rgba(217, 162, 104, 0.62);
  transform: translateY(-1px);
}
.cc-practice-cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ielts-honey, #D9A268);
  color: #1F1812;
}
.cc-practice-cta-icon svg {
  width: 18px;
  height: 18px;
  margin-left: 2px;
}
.cc-practice-cta-text {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  min-width: 0;
}
.cc-practice-cta-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: 1.25rem;
  letter-spacing: .005em;
  color: var(--ielts-honey, #D9A268);
}
.cc-practice-cta-sub {
  font-size: .85rem;
  color: var(--ielts-ink-soft, #B6A484);
  letter-spacing: .01em;
}
.cc-practice-cta.is-done {
  border-style: dashed;
}

/* Timer panel — printed onto the cue card itself.
   Lives inside .cc-paper as a right-column inset during practice mode.
   Looks like an exam-room countdown clock stamped on the paper. */
.cc-practice-bar {
  background: rgba(31, 24, 18, 0.06);
  border: 1px solid rgba(31, 24, 18, 0.16);
  border-radius: 12px;
  overflow: hidden;
  align-self: start;
  position: sticky;
  top: 1rem;
}
.cc-practice-bar-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .85rem;
  padding: 1rem 1.1rem 1.1rem;
}
.cc-practice-bar-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .2rem;
}
.cc-practice-stage {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(31, 24, 18, 0.78);
  letter-spacing: .005em;
}
.cc-practice-sub {
  font-family: 'Inter', sans-serif;
  font-size: .72rem;
  color: rgba(31, 24, 18, 0.5);
  line-height: 1.3;
}
.cc-practice-clock {
  display: block;
  font-family: 'Source Serif 4', Georgia, serif;
  font-variant-numeric: tabular-nums;
  font-size: 2.6rem;
  font-weight: 600;
  color: var(--ielts-paper-ink, #1F1812);
  letter-spacing: .015em;
  text-align: center;
  line-height: 1;
}
.cc-practice-bar-right {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .55rem;
}
.cc-practice-skip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .6rem 1rem;
  background: var(--ielts-honey, #D9A268);
  color: #1F1812;
  border: none;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .005em;
  cursor: pointer;
  transition: filter .15s, transform .15s;
}
.cc-practice-skip:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.cc-practice-quit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  width: 30px;
  height: 30px;
  background: transparent;
  border: 1px solid rgba(31, 24, 18, 0.22);
  border-radius: 50%;
  color: rgba(31, 24, 18, 0.55);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.cc-practice-quit:hover {
  color: var(--ielts-paper-ink, #1F1812);
  border-color: rgba(31, 24, 18, 0.45);
}
.cc-practice-quit svg { width: 13px; height: 13px; }
.cc-practice-progress {
  height: 3px;
  background: rgba(31, 24, 18, 0.10);
}
.cc-practice-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--ielts-honey, #D9A268);
  transition: width 1s linear;
}
.cc-practice-bar[data-stage="speaking"] .cc-practice-progress-fill {
  background: #C97F4E;
}

/* When the page is in practice mode, the cue card paper becomes a
   two-column composition: prompt content on the left, timer on the right. */
.cc-detail-page.is-practice .cc-cuecard .cc-paper {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 1.8rem;
  align-items: start;
}
.cc-cuecard-body { min-width: 0; }

/* Scratch notes — cream paper with faint horizontal rules */
.cc-practice-notes {
  margin-top: 1.5rem;
}
.cc-paper--lined {
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.50  0 0 0 0 0.32  0 0 0 0 0.16  0 0 0 0.05 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"),
    repeating-linear-gradient(to bottom, transparent 0, transparent 31px, rgba(31, 24, 18, 0.12) 31px, rgba(31, 24, 18, 0.12) 32px);
}
.cc-practice-notes-label {
  display: block;
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: .95rem;
  color: rgba(31, 24, 18, 0.55);
  margin-bottom: .6rem;
}
.cc-practice-notes-area {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  resize: vertical;
  min-height: 7rem;
  font-family: 'Inter', sans-serif;
  font-size: 1.02rem;
  line-height: 32px;
  color: var(--ielts-paper-ink, #1F1812);
}
.cc-practice-notes-area::placeholder {
  color: rgba(31, 24, 18, 0.38);
  font-style: italic;
}

/* When the page is in practice mode, hide everything tagged as spoiler. */
.cc-detail-page.is-practice [data-cc-hide-in-practice] {
  display: none !important;
}

/* Compact tweaks on narrow screens — the cue card stacks (timer above prompt) */
@media (max-width: 640px) {
  .cc-detail-page.is-practice .cc-cuecard .cc-paper {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .cc-practice-bar {
    order: -1;
    position: static;
  }
  .cc-practice-clock {
    font-size: 2.2rem;
  }
  .cc-practice-cta {
    padding: .95rem 1.1rem;
  }
  .cc-practice-cta-title {
    font-size: 1.1rem;
  }
}
