:root {
  color-scheme: light;
  --bg: #f4f6f7;
  --surface: #ffffff;
  --line: #d5dde2;
  --text: #172026;
  --muted: #60707a;
  --blue: #2563eb;
  --green: #0f7d5c;
  --red: #ba3f45;
  --amber: #996819;
  --ink: #27415a;
  --shadow: 0 10px 24px rgba(24, 42, 54, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  width: 100%;
  font: inherit;
}

button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  padding: 0 14px;
}

input,
textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 10px;
}

textarea {
  resize: vertical;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.shell {
  width: min(1200px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 32px;
}

.topbar,
.section-head,
.action-header {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 13px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  font-weight: 700;
}

h2 {
  font-size: 21px;
}

h3 {
  margin-bottom: 10px;
  font-size: 15px;
}

.status-pill,
.tag {
  width: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 6px 10px;
  font-size: 13px;
  white-space: nowrap;
}

.status-pill.pending {
  border-color: #a9bdf5;
  color: var(--blue);
}

.status-pill.success {
  border-color: #8ecab0;
  color: var(--green);
}

.status-pill.error {
  border-color: #e5a1a5;
  color: var(--red);
}

.status-pill.blocked {
  border-color: #d6b06b;
  color: var(--amber);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.summary-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.summary-card {
  min-height: 78px;
  padding: 12px;
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 14px;
}

.main-column,
.side-column {
  min-width: 0;
}

.panel {
  margin-bottom: 12px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.section-head,
.action-header {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.action-header p,
.guardrail p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.icon-button {
  width: 36px;
  padding: 0;
}

.action-list {
  display: grid;
  gap: 8px;
}

.action-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 10px;
}

.action-item strong {
  display: block;
  margin: 4px 0;
}

.action-item p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.decision-panel {
  display: grid;
  gap: 10px;
}

.result-box {
  overflow: auto;
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111822;
  color: #e8eef5;
  padding: 12px;
  font-size: 12px;
  white-space: pre-wrap;
}

@media (max-width: 880px) {
  .shell {
    width: min(100vw - 20px, 760px);
    padding-top: 14px;
  }

  .topbar,
  .action-header {
    align-items: flex-start;
  }

  .summary-grid,
  .workspace {
    grid-template-columns: 1fr;
  }

  .side-column {
    order: -1;
  }
}
