/* wizard.css — palantir-light intake wizard.
 *
 * Hybrid: editorial typography from the base theme (Charter serif + Inter
 * sans + JetBrains Mono) with the multi-step wizard flow on top. No emoji,
 * sober shadows, square corners. Same step / progress / 3-state selector /
 * upload primitives as before; just dressed in the project's house style.
 */

/* ── Base ────────────────────────────────────────────────────────────── */
body.wizard {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (prefers-color-scheme: dark) {
  body.wizard { background: var(--ink); color: var(--surface); }
}

/* ── Top bar: brand + progress + upload trigger ──────────────────────── */
.wizard-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-height: var(--touch-min);
}
@media (prefers-color-scheme: dark) {
  .wizard-topbar {
    background: var(--ink);
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }
}
.wizard-brand {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
/* Hide brand on narrow phones — give the progress bar all the width.
 * On >= 480px the brand stays at full size, no scroll-based shrinking. */
@media (max-width: 480px) {
  .wizard-brand { display: none; }
}
.wizard-progress {
  flex: 1;
  display: flex;
  gap: 4px;
  align-items: center;
}
.wizard-progress-segment {
  flex: 1;
  height: 3px;
  background: var(--line);
  transition: background 360ms var(--ease-apple);
}
.wizard-progress-segment.done { background: var(--ink); }
.wizard-progress-segment.active { background: var(--cyan); }

/* Inline upload prompt (lives at top of step 2 — Financieros).
 * Replaces the old top-bar "Subir archivo" button: more contextual,
 * less visual noise, only appears where it makes sense. */
.upload-prompt {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  width: 100%;
  margin: 0 0 var(--space-xl);
  padding: var(--space-md);
  background: var(--bg);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  touch-action: manipulation;
  transition: border-color 180ms var(--ease-apple), background 180ms var(--ease-apple);
}
.upload-prompt:hover {
  border-color: var(--cyan);
  background: var(--surface);
}
.upload-prompt:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
.upload-prompt-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--cyan);
  font-weight: 700;
}
.upload-prompt-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.9rem;
  line-height: 1.4;
}
.upload-prompt-text strong { color: var(--ink); font-weight: 600; }
.upload-prompt-text span { color: var(--muted); font-size: 0.82rem; }
@media (prefers-color-scheme: dark) {
  .upload-prompt {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.18);
  }
  .upload-prompt-icon {
    background: var(--ink);
    border-color: rgba(255, 255, 255, 0.18);
  }
  .upload-prompt-text strong { color: var(--surface); }
}

/* ── Stage / steps ───────────────────────────────────────────────────── */
.wizard-stage {
  position: relative;
  min-height: calc(100vh - 64px);
  padding: var(--space-2xl) var(--space-md) var(--space-3xl);
  overflow-x: hidden;
}

.wizard-step {
  max-width: 660px;
  margin: 0 auto;
  display: none;
}
.wizard-step.active {
  display: block;
  animation: step-in 260ms var(--ease-apple);
  /* Keep transition for any hover/focus effects added later */
  transition: opacity 260ms var(--ease-apple), transform 260ms var(--ease-apple);
}
@keyframes step-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Hero typography (Charter serif, sober) ─────────────────────────── */
.wizard-step .step-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--magenta);
  font-variant: small-caps;
  margin: 0 0 var(--space-sm);
}
.wizard-step h1.step-hero {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 var(--space-md);
  color: var(--ink);
}
@media (prefers-color-scheme: dark) {
  .wizard-step h1.step-hero { color: var(--surface); }
}
.wizard-step p.step-deck {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 0 var(--space-xl);
  max-width: 580px;
}
@media (prefers-color-scheme: dark) {
  .wizard-step p.step-deck { color: rgba(255, 255, 255, 0.7); }
}

/* ── Field group (single-column, no horizontal pairs) ────────────────── */
.field-group { margin: 0 0 var(--space-xl); }

.field-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin: 0 0 var(--space-xs);
}
@media (prefers-color-scheme: dark) {
  .field-label { color: var(--surface); }
}
.field-label .required-mark {
  color: var(--cyan);
  font-weight: 700;
  margin-left: 0.18em;
}
.field-help {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 var(--space-sm);
  max-width: 560px;
}

/* ── Inputs ──────────────────────────────────────────────────────────── */
.field-input,
.field-textarea,
.field-select {
  width: 100%;
  min-height: var(--field-min-h);
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  outline: none;
  touch-action: manipulation;
  transition: border-color 160ms var(--ease-apple),
              box-shadow 160ms var(--ease-apple),
              background 160ms var(--ease-apple);
}
.field-textarea {
  min-height: 110px;
  padding-top: var(--space-sm);
  resize: vertical;
  line-height: 1.5;
}
.field-select { appearance: none; cursor: pointer; }

.field-input::placeholder,
.field-textarea::placeholder {
  color: var(--muted);
  opacity: 0.65;
}

.field-input:hover,
.field-textarea:hover,
.field-select:hover { border-color: var(--ink-soft); }

.field-input:focus,
.field-textarea:focus,
.field-select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.18);
}
@media (prefers-color-scheme: dark) {
  .field-input, .field-textarea, .field-select {
    background: rgba(255, 255, 255, 0.04);
    color: var(--surface);
    border-color: rgba(255, 255, 255, 0.16);
  }
}

.field-input:disabled,
.field-textarea:disabled,
.field-select:disabled {
  background: var(--bg);
  color: var(--ink-soft);
  cursor: not-allowed;
}

/* ── 3-state selector toolbar ────────────────────────────────────────── */
.field-state-toolbar {
  display: flex;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
  flex-wrap: wrap;
}
.field-state-btn {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  cursor: pointer;
  touch-action: manipulation;
  transition: background 160ms var(--ease-apple), border-color 160ms var(--ease-apple), color 160ms var(--ease-apple);
}
.field-state-btn:hover { background: var(--bg); color: var(--ink); }
.field-state-btn.active.estimate {
  background: var(--amber-soft);
  border-color: var(--amber);
  color: var(--ink);
}
.field-state-btn.active.skip {
  background: var(--bg);
  border-color: var(--ink-soft);
  color: var(--ink-soft);
}
.field-state-hint {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: var(--space-xs);
  min-height: 1.2em;
  line-height: 1.45;
}

.field-input.is-estimated,
.field-textarea.is-estimated,
.field-select.is-estimated {
  font-style: italic;
  color: var(--ink-soft);
  background: var(--amber-soft);
  border-color: var(--amber);
}

/* ── Skipped (omitido) state ─────────────────────────────────────────── */
.field-input.is-skipped,
.field-textarea.is-skipped,
.field-select.is-skipped {
  background: var(--bg);
  border-style: dashed;
  border-color: var(--line);
  color: var(--muted);
  font-style: italic;
  /* faint diagonal stripes signal "no entra al cálculo" */
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0,
    transparent 6px,
    rgba(100, 116, 139, 0.06) 6px,
    rgba(100, 116, 139, 0.06) 12px
  );
}
.field-input.is-skipped::placeholder,
.field-textarea.is-skipped::placeholder {
  color: var(--muted);
  opacity: 0.85;
  font-style: italic;
}

/* ── Input affix (currency prefix / percent suffix) ─────────────────── */
.field-affix {
  position: relative;
  display: block;
}
.field-affix.has-prefix .field-input { padding-left: 4.6em; }
.field-affix.has-suffix .field-input { padding-right: 2.6em; }
.affix-prefix,
.affix-suffix {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  pointer-events: none;
  user-select: none;
  text-transform: uppercase;
  font-weight: 600;
}
.affix-prefix { left: var(--space-md); }
.affix-suffix { right: var(--space-md); }
/* When the input is focused, brighten the affix to reinforce focus */
.field-affix .field-input:focus ~ .affix-prefix,
.field-affix .field-input:focus ~ .affix-suffix {
  color: var(--ink);
}
/* Skipped affix dims */
.field-affix.is-skipped .affix-prefix,
.field-affix.is-skipped .affix-suffix {
  opacity: 0.4;
}
@media (prefers-color-scheme: dark) {
  .affix-prefix, .affix-suffix { color: rgba(255, 255, 255, 0.55); }
  .field-affix .field-input:focus ~ .affix-prefix,
  .field-affix .field-input:focus ~ .affix-suffix { color: var(--surface); }
}

.field-input.is-autofilled,
.field-textarea.is-autofilled,
.field-select.is-autofilled {
  background: var(--amber-soft);
  border-color: var(--amber);
  animation: autofill-pulse 480ms var(--ease-apple);
}
@keyframes autofill-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.45); }
  100% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
}

/* ── Chip picker (for radiogroups) ──────────────────────────────────── */
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}
.chip {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-min);
  padding: 0 var(--space-md);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  transition: background 140ms var(--ease-apple), border-color 140ms var(--ease-apple), color 140ms var(--ease-apple);
  text-align: left;
  letter-spacing: 0.005em;
}
.chip:hover { border-color: var(--ink-soft); background: var(--bg); }
.chip.selected {
  background: var(--ink);
  color: var(--surface);
  border-color: var(--ink);
}
@media (prefers-color-scheme: dark) {
  .chip {
    background: rgba(255, 255, 255, 0.04);
    color: var(--surface);
    border-color: rgba(255, 255, 255, 0.18);
  }
  .chip.selected { background: var(--surface); color: var(--ink); border-color: var(--surface); }
}

/* ── 1-5 stepper ─────────────────────────────────────────────────────── */
.stepper {
  display: flex;
  gap: var(--space-xs);
  margin-top: var(--space-xs);
}
.stepper-tile {
  flex: 1;
  min-height: var(--touch-min);
  padding: var(--space-xs) 0;
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  transition: background 140ms var(--ease-apple), border-color 140ms var(--ease-apple), color 140ms var(--ease-apple);
}
.stepper-tile:hover { border-color: var(--ink-soft); background: var(--bg); }
.stepper-tile.selected { background: var(--ink); color: var(--surface); border-color: var(--ink); }
@media (prefers-color-scheme: dark) {
  .stepper-tile {
    background: rgba(255, 255, 255, 0.04);
    color: var(--surface);
    border-color: rgba(255, 255, 255, 0.18);
  }
  .stepper-tile.selected { background: var(--surface); color: var(--ink); border-color: var(--surface); }
}
.stepper-legend {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: var(--space-xs);
}

/* ── Footer nav (solid bar, just the two buttons) ────────────────────
 * Single sticky strip at the bottom with [Atrás] [Siguiente]. NO status
 * row, NO permanent message slot — those live in the toast above. The
 * bar gives buttons a clean horizontal anchor that doesn't overlap form
 * content. When back is disabled (step 1), it stays in place but
 * invisible so Next stays in its expected right-side position. */
.wizard-foot {
  position: sticky;
  bottom: 0;
  z-index: 4;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: var(--space-sm) var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
}
@media (prefers-color-scheme: dark) {
  .wizard-foot { background: var(--ink); border-top-color: rgba(255, 255, 255, 0.08); }
}
.wizard-foot .wizard-btn:disabled {
  opacity: 0;
  visibility: hidden;
}

/* ── Toast (ephemeral status messages) ──────────────────────────────
 * Single slot above the floating nav. setStatus() / showSaved() write
 * the text + variant. Auto-hides via JS timer (1.8s success, 3s error).
 * No persistent strip; appears, communicates, disappears. */
.wizard-toast {
  position: fixed;
  /* sits above the footer bar (touch-min height + space-sm padding × 2) */
  bottom: calc(var(--touch-min) + var(--space-sm) * 2 + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  z-index: 5;
  background: var(--ink);
  color: var(--surface);
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
  opacity: 0;
  transition: opacity 220ms var(--ease-apple), transform 220ms var(--ease-apple);
  pointer-events: none;
  max-width: min(calc(100vw - 2 * var(--space-md)), 480px);
  white-space: normal;
}
.wizard-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.wizard-toast.success { background: var(--green); }
.wizard-toast.error { background: var(--red); }
@media (prefers-color-scheme: dark) {
  .wizard-toast { background: var(--surface); color: var(--ink); }
  .wizard-toast.success { background: var(--green); color: white; }
  .wizard-toast.error { background: var(--red); color: white; }
}
.wizard-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-min);
  padding: 0 var(--space-lg);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius-md);
  border: 1px solid var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  transition: background 160ms var(--ease-apple), color 160ms var(--ease-apple);
}
.wizard-btn-primary { background: var(--ink); color: var(--surface); min-width: 180px; }
.wizard-btn-primary:hover { background: var(--ink-soft); border-color: var(--ink-soft); }
.wizard-btn-primary:disabled {
  background: var(--muted);
  border-color: var(--muted);
  cursor: not-allowed;
  opacity: 0.55;
}
.wizard-btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.wizard-btn-ghost:hover { background: var(--bg); border-color: var(--ink-soft); }
.wizard-btn-ghost:disabled { color: var(--muted); border-color: var(--line); cursor: not-allowed; }
@media (prefers-color-scheme: dark) {
  .wizard-btn-ghost { background: rgba(255, 255, 255, 0.04); color: var(--surface); border-color: rgba(255, 255, 255, 0.16); }
  .wizard-btn-primary { background: var(--surface); color: var(--ink); border-color: var(--surface); }
}

/* (.saved-pill retired — replaced by .wizard-toast above) */

/* ── Drop overlay ────────────────────────────────────────────────────── */
.drop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(247, 245, 240, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  pointer-events: none;
}
.drop-overlay.visible { display: flex; }
.drop-overlay-card {
  background: var(--surface);
  border: 2px dashed var(--cyan);
  border-radius: var(--radius-md);
  padding: var(--space-2xl) var(--space-3xl);
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--ink);
  text-align: center;
  max-width: 480px;
  letter-spacing: -0.01em;
}
@media (prefers-color-scheme: dark) {
  .drop-overlay { background: rgba(10, 14, 26, 0.92); }
  .drop-overlay-card { background: var(--ink-soft); color: var(--surface); border-color: var(--cyan); }
}

/* ── Upload status pills ─────────────────────────────────────────────── */
.upload-list {
  position: fixed;
  top: 72px;
  right: var(--space-md);
  width: 320px;
  max-width: calc(100vw - 2 * var(--space-md));
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  z-index: 50;
  pointer-events: none;
}
.upload-pill {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  pointer-events: auto;
}
.upload-pill.parsing { border-color: var(--cyan); }
.upload-pill.done { border-color: var(--green); }
.upload-pill.error { border-color: var(--red); }
.upload-pill .name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.upload-pill .status {
  font-size: 0.66rem;
  color: var(--muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Recap ───────────────────────────────────────────────────────────── */
.recap {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: 1fr;
}
@media (orientation: landscape) and (min-width: 1024px) {
  .recap { grid-template-columns: 1fr 1fr; }
}
.recap-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}
.recap-card h3 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--space-sm);
  font-weight: 700;
}
.recap-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: baseline;
  gap: var(--space-sm);
  padding: var(--space-xs) 0;
  border-bottom: 1px dashed var(--line);
}
.recap-row:last-child { border-bottom: none; }
.recap-key {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--ink-soft);
  letter-spacing: 0.005em;
}
.recap-val {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  text-align: right;
}
.recap-val.estimated { color: var(--ink-soft); font-style: italic; }
.recap-val.skipped { color: var(--muted); font-style: italic; }
.recap-edit-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--cyan);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  min-height: var(--touch-min);
  min-width: 64px;
  padding: 0 var(--space-sm);
  border-radius: var(--radius-sm);
  touch-action: manipulation;
  transition: background 160ms var(--ease-apple), border-color 160ms var(--ease-apple);
}
.recap-edit-btn:hover { background: var(--bg); border-color: var(--line); }
.recap-edit-btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ── Scribble hint (iPad + Pencil) ──────────────────────────────────── */
.scribble-hint {
  display: none;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: var(--space-xs);
  font-style: italic;
}
@media (pointer: fine) and (hover: none) {
  .scribble-hint { display: block; }
}

/* ── Reduced motion ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .wizard-step,
  .field-input, .field-textarea, .field-select,
  .field-input.is-autofilled, .wizard-progress-segment,
  .chip, .stepper-tile, .field-state-btn, .wizard-btn {
    transition: none !important;
    animation: none !important;
  }
}

/* ── Focus-visible (keyboard navigation) ─────────────────────────────── */
.chip:focus-visible,
.stepper-tile:focus-visible,
.wizard-btn:focus-visible,
.wizard-upload-btn:focus-visible,
.field-state-btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* ── aria-invalid styling ───────────────────────────────────────────── */
.field-input[aria-invalid="true"],
.field-textarea[aria-invalid="true"],
.field-select[aria-invalid="true"] {
  border-color: var(--red);
  background: rgba(239, 68, 68, 0.04);
}
.field-input[aria-invalid="true"]:focus,
.field-textarea[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}

/* ── iPad-specific tuning ───────────────────────────────────────────── */
@media (pointer: fine) and (hover: none) {
  .field-input, .field-textarea, .field-select { font-size: 17px; }
  body.wizard { -webkit-tap-highlight-color: transparent; }
  .wizard-stage { overscroll-behavior-x: contain; }
}

/* ── iPad Pro / Air landscape ───────────────────────────────────────── */
@media (orientation: landscape) and (min-width: 1024px) and (max-width: 1366px) {
  .wizard-stage { padding-left: var(--space-2xl); padding-right: var(--space-2xl); }
  .wizard-step { max-width: 720px; }
  /* footer bar inherits its width from the viewport */
}

/* ── 60fps motion: only transform + opacity ─────────────────────────── */
.wizard-step { will-change: transform, opacity; }
.field-input.is-autofilled, .field-textarea.is-autofilled { will-change: background-color, box-shadow; }
.chip.selected, .stepper-tile.selected { will-change: background-color, color; }

/* ── "Deep dive" step framing (optional step 7) ──────────────────────── */
.step-optional-banner {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin: 0 0 var(--space-xl);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.step-optional-banner strong { color: var(--ink); font-weight: 600; }
.step-skip-btn {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0.4rem 0.8rem;
  white-space: nowrap;
  touch-action: manipulation;
  transition: background 160ms var(--ease-apple), border-color 160ms var(--ease-apple);
}
.step-skip-btn:hover { background: var(--surface); border-color: var(--ink-soft); }

/* ── Mini-table editor (profit centers, avatars, funnels) ─────────── */
.field-table {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}
.field-table-row {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: var(--space-xs);
  align-items: center;
}
.field-table-row.cols-4 {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
}
.field-table-input {
  width: 100%;
  min-height: 44px;
  padding: var(--space-xs) var(--space-sm);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  touch-action: manipulation;
  transition: border-color 160ms var(--ease-apple), box-shadow 160ms var(--ease-apple);
}
.field-table-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}
@media (prefers-color-scheme: dark) {
  .field-table-input {
    background: rgba(255, 255, 255, 0.04);
    color: var(--surface);
    border-color: rgba(255, 255, 255, 0.16);
  }
}
.field-table-suffix {
  position: relative;
  display: flex;
  align-items: center;
}
.field-table-suffix .field-table-input { padding-right: 1.8em; }
.field-table-suffix-mark {
  position: absolute;
  right: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  pointer-events: none;
}
.field-table-remove {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 400;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  touch-action: manipulation;
  line-height: 1;
  transition: background 160ms var(--ease-apple), color 160ms var(--ease-apple);
}
.field-table-remove:hover { background: var(--bg); color: var(--red); border-color: var(--line); }
.field-table-add {
  align-self: flex-start;
  background: transparent;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 0.5rem var(--space-sm);
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 160ms var(--ease-apple), color 160ms var(--ease-apple);
}
.field-table-add:hover { border-color: var(--cyan); color: var(--ink); }
.field-table-headers {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr) minmax(0, 1fr) 32px;
  gap: var(--space-xs);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: var(--space-xs);
  padding: 0 0.2rem;
}
.field-table-headers.cols-4 {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 32px;
}

/* ── Tag input (free-form list of strings) ──────────────────────────── */
/* Type a value, press Enter or comma → adds a chip. Click × to remove. */
.field-tag-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}
.field-tag-entry {
  width: 100%;
  min-height: 44px;
  padding: var(--space-xs) var(--space-sm);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  touch-action: manipulation;
  transition: border-color 160ms var(--ease-apple), box-shadow 160ms var(--ease-apple);
}
.field-tag-entry::placeholder { color: var(--muted); opacity: 0.7; }
.field-tag-entry:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15); }
.field-tag-entry:disabled { background: var(--bg); cursor: not-allowed; opacity: 0.55; }
@media (prefers-color-scheme: dark) {
  .field-tag-entry {
    background: rgba(255, 255, 255, 0.04);
    color: var(--surface);
    border-color: rgba(255, 255, 255, 0.16);
  }
}
.field-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  min-height: 0;
}
.field-tag-list:empty { display: none; }
.field-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.4rem 0.7rem 0.4rem 0.8rem;
  background: var(--ink);
  color: var(--surface);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  max-width: 100%;
  word-break: break-word;
}
@media (prefers-color-scheme: dark) {
  .field-tag { background: var(--surface); color: var(--ink); }
}
.field-tag-remove {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  padding: 0;
  font-weight: 400;
  touch-action: manipulation;
  transition: color 140ms var(--ease-apple);
}
.field-tag-remove:hover { color: var(--surface); }
@media (prefers-color-scheme: dark) {
  .field-tag-remove { color: rgba(10, 14, 26, 0.55); }
  .field-tag-remove:hover { color: var(--ink); }
}
.field-tag-hint {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: var(--space-xs);
}
.field-tag-counter {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
  margin-left: auto;
}

/* ── Multi-select chip group ────────────────────────────────────────── */
/* Same .chip styles as single-select; the JS toggles `selected` for each
 * chip independently (no roving "only one"). For visual differentiation
 * a multi-select group gets a leading checkmark glyph when selected. */
.chip-grid.multi .chip.selected::before {
  content: "✓";
  margin-right: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
}

/* ── Recap formatting for array-valued fields ──────────────────────── */
.recap-val.array {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  word-break: break-word;
}

/* ── Admin topbar (admin-conducted wizard) ───────────────────────────
 * Sticks ABOVE the wizard topbar in /studio/audits/:id/edit. Shows the
 * empresa name being audited + "Ver deliverable" + "Enviar al prospecto".
 * Same wizard step machinery underneath; admin just bookends it with
 * actions Pablo needs while running the call.
 */
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--ink);
  color: var(--surface);
  border-bottom: 1px solid var(--ink);
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-height: var(--touch-min);
  flex-wrap: wrap;
}
.admin-topbar .admin-brand {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}
.admin-topbar .admin-empresa {
  flex: 1;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--surface);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-topbar .admin-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
/* The admin actions reuse .dense-action styling but on dark bg */
.admin-topbar .dense-action {
  background: rgba(255, 255, 255, 0.06);
  color: var(--surface);
  border-color: rgba(255, 255, 255, 0.18);
}
.admin-topbar .dense-action:hover { background: rgba(255, 255, 255, 0.12); }
.admin-topbar .dense-action.primary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--surface);
}
.admin-topbar .dense-action.primary:hover { background: var(--bg); }
/* Below the admin topbar, the wizard topbar's own sticky should sit at
 * the right offset (admin-topbar height ~48-60px). Browser handles this
 * via the sticky stacking context. */
body.admin-mode .wizard-topbar { top: var(--touch-min); }

@media (max-width: 720px) {
  .admin-topbar { padding: 0.5rem var(--space-sm); }
  .admin-topbar .admin-empresa { font-size: 0.95rem; min-width: 0; }
  .admin-topbar .dense-action { font-size: 0.78rem; padding: 0 0.7rem; }
}

/* ── Admin-conducted dense form ──────────────────────────────────────
 * Single-page form, all sections stacked. No step nav, no progress.
 * Reuses field-group / chip / stepper / table / tag / affix primitives.
 * Pablo drives this while talking to the prospect.
 */
body.dense {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.dense-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-height: var(--touch-min);
  flex-wrap: wrap;
}
.dense-topbar .brand {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.dense-topbar .audit-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dense-topbar .audit-info .empresa {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dense-topbar .audit-info .meta {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.dense-topbar-actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.dense-action {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-min);
  padding: 0 var(--space-md);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  touch-action: manipulation;
  transition: background 160ms var(--ease-apple);
}
.dense-action:hover { background: var(--bg); }
.dense-action.primary { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.dense-action.primary:hover { background: var(--ink-soft); border-color: var(--ink-soft); }
.dense-stage {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-md) var(--space-3xl);
}
.dense-section { margin: 0 0 var(--space-2xl); }
.dense-section-header {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  margin: 0 0 var(--space-md);
  border-bottom: 1px solid var(--line);
}
.dense-section-header h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
  border: none;
  padding: 0;
  text-transform: none;
}
.dense-section-header .sec-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.dense-section-header .sec-tag {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--magenta);
  background: rgba(217, 70, 239, 0.08);
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
}
.dense-saved-pill {
  position: fixed;
  bottom: 1.4rem;
  right: 1.4rem;
  z-index: 10;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: white;
  background: var(--green);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms var(--ease-apple);
}
.dense-saved-pill.visible { opacity: 1; }
.dense-saved-pill.error { background: var(--red); }
.dense-modal-bg {
  position: fixed; inset: 0;
  background: rgba(10, 14, 26, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: var(--space-md);
}
.dense-modal-bg.visible { display: flex; }
.dense-modal {
  background: var(--surface);
  border-radius: var(--radius-md);
  max-width: 520px;
  width: 100%;
  padding: var(--space-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
}
.dense-modal h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  margin: 0 0 0.6rem;
  letter-spacing: -0.01em;
}
.dense-modal label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  margin: 1rem 0 0.3rem;
  color: var(--ink);
}
.dense-modal input, .dense-modal textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
}
.dense-modal textarea { min-height: 100px; resize: vertical; line-height: 1.5; }
.dense-modal-actions { display: flex; justify-content: space-between; gap: 0.6rem; margin-top: 1.4rem; }

/* ── Phone responsive ───────────────────────────────────────────────── */
@media (max-width: 720px) {
  .wizard-stage { padding: var(--space-md) var(--space-sm) var(--space-2xl); }
  .wizard-step h1.step-hero { font-size: clamp(1.8rem, 8vw, 2.4rem); }
  .wizard-step p.step-deck { font-size: 1.02rem; }
  .field-label { font-size: 0.92rem; }
  .field-input, .field-textarea, .field-select { font-size: 17px; }
  .wizard-brand { font-size: 0.62rem; }
  .wizard-upload-btn { font-size: 0.78rem; padding: 0 var(--space-sm); }
  .dense-stage { padding: var(--space-md) var(--space-sm) var(--space-2xl); }
  .dense-section-header h2 { font-size: 1.3rem; }
  .dense-topbar { padding: 0.5rem var(--space-sm); }
}

/* ═════════════════════════════════════════════════════════════════════
   ADMIN-MODE LIVE CONSULT WIDGETS · cross-cutting (running-sum-bar +
   flag-drawer + Live Consult panel post-recap). All scoped under
   body.admin-mode so self-serve flow is completely unaffected. Prefix
   adm-* to avoid clashes with the existing wizard CSS.
   ═════════════════════════════════════════════════════════════════════ */

/* Running-sum-bar · privado al facilitator. Vive entre admin-topbar y
   wizard-topbar. Suma todas las oportunidades flagged a lo largo del
   consult contra el gap (target − actuales). El dueño NUNCA lo ve. */
body:not(.admin-mode) .adm-running-sum-bar { display: none; }
.adm-running-sum-bar {
  background: #2c2820;
  color: #e9e3d0;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.adm-rsb-private {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #d4a73e;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10px;
}
.adm-rsb-private svg { width: 12px; height: 12px; }
.adm-rsb-sep { color: rgba(233, 227, 208, 0.3); }
.adm-rsb-stat {
  color: #f5f1e6;
  font-weight: 600;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.adm-rsb-stat strong { color: white; font-size: 13px; font-weight: 700; }
.adm-rsb-label { color: rgba(233, 227, 208, 0.6); font-weight: 500; }
.adm-rsb-empty {
  color: rgba(233, 227, 208, 0.5);
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.adm-rsb-gap-meter {
  flex: 1 1 120px;
  min-width: 120px;
  max-width: 240px;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.adm-rsb-gap-meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, #d4a73e, #4a8466);
  transition: width 0.4s ease;
}
@media (max-width: 720px) {
  .adm-running-sum-bar { gap: 8px 10px; padding: 6px 10px; font-size: 10.5px; }
  .adm-rsb-gap-meter { max-width: none; flex-basis: 100%; }
}

/* Flag-drawer · lateral derecho. Reusa el patrón existente de dialog
   pero más contenido (puro vanilla CSS sin <dialog> drawer chrome). */
body:not(.admin-mode) .adm-flag-drawer { display: none; }
.adm-flag-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: auto;
  margin: 0;
  width: 460px;
  max-width: 92vw;
  height: 100vh;
  max-height: 100vh;
  padding: 0;
  border: 0;
  border-left: 1px solid #e6e1d5;
  border-radius: 12px 0 0 12px;
  background: #faf7ee;
  color: #2c2820;
  font-family: var(--font-sans);
  box-shadow: -8px 0 32px rgba(0,0,0,0.12);
  overflow: hidden;
}
.adm-flag-drawer[open] { display: flex; }
.adm-flag-drawer form {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}
.adm-flag-drawer::backdrop {
  background: rgba(0,0,0,0.18);
  backdrop-filter: blur(2px);
}
.adm-fd-head {
  position: relative;
  padding: 18px 22px 14px;
  border-bottom: 1px solid #e6e1d5;
}
.adm-fd-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 32px; height: 32px;
  background: transparent;
  border: 0;
  font-size: 22px;
  line-height: 1;
  color: #6f6a5a;
  cursor: pointer;
  border-radius: 4px;
}
.adm-fd-close:hover { background: #e6e1d5; color: #2c2820; }
.adm-fd-title {
  font-family: 'Charter', 'Iowan Old Style', Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
}
.adm-fd-sub {
  font-size: 12.5px;
  color: #6f6a5a;
  line-height: 1.5;
}
.adm-fd-body {
  flex: 1;
  padding: 18px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.adm-fd-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.adm-fd-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  color: #6f6a5a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.adm-fd-field input,
.adm-fd-field select,
.adm-fd-field textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid #e6e1d5;
  border-radius: 6px;
  background: white;
  font-family: var(--font-sans);
  font-size: 13px;
  color: #2c2820;
  box-sizing: border-box;
}
.adm-fd-field textarea { resize: vertical; min-height: 56px; line-height: 1.5; }
.adm-fd-field input:focus,
.adm-fd-field select:focus,
.adm-fd-field textarea:focus { outline: none; border-color: #4a6fa5; }
.adm-fd-hint {
  font-size: 11px;
  color: #a8a195;
  font-style: italic;
}
.adm-fd-foot {
  padding: 14px 22px;
  border-top: 1px solid #e6e1d5;
  display: flex;
  align-items: center;
  gap: 10px;
}
.adm-fd-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #e6e1d5;
  background: white;
  color: #2c2820;
}
.adm-fd-btn:hover { border-color: #6f6a5a; }
.adm-fd-btn.primary {
  background: #2c2820;
  color: white;
  border-color: #2c2820;
}
.adm-fd-btn.primary:hover { background: #1a1812; }

/* Live Consult panel · admin-mode-only post-recap. Aparece arriba del
   recap step cuando se llega al final del wizard. */
body:not(.admin-mode) .adm-live-consult { display: none; }
.adm-live-consult {
  background: #faf7ee;
  border: 1px solid #e6e1d5;
  border-radius: 12px;
  padding: 22px 26px 26px;
  margin: 0 auto 18px;
  max-width: 760px;
}
.adm-live-consult[hidden] { display: none; }
.adm-lc-head { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #e6e1d5; }
.adm-lc-private-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  color: #8a6a17;
  background: #f3e6b5;
  padding: 3px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.adm-lc-private-tag svg { width: 12px; height: 12px; }
.adm-lc-title {
  font-family: 'Charter', 'Iowan Old Style', Georgia, serif;
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 4px;
  color: #2c2820;
}
.adm-lc-deck {
  font-size: 13px;
  color: #6f6a5a;
  line-height: 1.55;
  margin: 0;
}

/* Live Consult content elements */
.adm-lc-hero-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
@media (max-width: 720px) { .adm-lc-hero-row { grid-template-columns: 1fr; } }
.adm-lc-hero-cell {
  background: white;
  border: 1px solid #e6e1d5;
  border-radius: 10px;
  padding: 11px 13px;
}
.adm-lc-hero-cell.is-accent {
  background: #e6ecf5;
  border-color: #8aa4c8;
}
.adm-lc-hero-cell.is-accent .adm-lc-hero-value { color: #4a6fa5; }
.adm-lc-hero-label {
  font: 9.5px 'JetBrains Mono', ui-monospace, monospace;
  color: #6f6a5a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 5px;
}
.adm-lc-hero-value {
  font: 22px 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 700;
  color: #2c2820;
  line-height: 1;
}
.adm-lc-hero-value.empty { color: #a8a195; font-size: 14px; font-style: italic; font-weight: 400; }
.adm-lc-hero-meta {
  font: 10px 'JetBrains Mono', ui-monospace, monospace;
  color: #a8a195;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
  font-weight: 500;
}
.adm-lc-section {
  background: white;
  border: 1px solid #e6e1d5;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.adm-lc-section h3 {
  font-family: 'Charter', 'Iowan Old Style', Georgia, serif;
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 8px;
  color: #2c2820;
}
.adm-lc-section p.adm-lc-section-hint {
  font-size: 12px;
  color: #6f6a5a;
  line-height: 1.5;
  margin: 0 0 10px;
}
.adm-lc-opp-row {
  display: grid;
  grid-template-columns: 32px 1fr auto auto;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #efeadc;
  align-items: center;
}
.adm-lc-opp-row:last-child { border-bottom: 0; }
.adm-lc-opp-num {
  font: 11px 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 700;
  color: #a8a195;
  background: #f3f0e8;
  padding: 3px 6px;
  border-radius: 3px;
  text-align: center;
}
.adm-lc-opp-num.is-top3 {
  color: white;
  background: #4a6fa5;
}
.adm-lc-opp-row.is-top3 .adm-lc-opp-title { font-weight: 700; }
.adm-lc-rest-label {
  font: 9.5px 'JetBrains Mono', ui-monospace, monospace;
  color: #a8a195;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  padding: 12px 0 4px;
  border-top: 1px dashed #efeadc;
  margin-top: 6px;
}
.adm-lc-opp-title {
  font-family: 'Charter', 'Iowan Old Style', Georgia, serif;
  font-size: 13.5px;
  font-weight: 600;
  color: #2c2820;
}
.adm-lc-opp-meta {
  font: 10px 'JetBrains Mono', ui-monospace, monospace;
  color: #a8a195;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.adm-lc-opp-impact {
  font: 13px 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 700;
  color: #4a8466;
}
.adm-lc-opp-unflag {
  background: transparent;
  border: 0;
  color: #b94c4c;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 16px;
  line-height: 1;
}
.adm-lc-opp-unflag:hover { background: #f3d4d4; border-radius: 3px; }
.adm-lc-empty {
  font-style: italic;
  color: #a8a195;
  font-size: 12.5px;
  padding: 6px 0;
}
.adm-lc-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.adm-lc-field-label {
  font: 10px 'JetBrains Mono', ui-monospace, monospace;
  color: #6f6a5a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.adm-lc-field select,
.adm-lc-field input,
.adm-lc-field textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid #e6e1d5;
  border-radius: 6px;
  background: white;
  font-family: var(--font-sans);
  font-size: 13px;
  color: #2c2820;
  box-sizing: border-box;
}
.adm-lc-field textarea { resize: vertical; min-height: 56px; line-height: 1.5; }
.adm-lc-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 720px) { .adm-lc-grid-2 { grid-template-columns: 1fr; } }
