:root {
  --bg: #f4f1e8;
  --card: #fffdf7;
  --ink: #1f1c18;
  --muted: #665f57;
  --line: #d8d1c5;
  --accent: #cf6a32;
  --accent-dark: #8c4319;
  --secondary: #304552;
  --success: #e7f6e9;
  --warn: #fff3da;
  --error: #fde6e3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(207, 106, 50, 0.12), transparent 30%),
    linear-gradient(180deg, #f8f5ee, var(--bg));
  min-height: 100vh;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 56px;
}

.wrap.narrow {
  max-width: 560px;
}

.hero {
  margin-bottom: 18px;
}

.eyebrow {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.6);
}

h1 {
  margin: 14px 0 8px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
}

h2 {
  margin: 0;
}

.lead {
  margin: 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(42, 30, 20, 0.06);
  margin-top: 18px;
}

.grid {
  display: grid;
  gap: 14px;
}

.two {
  grid-template-columns: 1fr;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

input,
select,
button {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #bdb4a8;
  padding: 14px;
  font-size: 16px;
}

input,
select {
  background: #fff;
}

button {
  border: 0;
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

button[disabled] {
  opacity: 0.65;
  cursor: wait;
}

.table-action {
  width: auto;
  padding: 8px 10px;
  font-size: 14px;
  margin-right: 6px;
  margin-bottom: 6px;
}

.secondary-button {
  background: var(--secondary);
}

.secondary-button:hover {
  background: #1f303a;
}

.note,
.meta {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.result,
.status {
  border-radius: 14px;
  padding: 14px;
  margin-top: 14px;
  border: 1px solid var(--line);
  background: #fbfaf7;
}

.hidden {
  display: none;
}

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

.warning {
  background: var(--warn);
}

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

.mono {
  font-family: "Courier New", monospace;
  word-break: break-all;
}

.toolbar,
.section-title-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-form {
  margin-top: 12px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.checkbox-row input {
  width: auto;
}

.summary-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.summary-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  padding: 14px;
}

.summary-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.summary-value {
  margin-top: 8px;
  font-size: 1.3rem;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 16px;
}

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

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

th {
  font-size: 0.9rem;
  color: var(--muted);
}

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