/* Plain, large, high-contrast. Written for people who are not technical. */
:root {
  --ink: #1f1a17;
  --muted: #5b524b;
  --paper: #fbf8f4;
  --card: #ffffff;
  --line: #d9cfc4;
  --brand: #8a4b12;
  --brand-dark: #6b3a0e;
  --ok: #1e6b35;
  --ok-bg: #e7f5ec;
  --error: #9b1c1c;
  --error-bg: #fbeaea;
  font-size: 18px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}
h1 { font-size: 2rem; margin: 0.5rem 0 0.25rem; }
h2 { font-size: 1.35rem; margin-top: 2rem; }
a { color: var(--brand); }
.lead { color: var(--muted); font-size: 1.1rem; margin-top: 0; }
.muted { color: var(--muted); }

.topbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
  padding: 0.75rem 1.5rem; background: var(--card); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; font-size: 1.2rem; color: var(--ink); text-decoration: none; margin-right: auto; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.topbar nav a { font-size: 1.05rem; text-decoration: none; padding: 0.4rem 0.2rem; }
.topbar nav a:hover, .topbar nav a:focus { text-decoration: underline; }

.page { max-width: 62rem; margin: 0 auto; padding: 1.5rem; }
.narrow { max-width: 28rem; margin: 2rem auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1.5rem; }

.stack { display: flex; flex-direction: column; gap: 0.6rem; }
.stack label, .filters label { font-weight: 600; margin-top: 0.6rem; }
input, select, textarea {
  font: inherit; font-size: 1.1rem; padding: 0.65rem 0.8rem;
  border: 2px solid #b8aca0; border-radius: 8px; background: #fff; color: var(--ink);
  width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 3px solid #f2b86a; border-color: var(--brand); }
.code-input { font-size: 2rem; letter-spacing: 0.4em; text-align: center; max-width: 14rem; }

.btn, .btn-primary, .btn-danger, button.link {
  display: inline-block; font: inherit; font-size: 1.05rem; font-weight: 600;
  padding: 0.65rem 1.2rem; border-radius: 8px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn { background: #fff; color: var(--brand); border-color: var(--brand); }
.btn:hover { background: #f5ece3; }
.btn-danger { background: #fff; color: var(--error); border-color: var(--error); }
button.link { background: none; color: var(--brand); padding: 0.4rem 0.2rem; text-decoration: underline; }
button:focus-visible, a:focus-visible, .btn:focus-visible { outline: 3px solid #f2b86a; outline-offset: 2px; }
.actions { margin-top: 1rem; }
.inline { display: inline; }

.notice { padding: 0.9rem 1.1rem; border-radius: 8px; margin-bottom: 1rem; font-size: 1.05rem; }
.notice-ok { background: var(--ok-bg); color: var(--ok); }
.notice-error { background: var(--error-bg); color: var(--error); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin-top: 1rem; }
.tile {
  display: flex; flex-direction: column; gap: 0.4rem; padding: 1.25rem; min-height: 8rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  text-decoration: none; color: var(--ink);
}
.tile:hover, .tile:focus { border-color: var(--brand); box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.tile-title { font-weight: 700; font-size: 1.2rem; color: var(--brand); }
.tile-text { color: var(--muted); }

.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 0.6rem; margin: 1rem 0; }
.filters label { margin-top: 0; }
.filters input, .filters select { width: auto; min-width: 14rem; }

.table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 8px; overflow: hidden; }
.table th, .table td { text-align: left; padding: 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: #f3ece4; font-weight: 700; }
.plain { padding-left: 1.2rem; }

@media (max-width: 640px) {
  :root { font-size: 17px; }
  .topbar nav { order: 3; width: 100%; }
}
