:root {
  color-scheme: dark;
  --bg: #08110f;
  --bg-2: #0d1f1b;
  --panel: rgba(17, 35, 31, .82);
  --panel-strong: rgba(24, 49, 43, .94);
  --line: rgba(184, 213, 61, .20);
  --line-strong: rgba(184, 213, 61, .42);
  --ink: #f4f8ee;
  --muted: #a8b8ad;
  --brand: #b8d53d;
  --teal: #3ed0c2;
  --amber: #ffbf5f;
  --danger: #ff6b6b;
  --shadow: 0 24px 80px rgba(0, 0, 0, .35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 8%, rgba(184, 213, 61, .20), transparent 28%),
    radial-gradient(circle at 82% 24%, rgba(62, 208, 194, .18), transparent 32%),
    linear-gradient(140deg, #060b0a, var(--bg) 48%, #10241f);
}

.shell { width: min(1500px, calc(100% - 36px)); margin: 0 auto; padding: 28px 0 36px; }
.hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 8px; color: var(--brand); font-size: 12px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(34px, 5vw, 68px); line-height: .95; letter-spacing: -.06em; }
h2 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
h3 { margin: 10px 0 2px; font-size: 16px; }
p { margin: 0; }
.lede { margin-top: 14px; max-width: 820px; color: var(--muted); font-size: 18px; line-height: 1.5; }
.status-card { display: flex; align-items: center; gap: 12px; min-width: 250px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 20px; background: rgba(8, 17, 15, .72); box-shadow: var(--shadow); }
.status-card small { display: block; margin-top: 3px; color: var(--muted); }
.status-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 8px rgba(255,191,95,.12); }
.status-dot.live { background: var(--brand); box-shadow: 0 0 0 8px rgba(184,213,61,.14), 0 0 28px rgba(184,213,61,.65); }

.studio-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(330px, .75fr); gap: 18px; }
.stage-card, .score-card, .timeline-card, .iterations-card { border: 1px solid var(--line); border-radius: 30px; background: linear-gradient(180deg, rgba(17,35,31,.86), rgba(7,14,13,.72)); box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.stage-card { padding: 20px; }
.score-card, .timeline-card, .iterations-card { padding: 18px; }
.timeline-card, .iterations-card { min-height: 310px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-title.compact { margin-bottom: 14px; }
.iteration-pill, .mini-pill { border: 1px solid var(--line-strong); border-radius: 999px; color: var(--brand); padding: 8px 12px; font-weight: 900; background: rgba(184,213,61,.08); }
button { border: 1px solid rgba(184,213,61,.45); border-radius: 999px; padding: 9px 13px; background: rgba(184,213,61,.12); color: var(--ink); font-weight: 900; cursor: pointer; }
button:hover { background: rgba(184,213,61,.2); }
.ghost-button { border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: var(--muted); }
.run-title { margin-top: 5px; color: var(--muted); font-size: 14px; line-height: 1.35; }

.orchestration-stage { position: relative; min-height: 560px; border: 1px solid rgba(255,255,255,.08); border-radius: 26px; overflow: hidden; background:
  linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
  linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
  radial-gradient(circle at center, rgba(184,213,61,.08), transparent 42%);
  background-size: 42px 42px, 42px 42px, 100% 100%;
}
.flow-lines { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .7; }
.flow-lines path { fill: none; stroke: url(#flowGradient); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 15 17; animation: dash 5s linear infinite; }
.flow-lines path.soft { opacity: .25; stroke-width: 2; animation-direction: reverse; }
.flow-lines .mobile-wave { display: none; }
@keyframes dash { to { stroke-dashoffset: -180; } }

.agent-node { position: absolute; width: 154px; min-height: 154px; display: grid; place-items: center; text-align: center; padding: 16px; border: 1px solid rgba(255,255,255,.10); border-radius: 26px; background: rgba(8,17,15,.82); transition: transform .45s ease, border-color .45s ease, box-shadow .45s ease; }
.agent-node p { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.agent-node.active { transform: translateY(-8px) scale(1.035); border-color: var(--brand); box-shadow: 0 0 0 7px rgba(184,213,61,.09), 0 24px 60px rgba(0,0,0,.45); }
.albert { left: 4%; top: 36%; }
.jessica { left: 41%; top: 11%; }
.builder { right: 7%; top: 33%; }
.judge { left: 45%; bottom: 8%; }
.review { left: 9%; bottom: 8%; }
.avatar { width: 70px; height: 70px; display: grid; place-items: center; border-radius: 24px; font-size: 30px; font-weight: 1000; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 18px 38px rgba(0,0,0,.32); }
.albert-avatar { background: linear-gradient(135deg, #3846ff, #79a8ff); }
.jessica-avatar { background: linear-gradient(135deg, var(--brand), #eef7a3); color: #102014; }
.builder-avatar { background: linear-gradient(135deg, #2f6bff, #3ed0c2); }
.judge-avatar { background: linear-gradient(135deg, #ffbf5f, #ff7d5f); }
.review-avatar { background: linear-gradient(135deg, #27c46b, var(--brand)); color: #07120d; }

.task-bubble { position: absolute; left: 45%; top: 42%; width: 188px; padding: 13px 14px; border: 1px solid rgba(184,213,61,.58); border-radius: 20px; background: rgba(184,213,61,.13); box-shadow: 0 0 40px rgba(184,213,61,.22), 0 18px 50px rgba(0,0,0,.42); transition: left .7s cubic-bezier(.2,.9,.2,1), top .7s cubic-bezier(.2,.9,.2,1), transform .7s ease; z-index: 5; }
.task-bubble strong, .task-bubble small { display: block; }
.task-bubble small { color: var(--muted); margin-top: 3px; }
.task-icon { float: left; margin: 5px 9px 20px 0; color: var(--brand); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.25); filter: drop-shadow(0 0 12px var(--brand)); } }

.score-ring { --score: 0; width: 210px; height: 210px; margin: 6px auto 18px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--brand) calc(var(--score) * 1%), rgba(255,255,255,.08) 0); position: relative; }
.score-ring::after { content: ''; position: absolute; inset: 16px; border-radius: inherit; background: var(--bg-2); border: 1px solid rgba(255,255,255,.08); }
.score-ring span { position: relative; z-index: 1; font-size: 44px; font-weight: 1000; letter-spacing: -.08em; }
.rubric-list { display: grid; gap: 10px; }
.rubric-row { display: grid; grid-template-columns: 120px 1fr 34px; gap: 10px; align-items: center; color: var(--muted); font-size: 13px; }
.rubric-track { height: 8px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.rubric-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--teal)); }

.event-log { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; max-height: 245px; overflow: auto; }
.event-log li { border: 1px solid rgba(255,255,255,.08); border-radius: 16px; padding: 11px 12px; background: rgba(255,255,255,.04); }
.event-log time { display: block; margin-bottom: 4px; color: var(--brand); font-size: 11px; font-weight: 900; }
.event-log strong { text-transform: capitalize; }
.event-log p { margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.35; }
.iteration-bars { display: grid; gap: 13px; }
.iteration-bar { display: grid; grid-template-columns: 86px 1fr 56px; gap: 12px; align-items: center; }
.iteration-bar span { color: var(--muted); font-weight: 900; }
.bar-track { height: 18px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.08); }
.bar-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--danger), var(--amber), var(--brand)); transition: width .5s ease; }

@media (max-width: 1050px) {
  .hero, .studio-grid { grid-template-columns: 1fr; display: grid; }
  .status-card { width: 100%; }
  .studio-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .shell { width: 100%; padding: 10px 10px 28px; overflow-x: hidden; }
  .hero { gap: 12px; margin-bottom: 12px; }
  h1 { font-size: 34px; letter-spacing: -.045em; }
  .lede { font-size: 14px; line-height: 1.4; margin-top: 9px; }
  .status-card { min-width: 0; padding: 10px 12px; border-radius: 16px; }
  .stage-card, .score-card, .timeline-card, .iterations-card { border-radius: 22px; }
  .stage-card { padding: 10px; }
  .score-card, .timeline-card, .iterations-card { padding: 14px; }
  .section-title { align-items: flex-start; gap: 8px; margin-bottom: 10px; }
  .iteration-pill { flex: 0 0 auto; padding: 7px 10px; font-size: 12px; }
  .run-title { font-size: 13px; max-width: 230px; }
  .orchestration-stage { min-height: 660px; border-radius: 22px; overflow: hidden; }
  .flow-lines { opacity: .48; transform: none; }
  .flow-lines .desktop-wave { display: none; }
  .flow-lines .mobile-wave { display: block; stroke-width: 4; stroke-dasharray: 13 18; }
  .flow-lines .mobile-wave.soft { opacity: .24; stroke-width: 3; }
  .agent-node { width: 118px; min-height: 128px; padding: 11px 8px; border-radius: 23px; }
  .agent-node.active { transform: translateY(-4px) scale(1.02); box-shadow: 0 0 0 4px rgba(184,213,61,.11), 0 18px 42px rgba(0,0,0,.45); }
  .agent-node h3 { font-size: 16px; line-height: 1.08; margin-top: 8px; }
  .agent-node p { font-size: 10px; letter-spacing: .12em; line-height: 1.25; }
  .avatar { width: 56px; height: 56px; border-radius: 18px; font-size: 25px; }
  .albert { left: 6%; top: 6%; }
  .jessica { right: 6%; left: auto; top: 20%; }
  .builder { left: 6%; right: auto; top: 37%; }
  .judge { right: 6%; left: auto; bottom: 24%; }
  .review { left: 6%; bottom: 6%; }
  .task-bubble { width: 136px; padding: 9px 10px; border-radius: 16px; font-size: 13px; z-index: 3; box-shadow: 0 0 28px rgba(184,213,61,.20), 0 14px 34px rgba(0,0,0,.38); }
  .task-bubble small { font-size: 12px; }
  .task-icon { margin: 3px 7px 18px 0; }
  .score-ring { width: 170px; height: 170px; }
  .score-ring span { font-size: 38px; }
}
