/* ─────────────────────────────────────────────────────────────────
   IELTS Writing — Prompt Generator stylesheet.

   Three surfaces:
     1. Landing  — hero + stats + two big task cards + pinned link
     2. Generator — filter chip row + active prompt card +
                    planning card + action row (next / pin / hide)
     3. Pinned   — list of saved prompts (re-open in generator)

   Vocabulary matches the rest of the writing tools (cream paper on
   dark chocolate; per-task --task-accent flows through eyebrows,
   filter chips, and CTAs). Two tasks own their accent:
     · t2 → #B57A2E (honey)
     · t1 → #5C8A6A (sage)

   Animations:
     · prompt swap (fade out → fade in)
     · pin pulse (heart-like beat when pinned)
     · planning card slide-collapse
   ───────────────────────────────────────────────────────────── */

.wr-pg-page {
  max-width: 880px;
  margin: 0 auto;
  padding: 1.6rem 0 4rem;
  --task-accent: #B57A2E;
}

.wr-pg-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ielts-ink-soft, #B6A484);
  background: rgba(242, 230, 204, .05);
  border: 1px solid var(--ielts-line, rgba(242, 230, 204, .10));
  text-decoration: none;
  transition: background-color .15s, color .15s, border-color .15s;
  margin-bottom: 1.6rem;
}
.wr-pg-back:hover {
  color: var(--ielts-ink, #F2E6CC);
  background: rgba(242, 230, 204, .10);
  border-color: color-mix(in srgb, var(--ielts-honey, #D9A268) 30%, transparent);
}

.wr-pg-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ielts-honey, #D9A268);
  margin-bottom: .7rem;
}
.wr-pg-eyebrow::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px color-mix(in srgb, currentColor 60%, transparent);
}
.wr-pg-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 2.4rem;
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.05;
  color: var(--ielts-ink, #F2E6CC);
  margin: 0 0 .8rem;
}
.wr-pg-lede {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--ielts-ink-soft, #B6A484);
  margin: 0 0 1.6rem;
  max-width: 64ch;
}

/* ── Stats row (landing) ─────────────────────────────────────── */
.wr-pg-stats-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
}
.wr-pg-stat {
  flex: 1 1 130px;
  padding: 14px 18px;
  background: rgba(242, 230, 204, .04);
  border: 1px solid var(--ielts-line, rgba(242, 230, 204, .10));
  border-radius: 12px;
}
.wr-pg-stat-num {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--ielts-ink, #F2E6CC);
  line-height: 1;
}
.wr-pg-stat-l {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ielts-ink-soft, #B6A484);
  margin-top: 6px;
}

/* ── Task cards (landing) ────────────────────────────────────── */
.wr-pg-task-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
  margin-top: 1rem;
}
.wr-pg-task-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: 1.6rem 1.5rem 1.4rem;
  background: linear-gradient(180deg, rgba(255, 251, 240, 0.97) 0%, rgba(243, 233, 211, 0.95) 100%);
  border: 1px solid rgba(31, 24, 18, 0.10);
  border-left: 3px solid var(--task-accent, #B57A2E);
  border-radius: 14px;
  text-decoration: none;
  color: #1F1812;
  box-shadow: 0 1px 0 rgba(255,255,255,.65) inset, 0 18px 30px -22px rgba(31,24,18,.35);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  overflow: hidden;
}
.wr-pg-task-card::after {
  content: '';
  position: absolute;
  inset: -50% -20% auto auto;
  width: 240px; height: 240px;
  background: radial-gradient(circle, color-mix(in srgb, var(--task-accent) 18%, transparent) 0%, transparent 65%);
  pointer-events: none;
  opacity: .55;
  transition: opacity .25s ease, transform .25s ease;
}
.wr-pg-task-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 1px 0 rgba(255,255,255,.65) inset, 0 24px 36px -22px rgba(31,24,18,.45);
  border-left-color: color-mix(in srgb, var(--task-accent) 80%, #000);
}
.wr-pg-task-card:hover::after {
  opacity: .85;
  transform: translate(-8px, 6px);
}
.wr-pg-task-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--task-accent) 14%, transparent);
  color: var(--task-accent);
  border: 1px solid color-mix(in srgb, var(--task-accent) 30%, transparent);
}
.wr-pg-task-name {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 500;
  color: #1F1812;
  letter-spacing: -.01em;
}
.wr-pg-task-short {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .85rem;
  font-weight: 600;
  color: var(--task-accent);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.wr-pg-task-desc {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .94rem;
  line-height: 1.55;
  color: #4A3F33;
  margin: .15rem 0 .85rem;
}
.wr-pg-task-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  margin-top: auto;
  border-radius: 999px;
  background: var(--task-accent);
  color: #FBF4E2;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .88rem;
  font-weight: 600;
  align-self: flex-start;
  transition: transform .15s ease;
}
.wr-pg-task-card:hover .wr-pg-task-cta {
  transform: translateX(2px);
}

/* ── Pinned link on landing ──────────────────────────────────── */
.wr-pg-pinned-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 1.8rem;
  padding: 10px 16px;
  border-radius: 999px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ielts-ink, #F2E6CC);
  background: rgba(217, 162, 104, .12);
  border: 1px solid rgba(217, 162, 104, .35);
  text-decoration: none;
  transition: background-color .15s, border-color .15s;
}
.wr-pg-pinned-link:hover {
  background: rgba(217, 162, 104, .20);
  border-color: rgba(217, 162, 104, .55);
}
.wr-pg-pinned-link svg:first-child {
  color: var(--ielts-honey, #D9A268);
}

/* ── Generator top bar ───────────────────────────────────────── */
.wr-pg-gen-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}
.wr-pg-gen-top .wr-pg-back { margin-bottom: 0; }
.wr-pg-gen-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.wr-pg-gen-task {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--task-accent);
  background: color-mix(in srgb, var(--task-accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--task-accent) 35%, transparent);
}

/* ── Filter pill (generator page) ────────────────────────────
   A compact "Showing: line graph · Change" pill that re-opens the
   type-chooser modal. Replaces the always-visible chip row. */
.wr-pg-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 12px;
  margin-bottom: 1.4rem;
  border-radius: 999px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .82rem;
  color: var(--ielts-ink-soft, #B6A484);
  background: rgba(242, 230, 204, .04);
  border: 1px solid var(--ielts-line, rgba(242, 230, 204, .14));
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.wr-pg-filter-pill:hover {
  color: var(--ielts-ink, #F2E6CC);
  border-color: color-mix(in srgb, var(--task-accent) 50%, transparent);
  background: rgba(242, 230, 204, .07);
}
.wr-pg-filter-pill-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ielts-ink-soft, #B6A484);
}
.wr-pg-filter-pill-value {
  font-weight: 600;
  color: var(--task-accent);
}
.wr-pg-filter-pill-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding-left: 10px;
  border-left: 1px solid var(--ielts-line, rgba(242, 230, 204, .16));
  font-size: .76rem;
  font-weight: 600;
}

/* ── Modal (type chooser) ────────────────────────────────────
   Opened by the landing task cards and the generator filter pill.
   Backdrop fades in; the modal scales in. Closes on backdrop click,
   close-button click, Escape, or any hash change. */
body.wr-pg-modal-open {
  overflow: hidden;
}
.wr-pg-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(20, 14, 10, .68);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.4rem;
  opacity: 0;
  transition: opacity .18s ease;
}
.wr-pg-modal-backdrop.is-open {
  opacity: 1;
}
.wr-pg-modal-backdrop.is-leaving {
  opacity: 0;
}
.wr-pg-modal {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem 2rem 1.8rem;
  background: linear-gradient(180deg, rgba(255, 251, 240, 0.98) 0%, rgba(243, 233, 211, 0.97) 100%);
  border: 1px solid rgba(31, 24, 18, 0.12);
  border-left: 3px solid var(--task-accent, #B57A2E);
  border-radius: 16px;
  color: #1F1812;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55), 0 1px 0 rgba(255,255,255,.65) inset;
  transform: scale(.94);
  transition: transform .22s cubic-bezier(.34, 1.56, .64, 1);
}
.wr-pg-modal-backdrop.is-open .wr-pg-modal {
  transform: scale(1);
}
.wr-pg-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(31, 24, 18, 0.12);
  background: rgba(31, 24, 18, 0.04);
  color: #4A3F33;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color .15s, color .15s;
}
.wr-pg-modal-close:hover {
  background: rgba(31, 24, 18, 0.08);
  color: #1F1812;
}
.wr-pg-modal-eyebrow {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--task-accent);
  margin-bottom: .55rem;
}
.wr-pg-modal-h {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 500;
  letter-spacing: -.01em;
  color: #1F1812;
  margin: 0 0 .35rem;
}
.wr-pg-modal-p {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .92rem;
  line-height: 1.5;
  color: #4A3F33;
  margin: 0 0 1.2rem;
  max-width: 60ch;
}
.wr-pg-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .7rem;
}
.wr-pg-modal-option {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(31, 24, 18, 0.025);
  border: 1px solid rgba(31, 24, 18, 0.10);
  color: #1F1812;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.wr-pg-modal-option:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--task-accent) 8%, white);
  border-color: color-mix(in srgb, var(--task-accent) 45%, transparent);
}
.wr-pg-modal-option.is-any {
  grid-column: 1 / -1;
  background: color-mix(in srgb, var(--task-accent) 12%, white);
  border-color: color-mix(in srgb, var(--task-accent) 40%, transparent);
  border-left: 3px solid var(--task-accent);
}
.wr-pg-modal-option.is-any:hover {
  background: color-mix(in srgb, var(--task-accent) 18%, white);
}
.wr-pg-modal-opt-name {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #1F1812;
  letter-spacing: -.005em;
}
.wr-pg-modal-option.is-any .wr-pg-modal-opt-name {
  color: var(--task-accent);
}
.wr-pg-modal-opt-hint {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .82rem;
  color: #6B5E4A;
  line-height: 1.35;
}

@media (max-width: 540px) {
  .wr-pg-modal { padding: 1.5rem 1.3rem 1.4rem; }
  .wr-pg-modal-grid { grid-template-columns: 1fr; }
  .wr-pg-modal-h { font-size: 1.35rem; }
}

/* ── Prompt card ─────────────────────────────────────────────── */
.wr-pg-prompt-card {
  padding: 1.8rem 1.8rem 1.5rem;
  background: linear-gradient(180deg, rgba(255, 251, 240, 0.97) 0%, rgba(247, 238, 218, 0.95) 100%);
  border: 1px solid rgba(31, 24, 18, 0.08);
  border-left: 3px solid var(--task-accent, #B57A2E);
  border-radius: 14px;
  box-shadow: 0 1px 0 rgba(255,255,255,.65) inset, 0 20px 32px -22px rgba(31,24,18,.30);
  opacity: 1;
  transform: translateY(0);
  transition: opacity .16s ease, transform .16s ease;
}
.wr-pg-prompt-card.is-leaving {
  opacity: 0;
  transform: translateY(-6px);
}
.wr-pg-prompt-card.is-entering {
  opacity: 0;
  transform: translateY(8px);
}

.wr-pg-prompt-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 1rem;
}
.wr-pg-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 999px;
}
.wr-pg-tag.is-task {
  background: color-mix(in srgb, var(--task-accent) 18%, transparent);
  color: var(--task-accent);
  border: 1px solid color-mix(in srgb, var(--task-accent) 35%, transparent);
}
.wr-pg-tag.is-type {
  background: rgba(31, 24, 18, .06);
  color: #4A3F33;
  border: 1px solid rgba(31, 24, 18, .14);
}
.wr-pg-tag.is-topic {
  background: rgba(217, 162, 104, .14);
  color: #8C6A3A;
  border: 1px solid rgba(217, 162, 104, .30);
}

.wr-pg-prompt-text {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.18rem;
  line-height: 1.55;
  color: #1F1812;
  margin-bottom: 1.4rem;
}

/* ── Chart visual (T1) — wraps the SVG/table produced by the
   shared window._t1RenderChart renderer. The renderer's own
   styles (t1-svg, t1-process, t1-table, t1-map-row, etc.) come
   from practice.css; we just provide framing + breathing room
   inside the cream-paper prompt card. */
.wr-pg-chart-wrap {
  margin: 0 0 1.4rem;
  padding: 1rem 1rem .8rem;
  background: #FFFFFF;
  border: 1px solid rgba(31, 24, 18, 0.10);
  border-radius: 10px;
  overflow-x: auto;
}
.wr-pg-chart-wrap .t1-chart-figure {
  margin: 0;
}
.wr-pg-chart-wrap .t1-chart-body {
  display: block;
}
.wr-pg-chart-wrap .t1-svg {
  width: 100%;
  height: auto;
  max-width: 720px;
  display: block;
  margin: 0 auto;
}
.wr-pg-chart-wrap .t1-svg-pie {
  max-width: 320px;
}
.wr-pg-chart-wrap .t1-svg-map {
  max-width: 420px;
  /* practice.css clamps maps to 280px tall — we use 320px panels so
     labels have vertical breathing room, so override here. */
  max-height: 360px !important;
}
.wr-pg-chart-wrap .t1-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .92rem;
}
.wr-pg-chart-wrap .t1-table th,
.wr-pg-chart-wrap .t1-table td {
  padding: 8px 12px;
  border: 1px solid rgba(31, 24, 18, 0.10);
  text-align: left;
  color: #1F1812;
}
.wr-pg-chart-wrap .t1-table th {
  background: rgba(31, 24, 18, 0.04);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #4A3F33;
}
.wr-pg-chart-wrap .t1-table .t1-tcell-h {
  font-weight: 600;
  background: rgba(31, 24, 18, 0.025);
}
.wr-pg-chart-wrap .t1-pie-row,
.wr-pg-chart-wrap .t1-map-row,
.wr-pg-chart-wrap .t1-mixed-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  justify-content: center;
  align-items: flex-start;
}
.wr-pg-chart-wrap .t1-pie-panel,
.wr-pg-chart-wrap .t1-map-panel,
.wr-pg-chart-wrap .t1-mixed-panel {
  flex: 1 1 280px;
  min-width: 240px;
  max-width: 380px;
}
.wr-pg-chart-wrap .t1-panel-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #4A3F33;
  text-align: center;
  margin-bottom: .55rem;
}
.wr-pg-chart-wrap .t1-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: .8rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .82rem;
  color: #4A3F33;
}
.wr-pg-chart-wrap .t1-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.wr-pg-chart-wrap .t1-legend-swatch {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 2px;
}
.wr-pg-chart-wrap .t1-axis-tick,
.wr-pg-chart-wrap .t1-axis-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  fill: #4A3F33;
}
.wr-pg-chart-wrap .t1-axis,
.wr-pg-chart-wrap .t1-grid {
  stroke: #C9BFA7;
  stroke-width: 1;
}
.wr-pg-chart-wrap .t1-grid {
  stroke-opacity: .55;
}
.wr-pg-chart-wrap .t1-pie-pct {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
}
.wr-pg-chart-wrap .t1-process {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.wr-pg-chart-wrap .t1-process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 460px;
}
.wr-pg-chart-wrap .t1-process-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--task-accent);
  color: #FBF4E2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: .95rem;
  font-weight: 500;
  margin-bottom: 4px;
}
.wr-pg-chart-wrap .t1-process-card {
  width: 100%;
  padding: .65rem .9rem;
  background: linear-gradient(180deg, rgba(255, 251, 240, 1) 0%, rgba(247, 238, 218, 1) 100%);
  border: 1px solid rgba(31, 24, 18, 0.10);
  border-radius: 8px;
}
.wr-pg-chart-wrap .t1-process-h {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .82rem;
  font-weight: 700;
  color: var(--task-accent);
  margin-bottom: 3px;
  letter-spacing: .02em;
}
.wr-pg-chart-wrap .t1-process-b {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .9rem;
  line-height: 1.45;
  color: #1F1812;
}
.wr-pg-chart-wrap .t1-process-arrow {
  font-size: 1.1rem;
  color: var(--task-accent);
  line-height: 1;
  margin: 6px 0;
  opacity: .7;
}
/* Map labels — IELTS-style location labels. Practice.css uses
   fill: var(--ink) which resolves to cream on the dark IELTS
   shell — invisible inside our white chart wrap. Pure black + !important to
   beat the inherited rule + dropped the white halo (it washed the
   text into the surrounding cream). Black on cream is the standard
   IELTS look. */
.wr-pg-chart-wrap .t1-svg .t1-map-label,
.wr-pg-chart-wrap .t1-svg-map .t1-map-label,
.wr-pg-chart-wrap .t1-map-label {
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  fill: #000000 !important;
  stroke: none !important;
  paint-order: normal !important;
  letter-spacing: .01em;
}

/* ── Chart description (T1) ──────────────────────────────────── */
.wr-pg-chart-desc {
  padding: 1rem 1.2rem;
  background: rgba(31, 24, 18, .03);
  border: 1px solid rgba(31, 24, 18, .08);
  border-left: 3px solid color-mix(in srgb, var(--task-accent) 70%, #000);
  border-radius: 10px;
  margin-bottom: 1.4rem;
}
.wr-pg-chart-desc-h {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--task-accent) 75%, #000);
  margin-bottom: .55rem;
}
.wr-pg-chart-desc-b {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .92rem;
  line-height: 1.55;
  color: #2A2118;
}
.wr-pg-chart-desc-b p {
  margin: 0 0 .55rem;
}
.wr-pg-chart-desc-b p:last-child { margin-bottom: 0; }

/* ── Planning card (collapsible) ─────────────────────────────── */
.wr-pg-plan {
  margin-bottom: 1.5rem;
  padding: 1.1rem 1.3rem 1.2rem;
  background: rgba(217, 162, 104, .06);
  border: 1px solid rgba(217, 162, 104, .22);
  border-radius: 12px;
  max-height: 2000px;
  overflow: hidden;
  transition: max-height .35s ease, opacity .25s ease, padding .25s ease, margin .25s ease;
  opacity: 1;
}
.wr-pg-plan.is-hidden {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
  border-width: 0;
}
.wr-pg-plan-eyebrow {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8C6A3A;
  margin-bottom: .9rem;
}
.wr-pg-plan-row {
  margin-bottom: .85rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid rgba(217, 162, 104, .18);
}
.wr-pg-plan-row:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}
.wr-pg-plan-h {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: #5A4426;
  margin-bottom: .35rem;
}
.wr-pg-plan-h svg {
  color: #8C6A3A;
  flex: 0 0 auto;
}
.wr-pg-plan-b {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .94rem;
  line-height: 1.55;
  color: #2A2118;
}
.wr-pg-plan-vocab {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(217, 162, 104, .25);
}
.wr-pg-plan-vocab-h {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #5A4426;
  margin-bottom: .55rem;
}
.wr-pg-plan-vocab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.wr-pg-plan-vocab-item {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .82rem;
  color: #5A4426;
  background: rgba(217, 162, 104, .14);
  border: 1px solid rgba(217, 162, 104, .35);
}

/* ── Actions row ─────────────────────────────────────────────── */
.wr-pg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1.4rem;
}
.wr-pg-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 999px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s, background-color .15s, color .15s, border-color .15s, box-shadow .15s;
}
.wr-pg-cta.is-primary {
  background: var(--ielts-honey, #D9A268);
  color: #1F1812;
  border-color: var(--ielts-honey, #D9A268);
}
.wr-pg-cta.is-primary:hover {
  background: color-mix(in srgb, var(--ielts-honey, #D9A268) 88%, white);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -10px rgba(217, 162, 104, .65);
}
.wr-pg-cta.is-ghost {
  background: rgba(31, 24, 18, .04);
  color: #4A3F33;
  border-color: rgba(31, 24, 18, .12);
}
.wr-pg-cta.is-ghost:hover {
  border-color: color-mix(in srgb, var(--task-accent) 35%, transparent);
  background: rgba(31, 24, 18, .07);
}
.wr-pg-cta.wr-pg-pin.is-pinned {
  background: color-mix(in srgb, var(--ielts-honey, #D9A268) 22%, white);
  color: #5A4426;
  border-color: color-mix(in srgb, var(--ielts-honey, #D9A268) 45%, transparent);
}
.wr-pg-cta.wr-pg-pin.is-pinned svg {
  color: var(--ielts-honey, #D9A268);
}
.wr-pg-cta.wr-pg-pin.is-pulse {
  animation: wr-pg-pin-pulse .55s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes wr-pg-pin-pulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* ── Empty state ─────────────────────────────────────────────── */
.wr-pg-empty {
  padding: 2.2rem 1.8rem;
  background: linear-gradient(180deg, rgba(255, 251, 240, 0.97) 0%, rgba(247, 238, 218, 0.95) 100%);
  border: 1px solid rgba(31, 24, 18, 0.08);
  border-radius: 12px;
  text-align: center;
  color: #1F1812;
}
.wr-pg-empty h3 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 500;
  margin: 0 0 .55rem;
}
.wr-pg-empty p {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .94rem;
  line-height: 1.5;
  color: #4A3F33;
  max-width: 48ch;
  margin: 0 auto 1rem;
}
.wr-pg-empty .wr-pg-cta { margin: 0 auto; }

/* ── Pinned page ─────────────────────────────────────────────── */
.wr-pg-pin-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.wr-pg-pin-item {
  position: relative;
  display: flex;
  align-items: stretch;
  background: linear-gradient(180deg, rgba(255, 251, 240, 0.97) 0%, rgba(247, 238, 218, 0.95) 100%);
  border: 1px solid rgba(31, 24, 18, 0.08);
  border-left: 3px solid var(--task-accent);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255,255,255,.65) inset;
  transition: transform .15s, box-shadow .15s;
}
.wr-pg-pin-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255,255,255,.65) inset, 0 12px 22px -16px rgba(31,24,18,.35);
}
.wr-pg-pin-item-link {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: 1rem 1.2rem;
  color: #1F1812;
  text-decoration: none;
  min-width: 0;
}
.wr-pg-pin-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.wr-pg-pin-item-text {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1rem;
  line-height: 1.5;
  color: #1F1812;
}
.wr-pg-pin-unpin {
  width: 56px;
  border: none;
  border-left: 1px solid rgba(31, 24, 18, .08);
  background: rgba(217, 162, 104, .08);
  color: var(--ielts-honey, #D9A268);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color .15s, color .15s;
}
.wr-pg-pin-unpin:hover {
  background: rgba(217, 162, 104, .18);
  color: #8C6A3A;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 720px) {
  .wr-pg-task-grid { grid-template-columns: 1fr; }
  .wr-pg-title { font-size: 2rem; }
  .wr-pg-prompt-text { font-size: 1.08rem; }
  .wr-pg-prompt-card { padding: 1.4rem 1.3rem 1.2rem; }
  .wr-pg-pin-unpin { width: 48px; }
  .wr-pg-actions .wr-pg-cta { flex: 1 1 auto; justify-content: center; }
}
