/* =========================================================
   Editorial infographic — "What one billable hour accomplishes"
   Three zones: reduction → rate → synthesis
   ========================================================= */

/* ---------- Variant toggle: hide the inactive viz ---------- */
.eff-vis-wrap[data-viz="compact"]    .eff-vis-editorial { display: none; }
.eff-vis-wrap[data-viz="editorial"]  .eff-vis-compact   { display: none; }

/* ---------- Editorial figure shell ---------- */
.eff-vis-editorial {
  margin: clamp(0.75rem, 2vw, 1.5rem) 0 0;
  padding: clamp(0.9rem, 1.8vw, 1.5rem) clamp(0.75rem, 1.8vw, 1.25rem) clamp(1.5rem, 2.5vw, 2rem);
  border: 1px solid rgba(232, 200, 118, 0.18);
  background: rgba(20, 8, 18, 0.4);
  position: relative;
}
.eff-edit-title {
  font-family: var(--font-serif, "Fraunces", Georgia, serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(0.95rem, 1.1vw, 1.2rem);
  color: var(--white);
  margin: 0 0 clamp(0.75rem, 1.5vw, 1.1rem);
  letter-spacing: 0.005em;
}

/* ---------- Three-zone stage ---------- */
.eff-edit-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  align-items: center;
}
@media (max-width: 900px) {
  .eff-edit-stage { grid-template-columns: 1fr; gap: 1.5rem; }
}

.eff-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.eff-zone-lbl {
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
}

/* =====================================================
   ZONE 1 — Reduction: cluster → bands → smaller cluster
   Horizontal left-to-right flow inside the zone.
   ===================================================== */
.eff-zone-1 {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: 1fr auto;
  column-gap: 0.5rem;
  row-gap: 0.5rem;
  width: 100%;
  align-items: center;
}
.eff-zone-1 .eff-cluster-start { grid-column: 1; grid-row: 1; }
.eff-zone-1 .eff-funnel        { grid-column: 2; grid-row: 1; margin-top: 0; }
.eff-zone-1 .eff-cluster-end   { grid-column: 3; grid-row: 1; }
.eff-zone-1 .eff-zone-lbl      { grid-column: 1 / -1; grid-row: 2; margin-top: 0.15rem; }

.eff-cluster {
  display: grid;
  gap: 3px;
  justify-content: center;
}
.eff-cluster-start {
  grid-template-columns: repeat(4, 11px);
  width: max-content;
}
.eff-cluster-end {
  grid-template-columns: repeat(3, 11px);
  width: max-content;
}
/* Candidate-reference page icons — mini documents. Match the vocabulary
   of the Zone 2 page stack (.eff-page): filled page with a corner fold
   and faint text rules. Dim gold for pre-appraisal candidates. */
.ref {
  width: 11px;
  height: 14px;
  background: rgba(232, 200, 118, 0.22);
  border: 1px solid rgba(232, 200, 118, 0.5);
  border-radius: 1px;
  position: relative;
}
.ref::before {
  /* two faint horizontal "text" rules, mimicking page content */
  content: "";
  position: absolute;
  inset: 3px 2px auto 2px;
  height: 1px;
  background: rgba(232, 200, 118, 0.55);
  box-shadow: 0 3px 0 rgba(232, 200, 118, 0.45);
}
.ref::after {
  /* folded corner, top-right */
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 3px;
  background: linear-gradient(135deg, transparent 50%, rgba(46, 13, 36, 0.85) 50%);
}
/* Surviving references (after full-text appraisal) — solid gold pages */
.eff-cluster-end .ref {
  background: var(--gold);
  border-color: var(--gold);
}
.eff-cluster-end .ref::before {
  background: rgba(46, 13, 36, 0.7);
  box-shadow: 0 3px 0 rgba(46, 13, 36, 0.6);
}
.eff-cluster-end .ref::after {
  background: linear-gradient(135deg, transparent 50%, rgba(46, 13, 36, 0.35) 50%);
}

/* Funnel container (between the two clusters) */
.eff-funnel {
  position: relative;
  height: 70px;
  width: 100%;
  min-width: 80px;
}
.eff-funnel-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.eff-band-lbl {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.2;
  text-align: center;
}
.eff-band-1 {
  left: 0;
  bottom: -24px;
  width: 48%;
}
.eff-band-2 {
  right: 0;
  bottom: -24px;
  width: 48%;
}

/* =====================================================
   ZONE 2 — The rate (1 hour = 6 pages)
   ===================================================== */
.eff-zone-2 {
  align-self: center;
  width: 100%;
}
.eff-rate-frame {
  border: 1px solid rgba(232, 200, 118, 0.55);
  background:
    radial-gradient(ellipse 80% 100% at 50% 0%, rgba(232, 200, 118, 0.08), transparent 70%),
    rgba(20, 8, 18, 0.5);
  padding: clamp(0.9rem, 1.4vw, 1.25rem) clamp(0.65rem, 1vw, 1rem) clamp(0.7rem, 1vw, 0.9rem);
  position: relative;
}
.eff-rate-frame::before,
.eff-rate-frame::after {
  /* Editorial corner ticks */
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid var(--gold);
}
.eff-rate-frame::before { top: -3px; left: -3px; border-right: none; border-bottom: none; }
.eff-rate-frame::after  { bottom: -3px; right: -3px; border-left: none; border-top: none; }

.eff-rate-row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: clamp(0.35rem, 0.8vw, 0.65rem);
  align-items: center;
  justify-items: center;
}

.eff-clock {
  width: clamp(38px, 4vw, 52px);
  height: clamp(38px, 4vw, 52px);
}

.eff-rate-eq {
  font-family: var(--font-mono);
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  color: var(--gold);
  line-height: 1;
  font-weight: 300;
}

/* Six-page stack — 2 rows × 3 columns grid of page icons */
.eff-rate-stack {
  display: grid;
  grid-template-columns: repeat(3, auto);
  grid-auto-rows: auto;
  gap: 3px;
  align-items: center;
  justify-content: center;
}
.eff-page {
  width: clamp(12px, 1.3vw, 18px);
  height: clamp(18px, 1.8vw, 24px);
  background: var(--white);
  border: 1px solid rgba(232, 200, 118, 0.55);
  border-radius: 1px;
  position: relative;
  flex-shrink: 0;
}
/* page-line children are hidden — pages read as empty page icons */
.eff-page-line { display: none; }
/* subtle fold on each page corner for recognizability */
.eff-page::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 6px;
  height: 6px;
  background: linear-gradient(135deg, transparent 50%, rgba(46, 13, 36, 0.12) 50%);
}

.eff-rate-foot {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(0.5rem, 1.4vw, 0.9rem);
  align-items: start;
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px dashed rgba(232, 200, 118, 0.25);
}
.eff-rate-clock-lbl {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
  grid-column: 1;
}
.eff-rate-pages-lbl {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
  grid-column: 3;
}

/* =====================================================
   ZONE 3 — Synthesis (arrow → final SOTA paragraph)
   ===================================================== */
.eff-zone-3 {
  align-items: center;
  width: 100%;
}
.eff-synth-arrow {
  position: relative;
  width: 100%;
  max-width: 140px;
  height: 24px;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.eff-synth-arrow svg {
  width: 100%;
  height: 24px;
  display: block;
}
.eff-synth-lbl {
  position: absolute;
  bottom: -14px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.eff-final {
  margin-top: 0.75rem;
  width: 100%;
  max-width: 160px;
  border: 1px solid rgba(232, 200, 118, 0.5);
  background: var(--white);
  padding: 10px 10px 12px;
  border-radius: 1px;
  position: relative;
}
.eff-final::before {
  /* small page corner fold */
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, transparent 50%, rgba(46, 13, 36, 0.12) 50%);
}
.eff-final-paragraph {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fp-line {
  position: relative;
  display: block;
  height: 4px;
  background: rgba(46, 13, 36, 0.85);
  width: 100%;
  border-radius: 1px;
}
.fp-line:nth-child(1) { width: 92%; }
.fp-line:nth-child(2) { width: 84%; }
.fp-line:nth-child(3) { width: 88%; }
.fp-line:nth-child(4) { width: 78%; }
.fp-line:nth-child(5) { width: 64%; }

.fp-cite {
  position: absolute;
  right: -10px;
  top: -4px;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--plum-deep, #2e0d24);
  background: var(--gold);
  padding: 1px 4px;
  border-radius: 2px;
  line-height: 1;
}

/* signature */
.eff-edit-sig {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

/* =====================================================
   Tweaks panel (visualization style + future tweaks)
   ===================================================== */
.tweaks-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  background: rgba(20, 8, 18, 0.95);
  border: 1px solid rgba(232, 200, 118, 0.5);
  border-radius: 6px;
  padding: 14px 16px;
  min-width: 220px;
  font-family: var(--font-mono);
  color: var(--white);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.6);
  display: none;
}
.tweaks-panel[data-open="true"] { display: block; }
.tweaks-title {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(232, 200, 118, 0.2);
}
.tweaks-group {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}
.tweaks-group:last-child { margin-bottom: 0; }
.tweaks-group-label {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.tweaks-radio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--white);
  font-family: var(--font-sans, system-ui);
  padding: 0.25rem 0;
}
.tweaks-radio input { accent-color: var(--gold); margin: 0; }
.tweaks-radio span { line-height: 1.3; }

/* =====================================================
   Editorial viz — refined proportions + clearer L→R flow
   ===================================================== */
.eff-vis-editorial {
  padding: clamp(1.4rem, 2.6vw, 2.25rem) clamp(1.1rem, 2.2vw, 1.85rem) clamp(2.25rem, 3.4vw, 3rem);
}
.eff-edit-title {
  font-size: clamp(1.1rem, 1.3vw + 0.5rem, 1.6rem);
  margin: 0 0 clamp(1.25rem, 2.4vw, 2rem);
}

/* Three zones separated by explicit connector arrows.
   Add two narrow columns for chevrons between zone-1|zone-2|zone-3 */
.eff-edit-stage {
  grid-template-columns:
    minmax(0, 1.15fr)
    auto
    minmax(0, 0.95fr)
    auto
    minmax(0, 1fr);
  gap: clamp(0.9rem, 1.8vw, 1.6rem);
  align-items: stretch;
  min-height: clamp(240px, 22vw, 320px);
  position: relative;
}
.eff-edit-stage::before,
.eff-edit-stage::after {
  /* two connector chevrons between zones — drawn via pseudo-elements */
  content: "›";
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 3vw, 3rem);
  color: var(--gold);
  opacity: 0.75;
  align-self: center;
  justify-self: center;
  line-height: 0.8;
  text-shadow: 0 0 14px rgba(232, 200, 118, 0.25);
}
.eff-edit-stage::before { grid-column: 2; grid-row: 1; }
.eff-edit-stage::after  { grid-column: 4; grid-row: 1; }

.eff-zone-1 { grid-column: 1; }
.eff-zone-2 { grid-column: 3; }
.eff-zone-3 { grid-column: 5; }

.eff-zone {
  justify-content: center;
}

/* Bigger, more legible zone labels */
.eff-zone-lbl {
  font-size: clamp(0.72rem, 0.55vw + 0.55rem, 0.82rem);
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 0.85rem;
}

/* Zone 1: slightly bigger reference tiles + clearer band labels */
.eff-cluster-start { grid-template-columns: repeat(4, 13px); gap: 4px; }
.eff-cluster-end   { grid-template-columns: repeat(3, 13px); gap: 4px; }
.ref { width: 13px; height: 17px; }
.ref::before { inset: 4px 2.5px auto 2.5px; box-shadow: 0 4px 0 rgba(232, 200, 118, 0.45); }
.eff-cluster-end .ref::before { box-shadow: 0 4px 0 rgba(46, 13, 36, 0.6); }
.ref::after { width: 4px; height: 4px; }

.eff-funnel { height: 90px; min-width: 100px; }
.eff-band-lbl {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.25;
}
.eff-band-1, .eff-band-2 { bottom: -30px; }

/* Zone 2: bigger rate frame */
.eff-rate-frame {
  padding: clamp(1.1rem, 1.8vw, 1.5rem) clamp(0.85rem, 1.4vw, 1.25rem) clamp(0.9rem, 1.4vw, 1.15rem);
}
.eff-rate-row { gap: clamp(0.55rem, 1.1vw, 0.9rem); }
.eff-clock {
  width: clamp(48px, 5vw, 64px);
  height: clamp(48px, 5vw, 64px);
}
.eff-rate-eq { font-size: clamp(1.4rem, 2vw, 1.9rem); }
.eff-page {
  width: clamp(14px, 1.5vw, 20px);
  height: clamp(22px, 2.2vw, 28px);
}
.eff-rate-clock-lbl,
.eff-rate-pages-lbl {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.85);
}

/* Zone 3: bigger synthesis arrow, larger final document */
.eff-synth-arrow { max-width: 170px; height: 28px; margin-bottom: 0.9rem; }
.eff-synth-arrow svg { height: 28px; }
.eff-synth-lbl {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  bottom: -18px;
}
.eff-final {
  max-width: 190px;
  padding: 14px 14px 16px;
  margin-top: 1.1rem;
}
.fp-line { height: 5px; }
.eff-final-paragraph { gap: 7px; }
.eff-edit-sig { font-size: 0.66rem; bottom: 10px; right: 14px; }

/* Stack cleanly on narrow viewports — hide the chevrons since zones
   become vertical there */
@media (max-width: 900px) {
  .eff-edit-stage {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 2rem;
  }
  .eff-edit-stage::before,
  .eff-edit-stage::after { display: none; }
  .eff-zone-1, .eff-zone-2, .eff-zone-3 { grid-column: 1; }
}
