/**
 * British Heritage design system
 *
 * ┌─ READ ME BEFORE ADDING A NEW SCREEN ─────────────────────────────────┐
 * │                                                                      │
 * │  Full reference: ../../docs/design-system.md                         │
 * │                                                                      │
 * │  That file documents the palette, typography, component primitives,  │
 * │  icon system (app/js/icon-map.js), photo asset pipeline (Gemini      │
 * │  prompts → Squoosh → GitHub), and the .bh-scope vs global override   │
 * │  strategy. New screens MUST use .bh-* primitives + a screen-specific │
 * │  prefix (.msf-*, .lon-*, .sc-*, etc.) rather than introducing        │
 * │  unprefixed classes.                                                 │
 * │                                                                      │
 * └──────────────────────────────────────────────────────────────────────┘
 *
 * Quick summary (full detail in design-system.md):
 *  Palette: Oxford navy + cream paper + British red + heritage gold.
 *  Headings: DM Serif Display (editorial serif).
 *  Body:    Manrope (modern sans).
 *  Icons:   SVG via iconHTML() from icon-map.js — NEVER raw emoji in UI.
 *  Scope:   .bh-scope opt-in for new screens; global propagation block
 *           at bottom of this file for legacy screens.
 */

:root {
  --bh-navy:        #0a1f3d;
  --bh-navy-soft:   #143057;
  --bh-cream:       #f6f1e7;
  --bh-paper:       #fffdf8;
  --bh-paper-2:     #f9f5ec;
  --bh-red:         #c8102e;
  --bh-red-deep:    #a30d25;
  --bh-gold:        #b8860b;
  --bh-border:      #d6cdb8;
  --bh-text:        #0a1f3d;
  --bh-text-muted:  #5a6477;
  --bh-success:     #2a6e3f;
  --bh-success-bg:  #e6f3eb;
  --bh-error:       #b1233a;
  --bh-error-bg:    #fbe7eb;

  --bh-radius-sm: 4px;
  --bh-radius:    8px;
  --bh-radius-lg: 14px;

  --bh-shadow-sm: 0 1px 2px rgba(10,31,61,.05);
  --bh-shadow:    0 4px 14px rgba(10,31,61,.08);
  --bh-shadow-lg: 0 10px 30px rgba(10,31,61,.14);
}

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Manrope:wght@400;500;600;700;800&display=swap');

/* ── Container scope ─────────────────────────────────────────────────────── */
.bh-scope {
  background: var(--bh-cream);
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  color: var(--bh-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
}

/* Ribbon: the patriotic-flag stripe under headers */
.bh-ribbon {
  height: 4px;
  background: repeating-linear-gradient(90deg,
    var(--bh-red)     0 12px,
    var(--bh-navy)    12px 14px,
    var(--bh-cream)   14px 26px,
    var(--bh-navy)    26px 28px);
}

/* ── Heading scale ───────────────────────────────────────────────────────── */
.bh-scope h1,
.bh-scope h2,
.bh-scope h3,
.bh-scope .bh-title,
.bh-scope .bh-h1,
.bh-scope .bh-h2,
.bh-scope .bh-h3 {
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.005em;
  color: inherit;
  margin: 0;
}
.bh-scope .bh-h1, .bh-scope h1 { font-size: 1.85rem; }
.bh-scope .bh-h2, .bh-scope h2 { font-size: 1.5rem; }
.bh-scope .bh-h3, .bh-scope h3 { font-size: 1.18rem; }
.bh-scope .bh-eyebrow {
  font-family: "Manrope", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bh-red);
  margin-bottom: 6px;
}
.bh-scope .bh-eyebrow-quiet {
  font-family: "Manrope", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bh-text-muted);
}
.bh-scope p { line-height: 1.6; margin: 0 0 12px; }
.bh-scope .bh-lead {
  font-size: 0.95rem;
  color: var(--bh-text-muted);
  line-height: 1.55;
  font-weight: 500;
}
.bh-scope .bh-caption {
  font-size: 0.78rem;
  color: var(--bh-text-muted);
  font-weight: 500;
}

/* ── Header bar (navy with ribbon) ───────────────────────────────────────── */
.bh-header {
  padding: 24px 22px 22px;
  background: var(--bh-navy);
  color: var(--bh-cream);
  position: relative;
}
.bh-header h1, .bh-header h2, .bh-header .bh-title {
  color: var(--bh-cream);
}
.bh-header .bh-lead {
  color: rgba(246,241,231,0.78);
  font-weight: 500;
}
.bh-header .bh-eyebrow {
  color: rgba(246,241,231,0.7);
}
.bh-header + .bh-ribbon { margin-top: 0; }

.bh-back-btn {
  background: rgba(246,241,231,0.12);
  border: 1px solid rgba(246,241,231,0.25);
  color: var(--bh-cream);
  width: 38px; height: 38px;
  border-radius: var(--bh-radius);
  display: inline-grid; place-items: center;
  cursor: pointer;
  transition: background 0.15s;
  padding: 0;
  margin-bottom: 14px;
  font-family: inherit;
}
.bh-back-btn:hover { background: rgba(246,241,231,0.2); }
.bh-back-btn svg { width: 18px; height: 18px; fill: currentColor; }

/* ── Body container ──────────────────────────────────────────────────────── */
.bh-body {
  padding: 22px 18px 28px;
  background: var(--bh-cream);
  min-height: 60vh;
}

/* ── Card primitives ─────────────────────────────────────────────────────── */
.bh-card {
  background: var(--bh-paper);
  border: 1px solid var(--bh-border);
  border-radius: var(--bh-radius);
  padding: 18px 20px;
  box-shadow: var(--bh-shadow-sm);
}
.bh-card-tappable {
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.bh-card-tappable:hover {
  border-color: var(--bh-navy);
  transform: translateY(-1px);
  box-shadow: var(--bh-shadow);
}
.bh-card-tappable:active { transform: translateY(0); }

/* Row inside card: filled-icon + label + chevron */
.bh-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.bh-row-body { flex: 1; min-width: 0; }
.bh-row-label {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.12rem;
  line-height: 1.2;
}
.bh-row-sub {
  font-size: 0.82rem;
  color: var(--bh-text-muted);
  margin-top: 3px;
  font-weight: 500;
  line-height: 1.4;
}
.bh-row-chev {
  color: var(--bh-red);
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* ── Filled icon (navy box + red ribbon underneath) ──────────────────────── */
.bh-icon {
  width: 42px; height: 42px;
  border-radius: var(--bh-radius);
  background: var(--bh-navy);
  display: grid; place-items: center;
  color: var(--bh-cream);
  flex-shrink: 0;
  position: relative;
}
.bh-icon::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--bh-red);
  border-radius: 0 0 var(--bh-radius) var(--bh-radius);
}
.bh-icon svg {
  width: 22px; height: 22px;
  fill: currentColor;
}
.bh-icon-lg {
  width: 56px; height: 56px;
}
.bh-icon-lg svg { width: 28px; height: 28px; }

/* Inverted variant for accents (red background) */
.bh-icon-red {
  background: var(--bh-red);
  color: var(--bh-cream);
}
.bh-icon-red::after { background: var(--bh-navy); }

/* ── Tags / badges ───────────────────────────────────────────────────────── */
.bh-tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--bh-radius-sm);
  background: var(--bh-navy);
  color: var(--bh-cream);
}
.bh-tag-pro {
  background: var(--bh-red);
  color: var(--bh-cream);
}
.bh-tag-gold {
  background: var(--bh-gold);
  color: var(--bh-cream);
}
.bh-tag-quiet {
  background: var(--bh-paper-2);
  color: var(--bh-text-muted);
  border: 1px solid var(--bh-border);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.bh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  padding: 14px 22px;
  border-radius: var(--bh-radius);
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  min-height: 48px;
  text-decoration: none;
}
.bh-btn:active { transform: scale(0.97); }
.bh-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.bh-btn-full { width: 100%; }

.bh-btn-primary {
  background: var(--bh-red);
  color: var(--bh-cream);
  border-bottom: 3px solid var(--bh-navy);
  padding-bottom: 11px;
}
.bh-btn-primary:hover { background: var(--bh-red-deep); }

.bh-btn-secondary {
  background: var(--bh-paper);
  color: var(--bh-navy);
  border: 1px solid var(--bh-border);
}
.bh-btn-secondary:hover {
  background: var(--bh-paper-2);
  border-color: var(--bh-navy);
}

.bh-btn-ghost {
  background: transparent;
  color: var(--bh-text-muted);
  padding: 6px 12px;
  min-height: 32px;
  border: 1px solid var(--bh-border);
  font-size: 0.72rem;
}
.bh-btn-ghost:hover { color: var(--bh-navy); border-color: var(--bh-navy); }

/* Round mic button — used by Live Interpreter and any voice feature */
.bh-mic-btn {
  width: 96px; height: 96px;
  border-radius: 50%;
  border: none;
  background: var(--bh-red);
  color: var(--bh-cream);
  cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(200,16,46,0.4), inset 0 -4px 0 var(--bh-navy);
  transition: transform 0.15s, box-shadow 0.15s;
}
.bh-mic-btn:hover { transform: scale(1.03); box-shadow: 0 10px 28px rgba(200,16,46,0.5), inset 0 -4px 0 var(--bh-navy); }
.bh-mic-btn:active { transform: scale(0.97); }
.bh-mic-btn svg { width: 40px; height: 40px; fill: currentColor; }
.bh-mic-btn.is-recording {
  background: var(--bh-navy);
  box-shadow: 0 6px 20px rgba(10,31,61,0.4), inset 0 -4px 0 var(--bh-red);
  animation: bh-pulse 1.4s ease-in-out infinite;
}
@keyframes bh-pulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(10,31,61,0.4), inset 0 -4px 0 var(--bh-red), 0 0 0 0 rgba(200,16,46,0.5); }
  50%      { box-shadow: 0 6px 20px rgba(10,31,61,0.4), inset 0 -4px 0 var(--bh-red), 0 0 0 12px rgba(200,16,46,0); }
}

/* ── Form fields ─────────────────────────────────────────────────────────── */
.bh-textarea, .bh-input {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--bh-text);
  background: var(--bh-paper);
  border: 1px solid var(--bh-border);
  border-radius: var(--bh-radius);
  padding: 14px 16px;
  resize: vertical;
}
.bh-textarea { min-height: 130px; }
.bh-textarea:focus, .bh-input:focus {
  outline: none;
  border-color: var(--bh-navy);
  box-shadow: 0 0 0 3px rgba(10,31,61,0.08);
}

/* ── Segmented control (used for tabs) ───────────────────────────────────── */
.bh-segmented {
  display: flex;
  background: var(--bh-paper-2);
  border: 1px solid var(--bh-border);
  border-radius: var(--bh-radius);
  padding: 4px;
  gap: 4px;
  margin-bottom: 16px;
}
.bh-segmented-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 14px;
  border-radius: var(--bh-radius-sm);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bh-text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s, color 0.15s;
}
.bh-segmented-btn.is-active {
  background: var(--bh-paper);
  color: var(--bh-navy);
  box-shadow: var(--bh-shadow-sm);
}
.bh-segmented-btn svg { width: 16px; height: 16px; fill: currentColor; }

/* ── Direction pill (used by Translator) ─────────────────────────────────── */
.bh-direction {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bh-paper-2);
  border: 1px solid var(--bh-border);
  border-radius: var(--bh-radius);
  font-size: 0.85rem;
  color: var(--bh-text-muted);
  margin-bottom: 10px;
}
.bh-direction-from, .bh-direction-to { font-weight: 600; color: var(--bh-text); }
.bh-direction-arrow {
  color: var(--bh-red);
  font-weight: 800;
}

/* ── Drop area ───────────────────────────────────────────────────────────── */
.bh-drop {
  border: 2px dashed var(--bh-border);
  border-radius: var(--bh-radius-lg);
  padding: 32px 18px;
  text-align: center;
  background: var(--bh-paper);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.bh-drop:hover { border-color: var(--bh-navy); background: var(--bh-paper-2); }
.bh-drop-icon {
  width: 64px; height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--bh-paper-2);
  display: grid; place-items: center;
  color: var(--bh-navy);
}
.bh-drop-icon svg { width: 28px; height: 28px; fill: currentColor; }

/* ── Meta row (between input and button) ─────────────────────────────────── */
.bh-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--bh-text-muted);
  margin-top: 6px;
  font-weight: 500;
}
.bh-meta.is-over { color: var(--bh-error); font-weight: 700; }

/* ── Output card (translation result) ────────────────────────────────────── */
.bh-output-card {
  background: var(--bh-paper);
  border: 1px solid var(--bh-border);
  border-left: 4px solid var(--bh-red);
  border-radius: var(--bh-radius);
  padding: 16px 18px;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--bh-text);
  white-space: pre-wrap;
  min-height: 100px;
}
.bh-output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.bh-output-actions { display: flex; gap: 6px; }
.bh-icon-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--bh-border);
  background: var(--bh-paper);
  color: var(--bh-navy);
  border-radius: var(--bh-radius-sm);
  display: inline-grid; place-items: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  font-family: inherit;
}
.bh-icon-btn:hover { background: var(--bh-navy); color: var(--bh-cream); border-color: var(--bh-navy); }
.bh-icon-btn svg { width: 16px; height: 16px; fill: currentColor; }

/* ── Live transcript / translation panes (Live Interpreter) ──────────────── */
.bh-pane {
  background: var(--bh-paper);
  border: 1px solid var(--bh-border);
  border-radius: var(--bh-radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  min-height: 80px;
}
.bh-pane-label {
  font-family: "Manrope", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bh-text-muted);
  margin-bottom: 6px;
}
.bh-pane-text {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--bh-text);
  min-height: 28px;
}
.bh-pane-text:empty::before {
  content: attr(data-placeholder);
  color: var(--bh-text-muted);
  font-style: italic;
}
.bh-pane-translation {
  border-left: 4px solid var(--bh-red);
  background: var(--bh-paper);
}
.bh-pane-translation .bh-pane-label { color: var(--bh-red); }

/* ── Error message ───────────────────────────────────────────────────────── */
.bh-error {
  color: var(--bh-error);
  font-size: 0.85rem;
  font-weight: 600;
  margin: 10px 0;
  padding: 10px 14px;
  background: var(--bh-error-bg);
  border-radius: var(--bh-radius-sm);
  display: none;
}
.bh-error.is-visible { display: block; }

/* ── Layout helpers ──────────────────────────────────────────────────────── */
.bh-stack > * + * { margin-top: 12px; }
.bh-stack-lg > * + * { margin-top: 18px; }

/* ── Print stylesheet for output ─────────────────────────────────────────── */
@media print {
  body * { visibility: hidden; }
  .bh-output-card, .bh-output-card * { visibility: visible; }
  .bh-output-card {
    position: absolute;
    left: 0; top: 0;
    width: 100%;
    padding: 20px;
    border: none;
    font-size: 14pt;
  }
}

/* ── Helpers per propagare lo stile al di fuori di .bh-scope ───────────── */
/* Section title in British heritage: linea rossa decorativa + caps tracking. */
.section-title-bh {
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bh-text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 12px;
}
.section-title-bh::before {
  content: "";
  width: 28px;
  height: 3px;
  background: var(--bh-red);
  border-radius: 2px;
  flex-shrink: 0;
}

/* Pro badge: refresh in British heritage colours, no crown emoji. */
.pro-badge,
.bh-pro-badge {
  display: inline-block;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--bh-red);
  color: var(--bh-cream);
  vertical-align: middle;
  margin-left: 6px;
  line-height: 1.4;
}

/* Filled icon for mod-icon: opt-in by adding .mod-icon-ribbon — gives the same
   red bottom-stripe as .bh-icon while keeping the mod-icon's coloured fill. */
.mod-icon-ribbon { position: relative; overflow: hidden; }
.mod-icon-ribbon::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--bh-red);
}

/* ── Theory blocks (Cambridge papers) — inline marks for tips/traps headings ── */
.theory-heading-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 4px;
  margin-right: 8px;
  vertical-align: -5px;
  background: var(--bh-navy);
  color: var(--bh-cream);
}
.theory-tips .theory-heading-mark { background: var(--bh-navy); }
.theory-traps .theory-heading-mark { background: var(--bh-red); }
/* Refresh existing summary icon/chev so their SVGs sit cleanly */
.theory-summary-icon {
  display: inline-flex;
  width: 28px; height: 28px;
  border-radius: 6px;
  background: var(--bh-navy);
  color: var(--bh-cream);
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  flex-shrink: 0;
}
.theory-summary-chev {
  display: inline-flex;
  color: var(--bh-red) !important;
  font-size: 14px;
  flex-shrink: 0;
}

/* ── HOME — propagazione globale ─────────────────────────────────────────── */
/* Stat cards (streak / XP / level): keep the original navy gradient + white
   text — already on-brand and accessible. The previous attempt to flip them
   to cream paper conflicted with the !important white text rules in style.css
   nth-child(N), leaving Streak/XP/Level invisible against the cream. Just
   add a serif touch to the big numbers and a softer radius. */
.stat-card {
  border-radius: var(--bh-radius) !important;
  position: relative;
  overflow: hidden;
}
.stat-card .stat-value {
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: 400 !important;
  letter-spacing: -.01em;
}

/* All mod-icons get the red bottom ribbon — keeps their colour but unifies the signature */
.mod-icon, .compact-mod-icon {
  position: relative;
  overflow: hidden;
}
.mod-icon::after, .compact-mod-icon::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--bh-red);
  pointer-events: none;
}

/* Module / compact cards: cream paper + serif label */
.module-card, .compact-module-card {
  background: var(--bh-paper) !important;
  border: 1px solid var(--bh-border) !important;
  border-radius: var(--bh-radius) !important;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.module-card:hover, .compact-module-card:hover {
  border-color: var(--bh-navy) !important;
  transform: translateY(-1px);
  box-shadow: var(--bh-shadow);
}
.module-name, .compact-mod-label {
  font-family: "DM Serif Display", Georgia, serif !important;
  font-weight: 400 !important;
  color: var(--bh-navy) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}
.compact-mod-sub {
  color: var(--bh-text-muted) !important;
}

/* Module card row labels (Translator, Live Interpreter, AI Conv, ecc.) */
.module-card[style*="flex-direction:row"] > div:nth-child(2) > div:first-child {
  font-family: "DM Serif Display", Georgia, serif !important;
  font-weight: 400 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: var(--bh-navy) !important;
  font-size: 1.05rem !important;
}
.module-card[style*="flex-direction:row"] > div:nth-child(2) > div:nth-child(2) {
  color: var(--bh-text-muted) !important;
}
.module-card[style*="flex-direction:row"] > span:last-child {
  color: var(--bh-red) !important;
  font-weight: 700;
}

/* Exam hero card: navy with cream + red ribbon */
.exam-hero-card {
  background: var(--bh-navy) !important;
  color: var(--bh-cream) !important;
  border-radius: var(--bh-radius-lg) !important;
  padding: 22px 22px 24px !important;
  position: relative;
  overflow: hidden;
  border: none !important;
  box-shadow: var(--bh-shadow);
}
.exam-hero-card::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: repeating-linear-gradient(90deg,
    var(--bh-red) 0 12px,
    var(--bh-navy) 12px 14px,
    var(--bh-cream) 14px 26px,
    var(--bh-navy) 26px 28px);
}
.exam-hero-label {
  color: rgba(246,241,231,0.75) !important;
  font-size: .68rem !important;
  font-weight: 800 !important;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.exam-hero-title {
  font-family: "DM Serif Display", Georgia, serif !important;
  font-weight: 400 !important;
  color: var(--bh-cream) !important;
  font-size: 1.5rem !important;
  margin: 6px 0 8px !important;
}
.exam-hero-sub {
  color: rgba(246,241,231,0.78) !important;
  font-size: .85rem !important;
  line-height: 1.5 !important;
  margin-bottom: 14px !important;
}
.exam-hero-cta {
  background: var(--bh-red) !important;
  color: var(--bh-cream) !important;
  border: none !important;
  border-bottom: 3px solid rgba(0,0,0,.25) !important;
  padding-bottom: 11px !important;
  font-family: "Manrope", sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: .1em !important;
  text-transform: uppercase !important;
}

/* Hero (landmark photo) — keeps the photo but tightens the typography */
.home-hero .hero-greet {
  font-family: "Manrope", sans-serif !important;
  letter-spacing: .12em !important;
  font-weight: 700 !important;
}
.home-hero h2 {
  font-family: "DM Serif Display", Georgia, serif !important;
  font-weight: 400 !important;
}

/* Placement CTA: paper card with red side rule */
.placement-cta {
  background: var(--bh-paper) !important;
  border: 1px solid var(--bh-border) !important;
  border-radius: var(--bh-radius) !important;
  border-left: 4px solid var(--bh-red) !important;
  padding: 14px 16px !important;
}
.placement-cta-title {
  font-family: "DM Serif Display", Georgia, serif !important;
  font-weight: 400 !important;
  color: var(--bh-navy) !important;
}
.placement-cta-sub { color: var(--bh-text-muted) !important; }

/* Level pills: cream paper, navy active, red ring */
.level-pill {
  background: var(--bh-paper) !important;
  color: var(--bh-text-muted) !important;
  border: 1px solid var(--bh-border) !important;
  font-family: "Manrope", sans-serif !important;
  font-weight: 700 !important;
}
.level-pill.active, .level-pill[aria-pressed="true"] {
  background: var(--bh-navy) !important;
  color: var(--bh-cream) !important;
  border-color: var(--bh-navy) !important;
}

/* Section titles in home: bigger hierarchy */
.section-title-bh {
  font-size: 0.8rem;
  color: var(--bh-navy);
  font-weight: 800;
  letter-spacing: 0.16em;
}

/* Picks grid + idiom cards — keep the original navy/red gradient background
   that ships with .idiom-card; their inline-styled white text would otherwise
   disappear against a cream override. Just round the corners a touch. */
.idiom-card, .pick-compact {
  border-radius: var(--bh-radius) !important;
}

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║  GLOBAL PROPAGATION — applies British heritage to every screen      ║
   ║  without needing the .bh-scope wrapper. Conservative: only changes  ║
   ║  visual treatment, no layout / sizing.                              ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

/* App-wide background — was white, now cream paper everywhere */
body { background: var(--bh-cream) !important; }
.screen { background: var(--bh-cream) !important; }
.content { background: transparent !important; }

/* Page header: navy + serif title + ribbon stripe underneath */
.page-header {
  background: var(--bh-navy) !important;
  box-shadow: none !important;
  padding: 14px 16px !important;
  position: relative !important;
}
.page-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -4px; height: 4px;
  background: repeating-linear-gradient(90deg,
    var(--bh-red) 0 12px,
    var(--bh-navy) 12px 14px,
    var(--bh-cream) 14px 26px,
    var(--bh-navy) 26px 28px);
}
.page-header h1 {
  font-family: "DM Serif Display", Georgia, serif !important;
  font-weight: 400 !important;
  font-size: 1.35rem !important;
  letter-spacing: -.005em !important;
  color: var(--bh-cream) !important;
}
.page-header .btn-secondary {
  background: rgba(246,241,231,0.12) !important;
  border: 1px solid rgba(246,241,231,0.25) !important;
  color: var(--bh-cream) !important;
  font-family: "Manrope", sans-serif !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  padding: 7px 12px !important;
  min-height: 36px !important;
}
.page-header .btn-secondary:hover {
  background: rgba(246,241,231,0.2) !important;
  border-color: rgba(246,241,231,0.35) !important;
}

/* Push the body down so the ribbon doesn't overlap the first content row */
.page-header + .content { padding-top: 24px !important; }

/* Home header keeps its photo banner — only nudge the right-side icons */
.home-header { background: var(--bh-navy) !important; }
.home-settings-btn {
  background: rgba(246,241,231,0.12) !important;
  border: 1px solid rgba(246,241,231,0.25) !important;
  color: var(--bh-cream) !important;
}
.home-settings-btn:hover { background: rgba(246,241,231,0.22) !important; }

/* Buttons — British heritage palette */
.btn-primary {
  background: var(--bh-red) !important;
  color: var(--bh-cream) !important;
  border: none !important;
  border-bottom: 3px solid var(--bh-navy) !important;
  padding-bottom: 11px !important;
  box-shadow: none !important;
}
.btn-primary:hover {
  background: var(--bh-red-deep) !important;
  box-shadow: 0 4px 14px rgba(200,16,46,0.25) !important;
}
.btn-secondary {
  background: var(--bh-paper) !important;
  color: var(--bh-navy) !important;
  border: 1px solid var(--bh-border) !important;
}
.btn-secondary:hover {
  background: var(--bh-paper-2) !important;
  border-color: var(--bh-navy) !important;
  color: var(--bh-navy) !important;
}
.btn-success {
  background: var(--bh-success) !important;
  color: var(--bh-cream) !important;
  border-bottom: 3px solid var(--bh-navy) !important;
  padding-bottom: 11px !important;
}
.btn-danger {
  background: var(--bh-red) !important;
  color: var(--bh-cream) !important;
  border-bottom: 3px solid #5a0010 !important;
  padding-bottom: 11px !important;
}
.btn-outline {
  background: transparent !important;
  border: 1.5px solid var(--bh-red) !important;
  color: var(--bh-red) !important;
}
.btn-outline:hover { background: var(--bh-red) !important; color: var(--bh-cream) !important; }

/* Form inputs / selects / textareas — cream paper + navy focus */
input, select, textarea {
  font-family: "Manrope", system-ui, sans-serif;
}
.form-group label {
  font-family: "Manrope", sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em;
  color: var(--bh-text-muted) !important;
  text-transform: uppercase;
  font-size: .72rem !important;
}
.form-group input,
.form-group select,
.form-group textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"] {
  background: var(--bh-paper) !important;
  border: 1px solid var(--bh-border) !important;
  border-radius: var(--bh-radius) !important;
  color: var(--bh-text) !important;
  padding: 12px 14px !important;
  font-size: 1rem !important;
}
input:focus, select:focus, textarea:focus {
  outline: none !important;
  border-color: var(--bh-navy) !important;
  box-shadow: 0 0 0 3px rgba(10,31,61,0.08) !important;
}

/* Bottom navigation — cream background, red active state */
.nav-bottom, .bottom-nav {
  background: var(--bh-paper) !important;
  border-top: 1px solid var(--bh-border) !important;
}
.nav-item {
  color: var(--bh-text-muted) !important;
  font-family: "Manrope", sans-serif !important;
}
.nav-item.active {
  color: var(--bh-red) !important;
  background: rgba(200,16,46,0.06) !important;
}
.nav-item.active svg { stroke: var(--bh-red) !important; color: var(--bh-red) !important; }

/* Auth screen card */
.auth-card {
  background: var(--bh-paper) !important;
  border: 1px solid var(--bh-border) !important;
  border-radius: var(--bh-radius-lg) !important;
  box-shadow: var(--bh-shadow) !important;
  position: relative;
  overflow: hidden;
}
.auth-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 4px;
  background: repeating-linear-gradient(90deg,
    var(--bh-red) 0 12px,
    var(--bh-navy) 12px 14px,
    var(--bh-cream) 14px 26px,
    var(--bh-navy) 26px 28px);
}
.auth-tabs { background: var(--bh-paper-2) !important; border: 1px solid var(--bh-border) !important; border-radius: var(--bh-radius) !important; }
.auth-tab {
  font-family: "Manrope", sans-serif !important;
  color: var(--bh-text-muted) !important;
  letter-spacing: 0.06em !important;
}
.auth-tab.active {
  background: var(--bh-red) !important;
  color: var(--bh-cream) !important;
}
.auth-logo p {
  font-family: "DM Serif Display", Georgia, serif !important;
  font-weight: 400 !important;
  font-style: normal !important;
  color: var(--bh-navy) !important;
  font-size: 1.05rem !important;
}

/* Settings rows */
.settings-row {
  background: var(--bh-paper) !important;
  border-bottom: 1px solid var(--bh-border) !important;
}
.settings-label {
  font-family: "Manrope", sans-serif !important;
  font-weight: 700 !important;
  color: var(--bh-navy) !important;
}
.settings-desc { color: var(--bh-text-muted) !important; }
.settings-section-title, .section-title {
  color: var(--bh-navy) !important;
  font-family: "Manrope", sans-serif !important;
}

/* Modal overlay & sheet */
.modal-overlay { background: rgba(10,31,61,0.65) !important; }
.modal-sheet {
  background: var(--bh-paper) !important;
  border-radius: var(--bh-radius-lg) var(--bh-radius-lg) 0 0 !important;
  border-top: 4px solid var(--bh-red) !important;
}
.modal-title {
  font-family: "DM Serif Display", Georgia, serif !important;
  font-weight: 400 !important;
  color: var(--bh-navy) !important;
  font-size: 1.3rem !important;
}

/* Section titles globally — also apply to the existing .section-title, not just .section-title-bh */
.section-title {
  font-family: "Manrope", sans-serif !important;
  font-size: 0.8rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  color: var(--bh-navy) !important;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 12px;
}
.section-title::before {
  content: "";
  width: 28px;
  height: 3px;
  background: var(--bh-red);
  border-radius: 2px;
  flex-shrink: 0;
}
/* If a section-title already has the .section-title-bh helper, don't double the bar */
.section-title.section-title-bh::before { display: none; }

/* Theory card refresh — cream paper, red left rule, serif title */
.theory-card {
  background: var(--bh-paper) !important;
  border: 1px solid var(--bh-border) !important;
  border-left: 4px solid var(--bh-red) !important;
  border-radius: var(--bh-radius) !important;
}
.theory-summary-text strong {
  font-family: "DM Serif Display", Georgia, serif !important;
  color: var(--bh-navy) !important;
  font-weight: 400 !important;
  font-size: 1rem !important;
}
.theory-summary-text small { color: var(--bh-text-muted) !important; }
.theory-heading {
  font-family: "Manrope", sans-serif !important;
  color: var(--bh-navy) !important;
  font-weight: 700 !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.theory-intro, .theory-body { color: var(--bh-text) !important; }

/* Practice / drill / examiner-grade containers */
.session-task-header, .session-question, .session-passage, .session-feedback {
  color: var(--bh-text);
}
.session-task-type, .session-task-step {
  color: var(--bh-text-muted) !important;
  font-family: "Manrope", sans-serif !important;
}
.session-option {
  background: var(--bh-paper) !important;
  border: 1px solid var(--bh-border) !important;
  color: var(--bh-navy) !important;
  font-family: "Manrope", sans-serif !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.session-option.correct { background: var(--bh-success-bg) !important; border-color: var(--bh-success) !important; color: var(--bh-success) !important; }
.session-option.wrong { background: var(--bh-error-bg) !important; border-color: var(--bh-error) !important; color: var(--bh-error) !important; }
.session-next-btn {
  background: var(--bh-red) !important;
  color: var(--bh-cream) !important;
  border-bottom: 3px solid var(--bh-navy) !important;
  padding-bottom: 11px !important;
}

/* ── Onboarding wizard — British heritage refresh ─────────────────────── */
.onboarding-screen {
  background: linear-gradient(165deg, var(--bh-navy) 0%, #142a4a 60%, var(--bh-red-deep) 100%) !important;
}
.onboarding-progress-fill { background: var(--bh-red) !important; }
.onb-title {
  font-family: "DM Serif Display", Georgia, serif !important;
  font-weight: 400 !important;
  font-size: 1.85rem !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.25) !important;
}
.onb-sub {
  font-family: "Manrope", sans-serif !important;
  font-weight: 500 !important;
}
.onb-icon {
  font-size: 2.6rem !important;
  margin: 8px 0 16px !important;
}
.onb-option.selected {
  background: rgba(200,16,46,0.20) !important;
  border-color: var(--bh-red) !important;
}
.onb-cta {
  background: var(--bh-red) !important;
  color: var(--bh-cream) !important;
  border-bottom: 3px solid rgba(0,0,0,.3) !important;
  padding-bottom: 11px !important;
  font-family: "Manrope", sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  box-shadow: 0 4px 14px rgba(200,16,46,.30) !important;
}
.onb-cta:hover { background: var(--bh-red-deep) !important; }
.onb-cta-secondary {
  font-family: "Manrope", sans-serif !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Exam Plan card (Settings) — both the active (navy) and empty (CTA) states.
   Higher specificity than the legacy '.exam-plan-card.empty' yellow rule. */
.exam-plan-card,
.exam-plan-card.empty {
  background: var(--bh-navy) !important;
  color: var(--bh-cream) !important;
  border: none !important;
  border-radius: var(--bh-radius-lg) !important;
  position: relative;
  overflow: hidden;
  padding: 22px 22px 24px !important;
}
.exam-plan-card::after,
.exam-plan-card.empty::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: repeating-linear-gradient(90deg,
    var(--bh-red) 0 12px,
    var(--bh-navy) 12px 14px,
    var(--bh-cream) 14px 26px,
    var(--bh-navy) 26px 28px);
}
.exam-plan-card *, .exam-plan-card.empty * { color: var(--bh-cream) !important; }
.exam-plan-empty-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: var(--bh-red) !important;
  color: var(--bh-cream) !important;
  border-radius: 50%;
  margin-bottom: 10px !important;
  font-size: 1.2rem !important;
}
.exam-plan-empty-title {
  font-family: "DM Serif Display", Georgia, serif !important;
  font-weight: 400 !important;
  font-size: 1.3rem !important;
  color: var(--bh-cream) !important;
  margin-bottom: 6px !important;
  line-height: 1.2;
}
.exam-plan-empty-sub {
  color: rgba(246,241,231,0.82) !important;
  font-size: .9rem !important;
  line-height: 1.5 !important;
  margin-bottom: 16px !important;
  opacity: 1 !important;
}
.exam-plan-cta {
  background: var(--bh-red) !important;
  color: var(--bh-cream) !important;
  border: none !important;
  border-bottom: 3px solid rgba(0,0,0,.3) !important;
  padding: 13px 18px 10px !important;
  border-radius: var(--bh-radius) !important;
  font-family: "Manrope", sans-serif !important;
  font-weight: 700 !important;
  font-size: .85rem !important;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  width: 100%;
}
.exam-plan-cta:hover { background: var(--bh-red-deep) !important; }
.exam-plan-active-title {
  font-family: "DM Serif Display", Georgia, serif !important;
  font-weight: 400 !important;
  color: var(--bh-cream) !important;
  font-size: 1.2rem !important;
}
.exam-plan-active-cefr {
  background: var(--bh-red) !important;
  color: var(--bh-cream) !important;
}

/* Diagnostic / placement test container */
.diagnostic-q, .placement-q {
  background: var(--bh-paper) !important;
  border: 1px solid var(--bh-border) !important;
  border-radius: var(--bh-radius) !important;
}

/* Voice chat + AI chat bubbles */
.chat-bubble, .voice-bubble, .vc-msg, .vc-user-msg, .vc-ai-msg {
  border-radius: var(--bh-radius-lg) !important;
}
.vc-user-msg, .chat-bubble.user, .vc-msg.user {
  background: var(--bh-navy) !important;
  color: var(--bh-cream) !important;
}
.vc-ai-msg, .chat-bubble.ai, .vc-msg.ai {
  background: var(--bh-paper) !important;
  color: var(--bh-text) !important;
  border: 1px solid var(--bh-border) !important;
  border-left: 3px solid var(--bh-red) !important;
}

/* Karaoke / lyrics container */
.karaoke-line {
  font-family: "DM Serif Display", Georgia, serif;
  color: var(--bh-text-muted);
}
.karaoke-line.karaoke-active {
  background: var(--bh-red) !important;
  color: var(--bh-cream) !important;
  border-radius: 4px;
}
.kw-active { background: var(--bh-red) !important; color: var(--bh-cream) !important; }

/* Pronunciation phoneme cards */
.phoneme-card, .pron-card {
  background: var(--bh-paper) !important;
  border: 1px solid var(--bh-border) !important;
  border-radius: var(--bh-radius) !important;
}

/* Discover Britain accordion */
.discover-acc {
  background: var(--bh-paper) !important;
  border: 1px solid var(--bh-border) !important;
  border-radius: var(--bh-radius) !important;
}
.discover-head {
  background: var(--bh-paper-2) !important;
  border-bottom: 1px solid var(--bh-border);
}
.discover-title {
  font-family: "DM Serif Display", Georgia, serif !important;
  color: var(--bh-navy) !important;
  font-weight: 400 !important;
}
.discover-arrow { color: var(--bh-red) !important; }

/* Cities / history / literature detail hero */
.city-hero-img, .detail-hero-img { border-radius: var(--bh-radius-lg) var(--bh-radius-lg) 0 0 !important; }
.detail-hero-band {
  border-radius: 0 0 var(--bh-radius-lg) var(--bh-radius-lg) !important;
  position: relative;
}
.detail-hero-title {
  font-family: "DM Serif Display", Georgia, serif !important;
  font-weight: 400 !important;
}
.detail-hero-sub { font-family: "Manrope", sans-serif !important; }

/* Idiom screen card and similar */
.idiom-detail-card, .vocab-card, .word-card {
  background: var(--bh-paper) !important;
  border: 1px solid var(--bh-border) !important;
  border-left: 4px solid var(--bh-red) !important;
  border-radius: var(--bh-radius) !important;
}

/* Daily task card (study-path) */
.daily-task-item {
  background: var(--bh-paper) !important;
  border: 1px solid var(--bh-border) !important;
  border-radius: var(--bh-radius) !important;
}
.daily-task-item.done {
  background: var(--bh-success-bg) !important;
  border-color: var(--bh-success) !important;
}
.daily-task-icon {
  color: var(--bh-navy) !important;
  font-size: 1.3rem !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.daily-task-item.done .daily-task-icon { color: var(--bh-success) !important; }

/* ── TEA TIME — uniformata al British heritage ────────────────────────── */
.tea-hero {
  background: var(--bh-navy) !important;
  color: var(--bh-cream) !important;
  border-radius: var(--bh-radius-lg) !important;
  padding: 24px 22px !important;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
}
.tea-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: repeating-linear-gradient(90deg,
    var(--bh-red) 0 12px,
    var(--bh-navy) 12px 14px,
    var(--bh-cream) 14px 26px,
    var(--bh-navy) 26px 28px);
}
.tea-hero-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px;
  margin: 0 auto 12px;
  background: var(--bh-red) !important;
  color: var(--bh-cream) !important;
  border-radius: 50%;
  font-size: 1.6rem !important;
}
.tea-hero-title {
  font-family: "DM Serif Display", Georgia, serif !important;
  font-weight: 400 !important;
  font-size: 1.6rem !important;
  color: var(--bh-cream) !important;
  margin-bottom: 6px !important;
}
.tea-hero-sub {
  color: rgba(246,241,231,0.82) !important;
  font-size: .9rem !important;
  line-height: 1.5;
}

.tea-card, .tea-story-card, .tea-fact-strip {
  background: var(--bh-paper) !important;
  border: 1px solid var(--bh-border) !important;
  border-radius: var(--bh-radius) !important;
  padding: 16px !important;
  margin-bottom: 14px;
}
.tea-story-tag {
  display: inline-block;
  background: var(--bh-red);
  color: var(--bh-cream);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--bh-radius-sm);
  margin-bottom: 8px;
}
.tea-story-title {
  font-family: "DM Serif Display", Georgia, serif !important;
  font-weight: 400 !important;
  font-size: 1.15rem !important;
  color: var(--bh-navy) !important;
  margin-bottom: 8px;
  line-height: 1.25;
}
.tea-story-body { color: var(--bh-text); line-height: 1.55; font-size: .92rem; margin-bottom: 10px; }
.tea-newstory-btn { width: 100%; }

.tea-fact-strip {
  display: flex !important;
  align-items: center;
  gap: 10px;
  border-left: 4px solid var(--bh-red) !important;
}
.tea-fact-label {
  font-weight: 800;
  color: var(--bh-red);
  text-transform: uppercase;
  font-size: .68rem;
  letter-spacing: .1em;
  flex-shrink: 0;
}
.tea-fact-text { flex: 1; font-size: .85rem; color: var(--bh-text); line-height: 1.45; }
.tea-fact-next {
  background: transparent !important;
  border: 1px solid var(--bh-border) !important;
  color: var(--bh-navy) !important;
  width: 32px; height: 32px;
  border-radius: var(--bh-radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}
.tea-fact-next:hover { background: var(--bh-paper-2) !important; }

.tea-suggested-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bh-paper) !important;
  border: 1px solid var(--bh-border) !important;
  border-left: 4px solid var(--bh-red) !important;
  border-radius: var(--bh-radius) !important;
  padding: 14px 16px;
  cursor: pointer;
  margin-bottom: 18px;
  transition: border-color .15s, transform .15s;
}
.tea-suggested-card:hover { border-color: var(--bh-navy) !important; transform: translateY(-1px); }
.tea-suggested-icon {
  width: 48px; height: 48px;
  background: var(--bh-navy) !important;
  color: var(--bh-cream) !important;
  border-radius: var(--bh-radius);
  display: grid; place-items: center;
  font-size: 1.4rem !important;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.tea-suggested-icon::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--bh-red);
}
.tea-suggested-info { flex: 1; }
.tea-suggested-name {
  font-family: "DM Serif Display", Georgia, serif !important;
  font-weight: 400 !important;
  color: var(--bh-navy) !important;
  font-size: 1.1rem !important;
}
.tea-suggested-meta { color: var(--bh-text-muted); font-size: .82rem; margin-top: 2px; }
.tea-suggested-arrow { color: var(--bh-red); font-weight: 700; }

.tea-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.tea-gallery-card {
  background: var(--bh-paper) !important;
  border: 1px solid var(--bh-border) !important;
  border-radius: var(--bh-radius) !important;
  padding: 12px 8px !important;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: border-color .15s, transform .15s;
}
.tea-gallery-card:hover { border-color: var(--bh-navy) !important; transform: translateY(-1px); }
.tea-gallery-icon {
  width: 44px; height: 44px;
  background: var(--bh-navy) !important;
  color: var(--bh-cream) !important;
  border-radius: var(--bh-radius);
  display: grid; place-items: center;
  font-size: 1.3rem;
  position: relative;
  overflow: hidden;
}
.tea-gallery-icon::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--bh-red);
}
.tea-gallery-name {
  font-family: "DM Serif Display", Georgia, serif !important;
  font-weight: 400 !important;
  color: var(--bh-navy) !important;
  font-size: .82rem !important;
  text-align: center;
  line-height: 1.2;
}

.tea-games { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.tea-game-btn {
  background: var(--bh-paper) !important;
  border: 1px solid var(--bh-border) !important;
  border-radius: var(--bh-radius) !important;
  padding: 14px 16px !important;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.tea-game-btn:hover { border-color: var(--bh-navy) !important; transform: translateY(-1px); }
.tea-game-icon {
  width: 44px; height: 44px;
  background: var(--bh-navy) !important;
  color: var(--bh-cream) !important;
  border-radius: var(--bh-radius);
  display: grid; place-items: center;
  font-size: 1.4rem !important;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.tea-game-icon::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--bh-red);
}
.tea-game-title {
  font-family: "DM Serif Display", Georgia, serif !important;
  font-weight: 400 !important;
  color: var(--bh-navy) !important;
  font-size: 1.05rem !important;
}
.tea-game-sub { color: var(--bh-text-muted); font-size: .8rem; margin-top: 2px; line-height: 1.4; }

.tea-vocab-row, .tea-idiom-row, .tea-timeline-row, .tea-world-row {
  background: var(--bh-paper) !important;
  border: 1px solid var(--bh-border) !important;
  border-radius: var(--bh-radius) !important;
  padding: 12px 14px !important;
  margin-bottom: 8px;
}
.tea-vocab-en, .tea-idiom-en {
  font-family: "DM Serif Display", Georgia, serif !important;
  color: var(--bh-navy) !important;
  font-weight: 400 !important;
  font-size: 1.02rem;
}
.tea-vocab-it, .tea-idiom-it { color: var(--bh-text-muted); font-size: .85rem; margin-top: 2px; }
.tea-vocab-ex, .tea-idiom-ex { color: var(--bh-text); font-size: .85rem; margin-top: 6px; font-style: italic; }
.tea-vocab-note, .tea-idiom-note { color: var(--bh-text-muted); font-size: .78rem; margin-top: 4px; }
.tea-vocab-speak {
  background: transparent !important;
  border: 1px solid var(--bh-border) !important;
  color: var(--bh-navy) !important;
  padding: 4px 8px;
  border-radius: var(--bh-radius-sm);
  cursor: pointer;
  margin-top: 6px;
}
.tea-vocab-speak:hover { background: var(--bh-navy) !important; color: var(--bh-cream) !important; }
.tea-timeline-year {
  font-family: "DM Serif Display", Georgia, serif !important;
  color: var(--bh-red) !important;
  font-weight: 400 !important;
  font-size: 1.1rem;
}
.tea-timeline-event { color: var(--bh-text); font-size: .88rem; margin-top: 2px; }
.tea-world-country {
  font-family: "DM Serif Display", Georgia, serif !important;
  color: var(--bh-navy) !important;
  font-weight: 400 !important;
  font-size: 1.05rem;
  margin-bottom: 4px;
}
.tea-world-style, .tea-world-ceremony, .tea-world-fun { font-size: .82rem; color: var(--bh-text); line-height: 1.45; margin-top: 4px; }
.tea-world-fun { color: var(--bh-text-muted); border-left: 3px solid var(--bh-red); padding-left: 8px; }

/* ── KARAOKE — uniformata al British heritage ────────────────────────── */
.karaoke-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.karaoke-song-card {
  background: var(--bh-paper) !important;
  border: 1px solid var(--bh-border) !important;
  border-radius: var(--bh-radius) !important;
  padding: 0 !important;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  display: flex; flex-direction: column;
  text-align: left;
}
.karaoke-song-card:hover { border-color: var(--bh-navy) !important; transform: translateY(-2px); box-shadow: var(--bh-shadow); }
.karaoke-song-cover {
  width: 100%;
  height: 110px;
  background: var(--bh-navy) !important;
  color: var(--bh-cream) !important;
  display: grid; place-items: center;
  position: relative;
}
.karaoke-song-cover::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0; height: 4px;
  background: var(--bh-red);
}
.karaoke-song-icon { font-size: 2.2rem; color: var(--bh-cream) !important; display: inline-flex; align-items: center; justify-content: center; }
.karaoke-song-info { padding: 12px 14px; }
.karaoke-song-title {
  font-family: "DM Serif Display", Georgia, serif !important;
  font-weight: 400 !important;
  color: var(--bh-navy) !important;
  font-size: 1.02rem !important;
  line-height: 1.25;
  margin-bottom: 3px;
}
.karaoke-song-artist { color: var(--bh-text-muted); font-size: .76rem; margin-bottom: 8px; }
.karaoke-song-info .exam-tag.level {
  background: var(--bh-red) !important;
  color: var(--bh-cream) !important;
  font-size: .58rem;
  padding: 2px 7px;
  border-radius: var(--bh-radius-sm);
  letter-spacing: .1em;
}
.karaoke-song-header {
  display: flex; gap: 14px;
  margin-bottom: 16px;
}
.karaoke-cover-sm {
  width: 72px; height: 72px;
  background: var(--bh-navy) !important;
  color: var(--bh-cream) !important;
  border-radius: var(--bh-radius);
  display: grid; place-items: center;
  position: relative;
  overflow: hidden;
  font-size: 1.8rem;
  flex-shrink: 0;
}
.karaoke-cover-sm::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--bh-red);
}
.karaoke-title-lg {
  font-family: "DM Serif Display", Georgia, serif !important;
  font-weight: 400 !important;
  color: var(--bh-navy) !important;
  font-size: 1.4rem;
  line-height: 1.2;
}
.karaoke-artist-sm { color: var(--bh-text-muted); font-size: .82rem; margin-top: 2px; }
.karaoke-lyrics {
  background: var(--bh-paper) !important;
  border: 1px solid var(--bh-border) !important;
  border-radius: var(--bh-radius) !important;
  padding: 16px !important;
  font-family: "DM Serif Display", Georgia, serif !important;
  font-weight: 400 !important;
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--bh-text);
}

/* ── EXAM PICKER + DETAIL — British uniformata ───────────────────────── */
.exam-card {
  background: var(--bh-paper) !important;
  border: 1px solid var(--bh-border) !important;
  border-radius: var(--bh-radius) !important;
  padding: 14px 16px !important;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  width: 100%;
  text-align: left;
}
.exam-card:hover {
  border-color: var(--bh-navy) !important;
  transform: translateY(-1px);
  box-shadow: var(--bh-shadow) !important;
}
.exam-card-icon {
  width: 48px; height: 48px;
  background: var(--bh-navy) !important;
  color: var(--bh-cream) !important;
  border-radius: var(--bh-radius) !important;
  display: grid; place-items: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  font-size: 1.4rem;
}
.exam-card-icon::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--bh-red);
}
.exam-card-name {
  font-family: "DM Serif Display", Georgia, serif !important;
  font-weight: 400 !important;
  color: var(--bh-navy) !important;
  font-size: 1.05rem !important;
  line-height: 1.2;
}
.exam-card-abbr {
  color: var(--bh-red) !important;
  font-weight: 800 !important;
  font-size: .68rem !important;
  letter-spacing: .12em !important;
}
.exam-card-desc { color: var(--bh-text-muted) !important; font-size: .8rem !important; line-height: 1.45 !important; margin-top: 4px !important; }
.exam-card-meta { gap: 6px !important; margin-top: 8px !important; }
.exam-tag {
  background: var(--bh-paper-2) !important;
  color: var(--bh-text-muted) !important;
  border: 1px solid var(--bh-border) !important;
  font-size: .65rem !important;
  font-weight: 700 !important;
  letter-spacing: .06em !important;
  padding: 3px 7px !important;
  border-radius: var(--bh-radius-sm) !important;
  text-transform: uppercase;
}
.exam-tag.level {
  background: var(--bh-red) !important;
  color: var(--bh-cream) !important;
  border-color: var(--bh-red) !important;
}

/* Filter chips above the exam cards */
.filter-chip {
  background: var(--bh-paper) !important;
  color: var(--bh-text-muted) !important;
  border: 1px solid var(--bh-border) !important;
  font-family: "Manrope", sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: .04em !important;
  padding: 8px 14px !important;
  border-radius: var(--bh-radius) !important;
  cursor: pointer;
  font-size: .82rem !important;
  text-transform: none !important;
  transition: border-color .15s, background .15s, color .15s;
}
.filter-chip:hover { border-color: var(--bh-navy) !important; color: var(--bh-navy) !important; }
.filter-chip.active {
  background: var(--bh-navy) !important;
  color: var(--bh-cream) !important;
  border-color: var(--bh-navy) !important;
}

/* Exam detail header (the panel after clicking an exam) */
.exam-detail-header {
  background: var(--bh-navy) !important;
  color: var(--bh-cream) !important;
  border-radius: var(--bh-radius-lg) !important;
  padding: 22px 22px 24px !important;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px !important;
  text-align: center;
}
.exam-detail-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: repeating-linear-gradient(90deg,
    var(--bh-red) 0 12px,
    var(--bh-navy) 12px 14px,
    var(--bh-cream) 14px 26px,
    var(--bh-navy) 26px 28px);
}
.exam-detail-header h2 {
  font-family: "DM Serif Display", Georgia, serif !important;
  font-weight: 400 !important;
  color: var(--bh-cream) !important;
  font-size: 1.6rem !important;
  line-height: 1.2 !important;
  margin: 6px 0 6px !important;
}
.exam-detail-header .pass-note {
  color: rgba(246,241,231,0.82) !important;
  font-size: .85rem !important;
  line-height: 1.5 !important;
}
.exam-detail-header > div:first-child {
  color: var(--bh-red) !important;
}

/* Papers list inside the exam detail */
.papers-list {
  background: var(--bh-paper) !important;
  border: 1px solid var(--bh-border) !important;
  border-radius: var(--bh-radius) !important;
  overflow: hidden;
}
.paper-row {
  padding: 14px 16px !important;
  border-bottom: 1px solid var(--bh-border) !important;
  display: flex !important;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
}
.paper-row:last-child { border-bottom: none !important; }
.paper-row .paper-name {
  font-family: "DM Serif Display", Georgia, serif !important;
  color: var(--bh-navy) !important;
  font-weight: 400 !important;
  font-size: 1rem !important;
}
.paper-row .paper-meta { color: var(--bh-text-muted) !important; font-size: .8rem !important; }
.paper-module-btns {
  display: flex; gap: 6px; flex-wrap: wrap;
  width: 100%;
}
.exam-module-btn {
  font-size: .75rem !important;
  padding: 7px 10px !important;
  min-height: 34px !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

/* Pro upgrade banner inside exam detail */
.pro-banner {
  background: var(--bh-paper) !important;
  border: 1px solid var(--bh-border) !important;
  border-left: 4px solid var(--bh-red) !important;
  border-radius: var(--bh-radius) !important;
  padding: 16px 18px !important;
}
.pro-banner h3 {
  font-family: "DM Serif Display", Georgia, serif !important;
  font-weight: 400 !important;
  color: var(--bh-navy) !important;
  margin: 0 0 6px !important;
}
.pro-banner p { color: var(--bh-text-muted) !important; font-size: .88rem !important; margin-bottom: 12px !important; }

/* 💼 briefcase glyph used by Business exams */

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║  DARK MODE — variant per [data-theme="dark"]                        ║
   ║  Inverte le surface (cream/paper diventano dark navy) ma tiene il   ║
   ║  rosso accent e il navy degli header, così l'identità British       ║
   ║  resta riconoscibile anche di notte.                                ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

[data-theme="dark"] {
  --bh-navy:        #1a3a6d;          /* navy un po' più chiaro per stare su dark */
  --bh-navy-soft:   #2d4f8f;
  --bh-cream:       #0f172a;          /* surface scura */
  --bh-paper:       #1e293b;          /* card / paper surface */
  --bh-paper-2:     #273548;          /* hover / secondary surface */
  --bh-red:         #f02035;          /* rosso più brillante per contrast */
  --bh-red-deep:    #c8102e;
  --bh-gold:        #d4a017;
  --bh-border:      #334155;
  --bh-text:        #f1f5f9;          /* light text */
  --bh-text-muted:  #94a3b8;
  --bh-success:     #22c55e;
  --bh-success-bg:  #052e16;
  --bh-error:       #f87171;
  --bh-error-bg:    #2d0a10;

  --bh-shadow-sm: 0 1px 2px rgba(0,0,0,.30);
  --bh-shadow:    0 4px 14px rgba(0,0,0,.40);
  --bh-shadow-lg: 0 10px 30px rgba(0,0,0,.55);
}

/* Body / screens: dark surface */
[data-theme="dark"] body,
[data-theme="dark"] .screen { background: var(--bh-cream) !important; }

/* Header bar: keep navy (un po' più saturo) + ribbon */
[data-theme="dark"] .page-header { background: #0a1f3d !important; }
[data-theme="dark"] .home-header { background: #0a1f3d !important; }

/* Cards: usano --bh-paper che ora è dark navy */
[data-theme="dark"] .bh-card,
[data-theme="dark"] .module-card,
[data-theme="dark"] .compact-module-card,
[data-theme="dark"] .tea-card,
[data-theme="dark"] .tea-story-card,
[data-theme="dark"] .tea-fact-strip,
[data-theme="dark"] .tea-suggested-card,
[data-theme="dark"] .tea-gallery-card,
[data-theme="dark"] .tea-game-btn,
[data-theme="dark"] .tea-vocab-row,
[data-theme="dark"] .tea-idiom-row,
[data-theme="dark"] .tea-timeline-row,
[data-theme="dark"] .tea-world-row,
[data-theme="dark"] .karaoke-song-card,
[data-theme="dark"] .karaoke-lyrics,
[data-theme="dark"] .exam-card,
[data-theme="dark"] .papers-list,
[data-theme="dark"] .pro-banner,
[data-theme="dark"] .theory-card,
[data-theme="dark"] .placement-cta,
[data-theme="dark"] .idiom-detail-card,
[data-theme="dark"] .vocab-card,
[data-theme="dark"] .word-card,
[data-theme="dark"] .daily-task-item,
[data-theme="dark"] .settings-row,
[data-theme="dark"] .phoneme-card,
[data-theme="dark"] .pron-card,
[data-theme="dark"] .auth-card,
[data-theme="dark"] .modal-sheet,
[data-theme="dark"] .auth-tabs,
[data-theme="dark"] .discover-acc {
  background: var(--bh-paper) !important;
  border-color: var(--bh-border) !important;
}

/* Discover Britain accordion head */
[data-theme="dark"] .discover-head { background: var(--bh-paper-2) !important; }

/* Bottom nav: dark cream + red active */
[data-theme="dark"] .nav-bottom,
[data-theme="dark"] .bottom-nav { background: var(--bh-paper) !important; border-top-color: var(--bh-border) !important; }
[data-theme="dark"] .nav-item { color: var(--bh-text-muted) !important; }
[data-theme="dark"] .nav-item.active { color: var(--bh-red) !important; background: rgba(240,32,53,.10) !important; }

/* Headings stay light */
[data-theme="dark"] .module-name,
[data-theme="dark"] .compact-mod-label,
[data-theme="dark"] .tea-story-title,
[data-theme="dark"] .tea-suggested-name,
[data-theme="dark"] .tea-gallery-name,
[data-theme="dark"] .tea-game-title,
[data-theme="dark"] .tea-vocab-en,
[data-theme="dark"] .tea-idiom-en,
[data-theme="dark"] .tea-world-country,
[data-theme="dark"] .karaoke-song-title,
[data-theme="dark"] .karaoke-title-lg,
[data-theme="dark"] .exam-card-name,
[data-theme="dark"] .paper-row .paper-name,
[data-theme="dark"] .placement-cta-title,
[data-theme="dark"] .discover-title,
[data-theme="dark"] .pro-banner h3,
[data-theme="dark"] .theory-summary-text strong,
[data-theme="dark"] .theory-heading {
  color: var(--bh-text) !important;
}

[data-theme="dark"] .placement-cta-sub,
[data-theme="dark"] .compact-mod-sub,
[data-theme="dark"] .tea-story-body,
[data-theme="dark"] .tea-suggested-meta,
[data-theme="dark"] .tea-game-sub,
[data-theme="dark"] .karaoke-song-artist,
[data-theme="dark"] .karaoke-artist-sm,
[data-theme="dark"] .exam-card-desc,
[data-theme="dark"] .paper-row .paper-meta,
[data-theme="dark"] .theory-summary-text small,
[data-theme="dark"] .theory-intro,
[data-theme="dark"] .theory-body,
[data-theme="dark"] .settings-desc,
[data-theme="dark"] .tea-vocab-it,
[data-theme="dark"] .tea-idiom-it { color: var(--bh-text-muted) !important; }

/* Form inputs in dark mode */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: var(--bh-paper) !important;
  border-color: var(--bh-border) !important;
  color: var(--bh-text) !important;
}
[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
  border-color: var(--bh-red) !important;
  box-shadow: 0 0 0 3px rgba(240,32,53,.15) !important;
}

/* Buttons stay vivid */
[data-theme="dark"] .btn-primary { background: var(--bh-red) !important; color: #fff !important; }
[data-theme="dark"] .btn-secondary {
  background: var(--bh-paper-2) !important;
  color: var(--bh-text) !important;
  border-color: var(--bh-border) !important;
}
[data-theme="dark"] .btn-secondary:hover {
  background: var(--bh-paper) !important;
  border-color: var(--bh-red) !important;
  color: var(--bh-text) !important;
}

/* Translator / Live Interpreter scoped components */
[data-theme="dark"] .bh-scope { background: var(--bh-cream); color: var(--bh-text); }
[data-theme="dark"] .bh-body { background: var(--bh-cream); }
[data-theme="dark"] .bh-textarea,
[data-theme="dark"] .bh-input { background: var(--bh-paper); border-color: var(--bh-border); color: var(--bh-text); }
[data-theme="dark"] .bh-direction { background: var(--bh-paper-2); border-color: var(--bh-border); color: var(--bh-text-muted); }
[data-theme="dark"] .bh-direction-from,
[data-theme="dark"] .bh-direction-to { color: var(--bh-text); }
[data-theme="dark"] .bh-output-card { background: var(--bh-paper); border-color: var(--bh-border); color: var(--bh-text); }
[data-theme="dark"] .bh-pane { background: var(--bh-paper); border-color: var(--bh-border); }
[data-theme="dark"] .bh-pane-text { color: var(--bh-text); }
[data-theme="dark"] .bh-segmented { background: var(--bh-paper-2); border-color: var(--bh-border); }
[data-theme="dark"] .bh-segmented-btn { color: var(--bh-text-muted); }
[data-theme="dark"] .bh-segmented-btn.is-active { background: var(--bh-paper); color: var(--bh-text); }
[data-theme="dark"] .bh-drop { background: var(--bh-paper); border-color: var(--bh-border); }
[data-theme="dark"] .bh-drop-icon { background: var(--bh-paper-2); color: var(--bh-text); }
[data-theme="dark"] .bh-icon-btn { background: var(--bh-paper); border-color: var(--bh-border); color: var(--bh-text); }
[data-theme="dark"] .bh-icon-btn:hover { background: var(--bh-red); color: #fff; border-color: var(--bh-red); }

/* Section titles in dark mode */
[data-theme="dark"] .section-title,
[data-theme="dark"] .section-title-bh { color: var(--bh-text) !important; }

/* Level pill active state in dark mode */
[data-theme="dark"] .level-pill { background: var(--bh-paper) !important; color: var(--bh-text-muted) !important; border-color: var(--bh-border) !important; }
[data-theme="dark"] .level-pill.active,
[data-theme="dark"] .level-pill[aria-pressed="true"] { background: var(--bh-red) !important; color: #fff !important; border-color: var(--bh-red) !important; }

/* Filter chips (exam picker series tabs) in dark mode */
[data-theme="dark"] .filter-chip { background: var(--bh-paper) !important; color: var(--bh-text-muted) !important; border-color: var(--bh-border) !important; }
[data-theme="dark"] .filter-chip.active { background: var(--bh-red) !important; color: #fff !important; border-color: var(--bh-red) !important; }

/* Exam tags */
[data-theme="dark"] .exam-tag { background: var(--bh-paper-2) !important; color: var(--bh-text-muted) !important; border-color: var(--bh-border) !important; }
[data-theme="dark"] .exam-card-abbr { color: var(--bh-red) !important; }

/* Tea hero / exam-detail-header / exam-plan-card / onboarding stay navy:
   they already use a deep navy + ribbon, which works in dark mode too.
   Just make sure their text stays cream regardless. */
[data-theme="dark"] .tea-hero,
[data-theme="dark"] .exam-detail-header,
[data-theme="dark"] .exam-plan-card,
[data-theme="dark"] .exam-plan-card.empty,
[data-theme="dark"] .exam-hero-card { background: #0a1f3d !important; }
[data-theme="dark"] .tea-hero *, [data-theme="dark"] .exam-detail-header *, [data-theme="dark"] .exam-plan-card *, [data-theme="dark"] .exam-hero-card * { color: #f6f1e7 !important; }

/* Voice / AI chat bubbles */
[data-theme="dark"] .vc-ai-msg,
[data-theme="dark"] .chat-bubble.ai,
[data-theme="dark"] .vc-msg.ai { background: var(--bh-paper) !important; color: var(--bh-text) !important; border-color: var(--bh-border) !important; }
[data-theme="dark"] .vc-user-msg,
[data-theme="dark"] .chat-bubble.user,
[data-theme="dark"] .vc-msg.user { background: #0a1f3d !important; color: #f6f1e7 !important; }

/* ── Dark mode contrast fixes ────────────────────────────────────────────
   In dark mode, --bh-cream is overridden to a dark slate (it's the body
   surface). But many headings/buttons used color:var(--bh-cream) as
   *text on a navy panel* — those now read as dark-on-dark and disappear.
   Pin them to a literal cream so they always pop on navy regardless of
   theme. Same story for headings that were color:var(--bh-navy) on cream
   cards: in dark mode those cards are dark navy, so navy text vanishes.
*/

/* Text that sits on top of a navy panel must stay cream */
[data-theme="dark"] .page-header h1,
[data-theme="dark"] .bh-header h1,
[data-theme="dark"] .bh-header h2,
[data-theme="dark"] .bh-header .bh-title,
[data-theme="dark"] .bh-mic-btn,
[data-theme="dark"] .bh-back-btn,
[data-theme="dark"] .tea-hero-title,
[data-theme="dark"] .tea-hero-sub,
[data-theme="dark"] .exam-detail-header h2,
[data-theme="dark"] .exam-hero-title,
[data-theme="dark"] .exam-hero-sub,
[data-theme="dark"] .exam-hero-label,
[data-theme="dark"] .exam-plan-empty-title,
[data-theme="dark"] .exam-plan-empty-sub,
[data-theme="dark"] .exam-plan-active-title,
[data-theme="dark"] .karaoke-song-icon,
[data-theme="dark"] .bh-tag,
[data-theme="dark"] .bh-tag-pro,
[data-theme="dark"] .bh-tag-gold,
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .btn-danger,
[data-theme="dark"] .btn-success,
[data-theme="dark"] .bh-btn-primary,
[data-theme="dark"] .exam-plan-cta,
[data-theme="dark"] .onb-cta,
[data-theme="dark"] .exam-tag.level,
[data-theme="dark"] .filter-chip.active,
[data-theme="dark"] .level-pill.active,
[data-theme="dark"] .nav-item.active,
[data-theme="dark"] .exam-hero-cta {
  color: #f6f1e7 !important;
}
[data-theme="dark"] .home-settings-btn,
[data-theme="dark"] .home-settings-btn svg { color: #f6f1e7 !important; stroke: #f6f1e7 !important; }

/* Heading text that was navy-on-cream — flip to light when card is dark */
[data-theme="dark"] .settings-label,
[data-theme="dark"] .module-card[style*="flex-direction:row"] > div:nth-child(2) > div:first-child,
[data-theme="dark"] .row-label,
[data-theme="dark"] .bh-row-label,
[data-theme="dark"] .module-name,
[data-theme="dark"] .compact-mod-label,
[data-theme="dark"] .placement-cta-title,
[data-theme="dark"] .tea-story-title,
[data-theme="dark"] .tea-suggested-name,
[data-theme="dark"] .tea-gallery-name,
[data-theme="dark"] .tea-game-title,
[data-theme="dark"] .tea-vocab-en,
[data-theme="dark"] .tea-idiom-en,
[data-theme="dark"] .tea-world-country,
[data-theme="dark"] .karaoke-song-title,
[data-theme="dark"] .karaoke-title-lg,
[data-theme="dark"] .exam-card-name,
[data-theme="dark"] .paper-row .paper-name,
[data-theme="dark"] .discover-title,
[data-theme="dark"] .theory-summary-text strong,
[data-theme="dark"] .theory-heading,
[data-theme="dark"] .pro-banner h3,
[data-theme="dark"] .modal-title,
[data-theme="dark"] .section-title,
[data-theme="dark"] .section-title-bh,
[data-theme="dark"] .settings-section-title,
[data-theme="dark"] .detail-hero-title,
[data-theme="dark"] .auth-logo p {
  color: #f1f5f9 !important;
}

/* Muted body text */
[data-theme="dark"] .placement-cta-sub,
[data-theme="dark"] .settings-desc,
[data-theme="dark"] .compact-mod-sub,
[data-theme="dark"] .module-card[style*="flex-direction:row"] > div:nth-child(2) > div:nth-child(2),
[data-theme="dark"] .tea-story-body,
[data-theme="dark"] .tea-suggested-meta,
[data-theme="dark"] .tea-game-sub,
[data-theme="dark"] .karaoke-song-artist,
[data-theme="dark"] .karaoke-artist-sm,
[data-theme="dark"] .exam-card-desc,
[data-theme="dark"] .exam-card-meta,
[data-theme="dark"] .paper-row .paper-meta,
[data-theme="dark"] .pass-note,
[data-theme="dark"] .theory-summary-text small,
[data-theme="dark"] .theory-intro,
[data-theme="dark"] .theory-body,
[data-theme="dark"] .pro-banner p,
[data-theme="dark"] .tea-vocab-it,
[data-theme="dark"] .tea-idiom-it,
[data-theme="dark"] .tea-fact-text,
[data-theme="dark"] .tea-world-style,
[data-theme="dark"] .tea-world-ceremony { color: #cbd5e1 !important; }

/* Section title leading bar stays red — already correct, but make sure
   the chevron / arrow accents remain visible */
[data-theme="dark"] .row-chev,
[data-theme="dark"] .bh-row-chev,
[data-theme="dark"] .tea-suggested-arrow,
[data-theme="dark"] .discover-arrow { color: var(--bh-red) !important; }

/* SVG glyphs inside any navy icon box must stay literal cream in dark mode */
[data-theme="dark"] .bh-icon,
[data-theme="dark"] .exam-card-icon,
[data-theme="dark"] .tea-hero-icon,
[data-theme="dark"] .tea-suggested-icon,
[data-theme="dark"] .tea-gallery-icon,
[data-theme="dark"] .tea-game-icon,
[data-theme="dark"] .karaoke-song-cover,
[data-theme="dark"] .karaoke-cover-sm,
[data-theme="dark"] .karaoke-song-icon,
[data-theme="dark"] .exam-plan-empty-icon,
[data-theme="dark"] .placement-cta-icon,
[data-theme="dark"] .daily-task-icon,
[data-theme="dark"] .badge-item-icon,
[data-theme="dark"] .ach-icon,
[data-theme="dark"] .compact-mod-icon,
[data-theme="dark"] .mod-icon,
[data-theme="dark"] .theory-summary-icon,
[data-theme="dark"] .theory-heading-mark,
[data-theme="dark"] .grammar-topic-icon,
[data-theme="dark"] .book-cover-icon,
[data-theme="dark"] .movie-scene-icon,
[data-theme="dark"] .pron-group-icon,
[data-theme="dark"] .content-card-icon,
[data-theme="dark"] .bh-icon svg,
[data-theme="dark"] .exam-card-icon svg,
[data-theme="dark"] .tea-hero-icon svg,
[data-theme="dark"] .tea-suggested-icon svg,
[data-theme="dark"] .tea-gallery-icon svg,
[data-theme="dark"] .tea-game-icon svg,
[data-theme="dark"] .karaoke-song-cover svg,
[data-theme="dark"] .karaoke-cover-sm svg,
[data-theme="dark"] .karaoke-song-icon svg,
[data-theme="dark"] .exam-plan-empty-icon svg,
[data-theme="dark"] .placement-cta-icon svg {
  color: #f6f1e7 !important;
  fill: #f6f1e7 !important;
}
[data-theme="dark"] .bh-icon svg path,
[data-theme="dark"] .exam-card-icon svg path,
[data-theme="dark"] .tea-hero-icon svg path,
[data-theme="dark"] .tea-suggested-icon svg path,
[data-theme="dark"] .tea-gallery-icon svg path,
[data-theme="dark"] .tea-game-icon svg path,
[data-theme="dark"] .karaoke-song-icon svg path,
[data-theme="dark"] .exam-plan-empty-icon svg path,
[data-theme="dark"] .placement-cta-icon svg path { fill: #f6f1e7 !important; }

/* ── Speaking Coach ─────────────────────────────────────────────────────── */
.sc-intro-card { padding: 22px 22px 24px; border-left: 4px solid var(--bh-red); }
.sc-intro-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.sc-progress { margin-bottom: 14px; }
.sc-progress-bar {
  height: 4px;
  background: var(--bh-paper-2);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 6px;
}
.sc-progress-fill {
  height: 100%;
  background: var(--bh-red);
  transition: width .35s ease;
}

.sc-prompt-card {
  background: var(--bh-navy);
  color: var(--bh-cream);
  border-radius: var(--bh-radius);
  padding: 18px 20px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.sc-prompt-card::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--bh-red);
}
.sc-prompt-card .bh-eyebrow { margin-bottom: 4px; }
.sc-prompt-text {
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--bh-cream);
  margin: 0;
}

.sc-live-pane {
  background: var(--bh-paper);
  border: 1px solid var(--bh-border);
  border-left: 4px solid var(--bh-red);
  border-radius: var(--bh-radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  min-height: 80px;
}

.sc-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 14px 0 8px;
}
.sc-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sc-timer-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  padding: 4px 10px;
  background: var(--bh-paper-2);
  border: 1px solid var(--bh-border);
  border-radius: var(--bh-radius-sm);
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: .04em;
  color: var(--bh-navy);
}

/* Report ───────────────────────────────────────────────── */
.sc-report-band {
  background: var(--bh-navy);
  color: var(--bh-cream);
  border-radius: var(--bh-radius-lg);
  padding: 24px 22px 22px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
}
.sc-report-band::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0; height: 4px;
  background: repeating-linear-gradient(90deg,
    var(--bh-red) 0 12px,
    var(--bh-navy) 12px 14px,
    var(--bh-cream) 14px 26px,
    var(--bh-navy) 26px 28px);
}
.sc-band-score {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 4.2rem;
  line-height: 1;
  color: var(--bh-cream);
  margin: 6px 0 4px;
}
.sc-band-grade {
  display: inline-block;
  background: var(--bh-red);
  color: var(--bh-cream);
  font-weight: 800;
  letter-spacing: .12em;
  font-size: .7rem;
  padding: 4px 10px;
  border-radius: var(--bh-radius-sm);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.sc-band-explain {
  color: rgba(246,241,231,.82);
  font-size: .9rem;
  line-height: 1.5;
  margin: 0 auto;
  max-width: 90%;
}

.sc-criteria-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 8px;
}
.sc-criterion {
  background: var(--bh-paper);
  border: 1px solid var(--bh-border);
  border-radius: var(--bh-radius);
  padding: 12px 14px;
}
.sc-criterion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.sc-criterion-label {
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--bh-text-muted);
}
.sc-criterion-score {
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: 400;
  color: var(--bh-red);
  font-size: 1.1rem;
}
.sc-criterion-fb { color: var(--bh-text); font-size: .88rem; line-height: 1.5; margin: 0; }

.sc-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
}
.sc-list li {
  padding: 10px 14px 10px 36px;
  background: var(--bh-paper);
  border: 1px solid var(--bh-border);
  border-radius: var(--bh-radius);
  margin-bottom: 6px;
  font-size: .9rem;
  line-height: 1.5;
  color: var(--bh-text);
  position: relative;
}
.sc-list li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 14px;
  width: 12px; height: 12px;
  border-radius: 50%;
}
.sc-list-positive li { border-left: 3px solid var(--bh-success); }
.sc-list-positive li::before { background: var(--bh-success); }
.sc-list-improve li { border-left: 3px solid var(--bh-red); }
.sc-list-improve li::before { background: var(--bh-red); }

/* Dark mode adjustments */
[data-theme="dark"] .sc-criterion,
[data-theme="dark"] .sc-list li,
[data-theme="dark"] .sc-live-pane { background: var(--bh-paper) !important; border-color: var(--bh-border) !important; }
[data-theme="dark"] .sc-timer-tag { background: var(--bh-paper) !important; border-color: var(--bh-border) !important; color: var(--bh-text) !important; }
[data-theme="dark"] .sc-criterion-fb,
[data-theme="dark"] .sc-list li { color: var(--bh-text) !important; }
[data-theme="dark"] .sc-band-score,
[data-theme="dark"] .sc-band-grade,
[data-theme="dark"] .sc-band-explain { color: #f6f1e7 !important; }

/* Mic in disabled state (during examiner TTS) */
.bh-mic-btn.is-disabled {
  background: var(--bh-paper-2) !important;
  color: var(--bh-text-muted) !important;
  box-shadow: none !important;
  cursor: not-allowed;
  animation: none !important;
}
.bh-mic-btn.is-disabled svg { opacity: 0.5; }
[data-theme="dark"] .bh-mic-btn.is-disabled { background: var(--bh-paper) !important; color: var(--bh-text-muted) !important; }

/* ── Tier Comparison Paywall ──────────────────────────────────────────── */
.tier-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.tier-card {
  background: var(--bh-paper);
  border: 1px solid var(--bh-border);
  border-radius: var(--bh-radius-lg);
  padding: 20px 22px 22px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.tier-card::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--bh-border);
}
.tier-card--ghost::after { background: var(--bh-border); }
.tier-card--navy::after  { background: var(--bh-navy); }
.tier-card--red::after,
.tier-card--gold::after {
  background: repeating-linear-gradient(90deg,
    var(--bh-red) 0 12px,
    var(--bh-navy) 12px 14px,
    var(--bh-cream) 14px 26px,
    var(--bh-navy) 26px 28px);
}
.tier-card--red  { border: 2px solid var(--bh-red); box-shadow: 0 6px 20px rgba(200,16,46,.12); }
.tier-card--gold { border: 2px solid var(--bh-gold); }
.tier-card.is-current {
  background: var(--bh-paper-2);
}

.tier-badge {
  position: absolute;
  top: 14px; right: 14px;
  background: var(--bh-red);
  color: var(--bh-cream);
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: var(--bh-radius-sm);
}
.tier-current-pin {
  display: inline-block;
  background: var(--bh-navy);
  color: var(--bh-cream);
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: var(--bh-radius-sm);
  margin-bottom: 8px;
}

.tier-card-head { margin-bottom: 14px; }
.tier-name {
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bh-red);
  margin-bottom: 4px;
}
.tier-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}
.tier-price-amount {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--bh-navy);
}
.tier-price-suffix {
  font-size: 0.85rem;
  color: var(--bh-text-muted);
  font-weight: 600;
}
.tier-tagline {
  color: var(--bh-text-muted);
  font-size: 0.85rem;
  margin-top: 2px;
}

.tier-features {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tier-feature {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--bh-text);
}
.tier-feature-mark {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--bh-success);
}
.tier-feature.is-locked { color: var(--bh-text-muted); text-decoration: line-through; }
.tier-feature.is-locked .tier-feature-mark { color: var(--bh-text-muted); }
.tier-feature.is-strong { font-weight: 700; }
.tier-feature.is-premium .tier-feature-mark { color: var(--bh-red); }

.tier-cta {
  width: 100%;
  min-height: 46px;
}
.tier-cta-note {
  text-align: center;
  font-size: 0.7rem;
  color: var(--bh-text-muted);
  margin-top: 6px;
  font-style: italic;
}

/* Dark mode tier cards */
[data-theme="dark"] .tier-card { background: var(--bh-paper) !important; border-color: var(--bh-border) !important; }
[data-theme="dark"] .tier-card.is-current { background: var(--bh-paper-2) !important; }
[data-theme="dark"] .tier-price-amount { color: var(--bh-text) !important; }
[data-theme="dark"] .tier-feature { color: var(--bh-text) !important; }
[data-theme="dark"] .tier-feature.is-locked { color: var(--bh-text-muted) !important; }

/* 2-col on wider screens */
@media (min-width: 760px) {
  .tier-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Tier toggle: Monthly | Yearly ─────────────────────────────────────── */
.tier-toggle {
  display: inline-flex;
  background: var(--bh-paper-2);
  border: 1px solid var(--bh-border);
  border-radius: 999px;
  padding: 4px;
  margin: 0 auto 18px;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}
.tier-toggle-btn {
  background: transparent;
  border: none;
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--bh-text-muted);
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, color 0.2s;
}
.tier-toggle-btn.is-active {
  background: var(--bh-navy);
  color: var(--bh-cream);
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.tier-toggle-pill {
  background: var(--bh-red);
  color: var(--bh-cream);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 4px;
}
.tier-toggle-btn:not(.is-active) .tier-toggle-pill {
  background: var(--bh-success);
  color: #fff;
}

.tier-price-total {
  font-size: 0.78rem;
  color: var(--bh-success);
  font-weight: 700;
  margin-top: 2px;
}

@keyframes bh-spin { to { transform: rotate(360deg); } }

/* ── Tier toast (Stripe checkout return + portal errors) ───────────────── */
.tier-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(20px);
  background: var(--bh-navy);
  color: var(--bh-cream);
  font-family: "Manrope", sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 14px 22px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 9999;
  max-width: calc(100vw - 40px);
  text-align: center;
  pointer-events: none;
}
.tier-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.tier-toast--success { background: var(--bh-success); color: #fff; }
.tier-toast--error   { background: var(--bh-red);     color: #fff; }

/* ─── London strip ────────────────────────────────────────────────────────
 * Compact horizontal bar shown right below the home header. Mirrors the
 * navy header colour so it reads as an extension of it rather than its
 * own block. Single tap target (full-width button) — opens a detail
 * screen later. Auto-resets gold/red palette inherited from .btn. */
.london-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 9px 18px;
  background: var(--bh-navy);
  color: var(--bh-cream);
  border: none;
  border-bottom: 1px solid rgba(246,241,231,0.12);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.82rem;
  cursor: pointer;
  text-align: left;
}
.london-strip:active { background: #122c52; }
.london-strip-left {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.london-strip-label {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(246,241,231,0.65);
}
.london-strip-time {
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: 400;
  font-size: 1.05rem;
  color: var(--bh-cream);
  letter-spacing: 0.01em;
}
.london-strip-weather {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(246,241,231,0.85);
  font-size: 0.82rem;
  white-space: nowrap;
}
.london-strip-weather svg { opacity: 0.85; flex-shrink: 0; }

/* ─── British Recipe — home card + detail screen ────────────────────────
 * Home card: full-width button with a coloured photo block (placeholder
 * gradient until we ship real images) + label/title/meta. Detail screen
 * reuses the same gradient as a hero, then lists ingredients, method
 * (imperative drill) and the en→it cooking glossary.
 */
.recipe-home-btn {
  display: block;
  width: 100%;
  margin-bottom: 16px;
  padding: 0;
  background: white;
  border: 1px solid var(--bh-border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.recipe-home-btn:active { transform: translateY(1px); }
.recipe-home-btn:hover {
  box-shadow: 0 6px 18px rgba(10, 35, 70, 0.08);
}
/* Home card photo block: 130px slot occupied by the British Kitchen
   SVG banner (wide composition designed to look right at this aspect
   ratio). The gradient stays as fallback should the SVG fail to load. */
.recipe-home-photo {
  width: 100%;
  height: 130px;
  position: relative;
}
/* (Previous overlay removed — the British Kitchen SVG banner has its
   own colour-balanced composition and doesn't need a darkening
   gradient on top.) */
.recipe-home-info { padding: 12px 14px 14px; }
.recipe-home-eyebrow {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bh-red);
  margin-bottom: 4px;
}
.recipe-home-title {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.2rem;
  color: var(--bh-navy);
  margin-bottom: 6px;
  line-height: 1.15;
}
.recipe-home-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--bh-text-muted);
}
.recipe-home-sep { opacity: 0.5; }

/* Detail screen: hero photo runs edge to edge under the page header,
   tall enough that the whole dish is visible. background-position
   anchors the crop near the top so a portrait food shot (typical on
   Wikipedia: plate centred, shadow underneath) doesn't slice the
   dish in half on this wide container. */
.recipe-hero {
  /* Aspect-ratio + max-height keeps the dish photo readable on any
     viewport: it grows with screen width but never takes more than
     ~half the viewport vertically. Background-position raised so the
     plate (which tends to sit at the centre of Wikipedia food shots)
     stays in frame even on tall containers. */
  width: calc(100% + 32px);
  margin: -16px -16px 18px;
  aspect-ratio: 16 / 11;
  max-height: 60vh;
  border-radius: 0;
  position: relative;
  display: flex;
  align-items: flex-end;
  background-size: cover !important;
  background-position: center 35% !important;
}
.recipe-hero-overlay {
  width: 100%;
  padding: 22px 18px 20px;
  background: linear-gradient(to top, rgba(10,35,70,0.85) 0%, rgba(10,35,70,0.4) 50%, transparent 100%);
  color: var(--bh-cream);
}
.recipe-hero-eyebrow {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(246,241,231,0.75);
  margin-bottom: 4px;
}
.recipe-hero-title {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.7rem;
  font-weight: 400;
  margin: 0 0 4px;
  line-height: 1.1;
}
.recipe-hero-meta {
  display: flex;
  gap: 6px;
  font-size: 0.82rem;
  color: rgba(246,241,231,0.85);
}
.recipe-description {
  font-size: 0.95rem;
  color: var(--bh-text);
  line-height: 1.55;
  margin-bottom: 6px;
  padding: 0 2px;
}
.recipe-list {
  background: white;
  border: 1px solid var(--bh-border);
  border-radius: 10px;
  padding: 14px 18px 14px 36px;
  margin-bottom: 4px;
  font-size: 0.92rem;
  line-height: 1.55;
}
.recipe-list li { margin-bottom: 6px; color: var(--bh-text); }
.recipe-method li::marker { color: var(--bh-red); font-weight: 800; }
.recipe-glossary {
  background: white;
  border: 1px solid var(--bh-border);
  border-radius: 10px;
  padding: 8px 16px;
}
.recipe-glossary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--bh-border);
}
.recipe-glossary-row:first-child { border-top: none; }
.recipe-glossary-en {
  font-weight: 700;
  color: var(--bh-navy);
  font-size: 0.92rem;
}
.recipe-glossary-it {
  color: var(--bh-text-muted);
  font-size: 0.88rem;
  font-style: italic;
  text-align: right;
}

/* ─── London detail screen — Time + Weather in English ──────────────────── */

.london-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  background: var(--bh-paper);
  border: 1px solid var(--bh-border);
  border-radius: 10px;
  padding: 4px;
}
.london-tab {
  flex: 1;
  padding: 8px 10px;
  border: none;
  background: transparent;
  color: var(--bh-text-muted);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.london-tab.is-active {
  background: var(--bh-navy);
  color: var(--bh-cream);
}

/* Time tab */
.london-now-card {
  background: var(--bh-navy);
  color: var(--bh-cream);
  border-radius: 12px;
  padding: 22px 18px;
  text-align: center;
  margin-bottom: 16px;
}
.london-now-eyebrow {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(246,241,231,0.65);
  margin-bottom: 8px;
}
.london-now-digital {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 3rem;
  color: var(--bh-cream);
  line-height: 1;
  letter-spacing: 0.02em;
}
.london-now-phrase {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.2rem;
  color: var(--bh-gold);
  margin-top: 10px;
  line-height: 1.3;
}

.london-rules {
  background: white;
  border: 1px solid var(--bh-border);
  border-radius: 10px;
  padding: 14px 20px 14px 32px;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 14px;
}
.london-rules li { margin-bottom: 5px; color: var(--bh-text); }
.london-rules strong { color: var(--bh-navy); }

.london-quiz-card {
  background: white;
  border: 1px solid var(--bh-border);
  border-radius: 12px;
  padding: 18px;
  margin-top: 4px;
}
.london-quiz-progress {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bh-red);
  margin-bottom: 6px;
}
.london-quiz-digital {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 2.4rem;
  color: var(--bh-navy);
  text-align: center;
  margin: 4px 0;
}
.london-quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.london-quiz-option {
  padding: 12px 14px;
  background: var(--bh-paper);
  border: 1.5px solid var(--bh-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  color: var(--bh-text);
  transition: background 0.15s, border-color 0.15s;
}
.london-quiz-option:hover:not(:disabled) {
  border-color: var(--bh-navy);
  background: white;
}
.london-quiz-option.is-correct { background: rgba(22,163,74,0.15); border-color: #16A34A; color: #0d5a2a; }
.london-quiz-option.is-wrong   { background: rgba(200,16,46,0.12); border-color: var(--bh-red); color: var(--bh-red); }
.london-quiz-option:disabled { cursor: default; }
.london-quiz-fb {
  text-align: center;
  padding: 10px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
}
.london-quiz-fb.is-correct { background: rgba(22,163,74,0.12); color: #0d5a2a; }
.london-quiz-fb.is-wrong   { background: rgba(200,16,46,0.10); color: var(--bh-red); }
.london-quiz-result-score {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 3rem;
  color: var(--bh-navy);
  text-align: center;
}
.london-quiz-result-label {
  text-align: center;
  font-size: 1rem;
  color: var(--bh-text-muted);
  margin-top: 4px;
}

/* Weather tab */
.london-forecast {
  background: white;
  border: 1px solid var(--bh-border);
  border-radius: 10px;
  padding: 4px 14px;
  margin-bottom: 16px;
}
.london-forecast-row {
  display: grid;
  grid-template-columns: 70px 32px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--bh-border);
  font-size: 0.9rem;
}
.london-forecast-row:first-child { border-top: none; }
.london-forecast-day { color: var(--bh-navy); font-weight: 700; }
.london-forecast-icon { font-size: 1.4rem; text-align: center; line-height: 1; }
.london-forecast-cond { color: var(--bh-text-muted); }
.london-forecast-temp { white-space: nowrap; font-weight: 600; color: var(--bh-text); }

.london-idioms {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.london-idiom-card {
  background: white;
  border: 1px solid var(--bh-border);
  border-left: 3px solid var(--bh-red);
  border-radius: 8px;
  padding: 12px 14px;
}
.london-idiom-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}
.london-idiom-phrase {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1rem;
  color: var(--bh-navy);
}
.london-idiom-tts {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bh-paper);
  border: 1px solid var(--bh-border);
  color: var(--bh-navy);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.london-idiom-tts:hover {
  background: var(--bh-navy);
  color: var(--bh-cream);
}
.london-idiom-meaning {
  font-size: 0.85rem;
  color: var(--bh-text-muted);
}

/* ─── Mock Speaking Full (4-part Cambridge exam simulator) ─────────────── */
.msf-progress {
  margin-bottom: 12px;
}
.msf-progress-bar {
  background: var(--bh-border);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}
.msf-progress-fill {
  background: linear-gradient(90deg, var(--bh-red), var(--bh-gold));
  height: 100%;
  transition: width .35s ease;
}
.msf-part-title {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.25rem;
  color: var(--bh-navy);
  margin-bottom: 12px;
}
.msf-transition-card {
  background: var(--bh-paper);
  border-left: 4px solid var(--bh-red);
  padding: 18px 18px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.msf-photo-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}
@media (max-width: 560px) {
  .msf-photo-pair { grid-template-columns: 1fr; }
}
.msf-photo-card {
  background: var(--bh-cream);
  border: 1px solid var(--bh-border);
  border-radius: 8px;
  padding: 14px 12px 12px;
  position: relative;
}
.msf-photo-label {
  position: absolute;
  top: -10px;
  left: 12px;
  background: var(--bh-navy);
  color: var(--bh-cream);
  font-family: "DM Serif Display", Georgia, serif;
  font-size: .95rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.msf-photo-card p {
  margin: 0;
  font-size: .88rem;
  line-height: 1.45;
  color: var(--bh-text);
}
.msf-photo-card-img {
  padding: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--bh-navy);
}
.msf-photo-card-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.msf-photo-card-img .msf-photo-label {
  top: 8px;
  left: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 2;
}
.msf-prompt-list {
  margin: 8px 0 0 16px;
  padding: 0;
  color: var(--bh-text);
  font-size: .92rem;
  line-height: 1.5;
}
.msf-prompt-list li {
  margin: 2px 0;
}
/* A2 prompt cards — small image + label, fluid grid */
.msf-prompt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin: 10px 0 0;
}
.msf-prompt-grid .msf-prompt-card {
  margin: 0;
  background: var(--bh-cream);
  border: 1px solid var(--bh-border);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.msf-prompt-grid .msf-prompt-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.msf-prompt-grid .msf-prompt-card figcaption {
  padding: 6px 8px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--bh-navy);
  text-align: center;
  background: var(--bh-paper);
  border-top: 1px solid var(--bh-border);
}
.msf-dialogue {
  margin: 12px 0;
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px;
}
.msf-bubble {
  padding: 8px 12px;
  border-radius: 10px;
  max-width: 85%;
}
.msf-bubble-who {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.msf-bubble-text {
  font-size: .9rem;
  line-height: 1.4;
}
.msf-bubble-user {
  background: var(--bh-navy);
  color: var(--bh-cream);
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}
.msf-bubble-user .msf-bubble-who { color: rgba(246,241,231,.7); }
.msf-bubble-partner {
  background: var(--bh-paper);
  border-left: 3px solid var(--bh-gold);
  color: var(--bh-text);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}
.msf-bubble-partner .msf-bubble-who { color: var(--bh-navy); }
.msf-bubble-examiner {
  background: var(--bh-cream);
  border: 1px dashed var(--bh-red);
  color: var(--bh-navy);
  align-self: center;
  text-align: center;
  font-style: italic;
}
.msf-bubble-examiner .msf-bubble-who { color: var(--bh-red); }
.msf-intro-list {
  margin: 14px 0 0 16px;
  padding: 0;
  color: var(--bh-text);
  font-size: .9rem;
  line-height: 1.7;
}
.msf-intro-list li b {
  color: var(--bh-navy);
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: 400;
}
.msf-level-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 8px;
}
.msf-level-pill {
  background: var(--bh-paper);
  border: 1.5px solid var(--bh-border);
  color: var(--bh-text);
  padding: 6px 12px;
  border-radius: 99px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .03em;
  cursor: pointer;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.msf-level-pill:hover {
  background: var(--bh-cream);
  border-color: var(--bh-navy);
}
.msf-level-pill.is-active {
  background: var(--bh-navy);
  color: var(--bh-cream);
  border-color: var(--bh-navy);
  box-shadow: 0 2px 6px rgba(10, 31, 61, 0.2);
}
.msf-level-pill.is-coming-soon {
  opacity: 0.75;
}
.msf-level-pill.is-coming-soon.is-active {
  background: var(--bh-text-muted, #6b6358);
  border-color: var(--bh-text-muted, #6b6358);
}
.msf-pill-tag {
  background: var(--bh-gold);
  color: var(--bh-navy);
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 6px;
  line-height: 1;
}
.msf-level-pill.is-active .msf-pill-tag {
  background: var(--bh-gold);
  color: var(--bh-navy);
}
.msf-transcript-details {
  background: var(--bh-paper);
  border-radius: 8px;
  padding: 12px 14px;
}
.msf-transcript-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--bh-navy);
}
.msf-transcript-body {
  margin-top: 12px;
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.msf-transcript-turn {
  background: var(--bh-cream);
  border-left: 3px solid var(--bh-navy);
  padding: 10px 12px;
  border-radius: 6px;
  font-size: .85rem;
}
.msf-transcript-meta {
  font-size: .7rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--bh-red);
  margin-bottom: 4px;
}
.msf-transcript-prompt, .msf-transcript-response {
  margin: 3px 0;
  line-height: 1.4;
}

/* ─── Cultural Calendar UK ──────────────────────────────────────────── */
.cc-today-banner,
.cc-next-banner {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  cursor: pointer;
  padding: 18px 18px 16px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-family: inherit;
  transition: transform .12s;
}
.cc-today-banner:active,
.cc-next-banner:active { transform: scale(.99); }
.cc-today-banner {
  background: linear-gradient(135deg, var(--bh-red) 0%, #9a0c24 100%);
  color: var(--bh-cream);
  border-bottom: 4px solid var(--bh-navy);
}
.cc-today-label {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .85;
  margin-bottom: 4px;
}
.cc-today-name {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.55rem;
  line-height: 1.15;
  margin-bottom: 4px;
}
.cc-today-tagline {
  font-size: .88rem;
  opacity: .95;
  margin-bottom: 8px;
}
.cc-today-cta {
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .03em;
}
.cc-next-banner {
  background: var(--bh-navy);
  color: var(--bh-cream);
  border-bottom: 4px solid var(--bh-red);
}
.cc-next-label {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .7;
  margin-bottom: 4px;
}
.cc-next-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.cc-next-name {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.25rem;
  line-height: 1.15;
}
.cc-next-date {
  font-size: .82rem;
  opacity: .85;
  margin-top: 2px;
}
.cc-next-arrow {
  font-size: 1.6rem;
  opacity: .7;
}

.cc-year-label {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.5rem;
  color: var(--bh-navy);
  margin: 12px 0 8px;
  letter-spacing: .02em;
}
.cc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cc-card {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 12px;
  background: var(--bh-paper);
  border: 1px solid var(--bh-border);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: background .15s, border-color .15s;
}
.cc-card:hover {
  background: var(--bh-cream);
  border-color: var(--bh-navy);
}
.cc-card.is-today {
  background: var(--bh-cream);
  border-color: var(--bh-red);
  border-left-width: 4px;
}
.cc-card.is-past {
  opacity: .55;
}
.cc-card-date {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: .85rem;
  color: var(--bh-red);
  text-align: center;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: .02em;
}
.cc-card-body {
  min-width: 0;
}
.cc-card-name {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.02rem;
  color: var(--bh-navy);
  line-height: 1.2;
}
.cc-card-region {
  font-size: .72rem;
  color: var(--bh-text-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-top: 2px;
}
.cc-badge {
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 99px;
  white-space: nowrap;
}
.cc-badge-today {
  background: var(--bh-red);
  color: var(--bh-cream);
}
.cc-badge-soon {
  background: var(--bh-navy);
  color: var(--bh-cream);
}
.cc-badge-past {
  background: var(--bh-border);
  color: var(--bh-text-muted);
}

/* Detail */
.cc-detail-hero {
  background: var(--bh-navy);
  color: var(--bh-cream);
  padding: 22px 20px 24px;
  border-radius: 10px;
  margin-bottom: 18px;
  border-bottom: 4px solid var(--bh-red);
  position: relative;
}
/* Photo variant: hero is now a 4:3-ish image with the navy gradient on top
   for text legibility. Min-height ensures short tagline doesn't pancake
   the image. */
.cc-detail-hero-photo {
  min-height: 240px;
  padding-top: 100px;
  background-color: var(--bh-navy);
}
.cc-detail-region {
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .65;
  margin-bottom: 6px;
}
.cc-detail-name {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.8rem;
  line-height: 1.1;
  margin: 0 0 8px;
}
.cc-detail-date {
  font-size: .88rem;
  font-weight: 600;
  color: var(--bh-gold, #d4a955);
  margin-bottom: 10px;
}
.cc-detail-tagline {
  font-size: .95rem;
  opacity: .9;
  margin: 0;
  line-height: 1.4;
}

.cc-section {
  margin-bottom: 20px;
}
.cc-section-title {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.1rem;
  color: var(--bh-navy);
  margin: 0 0 8px;
  padding-left: 10px;
  border-left: 3px solid var(--bh-red);
}
.cc-section-body {
  font-size: .94rem;
  line-height: 1.55;
  color: var(--bh-text);
  margin: 0;
}
.cc-traditions {
  margin: 0;
  padding-left: 20px;
  font-size: .92rem;
  line-height: 1.55;
  color: var(--bh-text);
}
.cc-traditions li {
  margin-bottom: 6px;
}

.cc-vocab-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cc-vocab-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  background: var(--bh-paper);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: .88rem;
}
.cc-vocab-en {
  font-weight: 700;
  color: var(--bh-navy);
}
.cc-vocab-sep {
  color: var(--bh-red);
  font-weight: 700;
}
.cc-vocab-it {
  color: var(--bh-text);
  text-align: right;
}

.cc-idiom-card {
  background: var(--bh-paper);
  border-left: 4px solid var(--bh-gold, #d4a955);
  padding: 14px 16px;
  border-radius: 6px;
}
.cc-idiom-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 12px;
}
.cc-idiom-card .cc-section-title {
  border: none;
  padding: 0;
  margin: 0;
  flex: 1;
}
.cc-idiom-tts {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bh-navy);
  color: var(--bh-cream);
  border: none;
  border-radius: 99px;
  padding: 4px 10px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .12s;
}
.cc-idiom-tts:hover { background: #122e54; }
.cc-idiom-tts:active { transform: scale(.97); }
.cc-idiom-phrase {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.05rem;
  color: var(--bh-navy);
  margin: 0 0 4px;
  font-style: italic;
}
.cc-idiom-meaning {
  font-size: .88rem;
  color: var(--bh-text-muted);
  margin: 0;
  line-height: 1.45;
}

/* Cultural Calendar — home day-of banner. Sits above the landmark hero,
   only visible on the exact day of a UK festivity. */
.cc-home-banner {
  display: block;
  position: relative;
  width: 100%;
  border-radius: 14px;
  padding: 24px 22px 22px;
  margin: 0 0 14px;
  text-decoration: none;
  border-bottom: 5px solid var(--bh-red);
  overflow: hidden;
  cursor: pointer;
  transition: transform .12s;
  color: var(--bh-cream);
}
.cc-home-banner:hover,
.cc-home-banner:active { transform: scale(.99); }
.cc-home-banner-photo {
  background-size: cover;
  background-position: center;
  min-height: 200px;
}
.cc-home-banner-fallback {
  background: linear-gradient(135deg, var(--bh-navy) 0%, #143057 60%, var(--bh-red) 130%);
}
.cc-home-banner-eyebrow {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .8;
  margin-bottom: 8px;
  color: var(--bh-cream);
}
.cc-home-banner-name {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 2rem;
  line-height: 1.1;
  margin: 0 0 6px;
  color: var(--bh-cream);
}
.cc-home-banner-tagline {
  font-size: .95rem;
  line-height: 1.4;
  opacity: .92;
  margin: 0 0 14px;
  color: var(--bh-cream);
}
.cc-home-banner-cta {
  display: inline-block;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--bh-cream);
}

/* ─── C2 Part 3 — card monologue + extended discussion ─────────────── */
.msf-c2-card {
  background: var(--bh-paper);
  border: 1.5px solid var(--bh-navy);
  border-left: 4px solid var(--bh-red);
  border-radius: 8px;
  padding: 18px 18px 16px;
  margin-bottom: 14px;
}
.msf-c2-card.compact {
  padding: 12px 14px 10px;
}
.msf-c2-card-topic {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--bh-navy);
  margin: 6px 0 10px;
}
.msf-c2-card.compact .msf-c2-card-topic {
  font-size: 1rem;
  margin: 4px 0 6px;
}
.msf-c2-card-instr {
  font-size: .85rem;
  color: var(--bh-text-muted);
  margin: 0 0 8px;
  font-style: italic;
}
.msf-c2-sub-list {
  margin: 0;
  padding-left: 22px;
  color: var(--bh-text);
  font-size: .92rem;
  line-height: 1.5;
}
.msf-c2-sub-list.compact {
  font-size: .82rem;
  line-height: 1.4;
}
.msf-c2-sub-list li {
  margin-bottom: 4px;
}
.msf-c2-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  margin-top: 12px;
}
.msf-c2-card-actions .sc-timer-tag {
  align-self: center;
  font-size: .76rem;
}

/* Listening speed picker — sits below the Play / Listen button on the
   standalone listening screen + inside study sessions. Cambridge exam
   papers (cambridge-exams/renderer.js) bypass this entirely so the
   official exam pace is preserved. */
.listening-rate-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.listening-rate-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--bh-text-muted, var(--text-muted));
  margin-right: 2px;
}
.listening-rate-pill {
  background: var(--bh-paper, var(--surface));
  border: 1.5px solid var(--bh-border, var(--border));
  color: var(--bh-text, var(--text));
  padding: 4px 12px;
  border-radius: 99px;
  font-size: .78rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all .12s;
}
.listening-rate-pill:hover {
  border-color: var(--bh-navy, #0a1f3d);
}
.listening-rate-pill.is-active {
  background: var(--bh-navy, #0a1f3d);
  color: var(--bh-cream, #f6f1e7);
  border-color: var(--bh-navy, #0a1f3d);
}
/* Study session listen-row layout: button + picker side by side on wide,
   stacked on narrow. */
.session-listen-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}
.session-listen-row .session-tts-btn {
  margin-top: 0;
}
.session-listen-row .listening-rate-picker {
  margin-top: 0;
}
