:root {
  --ink: #202124;
  --line: #d7ddd7;
  --paper: #f8f8f2;
  --panel: #fff;
  --accent: #0b6b58;
  --danger: #9b2424;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

main,
.admin-header {
  width: min(980px, calc(100% - 2rem));
  margin: 0 auto;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

section {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

label,
fieldset {
  display: grid;
  gap: 0.35rem;
  margin: 0.8rem 0;
}

.inline {
  display: inline-flex;
  gap: 0.4rem;
  margin-right: 1rem;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea,
.body-editor {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.55rem;
  background: var(--panel);
}

.body-editor {
  min-height: 16rem;
}

.row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  align-items: end;
  margin: 0.6rem 0;
}

button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
}

button[type="button"] {
  background: #fff;
  color: var(--accent);
}

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.error {
  color: var(--danger);
  font-weight: 700;
}

.form-error {
  min-height: 1.5rem;
  color: var(--danger);
  font-weight: 700;
}

pre {
  overflow: auto;
  background: #111;
  color: #eee;
  padding: 1rem;
}

@media (max-width: 720px) {
  .row {
    grid-template-columns: 1fr;
  }
}
