/* ============================================================
   MEF · Interactive exhibit styles
   The embeddable "exhibit" widgets that drop into articles or
   stand alone in the CMS. ExhibitFrame is the branded shell;
   the rest are content modules that live inside it.
   ============================================================ */

/* ---- Exhibit frame (branded embed shell) ------------------- */
.mef-exhibit {
  font-family: var(--font-sans); background: var(--surface-card);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-card); overflow: hidden;
  max-width: var(--exhibit-width); width: 100%; color: var(--text-body);
}
.mef-exhibit--wide { max-width: 960px; }
.mef-exhibit--full { max-width: 100%; }
.mef-exhibit__bar { height: 4px; background: var(--mef-navy-800); }
.mef-exhibit__head { padding: 18px 24px 15px; border-bottom: 1px solid var(--rule); }
.mef-exhibit__eyebrow {
  display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--kicker); margin-bottom: 9px;
}
.mef-exhibit__eyebrow::before { content: ""; width: 14px; height: 2px; background: var(--mef-navy-800); }
.mef-exhibit__title {
  font-family: var(--font-serif); font-size: 21px; font-weight: 700; line-height: 1.2;
  color: var(--text-strong); margin: 0; letter-spacing: var(--tracking-tight);
}
.mef-exhibit__standfirst { font-size: 14.5px; line-height: 1.5; color: var(--text-muted); margin: 9px 0 0; }
.mef-exhibit__body { padding: 22px 24px; }
.mef-exhibit__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 24px; border-top: 1px solid var(--rule); background: var(--color-bg-alt);
  font-size: 11.5px; color: var(--text-muted);
}
.mef-exhibit__source { min-width: 0; }
.mef-exhibit__brand { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; color: var(--mef-navy-800); letter-spacing: 0.02em; white-space: nowrap; }
.mef-exhibit__brand img { height: 15px; width: auto; display: block; }

/* ---- Stat callout ------------------------------------------ */
.mef-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 22px 18px; }
.mef-stat { display: flex; flex-direction: column; gap: 4px; }
.mef-stat__value { font-family: var(--font-serif); font-size: 42px; line-height: 1; font-weight: 700; color: var(--mef-navy-800); letter-spacing: -0.02em; }
.mef-stat__value .mef-stat__unit { font-size: 21px; font-weight: 600; color: var(--text-muted); margin-left: 2px; }
.mef-stat__label { font-size: 13px; font-weight: 700; color: var(--text-strong); }
.mef-stat__sub { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.mef-stat--accent .mef-stat__value { color: var(--mef-crimson-600); }

/* ---- Timeline ---------------------------------------------- */
.mef-timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.mef-timeline::before { content: ""; position: absolute; left: 7px; top: 5px; bottom: 5px; width: 2px; background: var(--border-strong); }
.mef-tl-item { position: relative; padding: 0 0 22px 30px; }
.mef-tl-item:last-child { padding-bottom: 0; }
.mef-tl-item::before { content: ""; position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface-card); border: 3px solid var(--mef-navy-800); box-sizing: border-box; }
.mef-tl-item--navy::before { border-color: var(--mef-navy-500); }
.mef-tl-item__date { font-family: var(--font-sans); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--kicker); }
.mef-tl-item--navy .mef-tl-item__date { color: var(--mef-navy-500); }
.mef-tl-item__title { font-family: var(--font-serif); font-size: 16px; font-weight: 700; color: var(--text-strong); margin: 2px 0 4px; line-height: 1.25; }
.mef-tl-item__desc { font-size: 13.5px; line-height: 1.5; color: var(--text-muted); margin: 0; }

/* ---- Bar chart --------------------------------------------- */
.mef-bars { display: flex; flex-direction: column; gap: 15px; }
.mef-bar__top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.mef-bar__label { font-size: 13px; font-weight: 600; color: var(--text-strong); }
.mef-bar__value { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-muted); font-weight: 600; }
.mef-bar__track { height: 12px; background: var(--mef-slate-100); border-radius: var(--radius-pill); overflow: hidden; }
.mef-bar__fill { height: 100%; border-radius: var(--radius-pill); background: var(--data-1); width: 0; transition: width 700ms var(--ease-out); }

/* ---- Dossier card ------------------------------------------ */
.mef-dossier { display: flex; gap: 18px; align-items: flex-start; }
.mef-dossier__photo { width: 96px; height: 96px; flex: none; border-radius: var(--radius-sm); object-fit: cover; background: var(--mef-slate-100); box-shadow: inset 0 0 0 1px rgba(10,28,54,0.1); }
.mef-dossier__main { min-width: 0; flex: 1; }
.mef-dossier__name { font-family: var(--font-serif); font-size: 20px; font-weight: 700; color: var(--text-strong); margin: 0; line-height: 1.15; }
.mef-dossier__role { font-size: 12px; color: var(--kicker); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin: 5px 0 0; }
.mef-dossier__tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 11px 0 0; }
.mef-dossier__facts { list-style: none; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 7px; }
.mef-dossier__facts li { display: flex; gap: 10px; font-size: 13px; line-height: 1.4; }
.mef-dossier__facts .k { color: var(--text-faint); font-weight: 700; min-width: 96px; flex: none; text-transform: uppercase; letter-spacing: 0.03em; font-size: 11px; padding-top: 1px; }
.mef-dossier__facts .v { color: var(--text-body); }

/* ---- Before / after slider --------------------------------- */
.mef-ba { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius-sm); user-select: none; background: var(--mef-slate-100); touch-action: none; }
.mef-ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; display: block; }
.mef-ba__after { clip-path: inset(0 0 0 var(--ba-pos, 50%)); }
.mef-ba__divider { position: absolute; top: 0; bottom: 0; left: var(--ba-pos, 50%); width: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(10,28,54,0.3); cursor: ew-resize; }
.mef-ba__handle { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 36px; height: 36px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center; color: var(--mef-navy-800); font-size: 14px; }
.mef-ba__tag { position: absolute; top: 10px; padding: 3px 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #fff; background: rgba(15,39,71,0.78); border-radius: var(--radius-xs); }
.mef-ba__tag--before { left: 10px; }
.mef-ba__tag--after { right: 10px; }

/* ---- Quiz / poll ------------------------------------------- */
.mef-poll__q { font-family: var(--font-serif); font-size: 18px; font-weight: 700; color: var(--text-strong); line-height: 1.3; margin: 0 0 14px; }
.mef-poll__opts { display: flex; flex-direction: column; gap: 9px; }
.mef-poll__opt { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; font-family: var(--font-sans); font-size: 14px; font-weight: 600; color: var(--text-strong); background: var(--surface-card); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 11px 14px; cursor: pointer; overflow: hidden; transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease); }
.mef-poll__opt:hover:not(:disabled) { border-color: var(--mef-navy-500); background: var(--mef-slate-50); }
.mef-poll__opt:disabled { cursor: default; }
.mef-poll__fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--mef-slate-100); transition: width 600ms var(--ease-out); z-index: 0; }
.mef-poll__opt--correct { border-color: var(--mef-positive); }
.mef-poll__opt--correct .mef-poll__fill { background: rgba(47,125,79,0.16); }
.mef-poll__opt--wrong { border-color: var(--mef-crimson-500); }
.mef-poll__opt--wrong .mef-poll__fill { background: rgba(178,42,45,0.12); }
.mef-poll__lab { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; }
.mef-poll__pct { position: relative; z-index: 1; font-family: var(--font-mono); font-size: 12.5px; color: var(--text-muted); font-weight: 600; }
.mef-poll__mark { font-size: 13px; font-weight: 700; }
.mef-poll__foot { margin-top: 13px; font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
