/* ============================================================================
   ACT 4: THE 24-HOUR AUTONOMOUS AGENCY TIMELAPSE + PLAYABLE LIVE SLACK SIMULATOR
   Scoped strictly to #act-4-mount and .act4-*
   ============================================================================ */

#act-4-mount {
  position: relative;
  width: 100%;
  padding: 120px 0 140px;
  color: var(--text-primary, #f5f5f7);
  font-family: var(--font-sans, 'Inter', -apple-system, sans-serif);
  z-index: 2;
  overflow: visible;
}

.act4-shell {
  width: min(1440px, 94vw);
  margin: 0 auto;
  position: relative;
}

/*Ambient glow backdrops inside Act 4*/
.act4-ambient-glow {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(130px);
  z-index: -1;
  opacity: 0.35;
}

.act4-ambient-glow--top {
  width: 680px;
  height: 680px;
  top: 40px;
  left: -140px;
  background: radial-gradient(circle, rgba(94, 92, 230, 0.38), rgba(41, 151, 255, 0.08) 70%, transparent);
}

.act4-ambient-glow--mid {
  width: 760px;
  height: 760px;
  top: 48%;
  right: -180px;
  background: radial-gradient(circle, rgba(41, 151, 255, 0.32), rgba(48, 209, 88, 0.08) 70%, transparent);
}

/* ============================================================================
   SECTION HEADERS & NARRATIVE INTRO
   ============================================================================ */

.act4-section-header {
  max-width: 920px;
  margin: 0 auto 64px;
  text-align: center;
}

.act4-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(94, 92, 230, 0.14);
  border: 1px solid rgba(94, 92, 230, 0.38);
  box-shadow: 0 0 24px rgba(94, 92, 230, 0.18);
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a5b4fc;
  margin-bottom: 20px;
}

.act4-eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #30d158;
  box-shadow: 0 0 10px #30d158;
  animation: act4PulseDot 2s infinite;
}

@keyframes act4PulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

.act4-title {
  font-family: var(--font-display, 'Space Grotesk', sans-serif);
  font-size: clamp(2.25rem, 4.4vw, 4rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 18px;
}

.act4-title-serif {
  font-family: var(--font-serif, 'Instrument Serif', Georgia, serif);
  font-style: italic;
  font-weight: 400;
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-right: 4px;
}

.act4-subtitle {
  font-size: clamp(1rem, 1.25vw, 1.18rem);
  line-height: 1.65;
  color: var(--text-secondary, #a1a1aa);
  max-width: 760px;
  margin: 0 auto;
}

/* ============================================================================
   PART A: 24-HOUR SCROLL-SCRUBBED CHRONOMETER & STORY BEATS
   ============================================================================ */

.act4-part-a {
  position: relative;
  margin-bottom: 150px;
}

.act4-timelapse-grid {
  display: grid;
  grid-template-columns: 430px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
  position: relative;
}

/* Sticky Left Column: Giant Radial + Digital Chronometer */
.act4-chrono-sticky {
  position: sticky;
  top: 84px;
  background: linear-gradient(165deg, rgba(18, 20, 32, 0.92), rgba(10, 11, 18, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 26px 24px;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.act4-chrono-sticky::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #2997ff, #5e5ce6, #30d158);
}

.act4-chrono-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.act4-chrono-tag {
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93c5fd;
  display: flex;
  align-items: center;
  gap: 7px;
}

.act4-chrono-phase-pill {
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(94, 92, 230, 0.18);
  border: 1px solid rgba(94, 92, 230, 0.45);
  color: #c4b5fd;
  letter-spacing: 0.05em;
}

/* Radial Dial Container */
.act4-radial-wrap {
  position: relative;
  width: 268px;
  height: 268px;
  margin: 6px auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.act4-radial-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}

.act4-radial-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 8;
}

.act4-radial-ticks {
  fill: none;
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 4;
  stroke-dasharray: 2 10.15;
}

.act4-radial-progress {
  fill: none;
  stroke: url(#act4ChronoGradient);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 691.15;
  stroke-dashoffset: 630;
  transition: stroke-dashoffset 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 0 10px rgba(94, 92, 230, 0.55));
}

.act4-radial-node {
  cursor: pointer;
  transition: transform 0.2s ease, fill 0.2s ease;
}

.act4-radial-node:hover {
  transform: scale(1.3);
}

/* Center Readout inside Radial Dial */
.act4-radial-center {
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, rgba(30, 33, 52, 0.9), rgba(9, 10, 16, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px;
}

.act4-digital-time {
  font-family: var(--font-mono, monospace);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #ffffff;
  line-height: 1;
  text-shadow: 0 0 22px rgba(41, 151, 255, 0.45);
}

.act4-digital-ampm {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  color: #60a5fa;
  letter-spacing: 0.12em;
  margin-top: 5px;
}

.act4-digital-sub {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  color: var(--text-muted, #71717a);
  margin-top: 6px;
}

.act4-chrono-channel-badge {
  margin-top: 8px;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 600;
  color: #30d158;
  background: rgba(48, 209, 88, 0.12);
  border: 1px solid rgba(48, 209, 88, 0.3);
  padding: 3px 9px;
  border-radius: 6px;
}

/* Quick-Jump Time Selector Pills */
.act4-time-pills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.act4-time-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary, #a1a1aa);
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  font-weight: 600;
  padding: 6px 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
}

.act4-time-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.act4-time-pill.is-active {
  background: rgba(94, 92, 230, 0.22);
  border-color: rgba(94, 92, 230, 0.65);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(94, 92, 230, 0.32);
}

.act4-time-pill--play {
  background: rgba(48, 209, 88, 0.12);
  border-color: rgba(48, 209, 88, 0.35);
  color: #34d399;
}

.act4-time-pill--play.is-playing {
  background: rgba(255, 159, 10, 0.2);
  border-color: rgba(255, 159, 10, 0.55);
  color: #fbbf24;
}

/* Human vs @Intern Live Status inside Sticky Card */
.act4-chrono-comparison {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.act4-chrono-state-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  line-height: 1.4;
}

.act4-state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
}

.act4-state-dot--human {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.act4-state-dot--intern {
  background: #30d158;
  box-shadow: 0 0 10px #30d158;
}

.act4-state-label {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, #71717a);
  display: block;
}

.act4-state-val {
  color: #e4e4e7;
  font-weight: 500;
}

/* Cumulative 24h Telemetry Grid */
.act4-chrono-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.act4-chrono-metric-box {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.act4-chrono-metric-val {
  font-family: var(--font-mono, monospace);
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  display: block;
}

.act4-chrono-metric-val--emerald {
  color: #30d158;
}

.act4-chrono-metric-val--blue {
  color: #60a5fa;
}

.act4-chrono-metric-lbl {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  color: var(--text-muted, #71717a);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ============================================================================
   RIGHT COLUMN: 7 VERTICAL TIMELAPSE STORY BEATS
   ============================================================================ */

.act4-beats-column {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 34px;
  padding-left: 28px;
}

/* Vertical Spine Line */
.act4-beats-column::before {
  content: '';
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 4px;
  width: 2px;
  background: linear-gradient(
    180deg,
    rgba(41, 151, 255, 0.25) 0%,
    rgba(94, 92, 230, 0.65) 50%,
    rgba(48, 209, 88, 0.45) 100%
  );
}

.act4-beat-card {
  position: relative;
  background: linear-gradient(165deg, rgba(22, 24, 37, 0.86), rgba(13, 15, 24, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 28px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.act4-beat-card::before {
  content: '';
  position: absolute;
  left: -31px;
  top: 34px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #181824;
  border: 3px solid rgba(255, 255, 255, 0.28);
  transition: all 0.25s ease;
}

.act4-beat-card.is-active {
  border-color: rgba(94, 92, 230, 0.6);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 36px rgba(94, 92, 230, 0.2);
}

.act4-beat-card.is-active::before {
  background: #30d158;
  border-color: #ffffff;
  box-shadow: 0 0 16px #30d158;
  transform: scale(1.2);
}

.act4-beat-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.act4-beat-time-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.act4-beat-time-badge {
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(41, 151, 255, 0.24), rgba(94, 92, 230, 0.28));
  border: 1px solid rgba(94, 92, 230, 0.5);
  padding: 5px 12px;
  border-radius: 8px;
}

.act4-beat-channel {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  font-weight: 600;
  color: #60a5fa;
  background: rgba(41, 151, 255, 0.1);
  border: 1px solid rgba(41, 151, 255, 0.24);
  padding: 4px 10px;
  border-radius: 8px;
}

.act4-beat-primitives {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.act4-primitive-chip {
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  color: #d4d4d8;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3px 9px;
  border-radius: 999px;
}

.act4-beat-headline {
  font-family: var(--font-display, 'Space Grotesk', sans-serif);
  font-size: 21px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
  line-height: 1.25;
}

/* Split Human vs @Intern Comparison inside each Beat */
.act4-vs-grid {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.act4-human-box {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.act4-box-tag {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.act4-box-tag--human {
  color: #fbbf24;
}

.act4-box-tag--intern {
  color: #34d399;
}

.act4-human-status-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: #d4d4d8;
  font-weight: 500;
}

.act4-human-sub {
  margin-top: 10px;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  color: var(--text-muted, #71717a);
}

.act4-intern-box {
  background: rgba(48, 209, 88, 0.045);
  border: 1px solid rgba(48, 209, 88, 0.22);
  border-radius: 14px;
  padding: 15px 18px;
}

.act4-intern-summary {
  font-size: 14px;
  line-height: 1.58;
  color: #f4f4f5;
  margin-bottom: 12px;
}

.act4-intern-summary code {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 5px;
  color: #93c5fd;
}

/* Metrics / Terminal Diff Strip inside Beat */
.act4-beat-kpi-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.act4-beat-kpi {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  padding: 7px 11px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.act4-beat-kpi-label {
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  color: var(--text-muted, #71717a);
}

.act4-beat-kpi-val {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  font-weight: 700;
  color: #30d158;
}

/* Interactive Footer & [Inspect Execution Trace] Toggle */
.act4-beat-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.act4-trace-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(94, 92, 230, 0.15);
  border: 1px solid rgba(94, 92, 230, 0.42);
  color: #c4b5fd;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.act4-trace-toggle-btn:hover {
  background: rgba(94, 92, 230, 0.28);
  color: #ffffff;
  transform: translateY(-1px);
}

.act4-trace-toggle-btn.is-open {
  background: rgba(41, 151, 255, 0.22);
  border-color: rgba(41, 151, 255, 0.6);
  color: #ffffff;
}

.act4-beat-jump-slack-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary, #a1a1aa);
  font-family: var(--font-mono, monospace);
  font-size: 11.5px;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.act4-beat-jump-slack-btn:hover {
  color: #ffffff;
  border-color: rgba(41, 151, 255, 0.5);
  background: rgba(41, 151, 255, 0.1);
}

/* Expandable Execution Trace Drawer inside Beat */
.act4-trace-panel {
  display: none;
  margin-top: 16px;
  background: #07080d;
  border: 1px solid rgba(94, 92, 230, 0.35);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.8);
}

.act4-trace-panel.is-open {
  display: block;
  animation: act4SlideDown 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes act4SlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.act4-trace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  color: var(--text-secondary, #a1a1aa);
}

.act4-trace-replay-btn {
  background: rgba(48, 209, 88, 0.14);
  border: 1px solid rgba(48, 209, 88, 0.4);
  color: #34d399;
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.act4-trace-replay-btn:hover {
  background: rgba(48, 209, 88, 0.25);
}

.act4-trace-steps {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.act4-trace-step {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono, monospace);
  font-size: 11.5px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.act4-trace-step.is-highlighted {
  border-color: #30d158;
  background: rgba(48, 209, 88, 0.08);
}

.act4-trace-step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.act4-trace-fn {
  color: #60a5fa;
  font-weight: 700;
}

.act4-trace-latency {
  color: #34d399;
  font-size: 10.5px;
}

.act4-trace-args {
  color: #a1a1aa;
  font-size: 11px;
  margin-bottom: 4px;
  word-break: break-all;
}

.act4-trace-out {
  color: #e4e4e7;
  font-size: 11px;
  padding-top: 4px;
  border-top: 1px dashed rgba(255, 255, 255, 0.07);
}

/* ============================================================================
   PART B: PLAYABLE LIVE SLACK WORKSPACE SIMULATOR
   ============================================================================ */

.act4-part-b {
  position: relative;
  margin-top: 40px;
}

/* Top Telemetry Banner above Slack Window */
.act4-sim-Banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px 20px;
  border-radius: 16px;
  background: rgba(20, 22, 34, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.act4-sim-banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.act4-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(48, 209, 88, 0.14);
  border: 1px solid rgba(48, 209, 88, 0.4);
  color: #34d399;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
}

.act4-sim-banner-metrics {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.act4-sim-stat {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
}

.act4-sim-stat-lbl {
  color: var(--text-muted, #71717a);
}

.act4-sim-stat-val {
  color: #ffffff;
  font-weight: 700;
}

.act4-sim-stat-val--green {
  color: #30d158;
}

/* Main Slack Desktop Window Frame */
.act4-slack-window {
  width: 100%;
  min-height: 760px;
  max-height: 860px;
  background: #12131a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  box-shadow:
    0 40px 110px rgba(0, 0, 0, 0.78),
    0 0 60px rgba(94, 92, 230, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Window Titlebar */
.act4-slack-titlebar {
  height: 46px;
  background: #0b0c12;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  flex-shrink: 0;
}

.act4-window-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.act4-win-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.act4-win-dot--red { background: #ff5f56; }
.act4-win-dot--yellow { background: #ffbd2e; }
.act4-win-dot--green { background: #27c93f; }

.act4-titlebar-center {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  color: #d4d4d8;
}

.act4-zero-login-badge {
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(94, 92, 230, 0.28), rgba(41, 151, 255, 0.25));
  border: 1px solid rgba(94, 92, 230, 0.55);
  color: #c4b5fd;
}

.act4-titlebar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.act4-drawer-toggle-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e4e4e7;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  padding: 5px 11px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.act4-drawer-toggle-btn:hover {
  background: rgba(41, 151, 255, 0.18);
  border-color: rgba(41, 151, 255, 0.45);
}

/* 3-Pane Body inside Slack Window */
.act4-slack-body {
  flex: 1;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 390px;
  min-height: 0;
  overflow: hidden;
}

.act4-slack-body.is-drawer-collapsed {
  grid-template-columns: 270px minmax(0, 1fr) 0px;
}

/* ============================================================================
   LEFT SIDEBAR: WORKSPACE SWITCHER & 5 CHANNELS
   ============================================================================ */

.act4-slack-sidebar {
  background: #0e1017;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
  padding: 16px 12px;
  overflow-y: auto;
}

.act4-ws-header {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 16px;
}

.act4-ws-name {
  font-weight: 700;
  font-size: 14px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.act4-ws-sub {
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  color: #34d399;
  display: flex;
  align-items: center;
  gap: 6px;
}

.act4-sidebar-group-label {
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted, #71717a);
  padding: 0 10px;
  margin: 10px 0 8px;
}

.act4-channel-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.act4-channel-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: #a1a1aa;
  font-family: var(--font-sans, sans-serif);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s ease;
  text-align: left;
}

.act4-channel-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.act4-channel-btn.is-active {
  background: linear-gradient(90deg, rgba(94, 92, 230, 0.28), rgba(41, 151, 255, 0.14));
  border-color: rgba(94, 92, 230, 0.5);
  color: #ffffff;
  font-weight: 600;
}

.act4-channel-name-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.act4-channel-hash {
  font-family: var(--font-mono, monospace);
  color: #60a5fa;
  font-weight: 700;
}

.act4-channel-badge {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(41, 151, 255, 0.2);
  color: #93c5fd;
}

.act4-channel-badge--live {
  background: rgba(48, 209, 88, 0.2);
  color: #34d399;
}

/* Sidebar Primitives Status Box */
.act4-sidebar-primitives {
  margin-top: 18px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.act4-primitive-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  padding: 4px 0;
  color: #d4d4d8;
}

.act4-primitive-online {
  color: #30d158;
  font-size: 10px;
}

/* ============================================================================
   CENTER PANE: SLACK MESSAGE STREAM + PROMPT CHIPS + INPUT
   ============================================================================ */

.act4-slack-main {
  display: flex;
  flex-direction: column;
  background: #141621;
  min-height: 0;
  overflow: hidden;
}

.act4-channel-topbar {
  padding: 12px 20px;
  background: rgba(16, 18, 28, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.act4-channel-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.act4-channel-title {
  font-family: var(--font-display, sans-serif);
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.act4-channel-topic {
  font-size: 12px;
  color: var(--text-secondary, #a1a1aa);
}

.act4-channel-kpi-pill {
  font-family: var(--font-mono, monospace);
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 8px;
  background: rgba(48, 209, 88, 0.12);
  border: 1px solid rgba(48, 209, 88, 0.35);
  color: #34d399;
  white-space: nowrap;
}

/* Message Feed */
.act4-messages-feed {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.act4-msg {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  animation: act4MsgAppear 0.25s ease;
}

@keyframes act4MsgAppear {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.act4-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
}

.act4-avatar--human {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.act4-avatar--intern {
  background: linear-gradient(135deg, #5e5ce6, #2997ff);
  box-shadow: 0 0 16px rgba(94, 92, 230, 0.45);
}

.act4-avatar--guest {
  background: linear-gradient(135deg, #10b981, #059669);
}

.act4-msg-content {
  flex: 1;
  min-width: 0;
}

.act4-msg-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}

.act4-msg-author {
  font-weight: 700;
  font-size: 14px;
  color: #ffffff;
}

.act4-msg-role {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  color: #a1a1aa;
}

.act4-msg-role--bot {
  background: rgba(94, 92, 230, 0.22);
  border: 1px solid rgba(94, 92, 230, 0.45);
  color: #c4b5fd;
}

.act4-msg-time {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  color: var(--text-muted, #71717a);
}

.act4-msg-text {
  font-size: 14px;
  line-height: 1.56;
  color: #e4e4e7;
}

.act4-msg-text code {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 5px;
  color: #93c5fd;
}

.act4-mention {
  color: #60a5fa;
  background: rgba(41, 151, 255, 0.14);
  padding: 1px 6px;
  border-radius: 5px;
  font-weight: 600;
}

/* Embedded Slack Rich Card (Metrics, Diffs, Approvals) */
.act4-slack-card {
  margin-top: 12px;
  background: rgba(10, 12, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 3px solid #5e5ce6;
  border-radius: 12px;
  padding: 14px 16px;
}

.act4-slack-card--emerald {
  border-left-color: #30d158;
}

.act4-slack-card--amber {
  border-left-color: #ff9f0a;
}

.act4-slack-card-title {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.act4-slack-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.act4-slack-metric-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 10px;
}

.act4-slack-metric-lbl {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  color: var(--text-muted, #71717a);
  display: block;
}

.act4-slack-metric-val {
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

/* Interactive Action Buttons inside Slack Messages */
.act4-slack-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.act4-btn-approve {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.3);
}

.act4-btn-approve:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.55);
}

.act4-btn-reject {
  background: rgba(255, 69, 58, 0.14);
  border: 1px solid rgba(255, 69, 58, 0.4);
  color: #fca5a5;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.act4-btn-reject:hover:not(:disabled) {
  background: rgba(255, 69, 58, 0.25);
  color: #ffffff;
}

.act4-btn-secondary {
  background: rgba(94, 92, 230, 0.16);
  border: 1px solid rgba(94, 92, 230, 0.45);
  color: #c4b5fd;
  font-family: var(--font-mono, monospace);
  font-size: 11.5px;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.act4-btn-secondary:hover {
  background: rgba(94, 92, 230, 0.3);
  color: #ffffff;
}

/* Clickable Artifact Attachment Card inside Slack */
.act4-artifact-card {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(41, 151, 255, 0.12), rgba(94, 92, 230, 0.12));
  border: 1px solid rgba(41, 151, 255, 0.35);
  cursor: pointer;
  transition: all 0.2s ease;
}

.act4-artifact-card:hover {
  background: linear-gradient(135deg, rgba(41, 151, 255, 0.22), rgba(94, 92, 230, 0.24));
  border-color: rgba(41, 151, 255, 0.65);
  transform: translateY(-1px);
}

.act4-artifact-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.act4-artifact-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  color: #60a5fa;
}

.act4-artifact-name {
  font-family: var(--font-mono, monospace);
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
  display: block;
}

.act4-artifact-meta {
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  color: #93c5fd;
}

.act4-artifact-cta {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  background: rgba(41, 151, 255, 0.25);
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

/* Preset Prompt Chips Bar + Composer */
.act4-composer-area {
  padding: 12px 18px 16px;
  background: #0f111a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.act4-prompt-chips-label {
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  color: #a5b4fc;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.act4-prompt-chips {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.act4-prompt-chip {
  flex-shrink: 0;
  background: rgba(94, 92, 230, 0.14);
  border: 1px solid rgba(94, 92, 230, 0.35);
  color: #e0e7ff;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.act4-prompt-chip:hover {
  background: rgba(94, 92, 230, 0.32);
  border-color: #818cf8;
  color: #ffffff;
  transform: translateY(-1px);
}

.act4-input-form {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 6px 8px 6px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.act4-input-form:focus-within {
  border-color: #5e5ce6;
  box-shadow: 0 0 20px rgba(94, 92, 230, 0.28);
}

.act4-slack-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: var(--font-sans, sans-serif);
  font-size: 13.5px;
}

.act4-slack-input::placeholder {
  color: #71717a;
}

.act4-send-btn {
  background: linear-gradient(135deg, #5e5ce6, #2997ff);
  border: none;
  color: #ffffff;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.act4-send-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(94, 92, 230, 0.5);
}

/* ============================================================================
   RIGHT DRAWER: INTERACTIVE ARTIFACT INSPECTOR
   ============================================================================ */

.act4-artifact-drawer {
  background: #0c0e15;
  border-left: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.act4-drawer-header {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.act4-drawer-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.act4-drawer-title {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #93c5fd;
}

.act4-drawer-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}

.act4-drawer-tab {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #a1a1aa;
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  padding: 6px 8px;
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.act4-drawer-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

.act4-drawer-tab.is-active {
  background: rgba(41, 151, 255, 0.18);
  border-color: rgba(41, 151, 255, 0.55);
  color: #ffffff;
  font-weight: 700;
}

.act4-drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
}

/* XLSX Preview Table inside Drawer */
.act4-xlsx-formula-bar {
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  background: #07080c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  padding: 6px 10px;
  color: #34d399;
  margin-bottom: 10px;
}

.act4-xlsx-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  margin-bottom: 12px;
}

.act4-xlsx-table th,
.act4-xlsx-table td {
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 8px;
  text-align: left;
}

.act4-xlsx-table th {
  background: rgba(255, 255, 255, 0.05);
  color: #93c5fd;
  font-weight: 700;
}

.act4-xlsx-slider-box {
  background: rgba(94, 92, 230, 0.1);
  border: 1px solid rgba(94, 92, 230, 0.3);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 10px;
}

/* PPTX Slide Viewer inside Drawer */
.act4-pptx-stage {
  background: linear-gradient(145deg, #16192b, #0c0e18);
  border: 1px solid rgba(94, 92, 230, 0.45);
  border-radius: 12px;
  padding: 16px;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-bottom: 12px;
}

.act4-pptx-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* QA Screenshot Viewport inside Drawer */
.act4-qa-viewport {
  background: #07080d;
  border: 1px solid rgba(48, 209, 88, 0.35);
  border-radius: 12px;
  padding: 12px;
  position: relative;
}

.act4-qa-box-overlay {
  border: 1px dashed #30d158;
  background: rgba(48, 209, 88, 0.07);
  border-radius: 8px;
  padding: 10px;
  margin-top: 8px;
}

/* ============================================================================
   RESPONSIVE BREAKPOINTS
   ============================================================================ */

@media (max-width: 1180px) {
  .act4-timelapse-grid {
    grid-template-columns: 1fr;
  }
  .act4-chrono-sticky {
    position: relative;
    top: 0;
  }
  .act4-slack-body {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .act4-artifact-drawer {
    grid-column: 1 / -1;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 360px;
  }
  .act4-slack-window {
    max-height: none;
  }
}

@media (max-width: 780px) {
  .act4-vs-grid {
    grid-template-columns: 1fr;
  }
  .act4-slack-body {
    grid-template-columns: 1fr;
  }
  .act4-slack-sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
}
