/* ─────────────────────────────────────────────────────────────────
   PLANNER · Writing deep-dive page.
   V4 — scrollable diagnostic layout.

   The page is one long scroll: back row + task toggle + hero
   (overall section) + sticky criterion selector + 4 stacked
   criterion sections, each with:
     · What's holding you back   (3 issue cards)
     · Your priority plan        (3 ranked items + Why-first)
     · Evidence from your essays (placeholder until grader extension)
     · Recommended actions       (4 + inline expand)
   ───────────────────────────────────────────────────────────── */

body.is-pwr-active #course-body { padding: 0; margin: 0; }
body.is-pwr-active {
  background: #FBF8F0 !important;
  /* Body padding-top from the layout makes room for the IELTS nav.
     Stage no longer fixed → body scrolls naturally. */
}
/* The body::before atmospheric gradient is now killed globally in
   ielts-shell.css — no per-page override needed. */

/* ── Page container ───────────────────────────────────────── */
.pwr-page {
  background: transparent;
  color: #2A1F12;
  font-family: 'Source Serif 4', Georgia, serif;
  -webkit-font-smoothing: antialiased;
  min-height: calc(100vh - 76px);
}
.pwr-inner {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 24px clamp(20px, 2.4vw, 32px) 60px;
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2vh, 24px);
}

/* ── Back row + Task toggle ───────────────────────────────── */
.pwr-back-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
/* Back-to-Dashboard link — borderless, blends with the cream page.
   Was a white pill that read as "card on cream"; now a flat text
   link with a small arrow. */
.pwr-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #5C4A35;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 6px 10px 6px 4px;
  border-radius: 8px;
  background: transparent;
  border: none;
  box-shadow: none;
  transition: color 200ms, background 200ms, transform 200ms;
}
.pwr-back:hover {
  color: #D08820;
  background: rgba(208, 136, 32, 0.06);
  transform: translateX(-2px);
}

.pwr-task-toggle {
  display: inline-flex;
  background: rgba(74, 58, 38, 0.05);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.pwr-task-pill {
  padding: 6px 14px;
  border-radius: 999px;
  border: none;
  background: transparent;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #8C7757;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 180ms, color 180ms;
}
.pwr-task-pill:hover { color: #2A1F12; }
.pwr-task-pill.is-on {
  background: #2A1F12;
  color: #FFFFFF;
}

/* ── Shared section / card primitives ─────────────────────── */
.pwr-section-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #8C7757;
}

.pwr-card {
  /* Warmer cream — matches the dashboard landing cards instead of
     reading as stark white on the page bg. */
  background: #FDFAF0;
  border-radius: 16px;
  border: 1px solid rgba(74, 58, 38, 0.10);
  box-shadow:
    0 1px 2px rgba(74, 58, 38, 0.03),
    0 12px 32px -18px rgba(74, 58, 38, 0.10);
  padding: 22px 24px;
}
.pwr-card-head {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  padding-left: 12px;
}
/* Vertical gold accent bar — gives every section card a small
   identifying mark and makes the heads feel more architectural. */
.pwr-card-head::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 2px;
  background: #D08820;
}
.pwr-card-title {
  font-family: 'Cormorant Garamond', 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.01em;
  color: #2A1F12;
  margin: 0;
  line-height: 1.15;
}
.pwr-card-sub {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: 12.5px;
  color: #8C7757;
  margin: 0;
}

/* ── HERO ─────────────────────────────────────────────────── */
.pwr-hero {
  display: block;
}
.pwr-hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: clamp(14px, 1.4vw, 20px);
  align-items: stretch;
}
@media (max-width: 1100px) {
  .pwr-hero-grid { grid-template-columns: 1fr; }
}
.pwr-hero-card {
  background: #FDFAF0;
  border-radius: 16px;
  border: 1px solid rgba(74, 58, 38, 0.10);
  box-shadow:
    0 1px 2px rgba(74, 58, 38, 0.03),
    0 12px 32px -18px rgba(74, 58, 38, 0.10);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Hero headline */
.pwr-hero-headline {
  position: relative;
}
.pwr-hero-headline::after {
  content: '';
  position: absolute;
  left: 24px;
  bottom: 110px;
  width: 36px;
  height: 3px;
  border-radius: 2px;
  background: #D08820;
}
.pwr-hero-title {
  font-family: 'Cormorant Garamond', 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(28px, 2.8vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #2A1F12;
  margin: 4px 0 6px;
}
.pwr-hero-title em {
  font-style: italic;
  color: #D08820;
}
.pwr-hero-insight {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.5;
  color: #5C4A35;
  margin: 0 0 12px;
}
.pwr-hero-insight em {
  color: #D08820;
  font-style: italic;
  font-weight: 500;
}

/* Band / Target block */
.pwr-band-target {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(74, 58, 38, 0.03);
  border: 1px solid rgba(74, 58, 38, 0.06);
  margin-top: auto;
}
.pwr-band-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pwr-band-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8C7757;
}
.pwr-band-num {
  font-family: 'Fraunces', 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
  color: #2A1F12;
}
.pwr-band-block--target .pwr-band-num { color: #D08820; }
.pwr-band-arrow {
  font-size: 18px;
  color: #B7A480;
}

/* Hero radar card */
.pwr-hero-radar-card {
  align-items: center;
  text-align: center;
}
.pwr-radar-svg {
  width: 100%;
  max-width: 260px;
  height: auto;
  display: block;
  margin: 4px auto 0;
}
.pwr-radar-grid { fill: rgba(74, 58, 38, 0.02); stroke: rgba(74, 58, 38, 0.10); stroke-width: 1; }
.pwr-radar-you {
  fill: rgba(62, 150, 85, 0.20);
  stroke: #3E9655;
  stroke-width: 2;
  stroke-linejoin: round;
}
.pwr-radar-target {
  fill: none;
  stroke: #D08820;
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
  stroke-linejoin: round;
}
.pwr-radar-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  fill: #5C4A35;
  cursor: pointer;
  transition: fill 180ms;
}
.pwr-radar-label:hover { fill: #D08820; }
.pwr-radar-legend {
  display: flex;
  justify-content: center;
  gap: 18px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10.5px;
  color: #8C7757;
  margin-top: 6px;
}
.pwr-radar-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.pwr-legend-swatch {
  display: inline-block;
  width: 12px;
  height: 3px;
  border-radius: 2px;
  background: #3E9655;
}
.pwr-legend-swatch--target {
  background: transparent;
  border-top: 2px dashed #D08820;
  border-radius: 0;
}

/* Hero history */
.pwr-hero-history {
  align-items: stretch;
}
.pwr-hist-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.pwr-hist-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(74, 58, 38, 0.06);
  text-decoration: none;
  color: inherit;
  transition: background 180ms;
}
.pwr-hist-row:hover { background: rgba(208, 136, 32, 0.04); }
.pwr-hist-row:last-of-type { border-bottom: none; }
.pwr-hist-name {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 13.5px;
  color: #2A1F12;
}
.pwr-hist-band {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 16px;
  color: #D08820;
  font-variant-numeric: tabular-nums;
}
.pwr-hist-date {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11.5px;
  color: #8C7757;
}
.pwr-hist-arrow {
  color: #B7A480;
  font-size: 13px;
}
.pwr-hist-empty {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: 13.5px;
  color: #8C7757;
  text-align: center;
  padding: 24px 4px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Recent essays — paginated with dot indicators */
.pwr-hist-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pwr-hist-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-top: 10px;
  margin-top: auto;
}
.pwr-hist-arrow-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(74, 58, 38, 0.18);
  background: transparent;
  color: #5C4A35;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 180ms, border-color 180ms, color 180ms;
}
.pwr-hist-arrow-btn:hover {
  background: rgba(208, 136, 32, 0.10);
  border-color: rgba(208, 136, 32, 0.40);
  color: #D08820;
}
.pwr-hist-arrow-btn:disabled {
  opacity: 0.30;
  cursor: default;
  background: transparent;
}
.pwr-hist-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pwr-hist-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(74, 58, 38, 0.30);
  background: transparent;
  cursor: pointer;
  transition: background 180ms, border-color 180ms, transform 180ms;
}
.pwr-hist-dot:hover { border-color: rgba(208, 136, 32, 0.60); transform: scale(1.15); }
.pwr-hist-dot.is-active {
  background: #D08820;
  border-color: #D08820;
  transform: scale(1.15);
}

/* ── Sticky criterion selector ────────────────────────────── */
/* Integrated nav — no white pill on active, no box around active.
   Just colour + weight shift + a gold underline. Three thin
   vertical separators sit BETWEEN the four tabs (not on the
   outer edges). */
.pwr-crit-nav {
  position: sticky;
  top: 76px;
  z-index: 10;
  display: flex;
  gap: 0;
  padding: 8px 0;
  margin: 0;
  background: rgba(251, 248, 240, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(74, 58, 38, 0.08);
  border-bottom: 1px solid rgba(74, 58, 38, 0.08);
  overflow-x: auto;
  scrollbar-width: none;
}
.pwr-crit-nav::-webkit-scrollbar { display: none; }
.pwr-crit-tab {
  position: relative;
  flex: 1 0 auto;
  padding: 14px 24px;
  border: none;
  border-radius: 0;
  background: transparent;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #8C7757;
  cursor: pointer;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-align: center;
  transition: color 200ms, background 180ms;
}
.pwr-crit-tab:hover {
  color: #2A1F12;
  background: rgba(208, 136, 32, 0.04);
}
.pwr-crit-tab.is-on {
  color: #2A1F12;
  font-weight: 600;
}
/* Gold underline marker on the active tab — sits flush with the
   nav's bottom border so it reads as a tab indicator, not a
   floating accent. */
.pwr-crit-tab.is-on::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -1px;
  transform: translateX(-50%);
  width: 36px;
  height: 2px;
  border-radius: 2px;
  background: #D08820;
}
/* Thin vertical separators between tabs — only between the first
   three (not after the last tab, no outer edges). */
.pwr-crit-tab:not(:last-child)::before {
  content: '';
  position: absolute;
  right: 0;
  top: 30%;
  bottom: 30%;
  width: 1px;
  background: rgba(74, 58, 38, 0.14);
}

/* ── Criterion sections — tab-style, only one visible at a time */
.pwr-crit-sections {
  display: block;
}
.pwr-crit-section {
  display: none;
  flex-direction: column;
  gap: clamp(14px, 1.6vh, 18px);
}
.pwr-crit-section.is-active {
  display: flex;
}

/* Section header */
.pwr-cs-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 4px 0;
}
.pwr-cs-eyebrow {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: #D08820;
}
.pwr-cs-title {
  font-family: 'Cormorant Garamond', 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(24px, 2.2vw, 30px);
  letter-spacing: -0.01em;
  color: #2A1F12;
  margin: 0;
}
.pwr-cs-band-target {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px;
  color: #5C4A35;
}
.pwr-cs-band-label, .pwr-cs-target-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8C7757;
}
.pwr-cs-band-num {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 18px;
  color: #2A1F12;
}
.pwr-cs-target-num {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 18px;
  color: #D08820;
}
.pwr-cs-band-arrow { color: #B7A480; }

/* ── Top Patterns to Fix ─────────────────────────────────────
   Merged successor of "What's holding you back?" + "Priority
   plan". Three horizontal cards ranked by severity; each card
   carries rank chip, impact eyebrow, label, description, a
   slim fire-frequency bar with count, and evidence chips. */
.pwr-tp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 900px) {
  .pwr-tp-grid { grid-template-columns: 1fr; }
}
.pwr-tp-card {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 18px 18px;
  border-radius: 14px;
  border: 1px solid rgba(74, 58, 38, 0.10);
}
.pwr-impact-high {
  background: rgba(216, 64, 30, 0.04);
  border-color: rgba(216, 64, 30, 0.28);
}
.pwr-impact-med {
  background: rgba(208, 136, 32, 0.04);
  border-color: rgba(208, 136, 32, 0.28);
}
.pwr-impact-low {
  background: rgba(62, 150, 85, 0.04);
  border-color: rgba(62, 150, 85, 0.28);
}

.pwr-tp-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pwr-tp-rank {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(74, 58, 38, 0.16);
  color: #5C4A35;
}
.pwr-tp-impact {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.20em;
  text-transform: uppercase;
}
.pwr-impact-high .pwr-tp-impact { color: #D8401E; }
.pwr-impact-med  .pwr-tp-impact { color: #D08820; }
.pwr-impact-low  .pwr-tp-impact { color: #3E9655; }
.pwr-impact-high .pwr-tp-rank { color: #D8401E; border-color: rgba(216, 64, 30, 0.32); }
.pwr-impact-med  .pwr-tp-rank { color: #D08820; border-color: rgba(208, 136, 32, 0.34); }
.pwr-impact-low  .pwr-tp-rank { color: #3E9655; border-color: rgba(62, 150, 85, 0.34); }

.pwr-tp-label {
  font-family: 'Cormorant Garamond', 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.005em;
  color: #2A1F12;
  margin: 0;
  line-height: 1.15;
}
.pwr-tp-desc {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 13px;
  line-height: 1.5;
  color: #5C4A35;
  margin: 0;
}

/* Frequency line — slim bar + small count label below the desc.
   When count is 0 the fill is 0 and the label switches copy. */
.pwr-tp-freq {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}
.pwr-tp-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(74, 58, 38, 0.10);
  overflow: hidden;
}
.pwr-tp-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 420ms cubic-bezier(0.22, 1, 0.36, 1);
}
.pwr-impact-high .pwr-tp-bar-fill { background: #D8401E; }
.pwr-impact-med  .pwr-tp-bar-fill { background: #D08820; }
.pwr-impact-low  .pwr-tp-bar-fill { background: #3E9655; }
.pwr-tp-freq-text {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #8C7757;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.pwr-tp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.pwr-tp-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(74, 58, 38, 0.10);
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 12px;
  color: #2A1F12;
}
.pwr-tp-chip-meta {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px;
  color: #8C7757;
  font-variant-numeric: tabular-nums;
}

/* ── Zero-data onboarding panel ───────────────────────────
   Shown below the hero until the first essay lands. Three
   action tiles framed as "start here". */
.pwr-zero-panel {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 12px;
  padding: 30px 30px 32px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(74, 58, 38, 0.08);
}
.pwr-zero-head { text-align: left; }
.pwr-zero-title {
  font-family: 'Cormorant Garamond', 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.012em;
  color: #2A1F12;
  margin: 0 0 6px;
  line-height: 1.18;
}
.pwr-zero-sub {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 14px;
  line-height: 1.55;
  color: #5C4A35;
  margin: 0;
  max-width: 60ch;
}
.pwr-zero-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 900px) {
  .pwr-zero-tiles { grid-template-columns: 1fr; }
}
.pwr-zero-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 20px;
  border-radius: 14px;
  border: 1px solid rgba(74, 58, 38, 0.12);
  background: #FDFAF0;
  text-decoration: none;
  color: inherit;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.pwr-zero-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -10px rgba(42, 31, 18, 0.20);
}
.pwr-zero-tile--mock     { border-left: 3px solid #D08820; }
.pwr-zero-tile--mock:hover     { border-color: rgba(208, 136, 32, 0.35); }
.pwr-zero-tile--practice { border-left: 3px solid #3E9655; }
.pwr-zero-tile--practice:hover { border-color: rgba(62, 150, 85, 0.32); }
.pwr-zero-tile--lesson   { border-left: 3px solid #1E72B0; }
.pwr-zero-tile--lesson:hover   { border-color: rgba(30, 114, 176, 0.32); }
.pwr-zero-tile-tag {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: #8C7757;
}
.pwr-zero-tile--mock     .pwr-zero-tile-tag { color: #D08820; }
.pwr-zero-tile--practice .pwr-zero-tile-tag { color: #3E9655; }
.pwr-zero-tile--lesson   .pwr-zero-tile-tag { color: #1E72B0; }
.pwr-zero-tile-title {
  font-family: 'Cormorant Garamond', 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.005em;
  color: #2A1F12;
  margin: 0;
  line-height: 1.2;
}
.pwr-zero-tile-sub {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 13px;
  line-height: 1.5;
  color: #5C4A35;
  margin: 0;
}
.pwr-zero-tile-meta {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  color: #8C7757;
  letter-spacing: 0.02em;
  margin-top: auto;
}

/* ── Evidence card ────────────────────────────────────────── */
/* Stub state — shown when no graded essays exist yet for this
   criterion. Soft gold dashed border, italic copy. */
.pwr-evidence-stub {
  padding: 24px;
  border-radius: 12px;
  background: rgba(208, 136, 32, 0.04);
  border: 1px dashed rgba(208, 136, 32, 0.32);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.pwr-evidence-stub-eyebrow {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: #D08820;
}
.pwr-evidence-stub-text {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: 14px;
  line-height: 1.55;
  color: #5C4A35;
  margin: 0;
}

/* Real data state — before / after side-by-side */
.pwr-evidence-pair {
  display: grid;
  grid-template-columns: 1fr 24px 1fr;
  gap: 0;
  align-items: stretch;
}
@media (max-width: 760px) {
  .pwr-evidence-pair {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .pwr-evidence-arrow { display: none; }
}
.pwr-evidence-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: background 200ms, border-color 200ms, transform 200ms;
}
.pwr-evidence-side--original {
  background: rgba(216, 64, 30, 0.05);
  border: 1px solid rgba(216, 64, 30, 0.18);
}
.pwr-evidence-side--rewrite {
  background: rgba(62, 150, 85, 0.05);
  border: 1px solid rgba(62, 150, 85, 0.18);
}
.pwr-evidence-side:hover {
  transform: translateY(-1px);
}
.pwr-evidence-side--original:hover { border-color: rgba(216, 64, 30, 0.36); }
.pwr-evidence-side--rewrite:hover  { border-color: rgba(62, 150, 85, 0.36); }

.pwr-evidence-eyebrow {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.pwr-evidence-eyebrow--issue   { color: #C73B1E; }
.pwr-evidence-eyebrow--improve { color: #1E8C5A; }

.pwr-evidence-text {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 14.5px;
  line-height: 1.55;
  color: #2A1F12;
  margin: 0;
  flex: 1;
}

/* Word-diff highlighting */
.pwr-diff--removed {
  background: rgba(216, 64, 30, 0.18);
  color: #B53A1E;
  padding: 1px 4px;
  border-radius: 4px;
  text-decoration: line-through;
  text-decoration-color: rgba(216, 64, 30, 0.55);
  text-decoration-thickness: 1.5px;
}
.pwr-diff--added {
  background: rgba(62, 150, 85, 0.18);
  color: #1E7B45;
  padding: 1px 4px;
  border-radius: 4px;
  font-weight: 500;
}
.pwr-diff--kept { /* no styling — keeps the natural ink colour */ }

/* Arrow between original and rewrite — centered visually */
.pwr-evidence-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #D08820;
  font-size: 18px;
  font-weight: 600;
  user-select: none;
}

/* Tag chips */
.pwr-evidence-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}
.pwr-evidence-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}
.pwr-evidence-tag--issue {
  background: rgba(216, 64, 30, 0.10);
  color: #B53A1E;
}
.pwr-evidence-tag--improve {
  background: rgba(62, 150, 85, 0.10);
  color: #1E7B45;
}

/* Footer — essay source + pagination */
.pwr-evidence-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(74, 58, 38, 0.08);
}
.pwr-evidence-source {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  color: #8C7757;
}
.pwr-evidence-only {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: 12px;
  color: #8C7757;
}
.pwr-evidence-pager {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.pwr-evidence-count {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  color: #5C4A35;
  font-variant-numeric: tabular-nums;
}
.pwr-evidence-nav {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(74, 58, 38, 0.18);
  background: transparent;
  color: #5C4A35;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 180ms, border-color 180ms, color 180ms;
}
.pwr-evidence-nav:hover {
  background: rgba(208, 136, 32, 0.10);
  border-color: rgba(208, 136, 32, 0.40);
  color: #D08820;
}
.pwr-evidence-nav:disabled { opacity: 0.30; cursor: default; }

/* ── Recommended Actions ──────────────────────────────────── */
.pwr-recs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 1100px) { .pwr-recs-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .pwr-recs-grid { grid-template-columns: 1fr; } }

.pwr-rec-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 16px 18px;
  border-radius: 14px;
  background: #FFFFFF;
  border: 1px solid rgba(74, 58, 38, 0.10);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
              border-color 200ms,
              box-shadow 220ms;
}
/* Coloured accent stripe down the left of every rec card, tinted
   by content kind. Makes the four card types instantly scannable
   without forcing colored backgrounds on the whole tile. */
.pwr-rec-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: currentColor;
  opacity: 0.6;
}
.pwr-rec-card--lesson  { color: #1E72B0; }
.pwr-rec-card--drill   { color: #3E9655; }
.pwr-rec-card--phrase  { color: #7A3FA0; }
.pwr-rec-card--model   { color: #CB4528; }
.pwr-rec-card--mock    { color: #D08820; }
.pwr-rec-card--library { color: #8C55BC; }
.pwr-rec-card:hover {
  transform: translateY(-2px);
  border-color: rgba(208, 136, 32, 0.32);
  box-shadow: 0 10px 24px -16px rgba(74, 58, 38, 0.30);
}
.pwr-rec-card-tag {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.pwr-rec-card--lesson  .pwr-rec-card-tag { color: #1E72B0; }
.pwr-rec-card--drill   .pwr-rec-card-tag { color: #3E9655; }
.pwr-rec-card--phrase  .pwr-rec-card-tag { color: #7A3FA0; }
.pwr-rec-card--model   .pwr-rec-card-tag { color: #CB4528; }
.pwr-rec-card--mock    .pwr-rec-card-tag { color: #D08820; }
.pwr-rec-card--library .pwr-rec-card-tag { color: #8C55BC; }
.pwr-rec-card-title {
  font-family: 'Fraunces', 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: #2A1F12;
  margin: 0 0 4px;
}
.pwr-rec-card-sub {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 12px;
  line-height: 1.45;
  color: #5C4A35;
  margin: 0 0 8px;
  flex: 1;
}
.pwr-rec-card-meta {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  color: #8C7757;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pwr-recs-expand-btn {
  display: block;
  margin: 14px auto 0;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid rgba(208, 136, 32, 0.32);
  background: transparent;
  color: #D08820;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 200ms, border-color 200ms;
}
.pwr-recs-expand-btn:hover {
  background: rgba(208, 136, 32, 0.08);
  border-color: rgba(208, 136, 32, 0.55);
}

/* ── All-essays popup (re-uses bg-windows) ────────────────── */
.pwr-allessays-wrap {
  background: #FFFFFF;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.pwr-allessays-meta {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10.5px;
  color: #8C7757;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  text-transform: uppercase;
  font-weight: 600;
}
.pwr-allessays-empty {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: 13.5px;
  color: #8C7757;
  padding: 24px 4px;
  text-align: center;
}
.pwr-allessays-list { display: flex; flex-direction: column; flex: 1; }
.pwr-allessays-row {
  display: grid;
  grid-template-columns: 1fr 50px auto 14px;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(74, 58, 38, 0.06);
  text-decoration: none;
  color: inherit;
}
.pwr-allessays-row:last-child { border-bottom: none; }
.pwr-allessays-band {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 15px;
  color: #D08820;
  font-variant-numeric: tabular-nums;
}
.pwr-allessays-arrow { color: #B7A480; }
.pwr-allessays-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 4px 0;
  margin-top: 8px;
  border-top: 1px solid rgba(74, 58, 38, 0.06);
}
.pwr-allessays-pager-btn {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(74, 58, 38, 0.18);
  background: transparent;
  color: #5C4A35;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.pwr-allessays-pager-btn:disabled { opacity: 0.4; cursor: default; }
.pwr-allessays-pager-state {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  color: #8C7757;
}

@media (prefers-reduced-motion: reduce) {
  .pwr-rec-card, .pwr-pri-bar-fill, .pwr-pri-chev, .pwr-pri-detail {
    animation: none;
    transition: none;
  }
}
