:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #66736c;
  --line: #dce4de;
  --paper: #f6f8f5;
  --green: #156b4a;
  --green-dark: #0c5137;
  --amber: #fff4d6;
  --red: #9c2828;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: var(--green); }
.shell { max-width: 1120px; margin: 0 auto; padding: 24px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.brand { color: var(--ink); font-weight: 750; font-size: 18px; text-decoration: none; }
.topbar form { margin: 0; }
h1 { line-height: 1.15; margin: 0 0 8px; font-size: clamp(28px, 4vw, 38px); }
h2 { margin-top: 30px; font-size: 21px; }
.muted { color: var(--muted); }
.row { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.card { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin: 16px 0; box-shadow: 0 3px 14px #1b33230a; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.full { grid-column: 1 / -1; }
label { display: block; font-weight: 650; margin: 0 0 6px; }
input[type=text], input[type=url], input[type=datetime-local], input[type=password], textarea, select {
  width: 100%; border: 1px solid #bbc8bf; border-radius: 8px; padding: 10px 12px;
  background: white; color: var(--ink); font: inherit;
}
textarea { min-height: 110px; resize: vertical; }
textarea.article { min-height: 360px; }
input:focus, textarea:focus, select:focus { outline: 3px solid #156b4a2b; border-color: var(--green); }
.check { display: flex; align-items: center; gap: 9px; font-weight: 650; }
.check input { width: 18px; height: 18px; accent-color: var(--green); }
.button { display: inline-block; border: 0; border-radius: 8px; padding: 10px 15px; background: var(--green); color: white; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--green-dark); color: white; }
.button.secondary { color: var(--ink); background: #e9efea; }
.button.danger { color: var(--red); background: #fff0ee; }
.button.small { padding: 7px 10px; font-size: 14px; }
.notice { border: 1px solid #e7cb7b; background: var(--amber); border-radius: 8px; padding: 12px 14px; margin: 14px 0; }
.error { color: var(--red); font-weight: 700; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; border-bottom: 1px solid var(--line); padding: 12px 8px; vertical-align: top; }
.pill { display: inline-block; border-radius: 999px; padding: 3px 9px; background: #e8eee9; font-size: 13px; font-weight: 650; }
.pill.ok { color: #0d583b; background: #e2f5e9; }
.pill.warn { color: #7a5511; background: #fff2cc; }
.pill.bad { color: #8d2424; background: #fde8e6; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #f8faf8; border: 1px solid var(--line); padding: 14px; border-radius: 8px; max-height: 520px; overflow: auto; }
.source { margin: 10px 0; padding: 12px 0 0; border-top: 1px solid var(--line); }
.target-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; }
.target-card p { margin: 4px 0; }
.small-text { font-size: 13px; }
.login { max-width: 420px; margin: 12vh auto; }
@media (max-width: 700px) {
  .shell { padding: 16px; }
  .grid { grid-template-columns: 1fr; }
  .row { flex-direction: column; }
  .table th:nth-child(2), .table td:nth-child(2) { display: none; }
  .target-card { grid-template-columns: 1fr; }
}
