:root {
  color-scheme: dark;
  --bg: #05070c;
  --panel: rgba(9, 16, 22, .88);
  --line: rgba(91, 219, 190, .3);
  --line-strong: rgba(91, 219, 190, .72);
  --text: #f4f8fb;
  --muted: rgba(225, 239, 241, .68);
  --green: #53e0ac;
  --cyan: #4cc9f0;
  --yellow: #f5c451;
  --red: #ff6d79;
  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;
  background:
    radial-gradient(circle at 12% 12%, rgba(83, 224, 172, .12), transparent 26%),
    radial-gradient(circle at 88% 16%, rgba(76, 201, 240, .12), transparent 28%),
    var(--bg);
  color: var(--text);
}
button, textarea { font: inherit; }
.app-shell {
  min-height: 100vh;
  padding: 24px;
}
.workspace {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 18px;
  min-height: calc(100vh - 48px);
}
.control-panel, .output-panel, .bottom-grid section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0,0,0,.34), inset 0 0 40px rgba(83, 224, 172, .05);
  backdrop-filter: blur(18px);
}
.control-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
}
.brand-lockup {
  display: grid;
  gap: 4px;
}
.brand-lockup span {
  color: var(--green);
  font-size: .8rem;
  font-weight: 900;
  text-transform: uppercase;
}
.brand-lockup strong {
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: .95;
}
.lede, .summary, .steps p, .deliverable-content, li, #nextAction, #reasoningText {
  color: var(--muted);
  line-height: 1.55;
}
.agent-form {
  display: grid;
  gap: 14px;
}
label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 900;
}
textarea {
  width: 100%;
  min-height: 160px;
  resize: vertical;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  background: rgba(0,0,0,.28);
  color: var(--text);
  padding: 13px;
  outline: none;
}
textarea:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(83, 224, 172, .12);
}
button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  color: #06110e;
  font-weight: 950;
  cursor: pointer;
}
button:disabled { opacity: .6; cursor: wait; }
.output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}
.output-actions button {
  min-height: 42px;
  padding: 0 14px;
}
.output-actions button:nth-child(2) {
  background: linear-gradient(135deg, var(--yellow), var(--red));
  color: #160705;
}
.status-box {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
}
.status-box span { color: var(--muted); }
.status-box strong { color: var(--green); }
.output-panel {
  padding: 20px;
  overflow: hidden;
}
.output-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  padding-bottom: 18px;
}
.output-head p {
  margin: 0 0 10px;
  color: var(--green);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}
h1 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 5rem);
  line-height: .98;
}
#modelLabel {
  align-self: start;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
}
.summary { max-width: 820px; margin: 18px 0; }
.reasoning-panel {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}
.reasoning-panel h2 {
  margin: 0 0 8px;
  font-size: .82rem;
  text-transform: uppercase;
}
#reasoningText {
  max-height: 220px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.step, .deliverable {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  padding: 14px;
}
.step span {
  color: var(--yellow);
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}
.step strong, .deliverable strong {
  display: block;
  margin: 8px 0;
  color: var(--text);
}
.deliverables {
  display: grid;
  gap: 12px;
}
.deliverable-content {
  white-space: pre-wrap;
}
.bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.bottom-grid section {
  padding: 14px;
}
h2 {
  margin: 0 0 12px;
  color: var(--green);
}
ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}
@media (max-width: 900px) {
  .app-shell { padding: 12px; }
  .workspace, .steps, .bottom-grid { grid-template-columns: 1fr; }
}
