/* ═══════════════════════════════════════════════════════════════════
   IELTS Listening — Practice (Mock Mode runner + review)
   Reuses the cream lesson-page palette from .reading-page on top of
   which this layer adds the runner-specific chrome.
   ═══════════════════════════════════════════════════════════════════ */

/* Shared button */
.lp-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .65rem 1.2rem;
  border: 1px solid rgba(74, 58, 38, .22);
  background: #fff;
  color: #2A1F12;
  font: inherit;
  font-size: .92rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: background .14s, border-color .14s, transform .08s;
}
.lp-btn:hover { background: #FBF6EB; border-color: rgba(74, 58, 38, .45); }
.lp-btn:active { transform: translateY(1px); }
.lp-btn-primary {
  background: #2A1F12;
  border-color: #2A1F12;
  color: #F5EBD3;
}
.lp-btn-primary:hover { background: #3a2c1c; border-color: #3a2c1c; }

/* ── Themed loading state ───────────────────────────────────────── */
.lp-fancy-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.3rem;
  min-height: 60vh;
  text-align: center;
}
.lp-fancy-loader-eq {
  display: flex;
  align-items: flex-end;
  gap: .4rem;
  height: 52px;
}
.lp-fancy-loader-eq span {
  display: block;
  width: 6px;
  background: linear-gradient(180deg, #B57A2E 0%, #d18d3e 100%);
  border-radius: 3px;
  transform-origin: bottom;
  animation: lp-eq-bounce 1.05s ease-in-out infinite;
}
.lp-fancy-loader-eq span:nth-child(1) { height: 60%; animation-delay: 0s; }
.lp-fancy-loader-eq span:nth-child(2) { height: 100%; animation-delay: .13s; }
.lp-fancy-loader-eq span:nth-child(3) { height: 75%; animation-delay: .26s; }
.lp-fancy-loader-eq span:nth-child(4) { height: 90%; animation-delay: .39s; }
.lp-fancy-loader-eq span:nth-child(5) { height: 55%; animation-delay: .52s; }
@keyframes lp-eq-bounce {
  0%, 100% { transform: scaleY(.35); opacity: .65; }
  50%      { transform: scaleY(1);   opacity: 1; }
}
.lp-fancy-loader-label {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 500;
  color: #2A1F12;
  letter-spacing: .01em;
}
.lp-fancy-loader-sub {
  font-size: .9rem;
  color: #7B6850;
  max-width: 28rem;
  line-height: 1.45;
}

.lp-loading,
.lp-empty,
.lp-error {
  margin: 3rem auto;
  max-width: 36rem;
  padding: 2rem 1.5rem;
  text-align: center;
  border: 1px dashed rgba(74, 58, 38, .25);
  border-radius: 14px;
  background: #fff;
  color: #5e4d3a;
}
.lp-empty h3,
.lp-error h3 {
  margin: 0 0 .5rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 500;
}

/* ── Mode picker (landing) ───────────────────────────────────────── */
.lp-modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.4rem;
  padding-bottom: 4rem;
}
.lp-mode {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  padding: 1.9rem 1.8rem 1.7rem;
  background: #fff;
  border: 1px solid rgba(74, 58, 38, .12);
  border-radius: 18px;
  color: #2A1F12;
  text-decoration: none;
  overflow: hidden;
  transition: border-color .18s, box-shadow .18s, transform .14s;
}
.lp-mode:hover {
  border-color: rgba(181, 122, 46, .55);
  box-shadow: 0 18px 36px -22px rgba(74, 58, 38, .42);
  transform: translateY(-2px);
}
.lp-mode::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(181, 122, 46, .06) 0%, transparent 60%);
  pointer-events: none;
}
.lp-mode-icon {
  display: inline-flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  background: rgba(181, 122, 46, .1);
  color: #B57A2E;
  border-radius: 14px;
  margin-bottom: .35rem;
}
.lp-mode-eyebrow {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #B57A2E;
}
.lp-mode-title {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.9rem;
  font-weight: 500;
  line-height: 1.1;
}
.lp-mode-desc {
  margin: 0;
  font-size: .96rem;
  line-height: 1.55;
  color: #5e4d3a;
  max-width: 30rem;
}
.lp-mode-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  font-size: .82rem;
  color: #7B6850;
  margin-top: auto;
}
.lp-mode-cta {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .92rem;
  font-weight: 700;
  color: #B57A2E;
  transition: gap .14s;
}
.lp-mode:hover .lp-mode-cta { gap: .75rem; }

/* ── Hero ────────────────────────────────────────────────────────── */
.lp-page { padding-bottom: 4rem; }
.lp-hero {
  margin: 1.4rem 0 2.4rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid rgba(74, 58, 38, .12);
}
.lp-hero-eyebrow {
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #B57A2E;
  margin-bottom: .9rem;
}
.lp-hero-title {
  margin: 0 0 .8rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2.6rem;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.01em;
  color: #2A1F12;
}
.lp-hero-lede {
  margin: 0;
  max-width: 44rem;
  color: #5e4d3a;
  font-size: 1.02rem;
  line-height: 1.6;
}

/* ── Library cards ───────────────────────────────────────────────── */
.lp-lib { padding: .5rem 0 4rem; }
.lp-lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.1rem;
}

.lp-card {
  position: relative;
  display: flex;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(74, 58, 38, .1);
  border-radius: 16px;
  text-decoration: none;
  color: #2A1F12;
  transition: border-color .18s, box-shadow .18s, transform .14s;
}
.lp-card:hover {
  border-color: rgba(181, 122, 46, .5);
  box-shadow: 0 14px 32px -22px rgba(74, 58, 38, .45);
  transform: translateY(-2px);
}
/* The honey gradient left strip — gives each card identity without
   needing a per-mock illustration. Changes colour with attempt state. */
.lp-card-stripe {
  flex-shrink: 0;
  width: 6px;
  background: linear-gradient(180deg, #B57A2E 0%, #d18d3e 50%, #B57A2E 100%);
  background-size: 100% 200%;
  animation: lp-stripe-shimmer 9s ease-in-out infinite;
}
.lp-card-progress .lp-card-stripe {
  background: linear-gradient(180deg, #d18d3e 0%, #f0a85a 100%);
}
.lp-card-done .lp-card-stripe {
  background: linear-gradient(180deg, #2C6C40 0%, #4ea867 100%);
}
@keyframes lp-stripe-shimmer {
  0%, 100% { background-position: 0% 0%; }
  50%      { background-position: 0% 100%; }
}

.lp-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  padding: 1.4rem 1.5rem 1.3rem;
}
.lp-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
}
.lp-card-tag {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #7B6850;
  padding: .22rem .55rem;
  background: rgba(74, 58, 38, .07);
  border-radius: 5px;
}
.lp-card-status {
  font-size: .8rem;
  font-weight: 600;
  color: #7B6850;
}
.lp-card-status.is-done     { color: #2C6C40; }
.lp-card-status.is-progress { color: #B57A2E; }
.lp-card-title {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.65rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.005em;
}
.lp-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem;
  font-size: .82rem;
  color: #7B6850;
}
.lp-card-meta .lp-dot { color: #c4b5a0; }
.lp-card-cta {
  margin-top: .35rem;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .9rem;
  font-weight: 700;
  color: #B57A2E;
  transition: gap .14s;
}
.lp-card:hover .lp-card-cta { gap: .7rem; }
.lp-card-done .lp-card-cta { color: #2C6C40; }
.lp-card-progress .lp-card-cta { color: #B57A2E; }

/* ── Runner shell ────────────────────────────────────────────────── */

.lp-runner { padding-bottom: 9rem; /* leave room for sticky bottom nav */ }

.lp-bar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin: 0 -1.6rem 1.4rem;
  padding: .9rem 1.6rem;
  background: rgba(248, 245, 238, .94);
  border-bottom: 1px solid rgba(74, 58, 38, .12);
  backdrop-filter: blur(8px);
}
.lp-bar-back {
  font-size: .85rem;
  font-weight: 600;
  color: #7B6850;
  text-decoration: none;
}
.lp-bar-back:hover { color: #2A1F12; }
.lp-bar-title {
  flex: 1;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 500;
  color: #2A1F12;
}
.lp-bar-timer {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 1rem;
  font-weight: 600;
  padding: .35rem .8rem;
  background: rgba(74, 58, 38, .07);
  border-radius: 8px;
  color: #2A1F12;
  min-width: 4.4rem;
  text-align: center;
}

/* Review variant of the top bar — wider, with the score on display */
.lp-bar-review { align-items: stretch; gap: 1.6rem; padding: 1.1rem 1.6rem; }
.lp-bar-review .lp-bar-back { align-self: center; }
.lp-bar-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  padding: 0 1.2rem;
  border-left: 1px solid rgba(74, 58, 38, .12);
  border-right: 1px solid rgba(74, 58, 38, .12);
}
.lp-bar-score-raw {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: #2A1F12;
  line-height: 1;
}
.lp-bar-score-band {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #B57A2E;
}
.lp-bar-pps {
  display: flex;
  flex: 1;
  gap: .55rem;
  align-items: center;
}
.lp-bar-pp {
  font-size: .8rem;
  color: #5e4d3a;
  padding: .35rem .6rem;
  background: rgba(74, 58, 38, .07);
  border-radius: 6px;
}
.lp-bar-pp strong { color: #2A1F12; }

.lp-bar-retake {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .9rem;
  background: #fff;
  border: 1px solid rgba(74, 58, 38, .2);
  border-radius: 8px;
  color: #2A1F12;
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .14s, border-color .14s;
}
.lp-bar-retake:hover { background: #FBF6EB; border-color: #B57A2E; color: #B57A2E; }
.lp-bar-retake:active { transform: translateY(1px); }

/* ── Part panel ──────────────────────────────────────────────────── */

.lp-part {
  background: #fff;
  border: 1px solid rgba(74, 58, 38, .08);
  border-radius: 14px;
  padding: 1.5rem 1.7rem 1.7rem;
}
.lp-part-head { margin-bottom: 1rem; }
.lp-part-eyebrow {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: #2A1F12;
}
.lp-part-eyebrow::first-letter,
.lp-part-eyebrow {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

.lp-audio-host { margin-bottom: 1.6rem; }
.lp-audio-missing {
  padding: 1rem 1.1rem;
  background: rgba(74, 58, 38, .045);
  border-radius: 10px;
  font-style: italic;
  color: #7B6850;
  font-size: .9rem;
}

/* ── Quick Practice / Random Mock card actions (landing) ─────────── */

/* The Quick card isn't a single clickable link — the 4 Part buttons
   inside are the action. Same .sp-prac-mode chrome; this row replaces
   the .sp-prac-mode-cta strip. */
.sp-prac-mode.sp-prac-mode-card {
  cursor: default;
}
.sp-prac-mode.sp-prac-mode-card:hover {
  transform: none;
}

.lp-quick-parts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .55rem;
  margin-top: .9rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(74, 58, 38, .08);
}
.lp-quick-part-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .65rem .4rem;
  background: rgba(181, 122, 46, .08);
  border: 1px solid rgba(181, 122, 46, .25);
  border-radius: 10px;
  color: #B57A2E;
  text-decoration: none;
  font: inherit;
  font-size: .85rem;
  font-weight: 700;
  transition: background .14s, border-color .14s, transform .1s;
}
.lp-quick-part-btn:hover {
  background: rgba(181, 122, 46, .16);
  border-color: rgba(181, 122, 46, .55);
  transform: translateY(-1px);
}
.lp-quick-part-btn:active { transform: translateY(0); }
.lp-quick-part-num { white-space: nowrap; }

/* Random Mock card has a primary action + a small library link */
.lp-mock-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  margin-top: .9rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(74, 58, 38, .08);
}
.lp-mock-start-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .7rem 1.2rem;
  background: #2A1F12;
  border: 1px solid #2A1F12;
  border-radius: 10px;
  color: #F5EBD3;
  font: inherit;
  font-size: .92rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .14s, transform .1s;
}
.lp-mock-start-btn:hover { background: #3a2c1c; }
.lp-mock-start-btn:active { transform: translateY(1px); }
.lp-mock-lib-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .85rem;
  font-weight: 600;
  color: #7B6850;
  text-decoration: none;
  transition: color .14s, gap .14s;
}
.lp-mock-lib-link:hover { color: #B57A2E; gap: .55rem; }

/* ── Library page (the user's mock collection) ───────────────────── */
.lp-lib-card {
  background: #fff;
  border: 1px solid rgba(74, 58, 38, .12);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .14s, box-shadow .14s, transform .12s;
}
.lp-lib-card:hover {
  border-color: rgba(181, 122, 46, .45);
  box-shadow: 0 10px 24px -16px rgba(74, 58, 38, .3);
  transform: translateY(-1px);
}
.lp-lib-card-body {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  padding: 1.2rem 1.4rem 1.2rem;
}
.lp-lib-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
}
.lp-lib-card-tag {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #7B6850;
  padding: .22rem .55rem;
  background: rgba(74, 58, 38, .07);
  border-radius: 5px;
}
.lp-lib-card-best {
  font-size: .82rem;
  font-weight: 600;
  color: #2C6C40;
}
.lp-lib-card-title {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.2;
}
.lp-lib-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem;
  font-size: .8rem;
  color: #7B6850;
}
.lp-lib-card-actions {
  display: flex;
  gap: .55rem;
  margin-top: .3rem;
}
.lp-lib-card-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .9rem;
  background: #fff;
  border: 1px solid rgba(74, 58, 38, .2);
  border-radius: 8px;
  color: #2A1F12;
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .14s, border-color .14s;
}
.lp-lib-card-btn:hover {
  background: #FBF6EB;
  border-color: #B57A2E;
  color: #B57A2E;
}
.lp-lib-card-btn-primary {
  background: #2A1F12;
  border-color: #2A1F12;
  color: #F5EBD3;
}
.lp-lib-card-btn-primary:hover {
  background: #3a2c1c;
  border-color: #3a2c1c;
  color: #F5EBD3;
}

/* Dashboard retake badge */
.lp-dash-retake {
  display: inline-block;
  margin-left: .35rem;
  padding: .15rem .45rem;
  background: rgba(74, 58, 38, .07);
  color: #7B6850;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 4px;
}

/* ── Custom audio player ─────────────────────────────────────────── */
/* Restrained look — sits on the same paper background as the
   surrounding card, with just enough definition to be clearly
   interactive. No dark gradient, no glow, no neon honey accent. */
.lp-player {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .65rem .85rem .65rem .7rem;
  background: #fff;
  border: 1px solid rgba(74, 58, 38, .12);
  border-radius: 10px;
}
.lp-player-audio { display: none; }

/* Playback speed pill — sits at the far right of the player; clicking
   cycles 1× → 1.5× → 2× → 2.5× → 3× → 1×. Honey-tinted so it reads as
   an actionable accent without competing with the dark play button. */
.lp-player-speed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 3.1rem;
  height: 30px;
  padding: 0 .55rem;
  border-radius: 999px;
  background: rgba(217, 162, 104, .14);
  border: 1px solid rgba(181, 122, 46, .35);
  color: #5e4d3a;
  font: 700 .82rem/1 'JetBrains Mono', 'IBM Plex Mono', Menlo, monospace;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background .14s, border-color .14s, transform .08s, color .14s;
}
.lp-player-speed:hover {
  background: rgba(217, 162, 104, .26);
  border-color: rgba(181, 122, 46, .55);
  color: #2A1F12;
}
.lp-player-speed:active { transform: scale(.94); }
.lp-player-speed-val { display: inline-block; }

.lp-player-play {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background: #2A1F12;
  color: #F5EBD3;
  cursor: pointer;
  transition: background .14s, transform .08s;
}
.lp-player-play:hover { background: #3a2c1c; }
.lp-player-play:active { transform: scale(.94); }

/* Icon toggle driven entirely by data-state on the button — only one
   svg is ever visible. Avoids the prior bug where `display: block`
   on the icons was overriding the [hidden] attribute. */
.lp-player-ico-play, .lp-player-ico-pause { display: none; }
.lp-player-play[data-state="paused"] .lp-player-ico-play   { display: block; transform: translateX(1px); }
.lp-player-play[data-state="playing"] .lp-player-ico-pause { display: block; }

.lp-player-body { flex: 1; display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.lp-player-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .8rem;
}
.lp-player-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #7B6850;
}
.lp-player-time {
  font-family: 'JetBrains Mono', ui-monospace, 'Menlo', monospace;
  font-size: .76rem;
  color: #7B6850;
}

.lp-player-track {
  position: relative;
  height: 6px;
  background: rgba(74, 58, 38, .12);
  border-radius: 999px;
  cursor: pointer;
  touch-action: none;
}
.lp-player-track-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: #B57A2E;
  border-radius: 999px;
}
.lp-player-track-handle {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 12px;
  height: 12px;
  transform: translate(-50%, -50%);
  background: #fff;
  border: 2px solid #B57A2E;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity .14s;
}
.lp-player-track:hover .lp-player-track-handle,
.lp-is-dragging .lp-player-track-handle,
.lp-player-play[data-state="playing"] ~ .lp-player-body .lp-player-track-handle {
  opacity: 1;
}
/* No transition while dragging so the handle is glued to the cursor. */
.lp-is-dragging, .lp-is-dragging * { user-select: none; }

.lp-blocks { display: flex; flex-direction: column; gap: 1.6rem; }
.lp-block {
  padding: 1.2rem 1.3rem 1.3rem;
  background: #FBF6EB;
  border: 1px solid rgba(74, 58, 38, .08);
  border-radius: 12px;
}
.lp-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  flex-wrap: wrap;
  margin-bottom: .7rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid rgba(74, 58, 38, .1);
}
.lp-block-h3 {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 500;
  color: #2A1F12;
}

/* "Listen from here" — small affordance that seeks the Part audio */
.lp-listen-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .75rem;
  border: 1px solid rgba(181, 122, 46, .35);
  background: #fff;
  color: #B57A2E;
  font: inherit;
  font-size: .8rem;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: background .14s, border-color .14s;
}
.lp-listen-btn:hover { background: rgba(181, 122, 46, .12); border-color: #B57A2E; }

.lp-rubric, .lp-wordcount {
  margin: 0 0 .55rem;
  font-size: .9rem;
  color: #5e4d3a;
}
.lp-wordcount em { color: #2A1F12; font-weight: 600; font-style: normal; }

.lp-stem {
  margin: 0 0 .9rem;
  font-size: 1.02rem;
  color: #2A1F12;
  line-height: 1.5;
}
.lp-stem-q,
.lp-stem-qrange {
  display: inline-block;
  margin-right: .55rem;
  padding: .12rem .55rem;
  background: rgba(74, 58, 38, .9);
  color: #F8F5EE;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  border-radius: 5px;
}

/* ── note-completion rendering ───────────────────────────────────── */
.lp-note-title {
  margin: .8rem 0 .9rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #2A1F12;
}
.lp-notes {
  background: #fff;
  border: 1px solid rgba(74, 58, 38, .1);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  line-height: 1.85;
  font-size: .98rem;
  color: #2A1F12;
}
.lp-note-section {
  margin: 1rem 0 .35rem;
  font-weight: 700;
  font-size: 1rem;
}
.lp-note-section:first-child { margin-top: 0; }
.lp-note-subsection {
  margin: .55rem 0 .2rem;
  font-weight: 600;
  font-size: .95rem;
  color: #4a3a26;
}
.lp-note-line, .lp-note-bullet { margin: .2rem 0; }
.lp-note-bullet { padding-left: .25rem; }

/* The boxed [N] blank + its input */
.lp-blank-wrap {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin: 0 .15rem;
  vertical-align: middle;
}
.lp-blank-num {
  display: inline-block;
  padding: .08rem .42rem;
  background: rgba(74, 58, 38, .9);
  color: #F8F5EE;
  font-size: .72rem;
  font-weight: 700;
  border-radius: 4px;
  line-height: 1.3;
}
.lp-blank {
  width: 9rem;
  padding: .25rem .5rem;
  border: 1px solid rgba(74, 58, 38, .35);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #fff;
  font: inherit;
  font-size: .95rem;
  color: #2A1F12;
}
.lp-blank:focus {
  outline: none;
  border-color: #B57A2E;
  box-shadow: 0 0 0 2px rgba(181, 122, 46, .15);
}
.lp-blank-user {
  display: inline-block;
  min-width: 5rem;
  padding: .2rem .5rem;
  border-radius: 5px;
  font-weight: 500;
  background: rgba(74, 58, 38, .07);
}
.lp-blank-user.is-correct { background: rgba(58, 138, 80, .14); color: #2C6C40; }
.lp-blank-user.is-wrong   { background: rgba(184, 70, 56, .14); color: #9A3A2E; text-decoration: line-through; text-decoration-color: rgba(154, 58, 46, .55); }
.lp-blank-expected {
  font-size: .82rem;
  color: #2C6C40;
  font-weight: 600;
}

.lp-mark {
  display: inline-flex;
  width: 1.2rem;
  height: 1.2rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: .8rem;
  font-weight: 700;
}
.lp-mark.is-correct { background: #2C6C40; color: #fff; }
.lp-mark.is-wrong   { background: #9A3A2E; color: #fff; }

/* ── table-completion ────────────────────────────────────────────── */
.lp-tablewrap {
  overflow-x: auto;
  margin-top: 1rem;
}
.lp-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid rgba(74, 58, 38, .14);
  border-radius: 10px;
  overflow: hidden;
}
.lp-table th {
  text-align: left;
  padding: .75rem .95rem;
  background: rgba(74, 58, 38, .07);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: #2A1F12;
  border-bottom: 1px solid rgba(74, 58, 38, .14);
}
.lp-table td {
  vertical-align: top;
  padding: .9rem .95rem;
  font-size: .96rem;
  line-height: 1.55;
  color: #2A1F12;
  border-bottom: 1px solid rgba(74, 58, 38, .08);
}
.lp-table tr:last-child td { border-bottom: 0; }
.lp-table td + td,
.lp-table th + th { border-left: 1px solid rgba(74, 58, 38, .08); }

/* ── map-labeling ────────────────────────────────────────────────── */
.lp-map {
  margin: 1rem 0 1.4rem;
  padding: 0;
  text-align: center;
}
.lp-map-img {
  display: inline-block;
  max-width: 100%;
  max-height: 460px;
  border-radius: 10px;
  border: 1px solid rgba(74, 58, 38, .14);
  background: #fff;
}
.lp-map-missing {
  margin: 1rem 0;
  padding: 1.3rem 1.4rem;
  border: 1px dashed rgba(154, 58, 46, .35);
  border-radius: 10px;
  background: rgba(184, 70, 56, .04);
  color: #5e4d3a;
  font-size: .9rem;
  line-height: 1.5;
}
.lp-map-missing strong { color: #9A3A2E; }

/* ── multiple-choice (shared by mc-single + mc-multi) ───────────── */
.lp-mc-list {
  list-style: none;
  margin: 0 0 .6rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.lp-mc-row {
  background: #fff;
  border: 1px solid rgba(74, 58, 38, .15);
  border-radius: 8px;
  padding: .55rem .9rem;
  transition: border-color .14s, background .14s;
}
.lp-mc-row:hover { border-color: rgba(181, 122, 46, .55); }
.lp-mc-row label {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  cursor: pointer;
}
.lp-mc-row input { margin: .25rem 0 0; accent-color: #B57A2E; }
.lp-mc-letter {
  display: inline-block;
  min-width: 1.5rem;
  padding: .08rem .42rem;
  background: rgba(74, 58, 38, .12);
  color: #2A1F12;
  font-size: .78rem;
  font-weight: 700;
  border-radius: 4px;
  text-align: center;
}
.lp-mc-label { flex: 1; font-size: .95rem; color: #2A1F12; line-height: 1.45; }

/* Review variants */
.lp-mc-row.is-correct  { background: rgba(58, 138, 80, .14); border-color: rgba(58, 138, 80, .45); }
.lp-mc-row.is-wrong    { background: rgba(184, 70, 56, .12); border-color: rgba(184, 70, 56, .45); }
.lp-mc-row.is-missed   { background: rgba(74, 58, 38, .05); border-color: rgba(58, 138, 80, .35); border-style: dashed; }
.lp-mc-q { margin-top: 1rem; }
.lp-mc-q:first-child { margin-top: 0; }
.lp-mc-score, .lp-q-mark {
  margin-top: .55rem;
  font-size: .85rem;
  font-weight: 600;
}
.lp-q-mark.is-correct { color: #2C6C40; }
.lp-q-mark.is-wrong   { color: #9A3A2E; }

/* ── matching-set + map-labeling (drag-and-drop layout) ──────────── */
.lp-match-title {
  margin: .6rem 0 .8rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #2A1F12;
}

/* Two-column grid: items (drop targets) on the left, letter pool on
   the right. Collapses to a single column on narrow viewports. */
.lp-match-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  margin-top: .25rem;
}
@media (max-width: 720px) {
  .lp-match-grid { grid-template-columns: 1fr; gap: 1rem; }
}

.lp-match-items-col {
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

/* Each item is a row: question number + the prompt + the drop slot.
   In review mode, the .is-correct / .is-wrong classes tint the slot. */
.lp-match-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .95rem;
  flex-wrap: wrap;
}
.lp-match-q {
  display: inline-flex;
  min-width: 1.7rem;
  height: 1.7rem;
  padding: 0 .35rem;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1.5px solid #2A1F12;
  color: #2A1F12;
  font-size: .82rem;
  font-weight: 700;
  border-radius: 4px;
  flex: 0 0 auto;
}
.lp-match-label {
  font-weight: 500;
  margin-right: .25rem;
  flex: 0 0 auto;
}

/* Drop target. is-filled = has a letter; is-droppable = there's a
   picked letter waiting and this slot can receive it; is-hovered =
   pointer is currently over it during a drag. */
.lp-match-slot {
  flex: 1 1 8rem;
  min-height: 2.5rem;
  padding: .35rem .65rem;
  border: 1.5px dashed rgba(74, 58, 38, .35);
  border-radius: 6px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  user-select: none;
  touch-action: none;
  transition: border-color .12s, background .12s, box-shadow .12s;
}
.lp-match-slot.is-filled {
  border-style: solid;
  border-color: rgba(74, 58, 38, .5);
}
.lp-match-slot.is-droppable {
  border-color: #B57A2E;
  background: rgba(181, 122, 46, .07);
}
.lp-match-slot.is-hovered {
  border-color: #B57A2E;
  background: rgba(181, 122, 46, .12);
  box-shadow: 0 0 0 2px rgba(181, 122, 46, .22);
}
.lp-match-slot-empty {
  color: rgba(74, 58, 38, .55);
  font-style: italic;
  font-size: .88rem;
}
.lp-match-slot-text {
  color: #2A1F12;
  font-size: .92rem;
}

/* Review-mode tint on the slot (the per-item correctness class lives
   on the .lp-match-item wrapper). */
.lp-match-item.is-correct .lp-match-slot { border-color: rgba(58, 138, 80, .65); background: rgba(58, 138, 80, .1); }
.lp-match-item.is-wrong   .lp-match-slot { border-color: rgba(184, 70, 56, .65); background: rgba(184, 70, 56, .08); }

.lp-match-correct {
  flex: 1 1 100%;
  margin-left: 2.3rem;
  font-size: .82rem;
  font-weight: 600;
  color: #2C6C40;
}

/* Option pool — right column. Container is a quiet card; cards inside
   are draggable letter chips. */
.lp-match-pool-col {
  background: #fff;
  border: 1px solid rgba(74, 58, 38, .12);
  border-radius: 8px;
  padding: .85rem 1rem;
}
.lp-match-pool-hint {
  margin: 0 0 .65rem;
  font-size: .8rem;
  color: rgba(74, 58, 38, .65);
  font-style: italic;
}
.lp-match-pool {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  font-size: .92rem;
}
.lp-match-poolcard {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .5rem .7rem;
  border: 1.5px solid #2A1F12;
  background: #fff;
  border-radius: 4px;
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: border-color .12s, background .12s, box-shadow .12s, opacity .12s;
}
.lp-match-poolcard:active { cursor: grabbing; }
.lp-match-poolcard.is-used {
  opacity: .32;
  pointer-events: none;
  cursor: default;
}
.lp-match-poolcard.is-picked {
  border-color: #B57A2E;
  background: rgba(181, 122, 46, .1);
  box-shadow: 0 0 0 2px rgba(181, 122, 46, .25);
}
.lp-match-pool-text {
  color: #2A1F12;
  font-weight: 500;
}

/* Drag ghost: a small letter chip that follows the pointer between
   pointerdown and pointerup once movement exceeds the tap threshold. */
.lp-dnd-ghost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9999;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  height: 2.2rem;
  padding: 0 .7rem;
  background: #B57A2E;
  color: #fff;
  border-radius: 4px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .28);
}

/* ── Per-Part picker ─────────────────────────────────────────────── */
.lp-pp-list {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  padding-bottom: 4rem;
}
.lp-pp-mock {
  padding: 1.4rem 1.6rem 1.5rem;
  background: #fff;
  border: 1px solid rgba(74, 58, 38, .1);
  border-radius: 14px;
}
.lp-pp-mock-head { margin-bottom: 1.1rem; }
.lp-pp-tag {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #7B6850;
  padding: .22rem .55rem;
  background: rgba(74, 58, 38, .07);
  border-radius: 5px;
  margin-bottom: .5rem;
}
.lp-pp-title {
  margin: 0 0 .25rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1.2;
}
.lp-pp-meta {
  font-size: .85rem;
  color: #7B6850;
}
.lp-pp-parts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .7rem;
}
.lp-pp-part {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: .85rem 1rem;
  background: #FBF6EB;
  border: 1px solid rgba(74, 58, 38, .14);
  border-radius: 10px;
  text-decoration: none;
  color: #2A1F12;
  transition: border-color .14s, background .14s, transform .1s;
}
.lp-pp-part:hover {
  border-color: rgba(181, 122, 46, .55);
  background: #fff;
  transform: translateY(-1px);
}
.lp-pp-part.is-done {
  background: rgba(58, 138, 80, .08);
  border-color: rgba(58, 138, 80, .35);
}
.lp-pp-part.is-progress {
  background: rgba(181, 122, 46, .08);
  border-color: rgba(181, 122, 46, .35);
}
.lp-pp-part-num {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 500;
}
.lp-pp-part-range {
  font-size: .76rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #7B6850;
  font-weight: 600;
}
.lp-pp-part-state {
  font-size: .82rem;
  font-weight: 600;
  color: #7B6850;
}
.lp-pp-part.is-done .lp-pp-part-state { color: #2C6C40; }
.lp-pp-part.is-progress .lp-pp-part-state { color: #B57A2E; }

/* ── Dashboard ───────────────────────────────────────────────────── */
.lp-dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .9rem;
  margin: .5rem 0 2rem;
}
.lp-dash-stat {
  padding: 1.1rem 1.2rem;
  background: #fff;
  border: 1px solid rgba(74, 58, 38, .12);
  border-radius: 12px;
}
.lp-dash-stat-num {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2.2rem;
  font-weight: 500;
  line-height: 1;
  color: #2A1F12;
}
.lp-dash-stat-label {
  margin-top: .35rem;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  color: #7B6850;
}

.lp-dash-h2 {
  margin: 0 0 .9rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: #2A1F12;
}
.lp-dash-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding-bottom: 4rem;
}
.lp-dash-row {
  display: grid;
  grid-template-columns: 7rem 5rem 1fr auto 16px;
  align-items: center;
  gap: 1rem;
  padding: .85rem 1.1rem;
  background: #fff;
  border: 1px solid rgba(74, 58, 38, .1);
  border-radius: 10px;
  text-decoration: none;
  color: #2A1F12;
  transition: border-color .14s, transform .12s;
}
.lp-dash-row:hover {
  border-color: rgba(181, 122, 46, .55);
  transform: translateY(-1px);
}
.lp-dash-row-when {
  font-size: .82rem;
  color: #7B6850;
  white-space: nowrap;
}
.lp-dash-mode {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .25rem .55rem;
  border-radius: 5px;
  text-align: center;
}
.lp-dash-mode.is-mock { background: rgba(74, 58, 38, .12); color: #2A1F12; }
.lp-dash-mode.is-part { background: rgba(181, 122, 46, .14); color: #B57A2E; }
.lp-dash-row-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lp-dash-row-score {
  font-size: .85rem;
  font-weight: 600;
  color: #2A1F12;
  white-space: nowrap;
}
.lp-dash-row-arrow { color: #B57A2E; }

@media (max-width: 720px) {
  .lp-dash-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }
  .lp-dash-row-when { grid-column: 1; grid-row: 1; }
  .lp-dash-row-mode, .lp-dash-mode { grid-column: 2; grid-row: 1; }
  .lp-dash-row-title { grid-column: 1 / -1; grid-row: 2; }
  .lp-dash-row-score { grid-column: 1; grid-row: 3; }
  .lp-dash-row-arrow { grid-column: 2; grid-row: 3; }
}

/* ── Transcript toggle (review mode) ─────────────────────────────── */
.lp-transcript-host {
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px dashed rgba(74, 58, 38, .2);
}
.lp-transcript-toggle {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .9rem;
  background: #fff;
  border: 1px solid rgba(74, 58, 38, .2);
  border-radius: 999px;
  color: #2A1F12;
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .14s, border-color .14s;
}
.lp-transcript-toggle:hover {
  background: #FBF6EB;
  border-color: #B57A2E;
  color: #B57A2E;
}
.lp-transcript {
  margin-top: 1rem;
  padding: 1.2rem 1.4rem;
  background: #fff;
  border: 1px solid rgba(74, 58, 38, .1);
  border-radius: 10px;
  font-size: .96rem;
  line-height: 1.7;
  color: #2A1F12;
}
.lp-transcript p { margin: 0 0 .9rem; }
.lp-transcript p:last-child { margin-bottom: 0; }
.lp-transcript-spk {
  display: inline-block;
  padding: .05rem .42rem;
  margin-right: .2rem;
  background: rgba(74, 58, 38, .12);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  border-radius: 4px;
  color: #2A1F12;
  vertical-align: middle;
}
.lp-transcript-sep {
  margin: 1.4rem 0;
  border: 0;
  border-top: 1px dashed rgba(74, 58, 38, .25);
}
/* Answer-key highlight inside the transcript: light honey wash so the
   sentence pops without screaming. Inherits text color, no border. */
.lp-tx-hl {
  background: rgba(217, 162, 104, .22);
  color: inherit;
  padding: 0 .15rem;
  border-radius: 3px;
  box-shadow: inset 0 -1px 0 rgba(181, 122, 46, .35);
}

/* ── Per-Part runner: hide bottom-nav-only spacing on the foot ───── */
.lp-runner-part { padding-bottom: 3rem; }

/* Top bar additions */
.lp-bar-spacer { flex: 1; }
.lp-bar-pp-tag {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 500;
  padding: .25rem .8rem;
  background: rgba(181, 122, 46, .12);
  color: #B57A2E;
  border-radius: 6px;
  white-space: nowrap;
}

/* Submit row */
.lp-part-foot {
  margin-top: 1.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(74, 58, 38, .12);
  display: flex;
  justify-content: flex-end;
}

/* ── Bottom nav (Reading-style) ──────────────────────────────────── */
.lp-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  display: flex;
  gap: .35rem;
  padding: .6rem .9rem;
  background: rgba(248, 245, 238, .96);
  border-top: 1px solid rgba(74, 58, 38, .14);
  backdrop-filter: blur(10px);
}
.lp-nav-part {
  flex: 1;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem .8rem;
  background: #fff;
  border: 1px solid rgba(74, 58, 38, .1);
  border-radius: 8px;
  font: inherit;
  font-size: .82rem;
  color: #5e4d3a;
  cursor: pointer;
  text-align: left;
  transition: border-color .14s, background .14s;
}
.lp-nav-part:hover { border-color: rgba(181, 122, 46, .55); background: #fff; }
.lp-nav-part.is-active {
  border-color: rgba(154, 58, 46, .55);
  background: rgba(184, 70, 56, .03);
  flex: 2;
}
.lp-nav-part-label {
  font-weight: 700;
  color: #2A1F12;
  white-space: nowrap;
}
.lp-nav-q-wrap {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex-wrap: wrap;
}
.lp-nav-q-count { font-style: italic; color: #7B6850; }
.lp-nav-q {
  display: inline-flex;
  width: 1.6rem;
  height: 1.6rem;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid rgba(74, 58, 38, .25);
  border-radius: 4px;
  font-size: .78rem;
  font-weight: 600;
  color: #5e4d3a;
}
.lp-nav-q.is-answered { background: #B57A2E; border-color: #B57A2E; color: #F8F5EE; }
.lp-nav-q.is-correct  { background: #2C6C40; border-color: #2C6C40; color: #fff; }
.lp-nav-q.is-wrong    { background: #9A3A2E; border-color: #9A3A2E; color: #fff; }

/* Per-part X/Y badge on the bottom-nav Part buttons in review mode.
   Sits at the far right of each button — quick read of how the student
   did on that part without switching tabs. */
.lp-nav-part-score {
  margin-left: auto;
  display: inline-flex;
  align-items: baseline;
  gap: .15rem;
  padding: .28rem .55rem;
  background: rgba(217, 162, 104, .15);
  border: 1px solid rgba(181, 122, 46, .35);
  border-radius: 999px;
  font-family: 'JetBrains Mono', 'IBM Plex Mono', Menlo, monospace;
  font-size: .78rem;
  color: #5e4d3a;
  white-space: nowrap;
}
.lp-nav-part-score strong { color: #2A1F12; font-weight: 700; }
.lp-nav-part.is-active .lp-nav-part-score {
  background: rgba(184, 70, 56, .08);
  border-color: rgba(154, 58, 46, .45);
}


/* ═══════════════════════════════════════════════════════════════════
   FIXED-APP LAYOUT (sticky top bar + scrollable middle + bottom nav)

   The runner takes over the viewport below the global site nav (or the
   whole viewport in focus mode). Background doesn't scroll; only the
   middle .lp-scroll-area moves. Audio player + Submit + Focus +
   Fullscreen all live in the sticky top bar so they're always reachable
   while the student scrolls through question blocks.
   ═══════════════════════════════════════════════════════════════════ */

.lp-runner-fixed {
  --lp-top-offset: 64px;
  position: fixed;
  top: var(--lp-top-offset);
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 0;
  max-width: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #F8F5EE;
}

/* Focus mode hides the global site nav so the runner can claim the
   whole viewport. Wide net on header selectors so we catch whichever
   one the global shell uses. */
body.is-focus-listening .lp-runner-fixed { top: 0; }
body.is-focus-listening header.site-nav,
body.is-focus-listening header.global-nav,
body.is-focus-listening .ie-shell-nav,
body.is-focus-listening .ielts-nav,
body.is-focus-listening .site-header,
body.is-focus-listening #site-header,
body.is-focus-listening .global-header { display: none !important; }

/* ── Sticky top bar (two rows: meta + player) ───────────────────── */
.lp-runner-fixed .lp-bar,
.lp-runner-fixed .lp-bar-sticky {
  position: static;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
  background: rgba(248, 245, 238, .96);
  border-bottom: 1px solid rgba(74, 58, 38, .12);
  backdrop-filter: blur(8px);
}

.lp-bar-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .65rem 1.4rem;
}
.lp-bar-row-meta {
  border-bottom: 1px solid rgba(74, 58, 38, .08);
  flex-wrap: wrap;
  row-gap: .4rem;
}
.lp-bar-row-player { padding: .55rem 1.4rem .75rem; }
.lp-bar-spacer { flex: 1 1 0; min-width: 0; }

/* Score/PPS slots in review mode — sit inline with everything else */
.lp-runner-fixed .lp-bar-review .lp-bar-row-meta { align-items: center; }
.lp-runner-fixed .lp-bar-score { padding: 0 .9rem; }
.lp-runner-fixed .lp-bar-pps { flex: 0 1 auto; flex-wrap: wrap; }

/* Tag for Per-Part mode */
.lp-bar-pp-tag {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .35rem .7rem;
  color: #2A1F12;
  background: rgba(74, 58, 38, .07);
  border-radius: 6px;
}

/* ── Top-bar pill buttons (mirrors reading-practice patterns) ─────
   Mode button = honey pill with icon + label. Three label/icon "slots"
   inside; CSS shows the right one per state. Close X is icon-only,
   square, hidden until focus mode is on. */
.lp-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font: 600 .9rem/1 'Inter', sans-serif;
  color: #2A1F12;
  background: rgba(181, 122, 46, .10);
  border: 1px solid rgba(181, 122, 46, .35);
  border-radius: 999px;
  padding: .55rem 1rem;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.lp-mode-btn:hover {
  background: rgba(181, 122, 46, .18);
  border-color: rgba(181, 122, 46, .55);
}
.lp-mode-btn svg { color: #B57A2E; }
.lp-mode-btn:active { transform: translateY(1px); }

/* Mode-button slot swap — three icon+label pairs, one shown per state.
   Default = Focus slot; body.is-focus-listening swaps to Fullscreen
   slot; body.is-fullscreen-listening swaps to Exit-Fullscreen slot. */
.lp-mode-slot { display: none; align-items: center; gap: .45rem; }
.lp-mode-slot-focus { display: inline-flex; }
body.is-focus-listening .lp-mode-slot-focus { display: none; }
body.is-focus-listening .lp-mode-slot-fsenter { display: inline-flex; }
body.is-fullscreen-listening .lp-mode-slot-fsenter { display: none; }
body.is-fullscreen-listening .lp-mode-slot-fsexit { display: inline-flex; }

/* X close button — icon-only square, hidden until focus mode is on */
.lp-close-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  background: rgba(182, 68, 44, .10);
  border: 1px solid rgba(182, 68, 44, .25);
  color: #B6442C;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.lp-close-btn:hover {
  background: rgba(182, 68, 44, .18);
  border-color: rgba(182, 68, 44, .45);
}
.lp-close-btn:active { transform: translateY(1px); }
body.is-focus-listening .lp-close-btn { display: inline-flex; }

/* ── Timer — honey pill with clock icon + monospace digits ───── */
.lp-runner-fixed .lp-bar-timer {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font: 600 1rem/1 'Inter', sans-serif;
  color: #2A1F12;
  background: rgba(181, 122, 46, .12);
  padding: .55rem 1.05rem;
  border-radius: 999px;
  min-width: auto;
  text-align: left;
}
.lp-runner-fixed .lp-bar-timer svg { color: #B57A2E; }
.lp-runner-fixed .lp-bar-timer-num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .01em;
}
/* Warn (≤ 60s left) → ember tint; Done (=0) → muted */
.lp-runner-fixed .lp-bar-timer.is-warn {
  background: rgba(182, 68, 44, .14);
  color: #B6442C;
}
.lp-runner-fixed .lp-bar-timer.is-warn svg { color: #B6442C; }
.lp-runner-fixed .lp-bar-timer.is-done {
  background: rgba(74, 58, 38, .08);
  color: rgba(74, 58, 38, .55);
}

/* Player + audio-missing constrained to the question-block width and
   centred in the row, so the bar's player visually matches the columns
   below it instead of spanning the full viewport. */
.lp-runner-fixed .lp-bar-row-player {
  justify-content: center;
}
.lp-runner-fixed .lp-bar-row-player .lp-player,
.lp-runner-fixed .lp-bar-row-player .lp-audio-missing-inline {
  flex: 1 1 auto;
  max-width: 1100px;
  margin: 0 auto;
  background: #fff;
  padding: .45rem .7rem .45rem .55rem;
}
.lp-audio-missing-inline {
  margin: 0;
  padding: .55rem .85rem;
  font-size: .85rem;
  font-style: italic;
  color: #7B6850;
  background: rgba(74, 58, 38, .045);
  border-radius: 8px;
}

/* ── Floating Submit (active runner only) ─────────────────────────
   Sage-green pill (#6A8765, mirrors the reading practice Submit) at
   the bottom-right corner of the runner, above the bottom-nav strip.
   Stays put while the middle area scrolls because it's a sibling of
   .lp-scroll-area inside the fixed-position runner. */
.lp-submit-floating {
  position: absolute;
  right: 1.5rem;
  bottom: calc(4.4rem + 1rem);   /* above the bottom nav */
  z-index: 18;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.6rem;
  background: #6A8765;
  border: none;
  color: #FFFCF4;
  border-radius: 999px;
  font: 700 1rem/1 'Inter', sans-serif;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(46, 70, 42, .45),
              0 3px 6px -3px rgba(46, 70, 42, .25);
  transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
}
.lp-submit-floating::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFCF4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M5 13l4 4L19 7'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
}
.lp-submit-floating:hover {
  background: #587553;
  box-shadow: 0 14px 28px -12px rgba(46, 70, 42, .55),
              0 4px 8px -3px rgba(46, 70, 42, .3);
  transform: translateY(-1px);
}
.lp-submit-floating:active { transform: translateY(1px); }

/* Per-Part mode has no bottom nav — anchor a bit lower */
.lp-runner-fixed.lp-runner-part .lp-submit-floating {
  bottom: 1.5rem;
}

/* ── Scrollable middle ──────────────────────────────────────────── */
.lp-scroll-area {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 1.3rem 1.6rem 1.5rem;
}

/* Part panel inside the scroll area — same look, no extra side padding
   needed since the scroll area provides it. */
.lp-runner-fixed .lp-part {
  margin: 0 auto;
  max-width: 1100px;
}

/* ── Bottom nav becomes a flex child, no longer position: fixed ── */
.lp-runner-fixed .lp-nav {
  position: static;
  flex: 0 0 auto;
  left: auto;
  right: auto;
  bottom: auto;
  z-index: auto;
}

/* Drop the old padding-bottom that reserved space for the fixed nav */
.lp-runner-fixed.lp-runner { padding-bottom: 0; }

/* ── Wider use of horizontal space ──────────────────────────────── */
.lp-runner-fixed .lp-bar-title {
  font-size: 1.25rem;
}

/* Narrow viewports — let the meta row wrap cleanly */
@media (max-width: 720px) {
  .lp-bar-row { padding: .55rem 1rem; }
  .lp-bar-row-player { padding: .5rem 1rem .7rem; }
  .lp-scroll-area { padding: 1rem 1rem 1.2rem; }
  .lp-runner-fixed .lp-bar-title {
    flex: 1 1 100%;
    order: 2;
    font-size: 1.05rem;
  }
  .lp-runner-fixed .lp-bar-pps { display: none; }
  /* Per-part score badge: stay visible but tighten. */
  .lp-nav-part-score { padding: .22rem .45rem; font-size: .72rem; }
}

/* ═══════════════════════════════════════════════════════════════════
   MOCK COMPLETE summary screen — page shown right after submitting a
   Mock. Mirrors reading's .rpm-summary block so the two suites feel
   like one.
   ═══════════════════════════════════════════════════════════════════ */
.lpm-summary {
  max-width: 820px;
  margin: 48px auto 96px;
  padding: 0 1.6rem;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #2A1F12;
}
.lpm-summary-headline {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 600;
  text-align: center;
  margin: 0 0 1.4rem;
}
.lpm-summary-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .9rem;
  background: #FFFCF4;
  border: 1px solid rgba(74, 58, 38, .08);
  border-radius: 18px;
  padding: 2rem 2.2rem 1.7rem;
  box-shadow: 0 1px 0 rgba(74, 58, 38, .02), 0 18px 36px -20px rgba(74, 58, 38, .18);
  position: relative;
}
.lpm-summary-card.is-strong { border-top: 4px solid #6A8765; }
.lpm-summary-card.is-mid    { border-top: 4px solid #B57A2E; }
.lpm-summary-card.is-weak   { border-top: 4px solid #B6442C; }

.lpm-summary-band-wrap { text-align: center; }
.lpm-summary-band-label {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #8C7757;
  font-weight: 600;
  margin-bottom: .3rem;
}
.lpm-summary-band {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 3.4rem;
  font-weight: 700;
  line-height: 1;
  color: #B57A2E;
}
.lpm-summary-card.is-strong .lpm-summary-band { color: #6A8765; }
.lpm-summary-card.is-weak   .lpm-summary-band { color: #B6442C; }

.lpm-summary-raw {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: .15rem;
  font-family: 'Source Serif 4', Georgia, serif;
  color: #2A1F12;
  padding-top: .15rem;
}
.lpm-summary-num   { font-size: 1.8rem; font-weight: 700; line-height: 1; }
.lpm-summary-slash { font-size: 1.2rem; color: rgba(74, 58, 38, .35); margin: 0 .1rem; }
.lpm-summary-total { font-size: 1.2rem; font-weight: 600; color: rgba(74, 58, 38, .55); }
.lpm-summary-raw-label {
  margin-left: .65rem;
  font-family: 'Inter', sans-serif;
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #8C7757;
  font-weight: 600;
  align-self: center;
}
.lpm-summary-meta {
  font-size: .9rem;
  color: #8C7757;
}

/* Per-part breakdown — 4 cards in a row (listening = 4 parts). */
.lpm-summary-parts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.6rem;
}
.lpm-summary-part {
  background: #FFFCF4;
  border: 1px solid rgba(74, 58, 38, .08);
  border-radius: 14px;
  padding: 1.1rem 1.2rem 1.3rem;
}
.lpm-summary-part-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: .35rem;
}
.lpm-summary-part-label {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  color: #8C7757;
  font-weight: 600;
}
.lpm-summary-part-score {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #2A1F12;
}
.lpm-summary-slash-sm {
  color: rgba(74, 58, 38, .35);
  font-size: .9em;
  margin: 0 .15rem;
}
.lpm-summary-part-title {
  font-size: .88rem;
  color: #2A1F12;
  margin-bottom: .9rem;
  min-height: 2.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lpm-summary-part-bar {
  height: 6px;
  background: rgba(74, 58, 38, .08);
  border-radius: 999px;
  overflow: hidden;
}
.lpm-summary-part-bar-fill {
  height: 100%;
  background: #B57A2E;
  border-radius: 999px;
  transition: width .35s ease;
}
.lpm-summary-part.is-strong .lpm-summary-part-bar-fill { background: #6A8765; }
.lpm-summary-part.is-weak   .lpm-summary-part-bar-fill { background: #B6442C; }

.lpm-summary-part.is-clickable {
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.lpm-summary-part.is-clickable:hover {
  transform: translateY(-2px);
  border-color: rgba(181, 122, 46, .45);
  box-shadow: 0 6px 18px rgba(74, 58, 38, .08);
}
.lpm-summary-part-cta {
  margin-top: .85rem;
  font: 600 .78rem/1 'Inter', sans-serif;
  letter-spacing: .04em;
  color: #B57A2E;
}
.lpm-summary-part.is-clickable:hover .lpm-summary-part-cta {
  color: #B6442C;
}

.lpm-summary-footer {
  margin-top: 1.2rem;
  text-align: center;
}
.lpm-summary-link {
  font: 500 .85rem/1 'Inter', sans-serif;
  color: #8C7757;
  text-decoration: none;
  border-bottom: 1px dashed rgba(74, 58, 38, .2);
  padding-bottom: 2px;
  transition: color .15s ease, border-color .15s ease;
}
.lpm-summary-link:hover { color: #B57A2E; border-bottom-color: rgba(181, 122, 46, .45); }

.lpm-summary-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.4rem;
}
.lpm-summary-btn-primary,
.lpm-summary-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font: 600 .92rem/1 'Inter', sans-serif;
  border-radius: 999px;
  padding: .75rem 1.4rem;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .12s ease;
}
.lpm-summary-btn-primary {
  color: #FFFCF4;
  background: #6A8765;
  border: 1px solid #6A8765;
}
.lpm-summary-btn-primary:hover  { background: #587553; }
.lpm-summary-btn-primary:active { transform: translateY(1px); }
.lpm-summary-btn-secondary {
  color: #2A1F12;
  background: transparent;
  border: 1px solid rgba(74, 58, 38, .2);
}
.lpm-summary-btn-secondary:hover { background: rgba(181, 122, 46, .08); border-color: rgba(181, 122, 46, .35); }

@media (max-width: 980px) {
  .lpm-summary-parts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .lpm-summary-parts { grid-template-columns: 1fr; }
  .lpm-summary-actions { flex-direction: column; align-items: stretch; }
  .lpm-summary-btn-primary,
  .lpm-summary-btn-secondary { justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════════════
   PART-MODE inline score banner — shown above the question panel
   after submission. Mirrors reading's .rpp-score-card.
   ═══════════════════════════════════════════════════════════════════ */
.lp-score-banner {
  flex: 0 0 auto;
  display: flex;
  padding: .8rem 1.6rem;
  background: #F8F5EE;
  border-bottom: 1px solid rgba(74, 58, 38, .08);
}
.lp-score-card {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding: .6rem 1.1rem;
  background: #FFFCF4;
  border: 1px solid rgba(74, 58, 38, .08);
  border-radius: 999px;
  box-shadow: 0 1px 0 rgba(74, 58, 38, .02), 0 4px 14px rgba(74, 58, 38, .06);
}
.lp-score-card.is-strong { background: linear-gradient(135deg, rgba(106, 135, 101, .12) 0%, #FFFCF4 100%); border-color: rgba(92, 138, 106, .25); }
.lp-score-card.is-mid    { background: linear-gradient(135deg, rgba(181, 122, 46, .12) 0%, #FFFCF4 100%); border-color: rgba(181, 122, 46, .25); }
.lp-score-card.is-weak   { background: linear-gradient(135deg, rgba(182, 68, 44, .12) 0%, #FFFCF4 100%); border-color: rgba(182, 68, 44, .25); }
.lp-score-stats {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  flex-wrap: wrap;
}
.lp-score-num {
  font-family: 'Source Serif 4', 'Tiempos', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: #2A1F12;
  line-height: 1;
  letter-spacing: -.01em;
}
.lp-score-slash { color: #8C7757; margin: 0 .1em; font-weight: 400; }
.lp-score-meta {
  display: inline-flex;
  gap: .45rem;
  font-size: .8rem;
  color: #5C4A35;
}
.lp-score-pct { font-weight: 600; }
.lp-score-sep { color: #8C7757; }
.lp-score-actions { display: flex; gap: .45rem; flex-shrink: 0; }
.lp-score-redo,
.lp-score-back {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-size: .8rem; font-weight: 600;
  padding: .4rem .85rem;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.lp-score-redo {
  background: linear-gradient(135deg, #B57A2E 0%, #B6442C 100%);
  color: #FFFCF4;
  border: none;
  box-shadow: 0 1px 2px rgba(74, 58, 38, .15), 0 6px 16px rgba(181, 122, 46, .28);
}
.lp-score-redo:hover { transform: translateY(-1px); }
.lp-score-back {
  background: transparent;
  color: #B57A2E;
  border: 1px solid rgba(181, 122, 46, .35);
}
.lp-score-back:hover { background: rgba(181, 122, 46, .08); color: #B6442C; }

@media (max-width: 720px) {
  .lp-score-banner { padding: .6rem 1rem; }
  .lp-score-card { flex-direction: column; align-items: flex-start; padding: .6rem .9rem; }
  .lp-score-actions { width: 100%; justify-content: stretch; }
  .lp-score-redo, .lp-score-back { flex: 1; }
}

/* ═══════════════════════════════════════════════════════════════════
   LISTENING DASHBOARD — editorial layout that mirrors the reading and
   speaking dashboards. Same top row (back + jump-to-history), same
   centred hero, same card surface. Listening-specific additions are
   the by-Part bars (1-4) and the mock-coverage grid.
   ═══════════════════════════════════════════════════════════════════ */
.lpd-page {
  --lpd-card:        #FFFCF4;
  --lpd-card-border: rgba(74, 58, 38, .08);
  --lpd-card-shadow: 0 1px 0 rgba(74, 58, 38, .02),
                     0 12px 28px -16px rgba(74, 58, 38, .14);
  --lpd-honey-soft:  rgba(181, 122, 46, .14);
  --lpd-ember-soft:  rgba(182, 68,  44, .12);
  --lpd-sage:        #5C8A6A;
  --lpd-sage-soft:   rgba(92, 138, 106, .14);

  position: relative;
  width: 100%;
  color: #2A1F12;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.lpd-inner {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 .5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
}
/* The async-loaded inner section holds every card. Make it a flex
   column with the same gap as .lpd-inner so adjacent cards (Trend,
   By Part, Practice, Danger) have proper breathing room — without
   this the cards stacked as block elements with no separation. */
.lpd-body {
  display: flex;
  flex-direction: column;
  gap: 2.8rem;
}

/* ── Top row: back link on left, jump pill on right. */
.lpd-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: -.4rem;
}
.lpd-back {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .9rem; font-weight: 500;
  color: #8C7757;
  text-decoration: none;
  transition: color .15s;
}
.lpd-back:hover { color: #2A1F12; }
.lpd-jump {
  display: inline-flex; align-items: center; gap: .4rem;
  font: inherit; font-size: .82rem; font-weight: 600;
  color: #B57A2E;
  background: transparent;
  border: 1px solid rgba(181, 122, 46, .35);
  padding: .42rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.lpd-jump:hover {
  background: var(--lpd-honey-soft);
  border-color: #B57A2E;
  transform: translateY(1px);
}
.lpd-jump[hidden] { display: none; }

/* ── Centred editorial hero. */
.lpd-hero { text-align: center; padding: .4rem 1rem 1rem; }
.lpd-title {
  font-family: 'Source Serif 4', 'Tiempos', Georgia, serif;
  font-size: clamp(2.2rem, 4vw, 3.1rem);
  font-weight: 500;
  letter-spacing: -.015em;
  color: #2A1F12;
  margin: 0 0 .6rem;
  line-height: 1.05;
}
.lpd-lede {
  font-size: .98rem;
  line-height: 1.55;
  color: #5C4A35;
  max-width: 580px;
  margin: 0 auto;
}

/* ── Generic card surface — reused for stats, trend, breakdowns, list. */
.lpd-card {
  background: var(--lpd-card);
  border: 1px solid var(--lpd-card-border);
  border-radius: 14px;
  box-shadow: var(--lpd-card-shadow);
}

/* ── Stat strip — 4-cell layout by default; 2-cell variant for the
   editorial Average band + Best band pair (bigger numerals, more
   breathing room around them). */
.lpd-stats {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  padding: 1.3rem 1rem;
}
.lpd-stats-2 {
  grid-template-columns: 1fr auto 1fr;
  padding: 2.2rem 1rem;
}
.lpd-stat-cell {
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  padding: .5rem 1rem;
}
.lpd-stats-2 .lpd-stat-cell { gap: .6rem; padding: .5rem 1.5rem; }
.lpd-stats-2 .lpd-stat-num { font-size: 3.2rem; }
.lpd-stats-2 .lpd-stat-icon { width: 46px; height: 46px; }
.lpd-stats-2 .lpd-stat-icon svg { width: 22px; height: 22px; }
.lpd-stat-sub {
  font-size: .8rem;
  color: #8C7757;
  font-weight: 500;
  text-align: center;
  max-width: 14rem;
  line-height: 1.4;
  margin-top: .15rem;
}
.lpd-stat-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--lpd-honey-soft);
  color: #B57A2E;
}
.lpd-stat-icon.is-sage  { background: var(--lpd-sage-soft);  color: var(--lpd-sage); }
.lpd-stat-icon.is-peach { background: var(--lpd-ember-soft); color: #B6442C; }
.lpd-stat-num {
  font-family: 'Source Serif 4', 'Tiempos', Georgia, serif;
  font-size: 2rem; font-weight: 500;
  color: #2A1F12; line-height: 1;
  letter-spacing: -.01em;
  margin-top: .15rem;
}
.lpd-stat-label {
  font-size: .68rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: #8C7757;
  margin-top: .15rem;
}
.lpd-vdiv { width: 1px; height: 44px; background: var(--lpd-card-border); }

/* ── Generic card header: title + small right-side subtitle. */
.lpd-card-h {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.4rem .85rem;
  border-bottom: 1px solid var(--lpd-card-border);
}
.lpd-card-title {
  font-family: 'Source Serif 4', 'Tiempos', Georgia, serif;
  font-size: 1.2rem; font-weight: 500;
  color: #2A1F12;
  margin: 0;
  letter-spacing: -.005em;
}
.lpd-card-sub {
  font-size: .74rem; font-weight: 600;
  letter-spacing: .04em;
  color: #8C7757;
}

/* ── Band trend card + SVG line chart. */
.lpd-trend-card { padding-bottom: 1.4rem; }
.lpd-trend-wrap {
  width: 100%;
  position: relative;
  overflow: visible;
  padding: .5rem 1.4rem 0;
}
.lpd-trend-svg { width: 100%; height: auto; display: block; overflow: visible; }
.lpd-trend-axis {
  fill: rgba(140, 119, 87, .8);
  font: 600 9.5px/1 'SF Mono', 'JetBrains Mono', Menlo, monospace;
  letter-spacing: .02em;
}
.lpd-trend-ref { stroke: rgba(74, 58, 38, .14); stroke-width: 1; stroke-dasharray: 4 4; }
.lpd-trend-ref-label {
  fill: rgba(140, 119, 87, .85);
  font: 600 9.5px/1 'Inter', system-ui, sans-serif;
  letter-spacing: .03em;
}
.lpd-trend-baseline { stroke: rgba(74, 58, 38, .22); stroke-width: 1; }
.lpd-trend-avg { stroke: rgba(140, 119, 87, .55); stroke-width: 1; stroke-dasharray: 2 4; }
.lpd-trend-avg-label {
  fill: rgba(140, 119, 87, .9);
  font: 600 10px/1 'Inter', system-ui, sans-serif;
  letter-spacing: .03em;
}
.lpd-trend-line {
  fill: none;
  stroke: #B57A2E;
  stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: lpd-trend-draw 1.4s cubic-bezier(.4, 0, .2, 1) forwards;
}
@keyframes lpd-trend-draw { to { stroke-dashoffset: 0; } }
.lpd-trend-area { opacity: 0; animation: lpd-trend-fade-in 1.4s .35s ease forwards; }
@keyframes lpd-trend-fade-in { to { opacity: 1; } }

.lpd-trend-dot {
  fill: #FFFCF4;
  stroke-width: 2.4;
  cursor: pointer;
  transition: r .15s ease, stroke-width .15s ease;
  opacity: 0;
  animation: lpd-trend-dot-in .35s 1s ease forwards;
}
@keyframes lpd-trend-dot-in { to { opacity: 1; } }
.lpd-trend-dot.is-strong { stroke: #5C8A6A; }
.lpd-trend-dot.is-mid    { stroke: #B57A2E; }
.lpd-trend-dot.is-weak   { stroke: #B6442C; }
.lpd-trend-dot:hover,
.lpd-trend-dot:focus-visible { outline: none; stroke-width: 3.2; }
.lpd-trend-dot:hover.is-strong, .lpd-trend-dot:focus-visible.is-strong { fill: rgba(92,138,106,.18); }
.lpd-trend-dot:hover.is-mid,    .lpd-trend-dot:focus-visible.is-mid    { fill: rgba(181,122,46,.18); }
.lpd-trend-dot:hover.is-weak,   .lpd-trend-dot:focus-visible.is-weak   { fill: rgba(182,68,44,.18); }
.lpd-trend-halo {
  fill: none;
  stroke-width: 1.5;
  opacity: 0;
  animation:
    lpd-trend-dot-in .4s 1.15s ease forwards,
    lpd-trend-pulse 2.6s 1.55s ease-in-out infinite;
}
.lpd-trend-halo.is-strong { stroke: rgba(92,138,106,.45); }
.lpd-trend-halo.is-mid    { stroke: rgba(181,122,46,.45); }
.lpd-trend-halo.is-weak   { stroke: rgba(182,68,44,.45); }
@keyframes lpd-trend-pulse {
  0%, 100% { r: 11; opacity: .6; }
  50%      { r: 14; opacity: .15; }
}

/* Tooltip — appears on hover/focus of a dot. */
.lpd-trend-tooltip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  background: #FFFEFA;
  border: 1px solid rgba(74, 58, 38, .10);
  border-radius: 12px;
  padding: .7rem .9rem .75rem;
  box-shadow:
    0 1px 0 rgba(74, 58, 38, .03),
    0 12px 32px -10px rgba(74, 58, 38, .22);
  font-family: 'Inter', system-ui, sans-serif;
  min-width: 220px;
  max-width: 280px;
  animation: lpd-trend-tip-in .14s ease;
}
.lpd-trend-tooltip[hidden] { display: none; }
@keyframes lpd-trend-tip-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.lpd-trend-tip-title {
  font-family: 'Source Serif 4', 'Tiempos', Georgia, serif;
  font-size: .95rem; font-weight: 500;
  color: #2A1F12;
  letter-spacing: -.005em;
  line-height: 1.3;
  margin-bottom: .35rem;
}
.lpd-trend-tip-meta {
  display: flex; align-items: center; gap: .35rem;
  font-size: .72rem; font-weight: 500;
  color: #8C7757;
  margin-bottom: .55rem;
}
.lpd-trend-tip-band { font-weight: 600; color: #B57A2E; }
.lpd-trend-tip-sep  { opacity: .55; }
.lpd-trend-tip-score {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: .55rem;
  padding-top: .55rem;
  border-top: 1px solid rgba(74, 58, 38, .08);
}
.lpd-trend-tip-frac {
  font-family: 'Source Serif 4', 'Tiempos', Georgia, serif;
  font-size: 1.05rem; font-weight: 500;
  color: #2A1F12;
}
.lpd-trend-tip-pct {
  font: 600 .85rem/1 'Inter', system-ui, sans-serif;
  letter-spacing: .02em;
}
.lpd-trend-tooltip.is-strong .lpd-trend-tip-pct { color: var(--lpd-sage); }
.lpd-trend-tooltip.is-mid    .lpd-trend-tip-pct { color: #B57A2E; }
.lpd-trend-tooltip.is-weak   .lpd-trend-tip-pct { color: #B6442C; }

.lpd-chart-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: #8C7757;
  font-size: .9rem;
  line-height: 1.5;
}

/* ── 2-col grid: By Part | Coverage. */
.lpd-grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.4rem;
  align-items: start;
}
.lpd-bypart-card, .lpd-coverage-card { padding-bottom: 1.4rem; }

.lpd-bar-list {
  list-style: none;
  margin: 0;
  padding: 1.1rem 1.4rem 0;
  display: flex; flex-direction: column;
  gap: .8rem;
}
.lpd-bar-row { display: flex; flex-direction: column; gap: .35rem; }
.lpd-bar-row-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: .55rem;
}
.lpd-bar-row-label {
  font-size: .92rem; font-weight: 600;
  color: #2A1F12;
  min-width: 0;
}
.lpd-bar-row-val {
  font-family: 'Source Serif 4', 'Tiempos', Georgia, serif;
  font-size: 1.05rem; font-weight: 500;
  color: #2A1F12;
  letter-spacing: -.005em;
  white-space: nowrap;
  flex-shrink: 0;
}
.lpd-bar-row-val-sub {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .74rem; font-weight: 500;
  color: #8C7757;
  margin-left: .15em;
}
.lpd-bar-track {
  width: 100%; height: 8px;
  background: rgba(74, 58, 38, .06);
  border-radius: 999px;
  overflow: hidden;
}
.lpd-bar-fill {
  height: 100%;
  width: var(--lpd-bar-pct, 0%);
  border-radius: 999px;
  animation: lpd-bar-grow .9s cubic-bezier(.32, .72, 0, 1) both;
  background: linear-gradient(90deg, currentColor 0%, currentColor 100%);
}
@keyframes lpd-bar-grow { from { width: 0; } }
.lpd-bar-row.is-strong .lpd-bar-fill,    .lpd-bar-row.is-strong .lpd-bar-row-val { color: var(--lpd-sage); }
.lpd-bar-row.is-mid    .lpd-bar-fill,    .lpd-bar-row.is-mid    .lpd-bar-row-val { color: #B57A2E; }
.lpd-bar-row.is-weak   .lpd-bar-fill,    .lpd-bar-row.is-weak   .lpd-bar-row-val { color: #B6442C; }
.lpd-bar-row-low {
  display: inline-block;
  font-size: .62rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: #8C7757;
  background: rgba(74, 58, 38, .07);
  padding: .12rem .45rem;
  border-radius: 4px;
  margin-left: .45rem;
  vertical-align: middle;
  cursor: help;
}
.lpd-bar-row.is-low .lpd-bar-row-val,
.lpd-bar-row.is-low .lpd-bar-fill { opacity: .55; }
.lpd-bar-row.is-empty .lpd-bar-row-label { color: #8C7757; font-weight: 500; opacity: .8; }
.lpd-bar-row-empty-tag {
  font-size: .68rem; font-weight: 600;
  letter-spacing: .04em;
  color: #8C7757;
  font-style: italic;
}
.lpd-bar-row.is-empty .lpd-bar-track { background: rgba(74, 58, 38, .04); }
.lpd-bypart-foot {
  margin: 1rem 1.4rem 0;
  padding-top: .9rem;
  border-top: 1px dashed var(--lpd-card-border);
  font-size: .8rem;
  line-height: 1.45;
  color: #8C7757;
}

/* ── Coverage grid — small linked squares per Mock. */
.lpd-cov-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .55rem;
  padding: 1.1rem 1.4rem 0;
}
.lpd-cov-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .15rem;
  aspect-ratio: 1;
  padding: .3rem .2rem;
  border-radius: 10px;
  border: 1px solid var(--lpd-card-border);
  background: #F8F5EE;
  color: #8C7757;
  text-decoration: none;
  font-size: .68rem;
  transition: transform .12s ease, border-color .15s ease, box-shadow .15s ease;
}
.lpd-cov-cell:hover {
  transform: translateY(-2px);
  border-color: rgba(181, 122, 46, .45);
  box-shadow: 0 4px 14px rgba(74, 58, 38, .08);
}
.lpd-cov-num {
  font-family: 'Source Serif 4', 'Tiempos', Georgia, serif;
  font-size: 1rem; font-weight: 500;
  color: #2A1F12;
  line-height: 1;
}
.lpd-cov-score {
  font: 700 .68rem/1 'JetBrains Mono', monospace;
  letter-spacing: .02em;
}
.lpd-cov-cell.is-todo { background: rgba(74, 58, 38, .03); }
.lpd-cov-cell.is-todo .lpd-cov-num { color: #8C7757; opacity: .55; }
.lpd-cov-cell.is-strong { background: var(--lpd-sage-soft); border-color: rgba(92, 138, 106, .25); }
.lpd-cov-cell.is-strong .lpd-cov-score { color: var(--lpd-sage); }
.lpd-cov-cell.is-mid    { background: var(--lpd-honey-soft); border-color: rgba(181, 122, 46, .25); }
.lpd-cov-cell.is-mid    .lpd-cov-score { color: #B57A2E; }
.lpd-cov-cell.is-weak   { background: var(--lpd-ember-soft); border-color: rgba(182, 68, 44, .25); }
.lpd-cov-cell.is-weak   .lpd-cov-score { color: #B6442C; }

.lpd-cov-legend {
  display: flex; flex-wrap: wrap; gap: .7rem 1rem;
  padding: 1rem 1.4rem 0;
  font-size: .72rem;
  color: #8C7757;
  font-weight: 500;
}
.lpd-cov-leg { display: inline-flex; align-items: center; gap: .35rem; }
.lpd-cov-leg-cell {
  display: inline-block; width: 12px; height: 12px;
  border-radius: 3px;
  border: 1px solid var(--lpd-card-border);
}
.lpd-cov-leg-cell.is-todo  { background: rgba(74, 58, 38, .03); }
.lpd-cov-leg-cell.is-weak  { background: var(--lpd-ember-soft); border-color: rgba(182, 68, 44, .25); }
.lpd-cov-leg-cell.is-mid   { background: var(--lpd-honey-soft); border-color: rgba(181, 122, 46, .25); }
.lpd-cov-leg-cell.is-strong{ background: var(--lpd-sage-soft);  border-color: rgba(92, 138, 106, .25); }

/* ── History list card. */
.lpd-list-card { padding: 1.3rem 1.6rem 1.5rem; }
.lpd-list-h {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--lpd-card-border);
  flex-wrap: wrap;
}
.lpd-list-title {
  font-family: 'Source Serif 4', 'Tiempos', Georgia, serif;
  font-size: 1.35rem; font-weight: 500;
  color: #2A1F12;
  margin: 0;
  letter-spacing: -.005em;
}
.lpd-list-controls { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.lpd-control {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .82rem;
  color: #8C7757;
  cursor: pointer;
}
.lpd-control-prefix { font-weight: 500; }
.lpd-control-select {
  appearance: none; -webkit-appearance: none;
  font: inherit; font-size: .82rem; font-weight: 600;
  color: #2A1F12;
  background: transparent;
  border: none;
  padding: .15rem 1.1rem .15rem .15rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%238C7757' stroke-width='1.5' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right center;
}
.lpd-control-select:focus { outline: none; }

.lpd-list { list-style: none; margin: 0; padding: 0; }
.lpd-row-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1.4fr) auto auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--lpd-card-border);
  text-decoration: none;
  color: inherit;
  transition: background .12s;
}
.lpd-row:first-child .lpd-row-link { padding-top: .4rem; }
.lpd-row:last-child  .lpd-row-link { border-bottom: 0; padding-bottom: .4rem; }
.lpd-row-link:hover { background: rgba(181, 122, 46, .04); }
.lpd-row-when {
  display: flex; flex-direction: column; gap: .2rem;
  min-width: 86px;
}
.lpd-row-when-rel {
  font-family: 'Source Serif 4', 'Tiempos', Georgia, serif;
  font-size: 1rem; font-weight: 500;
  color: #2A1F12;
  line-height: 1.1;
}
.lpd-row-when-abs {
  font-size: .72rem; font-weight: 500;
  color: #8C7757;
}
.lpd-row-meta {
  display: flex; flex-direction: column; gap: .25rem;
  min-width: 0;
}
.lpd-row-mode {
  display: inline-flex;
  align-self: flex-start;
  font-size: .62rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  padding: .22rem .55rem;
  border-radius: 4px;
}
.lpd-row-mode.is-mock  { background: var(--lpd-honey-soft); color: #B57A2E; }
.lpd-row-mode.is-part  { background: var(--lpd-sage-soft);  color: var(--lpd-sage); }
.lpd-row-mode.is-quick { background: rgba(120, 158, 200, .18); color: #5B7FA8; }
.lpd-retake {
  display: inline-block;
  font-size: .58rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  padding: .18rem .45rem;
  border-radius: 4px;
  background: rgba(74, 58, 38, .07);
  color: #8C7757;
  align-self: flex-start;
  margin-top: -.18rem;
}
.lpd-row-title {
  font-size: 1rem; font-weight: 600;
  color: #2A1F12;
  margin-top: .15rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 460px;
}
.lpd-row-score {
  display: flex; flex-direction: column; align-items: flex-end; gap: .15rem;
  min-width: 130px;
}
.lpd-row-score-frac {
  font-family: 'Source Serif 4', 'Tiempos', Georgia, serif;
  font-size: 1rem; font-weight: 500;
  color: #2A1F12;
  letter-spacing: -.005em;
}
.lpd-row-score-pct {
  font: 700 .72rem/1 'Inter', sans-serif;
  letter-spacing: .04em;
}
.lpd-row.is-strong .lpd-row-score-pct { color: var(--lpd-sage); }
.lpd-row.is-mid    .lpd-row-score-pct { color: #B57A2E; }
.lpd-row.is-weak   .lpd-row-score-pct { color: #B6442C; }
.lpd-row-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: transparent;
  color: #8C7757;
  transition: background .15s, color .15s, transform .15s;
}
.lpd-row-link:hover .lpd-row-arrow {
  background: var(--lpd-honey-soft);
  color: #B57A2E;
  transform: translateX(2px);
}
.lpd-empty-list {
  list-style: none;
  text-align: center;
  padding: 2rem 1rem;
  color: #8C7757;
  font-size: .9rem;
}

/* ── Empty + error states (full-card). */
.lpd-empty, .lpd-error, .lpd-loading {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #8C7757;
}
.lpd-empty-title {
  font-family: 'Source Serif 4', 'Tiempos', Georgia, serif;
  font-size: 1.3rem; font-weight: 500;
  color: #2A1F12;
  margin-bottom: .5rem;
}
.lpd-empty-sub { font-size: .9rem; margin: 0 auto 1.2rem; line-height: 1.55; max-width: 520px; }
.lpd-empty-cta {
  display: inline-block;
  font-size: .9rem; font-weight: 600;
  color: #B57A2E;
  text-decoration: none;
  border: 1px solid rgba(181, 122, 46, .35);
  padding: .55rem 1.1rem;
  border-radius: 999px;
  transition: background .15s, border-color .15s, color .15s;
}
.lpd-empty-cta:hover { background: var(--lpd-honey-soft); color: #B6442C; }

/* ── Danger zone — bottom-of-page reset. */
.lpd-danger {
  margin-top: 1.8rem;
  padding: 1.1rem 1.4rem 1.2rem;
  border: 1px dashed rgba(74, 58, 38, .18);
  border-radius: 14px;
  background: rgba(74, 58, 38, .025);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.2rem; flex-wrap: wrap;
}
.lpd-danger-head { flex: 1 1 280px; min-width: 0; }
.lpd-danger-title {
  font: 600 .95rem/1.3 'Inter', sans-serif;
  color: #2A1F12;
  margin-bottom: .15rem;
}
.lpd-danger-sub {
  font: 400 .8rem/1.4 'Inter', sans-serif;
  color: #8C7757;
}
.lpd-danger-actions { display: flex; gap: .55rem; flex-shrink: 0; flex-wrap: wrap; }
.lpd-danger-btn {
  font: 600 .8rem/1 'Inter', sans-serif;
  padding: .55rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(182, 68, 44, .3);
  background: transparent;
  color: #B6442C;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.lpd-danger-btn:hover {
  background: #B6442C;
  border-color: #B6442C;
  color: #FFFCF4;
}

/* Reduced-motion respect. */
@media (prefers-reduced-motion: reduce) {
  .lpd-trend-line,
  .lpd-trend-area,
  .lpd-trend-dot,
  .lpd-trend-halo,
  .lpd-bar-fill {
    animation: none;
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

/* Responsive — collapse the breakdown grid first, then the stat strip. */
@media (max-width: 980px) {
  .lpd-grid-2 { grid-template-columns: 1fr; }
  .lpd-cov-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .lpd-stats { grid-template-columns: 1fr 1fr; gap: .6rem; padding: 1rem .7rem; }
  .lpd-vdiv { display: none; }
  .lpd-stat-cell {
    background: var(--lpd-card);
    border: 1px solid var(--lpd-card-border);
    border-radius: 10px;
    padding: 1rem .8rem;
  }
  .lpd-cov-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .lpd-list-h { flex-direction: column; align-items: flex-start; }
  .lpd-row-link { grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; }
  .lpd-row-when-abs { display: none; }
}
@media (max-width: 480px) {
  .lpd-stats { grid-template-columns: 1fr; }
  .lpd-cov-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lpd-row-score { min-width: auto; }
  .lpd-row-score-frac { font-size: .9rem; }
}
