:root {
  --ink: #1b2a4a;
  --paper: #f7f5f2;
  --accent: #c8532b;
  --accent-ink: #ffffff;
  --line: #d8d2c9;
  --muted: #5b5548;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}

.wrap {
  max-width: 64rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

h1 {
  font-size: 1.9rem;
  margin: 0 0 0.25rem;
}

.muted { color: var(--muted); }
.error { color: #a03010; min-height: 1.4em; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 1rem;
}

.switch {
  display: inline-flex;
  border: 1px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
}

.tab {
  font: inherit;
  padding: 0.5rem 1.1rem;
  background: transparent;
  color: var(--ink);
  border: none;
  cursor: pointer;
}
.tab[aria-selected="true"] {
  background: var(--ink);
  color: var(--accent-ink);
}
.tab:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.badge {
  font-size: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
}

.ghost {
  font: inherit;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  padding: 0.4rem 1rem;
  cursor: pointer;
}
.ghost:hover { background: var(--ink); color: var(--accent-ink); }

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
}
caption { text-align: left; padding: 0.5rem 0; font-style: italic; }
th, td {
  text-align: left;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--line);
}
th {
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
tbody tr:last-child td { border-bottom: none; }

form {
  max-width: 22rem;
  display: grid;
  gap: 0.5rem;
}
label { font-weight: bold; }
input {
  font: inherit;
  padding: 0.5rem;
  border: 1px solid var(--line);
  background: #fff;
}
form button {
  font: inherit;
  margin-top: 0.5rem;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  cursor: pointer;
}

@media (max-width: 480px) {
  th, td { padding: 0.5rem; font-size: 0.92rem; }
  .ghost { margin-left: 0; }
}
