:root {
  color-scheme: light;
  --bg: #f5f1e8;
  --panel: #fffdf8;
  --text: #1f1b16;
  --muted: #756a5c;
  --line: #d9cfbf;
  --accent: #8a3b12;
  --accent-2: #0c5b56;
  --success: #e8f5ec;
  --error: #fdeceb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Iosevka Etoile", "IBM Plex Sans", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(138, 59, 18, 0.16), transparent 30%),
    radial-gradient(circle at top right, rgba(12, 91, 86, 0.12), transparent 35%),
    var(--bg);
  color: var(--text);
}

a { color: var(--accent-2); }
code, pre { font-family: "Iosevka", monospace; }

.site-header, .layout {
  width: min(1040px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0 1rem;
  align-items: flex-start;
}

.brand {
  text-decoration: none;
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 700;
}

.tagline, .muted { color: var(--muted); }
.small { font-size: 0.85rem; }

.layout {
  display: grid;
  gap: 1rem;
  padding-bottom: 3rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: 0 18px 40px rgba(38, 28, 17, 0.08);
}

.card.narrow { max-width: 34rem; }

.captcha-block {
  margin-top: 1rem;
}

.captcha-host {
  margin-top: 0.6rem;
  min-height: 318px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.actions, .inline-form {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.button, button {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.1rem;
  background: var(--accent);
  color: white;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

button.danger {
  background: #a52818;
}

label {
  display: block;
  margin: 0.9rem 0 0.35rem;
  font-weight: 600;
}

input, textarea, select {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 0.85rem 0.6rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.76rem;
}

.badge.active {
  background: #dcefe8;
  color: #0a5a4b;
}

.badge.disabled {
  background: #f4d9d4;
  color: #7d2614;
}

.notice {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.notice.success { background: var(--success); }
.notice.error { background: var(--error); }

pre {
  overflow-x: auto;
  padding: 1rem;
  border-radius: 14px;
  background: #1e1915;
  color: #f8f0e7;
}

.details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.65rem 1rem;
}

.details dt {
  font-weight: 700;
}

@media (max-width: 720px) {
  .site-header, .section-head {
    flex-direction: column;
  }

  table, thead, tbody, th, td, tr {
    display: block;
  }

  th { display: none; }
  td {
    padding-left: 0;
    padding-right: 0;
  }
}
