/*
 * Lorenza auth-overlay styles — externalized so the CSP can keep
 * `style-src 'self'` without `'unsafe-inline'`. This used to be a
 * runtime `<style>` injection by `lorenza-api.js#injectStyles()`,
 * which the post-v1.0.1 CSP-tightening pass moved here.
 *
 * Two responsibilities:
 *   1. FOUC guard — hide the intake form before its first paint when
 *      the user has no session token. `lorenza-api.js` toggles
 *      `html.lorenza-locked` synchronously before the parser yields.
 *   2. Auth chrome — login modal, top bar, brief picker, modals list.
 *      Mounted by `lorenza-api.js` at runtime; this stylesheet renders
 *      it whether or not the JS has finished setting up.
 */

/* ---------- FOUC guard ----------
   `lorenza-api.js` adds `html.lorenza-locked` synchronously at the top
   of its IIFE when no session token is present, and removes the class
   in `mountAuthenticatedShell()` once auth is resolved. Keeps every
   body child invisible during the brief window between HTML parsing
   and JS executing — except the login overlay itself. */
html.lorenza-locked body > *:not(#lorenza-login):not(.lorenza-overlay) {
  visibility: hidden !important;
}

/* ---------- Overlay scrim + modals ---------- */
.lorenza-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(15,23,42,0.55); display: flex;
  align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
  font-family: var(--font-body, ui-sans-serif, system-ui);
}
.lorenza-modal {
  background: #fff;
  /* The page sets `color: var(--lop-text-primary, #fff)` on body for the
     dark intake form. Without an explicit override here, every text
     element inside the modal — picker rows, history rows, the login
     subtitle — would inherit white-on-white and be invisible until
     hover (when `:hover` repaints the background). Lock to slate-900. */
  color: #0f172a;
  border-radius: 14px;
  padding: 28px 32px; width: min(420px, 92vw);
  box-shadow: 0 30px 80px rgba(0,0,0,0.25);
}
/* Wide-modal variant — used by the brief picker and revision history. */
.lorenza-modal--wide { width: min(560px, 92vw); }

/* Logomark inside a modal — sits above the title in the login form. */
.lorenza-modal-brand {
  display: flex; justify-content: center;
  margin-bottom: 14px;
}
.lorenza-modal-brand img {
  height: 64px; width: auto;
  display: block;
}
.lorenza-modal h2 { margin: 0 0 6px; font-size: 22px; text-align: center; }
.lorenza-modal p.sub { text-align: center; }
.lorenza-modal p.sub { color: #475569; margin: 0 0 18px; font-size: 14px; }
.lorenza-modal label { display: block; font-size: 13px; color: #334155; margin-top: 14px; }
.lorenza-modal input[type="email"],
.lorenza-modal input[type="password"],
.lorenza-modal input[type="text"],
.lorenza-modal input[type="search"] {
  width: 100%; box-sizing: border-box; padding: 10px 12px;
  border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; margin-top: 4px;
}
.lorenza-modal .btn-row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

.lorenza-btn {
  padding: 9px 16px; border-radius: 8px; border: 1px solid transparent;
  cursor: pointer; font-size: 14px; font-weight: 500;
}
.lorenza-btn.primary { background: #1d4ed8; color: #fff; }
.lorenza-btn.primary:hover { background: #1e40af; }
.lorenza-btn.ghost { background: #fff; color: #334155; border-color: #cbd5e1; }
.lorenza-btn.ghost:hover { background: #f1f5f9; }
.lorenza-error {
  background: #fee2e2; color: #991b1b;
  padding: 9px 12px; border-radius: 8px;
  font-size: 13px; margin-top: 10px;
}

/* ---------- Top bar (mounted post-auth) ---------- */
.lorenza-topbar {
  position: sticky; top: 0; z-index: 500;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 24px;
  background: #0f172a; color: #f1f5f9;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  border-bottom: 1px solid #1e293b;
}
.lorenza-topbar .brand {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; color: inherit;
  font-weight: 600; letter-spacing: 0.02em;
}
.lorenza-topbar .brand img {
  height: 22px; width: auto;
  display: block;
}
.lorenza-topbar .brand:hover { color: #fff; }

/* Three-button language picker (ES / EN / PT) in the topbar. The active
   language gets the teal highlight; the inactive ones are subdued. */
.lorenza-lang-picker {
  display: inline-flex;
  margin-right: 8px;
  border: 1px solid #334155;
  border-radius: 6px;
  overflow: hidden;
}
.lorenza-lang-picker button {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  padding: 4px 8px !important;
  font-size: 11px !important;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: transparent !important;
  color: #94a3b8 !important;
  border: 0 !important;
  border-radius: 0 !important;
  cursor: pointer;
}
.lorenza-lang-picker button + button { border-left: 1px solid #334155 !important; }
.lorenza-lang-picker button:hover { background: #1e293b !important; color: #f1f5f9 !important; }
.lorenza-lang-picker button.active {
  background: #00d4b8 !important; color: #0a1628 !important;
}
.lorenza-lang-picker .lang-flag {
  /* SVG flags hosted in `/static/flags/` (es.svg / us.svg / br.svg).
     Switched from emoji because Windows often renders flag emoji as
     regional-indicator letters. SVGs are 100% reliable across browsers
     + OSes. Sized to match the lang-code ascender height. */
  width: 18px; height: 12px;
  display: inline-block;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.15);
  vertical-align: -2px;
}
.lorenza-lang-picker .lang-code {
  letter-spacing: 0.04em;
  line-height: 1;
}
.lorenza-lang-picker button.active .lang-flag {
  box-shadow: 0 0 0 1px rgba(0,0,0,0.25);
}
.lorenza-topbar .ctx { color: #94a3b8; }
.lorenza-topbar .ctx strong { color: #e2e8f0; font-weight: 600; }
.lorenza-topbar .spacer { flex: 1; }
.lorenza-topbar button {
  padding: 6px 12px; border-radius: 6px; font-size: 13px;
  background: #1e293b; color: #e2e8f0; border: 1px solid #334155; cursor: pointer;
}
.lorenza-topbar button:hover { background: #334155; }
.lorenza-topbar button.primary { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.lorenza-topbar button.primary:hover { background: #1e40af; }
.lorenza-topbar button.danger { background: transparent; color: #fca5a5; border-color: transparent; }

/* ---------- Brief picker / history modal lists ---------- */
.lorenza-list { max-height: 420px; overflow: auto; margin-top: 10px; }
.lorenza-list .row { padding: 10px; border-bottom: 1px solid #e2e8f0; cursor: pointer; }
.lorenza-list .row:hover { background: #f1f5f9; }
.lorenza-list .row .meta { color: #64748b; font-size: 12px; }

/* Result counter — sits between the search input and the list. */
.lorenza-list-meta {
  margin-top: 12px;
  font-size: 11px;
  color: #64748b;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.lorenza-list-empty {
  padding: 20px 10px;
  color: #64748b;
  font-style: italic;
  text-align: center;
}

/* ---------- JS-injected widget styling ---------- */
/* These four classes back inline style="…" attributes that used to live
   inside lorenza-api.js innerHTML strings. Externalized so the CSP can
   keep `style-src 'self'` without `'unsafe-inline'`. */
.lorenza-brief-meta { color: #64748b; }
.lorenza-readiness-pill { color: #1d4ed8; }
.lorenza-btn-restore { margin-top: 6px; }

/* ---------- PPTX templates picker ---------- */
.lorenza-tpl-list .lorenza-tpl-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "head actions" "body actions";
  column-gap: 14px;
  align-items: center;
  cursor: default;
}
.lorenza-tpl-row .lorenza-tpl-head { grid-area: head; }
.lorenza-tpl-row .lorenza-tpl-body { grid-area: body; }
.lorenza-tpl-row .lorenza-tpl-actions {
  grid-area: actions;
  display: flex;
  gap: 6px;
  align-items: center;
}
.lorenza-tpl-row strong { font-size: 14px; }
.lorenza-tpl-row .meta { color: #64748b; font-size: 12px; margin-left: 8px; }
.lorenza-tpl-row .lorenza-tpl-link {
  color: #1d4ed8;
  text-decoration: underline;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  word-break: break-all;
}
.lorenza-tpl-row .lorenza-tpl-meta {
  color: #64748b;
  font-size: 11px;
  margin-left: 10px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.lorenza-tpl-row .lorenza-tpl-empty {
  color: #94a3b8;
  font-size: 12px;
  font-style: italic;
}
.lorenza-tpl-row .lorenza-btn.danger { color: #b91c1c; border-color: #fecaca; }
.lorenza-tpl-row .lorenza-btn.danger:hover { background: #fee2e2; }
/* Hidden file picker — clicked programmatically when the user hits "Open…" */
.lorenza-tpl-file-input { display: none !important; }

/* ---------- Combined PPTX picker (Generate section, card 4) ---------- */
.lorenza-pptx-list .lorenza-pptx-row {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas: "head" "tpl" "actions";
  row-gap: 8px;
  cursor: default;
  padding: 14px 10px;
}
.lorenza-pptx-row + .lorenza-pptx-row {
  border-top: 1px solid #e2e8f0;
}
.lorenza-pptx-row .lorenza-pptx-head {
  grid-area: head;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.lorenza-pptx-row .lorenza-pptx-template { grid-area: tpl; }
.lorenza-pptx-row .lorenza-pptx-actions {
  grid-area: actions;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.lorenza-pptx-row strong { font-size: 14px; }
.lorenza-pptx-row .meta { color: #64748b; font-size: 12px; }
.lorenza-pptx-row .lorenza-pptx-download {
  background: #0b1120;
  color: #fff;
  border-color: #0b1120;
}
.lorenza-pptx-row .lorenza-pptx-download:hover { background: #1e293b; }
.lorenza-pptx-row .lorenza-pptx-download:disabled { opacity: 0.7; cursor: progress; }
.lorenza-pptx-row .lorenza-btn.danger { color: #b91c1c; border-color: #fecaca; }
.lorenza-pptx-row .lorenza-btn.danger:hover { background: #fee2e2; }
.lorenza-pptx-readonly { color: var(--coral, #FF6B61); }
/* No-brief banner — rendered when the picker opens without a saved brief.
   Higher contrast than .sub so the user reads it before scanning rows. */
.lorenza-pptx-blocked {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 10px 0 6px;
  font-size: 13px;
  text-align: left;
}

/* ---------- Deliverables picker ---------- */
.lorenza-dlv-list .lorenza-dlv-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "head actions" "body actions";
  column-gap: 14px;
  align-items: center;
  cursor: default;
}
.lorenza-dlv-row .lorenza-dlv-head { grid-area: head; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lorenza-dlv-row .lorenza-dlv-body { grid-area: body; }
.lorenza-dlv-row .lorenza-dlv-actions { grid-area: actions; display: flex; align-items: center; }
.lorenza-dlv-row strong { font-size: 14px; }
.lorenza-dlv-row .meta { color: #64748b; font-size: 12px; }
.lorenza-dlv-row .lorenza-dlv-fmt {
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.lorenza-dlv-row .lorenza-dlv-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0.04em;
}
.lorenza-dlv-row .lorenza-dlv-badge--templated {
  background: #ecfdf5;
  color: #059669;
}

/* ============ Contextus floating helper ============
   Lives in `lorenza-contextus.js`. The panel is anchored bottom-right
   and follows the user as they edit fields. The dock chip is what the
   user sees when the panel is minimized. */

.lorenza-contextus {
  position: fixed;
  right: 20px; bottom: 20px;
  width: 360px; max-width: calc(100vw - 40px);
  max-height: 60vh;
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid #1e293b;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 13px;
  z-index: 9000;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.lorenza-contextus.ctxs-open { display: flex; }

.ctxs-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #111c33 0%, #0f172a 100%);
  border-bottom: 1px solid #1e293b;
}
.ctxs-brand {
  display: inline-flex; align-items: center; gap: 8px;
  flex: 1;
  font-weight: 700; letter-spacing: 0.02em;
  color: #f1f5f9;
}
.ctxs-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%;
  background: #00d4b8;
  box-shadow: 0 0 8px rgba(0, 212, 184, 0.6);
}
.ctxs-iconbtn {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
  background: transparent;
  color: #94a3b8;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 14px; line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ctxs-iconbtn:hover {
  background: #1e293b; color: #f1f5f9; border-color: #334155;
}

.ctxs-fieldlabel {
  padding: 10px 14px;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em;
  color: #94a3b8;
  border-bottom: 1px solid #1e293b;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.ctxs-body {
  flex: 1;
  padding: 10px;
  overflow: auto;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 80px;
}
.ctxs-loading {
  padding: 20px 0;
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
}
.ctxs-empty {
  padding: 20px 0;
  text-align: center;
  color: #64748b;
  font-size: 12px;
}
.ctxs-item {
  background: #1a2540;
  border: 1px solid #2a3855;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.ctxs-suggestion {
  color: #f1f5f9;
  line-height: 1.5;
  white-space: pre-wrap;
  font-size: 13px;
}
.ctxs-rationale {
  color: #94a3b8;
  font-size: 11px;
  font-style: italic;
  border-top: 1px dashed #2a3855;
  padding-top: 6px;
}
.ctxs-actions {
  display: flex; gap: 6px; justify-content: flex-end;
  padding-top: 4px;
}
.ctxs-applybtn {
  padding: 4px 10px;
  background: transparent;
  color: #cbd5e1;
  border: 1px solid #334155;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ctxs-applybtn:hover { background: #1e293b; border-color: #475569; color: #fff; }
.ctxs-applybtn--primary {
  background: #00d4b8; color: #0a1628;
  border-color: #00d4b8;
  font-weight: 600;
}
.ctxs-applybtn--primary:hover { background: #00a693; border-color: #00a693; color: #0a1628; }

.ctxs-refresh-bar {
  padding: 8px 12px;
  border-top: 1px solid #1e293b;
  display: flex; justify-content: flex-end; gap: 6px;
}
.ctxs-runbtn {
  padding: 4px 10px;
  background: #1e293b;
  color: #cbd5e1;
  border: 1px solid #334155;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
}
.ctxs-runbtn:hover { background: #334155; color: #fff; }
/* The ✨ Enrich variant — visually distinct so the user knows enrichment
   is the higher-effort, higher-quality path. */
.ctxs-runbtn--primary {
  background: #00d4b8; color: #0a1628;
  border-color: #00d4b8;
  font-weight: 600;
}
.ctxs-runbtn--primary:hover { background: #00a693; border-color: #00a693; color: #0a1628; }

/* Dock — collapsed-mode chip. Always present after init; visible only
   while the panel is closed. */
.lorenza-contextus-dock {
  position: fixed;
  right: 20px; bottom: 20px;
  display: none;
  align-items: center; gap: 8px;
  padding: 8px 14px;
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid #1e293b;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  cursor: pointer;
  z-index: 9000;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.lorenza-contextus-dock.ctxs-dock-visible { display: inline-flex; }
.lorenza-contextus-dock:hover {
  background: #1e293b; border-color: #334155; transform: translateY(-1px);
}

/* Settings dialog reuses .lorenza-overlay + .lorenza-modal but wants the
   selects/inputs to span the full width. */
.ctxs-settings-overlay .lorenza-modal select,
.ctxs-settings-overlay .lorenza-modal input[type="password"] {
  width: 100%; box-sizing: border-box;
  margin-top: 4px;
  padding: 9px 12px;
  font-size: 13px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}
.ctxs-settings-overlay .lorenza-modal label.ctxs-toggle {
  display: flex; align-items: center; gap: 8px;
  margin-top: 16px;
  font-size: 13px; color: #334155;
}
.ctxs-settings-overlay .lorenza-modal label.ctxs-toggle input { width: auto; margin: 0; }
.ctxs-settings-overlay .lorenza-modal a {
  color: #1d4ed8; text-decoration: none;
}
.ctxs-settings-overlay .lorenza-modal a:hover { text-decoration: underline; }
.ctxs-settings-overlay .lorenza-modal code {
  background: #f1f5f9; padding: 1px 5px; border-radius: 3px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
}

/* Per-provider links — get-key + buy-credits side-by-side, one row per
   provider. Surfaces both 'configure' and 'top up' paths so the user can
   resolve a provider error (rate limit, exhausted credit) without leaving
   Lorenza. */
.ctxs-provider-links {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 14px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
}
.ctxs-provider-row {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
}
.ctxs-provider-name {
  flex: 0 0 110px;
  font-weight: 600;
  color: #334155;
}
.ctxs-provider-row a {
  flex: 0 0 auto;
  color: #1d4ed8;
}

/* "Probar conexión" result block — sits above the button row in the
   settings dialog. Three visual states: pending (neutral), ok (green),
   fail (red). `white-space: pre-wrap` so the verbose provider error
   ("Incorrect API key provided: sk-XXXX-…") wraps instead of clipping. */
.ctxs-test-result {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid transparent;
}
.ctxs-test-pending {
  background: #f1f5f9; color: #475569; border-color: #cbd5e1;
}
.ctxs-test-ok {
  background: #dcfce7; color: #166534; border-color: #86efac;
}
.ctxs-test-fail {
  background: #fee2e2; color: #991b1b; border-color: #fca5a5;
}

/* ---------- Multi-key settings rows ---------- */
.ctxs-settings-modal { max-width: 640px; width: min(640px, 92vw); }
.ctxs-key-row {
  margin-top: 14px; padding: 12px;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px;
}
.ctxs-key-row-head {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 12px;
}
.ctxs-key-provider {
  font-weight: 700; color: #0f172a; font-size: 13px;
}
.ctxs-key-cheapest {
  color: #64748b; font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ctxs-free-badge {
  display: inline-block; padding: 1px 6px;
  background: #dcfce7; color: #166534;
  border: 1px solid #86efac; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
}
.ctxs-key-row input[type="password"] { flex: 1; margin-top: 0; }
.ctxs-key-row-input {
  display: flex; gap: 8px; align-items: stretch;
}
.ctxs-test-row {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 12px;
  padding: 0 12px;
}

/* ---------- Active-model selector on the floating panel ---------- */
.ctxs-active-selector {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: #0a1428; border-bottom: 1px solid #1e293b;
}
.ctxs-active-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em;
  color: #94a3b8; flex: 0 0 auto;
}
.ctxs-active-select {
  flex: 1; min-width: 0;
  background: #1a2540; color: #e2e8f0;
  border: 1px solid #2a3855; border-radius: 6px;
  padding: 4px 8px; font-size: 12px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
}
.ctxs-active-select:hover { border-color: #00d4b8; }
.ctxs-active-empty {
  font-size: 11px; color: #94a3b8; font-style: italic;
}

/* Inline warning text under a settings toggle (e.g. "suggest while
   minimized" — cost caveat). Wraps under the checkbox label in a soft
   amber tone so the user notices but the dialog doesn't get loud. */
.ctxs-toggle-warn {
  display: block;
  margin-top: 4px;
  margin-left: 24px;
  padding: 6px 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  color: #92400e;
  font-size: 11px;
  line-height: 1.5;
}
.ctxs-toggle-warn code {
  background: #fef3c7;
  padding: 0 4px;
  border-radius: 3px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* ---------- Section §13 inline-style replacements ---------- */
/* These four classes replace inline `style="..."` attributes in
   lorenza.html — necessary because dropping `'unsafe-inline'` from
   the CSP `style-src` directive forbids inline styles. */
.readiness-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-faint);
  margin-top: 8px;
}
.recompute-btn { margin-top: 16px; }
.preview-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.preview-hidden { display: none; margin-top: 16px; }
