:root {
  color-scheme: light;
  --bg: #ebe4d8;
  --paper: #fffdf8;
  --ink: #1f1a16;
  --muted: #6e675f;
  --line: #e4dcd0;
  --accent: #8f3d22;
  --accent-ink: #fffaf6;
  --ok: #1d6b45;
  --ok-bg: #e7f4ec;
  --wait: #8a5a12;
  --wait-bg: #f8efd8;
  --run: #1e4e8c;
  --run-bg: #e7eef8;
  --bad: #8d1d1d;
  --bad-bg: #f8e6e4;
  --quiet: #5c564e;
  --quiet-bg: #eeeae4;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 "Avenir Next", "Segoe UI", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input { font: inherit; }
.wrap { width: min(760px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 72px; }
.top { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 22px; }
.brand { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.brand strong { display: block; font-size: 18px; letter-spacing: -0.02em; }
.brand small { display: block; color: var(--muted); font-size: 13px; }
.nav { display: flex; gap: 14px; align-items: center; }
.nav form { margin: 0; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(70, 48, 20, 0.06);
  padding: 22px;
  margin-bottom: 16px;
}
.rule { height: 4px; background: var(--accent); margin: -22px -22px 18px; }
h1 { font-size: 28px; line-height: 1.25; letter-spacing: -0.03em; margin: 0 0 8px; }
h2 { font-size: 15px; margin: 0 0 10px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); font-weight: 650; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.banner { background: #f8efd8; border: 1px solid #ead7a4; padding: 12px 14px; margin-bottom: 16px; }
.row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.kv { display: grid; grid-template-columns: 108px 1fr; gap: 8px 12px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.mono, code, pre { font-family: "IBM Plex Mono", "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.mono { font-size: 14px; }
pre {
  margin: 0;
  padding: 14px;
  background: #f6f1e8;
  border: 1px solid var(--line);
  overflow: auto;
  font-size: 13px;
  line-height: 1.45;
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 13px;
  border: 1px solid transparent;
}
.pill.pending { color: var(--wait); background: var(--wait-bg); }
.pill.approved, .pill.provisioning { color: var(--run); background: var(--run-bg); }
.pill.completed { color: var(--ok); background: var(--ok-bg); }
.pill.failed { color: var(--bad); background: var(--bad-bg); }
.pill.rejected { color: var(--quiet); background: var(--quiet-bg); }
.list { display: flex; flex-direction: column; gap: 10px; }
.item {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: inherit;
  text-decoration: none;
}
.item:hover { border-color: #c8b8a4; }
.item strong { font-weight: 650; }
.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  bottom: 12px;
  background: rgba(255, 253, 248, 0.96);
  border: 1px solid var(--line);
  padding: 12px;
}
label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 14px; }
input {
  width: 100%;
  border: 1px solid #d9d0c3;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
}
input:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button {
  border: 1px solid transparent;
  padding: 12px 16px;
  cursor: pointer;
}
button.primary { background: var(--accent); color: var(--accent-ink); }
button.danger { background: transparent; color: var(--bad); border-color: #e4b4b0; }
button.text { background: transparent; color: var(--ink); border-color: var(--line); padding: 8px 12px; }
button:disabled { opacity: 0.6; cursor: wait; }
.message:empty { display: none; }
.message { margin-top: 12px; color: var(--bad); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 18px; border-left: 2px solid var(--line); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 6px;
  width: 8px;
  height: 8px;
  background: var(--accent);
}
.timeline .when { color: var(--muted); font-size: 13px; }
details summary { cursor: pointer; color: var(--muted); }
@media (max-width: 640px) {
  h1 { font-size: 24px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv div { margin-bottom: 8px; }
  .wrap { width: min(760px, calc(100% - 24px)); }
}
@media (min-width: 720px) {
  .actions { flex-direction: row; align-items: end; }
  .actions button { width: auto; }
  .actions label { flex: 1; }
}