/* ─────────────────────────────────────────────────────────
   CRA4 — Meridian working-session simulator, restyled in
   the CRA3 blueprint/drafting language. Loads after cra3.css.
   ───────────────────────────────────────────────────────── */

.sim-frame {
  margin-top: clamp(36px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--draft-raise);
  overflow: hidden;
}
.sim-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
}
.sim-company { display: flex; flex-direction: column; gap: 3px; }
.sim-company-name { font-weight: 600; font-size: 16.5px; }
.sim-company-desc {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
}
.timeline {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.timeline-track {
  position: relative;
  width: clamp(100px, 16vw, 200px);
  height: 3px;
  background: var(--line);
}
.timeline-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--accent);
  transition: width 0.5s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.timeline-now { color: var(--ink); }

.sim-body {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  align-items: start;
}
.tasks { border-right: 1px solid var(--line); }
.task { padding: 18px 28px; display: flex; flex-direction: column; gap: 12px; }
.task + .task { border-top: 1px solid var(--line-soft); }
.task-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.task-name { font-weight: 600; font-size: 15.5px; }
.task-hours {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.task-leak { color: var(--alert); font-weight: 500; }

.modes { display: flex; gap: 6px; flex-wrap: wrap; }
.mode {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.mode:hover { border-color: var(--ink); color: var(--ink); }
.mode.on { background: var(--ink); border-color: var(--ink); color: var(--draft); }
.mode.on.mode-agent { background: var(--accent); border-color: var(--accent); color: #fff; }
.mode.on.mode-gone { background: var(--faint); border-color: var(--faint); color: var(--draft); text-decoration: line-through; }

.task-note { font-size: 13.5px; color: var(--good); }

.metrics {
  position: sticky;
  top: 76px;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.metrics-h {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}
.metric { display: flex; flex-direction: column; gap: 5px; }
.metric-val {
  font-size: clamp(28px, 2.8vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.metric-val .up { color: var(--good); }
.metric-val .down { color: var(--accent); }
.metric-label { font-size: 13.5px; color: var(--muted); }
.capacity-bar { height: 6px; background: var(--line-soft); overflow: hidden; }
.capacity-fill { height: 100%; background: var(--good); transition: width 0.5s cubic-bezier(0.2, 0.6, 0.2, 1); }

.metrics-actions { display: flex; flex-direction: column; gap: 10px; }
.text-btn {
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 18px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
}
.text-btn:hover { border-color: var(--accent); color: var(--accent); }
.text-btn.filled { background: var(--accent); border-color: var(--accent); color: #fff; }
.text-btn.filled:hover { opacity: 0.92; }
.metrics-foot { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--faint); }

@media (max-width: 880px) {
  .sim-body { grid-template-columns: 1fr; }
  .tasks { border-right: none; border-bottom: 1px solid var(--line); }
  .metrics { position: static; }
}

/* ── Interview (CRA2 mechanics, blueprint skin) ──────── */
#interview-root {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 140px;
  padding-bottom: 80px;
  background:
    repeating-linear-gradient(0deg, var(--bp-grid) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, var(--bp-grid) 0 1px, transparent 1px 28px),
    var(--blueprint);
  color: var(--bp-ink);
}
.interview { width: 100%; }
.interview-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8fb6ff;
  margin-bottom: 32px;
}
.transcript { display: flex; flex-direction: column; gap: 10px; margin-bottom: 36px; }
.transcript-row {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--bp-muted);
}
.transcript-row .t-a { color: var(--bp-ink); font-family: var(--font-sans); font-size: 14.5px; }
.q-text {
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 600;
  max-width: 22ch;
  margin: 0;
}
.q-text em { font-style: normal; color: #8fb6ff; }
.chips { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.chip {
  font-family: var(--font-sans);
  font-size: 15.5px;
  font-weight: 500;
  color: var(--bp-ink);
  background: rgba(12, 35, 80, 0.4);
  border: 1px solid var(--bp-line);
  border-radius: 6px;
  padding: 13px 24px;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}
.chip:hover { border-color: #8fb6ff; color: #8fb6ff; transform: translateY(-1px); }
.synthesis {
  font-size: clamp(21px, 2.4vw, 30px);
  line-height: 1.4;
  font-weight: 500;
  max-width: 36ch;
  margin: 8px 0 0 0;
}
.synthesis .hl { color: #8fb6ff; }
.interview-actions { display: flex; align-items: center; gap: 24px; margin-top: 44px; flex-wrap: wrap; }
.restart {
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--bp-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
}
.restart:hover { color: var(--bp-ink); }
.skip-line { margin-top: 56px; }
@media (prefers-reduced-motion: no-preference) {
  .q-enter { animation: q-in 0.5s cubic-bezier(0.2, 0.6, 0.2, 1) both; }
  @keyframes q-in {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
  }
}

/* back-to-main link in nav */
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-back {
  font-size: 14px;
  font-weight: 600;
  color: var(--bp-ink);
  opacity: 0.85;
  transition: opacity 0.2s ease, color 0.3s ease;
  white-space: nowrap;
}
.nav-back:hover { opacity: 1; }
.nav.over-light .nav-back { color: var(--ink); }

/* high-risk delegation warning */
.task-note.warn { color: var(--alert); font-weight: 500; }
.mode.on.warned { background: var(--alert); border-color: var(--alert); color: #fff; }

/* TKR-001 drawing beside the interview */
header[data-screen-label="Interview"] { position: relative; }
.interview-draft {
  position: absolute;
  right: clamp(24px, 5vw, 88px);
  top: 50%;
  transform: translateY(-50%);
  width: min(36vw, 500px);
  pointer-events: none;
  z-index: 1;
}
.interview-draft svg { width: 100%; height: auto; display: block; }
@media (min-width: 1101px) {
  #interview-root .interview { padding-right: min(40vw, 560px); }
}
@media (max-width: 1100px) { .interview-draft { display: none; } }
