:root {
  color-scheme: light;
  --ink: #18211f;
  --muted: #63706d;
  --line: #d8dfdc;
  --panel: #ffffff;
  --surface: #f4f7f5;
  --accent: #0c766f;
  --accent-2: #315f9d;
  --warn: #a15c10;
  --bad: #a13b3b;
  --good: #247545;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--surface);
  color: var(--ink);
}

.sidebar {
  background: #102420;
  color: white;
  padding: 20px 16px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #e7f4ef;
  color: #102420;
  font-weight: 800;
}

.brand small {
  display: block;
  color: #aab9b5;
  margin-top: 2px;
}

nav {
  display: grid;
  gap: 6px;
}

nav button,
#refresh,
.action {
  border: 1px solid transparent;
  border-radius: 8px;
  min-height: 38px;
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
}

nav button {
  background: transparent;
  color: #dce7e4;
  text-align: left;
}

nav button.active,
nav button:hover {
  background: #1d3a35;
  color: white;
}

main {
  min-width: 0;
}

.topbar {
  min-height: 92px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
}

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

h1 {
  font-size: 26px;
}

h2 {
  font-size: 18px;
  margin-bottom: 14px;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 4px;
}

#view {
  padding: 24px 28px 44px;
}

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

.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.panel {
  padding: 18px;
  margin-bottom: 16px;
}

.card {
  padding: 14px;
}

.metric {
  font-size: 30px;
  font-weight: 760;
  margin-top: 8px;
}

.muted {
  color: var(--muted);
}

.list {
  display: grid;
  gap: 10px;
}

.row {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 0.6fr 0.5fr;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.row:first-child {
  border-top: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e8eeec;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.status.ready,
.status.published,
.status.approved {
  background: #e3f1e8;
  color: var(--good);
}

.status.blocked,
.status.rejected,
.status.failed {
  background: #f5e6e6;
  color: var(--bad);
}

.status.pending_review,
.status.revision_requested {
  background: #fff0d9;
  color: var(--warn);
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.action {
  background: var(--accent);
  color: white;
}

.action.secondary {
  background: white;
  color: var(--ink);
  border-color: var(--line);
}

pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #eef3f1;
  border-radius: 8px;
  padding: 12px;
  max-height: 360px;
  overflow: auto;
}

@media (max-width: 900px) {
  body {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
  }
  .grid,
  .two,
  .row {
    grid-template-columns: 1fr;
  }
  .topbar {
    align-items: flex-start;
    gap: 12px;
  }
}
