:root {
  --bg: #f7f1e8;
  --card: #fffdf9;
  --ink: #2b211c;
  --muted: #6e5f55;
  --line: #e4d7c7;
  --accent: #a4451f;      /* rez */
  --accent-ink: #fff;
  --ok: #5d6b2f;          /* oliva */
  --err: #9b1c2c;         /* burgundy */
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1714; --card: #27201c; --ink: #f1e8df; --muted: #b6a597;
    --line: #3d322b; --accent: #d9743f; --accent-ink: #1d1714; --ok: #a6b56a; --err: #f08a8f;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
.wrap { max-width: 640px; margin: 0 auto; padding: 16px 16px 48px; }
.top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 8px 2px 16px; }
.brand { font-weight: 800; font-size: 1.35rem; text-decoration: none; color: var(--accent); }
.sub { color: var(--muted); font-size: .95rem; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px;
}
h1 { font-size: 1.5rem; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 1.1rem; margin: 22px 0 6px; }
.lead { margin: 0 0 8px; color: var(--muted); }
.deadline { margin: 0; }
.alert {
  border: 1px solid var(--err); color: var(--err); background: color-mix(in srgb, var(--err) 8%, var(--card));
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; font-weight: 600;
}
fieldset { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
legend { font-weight: 700; font-size: 1.1rem; margin-bottom: 10px; padding: 0; }
label { display: block; margin-bottom: 12px; font-weight: 600; font-size: .95rem; }
input, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 11px 12px;
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
input[aria-invalid="true"] { border-color: var(--err); }
.opt { font-weight: 400; color: var(--muted); font-size: .85rem; }
.err { display: block; color: var(--err); font-weight: 600; font-size: .88rem; margin-top: 2px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > label { flex: 1 1 200px; }
.row > .zip { flex: 0 1 120px; }

.product {
  display: grid; grid-template-columns: 1fr 76px auto; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; font-weight: 600;
}
.product:last-of-type { border-bottom: 0; }
.pname small { display: block; color: var(--muted); font-weight: 400; }
.product .qty { margin: 0; text-align: center; padding: 9px 4px; }
.unit { color: var(--muted); font-weight: 400; }

.radio {
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
  padding: 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; font-weight: 400;
}
.radio:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--card)); }
.radio input { width: auto; margin: 4px 0 0; accent-color: var(--accent); }
.radio small { display: block; color: var(--muted); }

details { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; margin: 4px 0 14px; }
details[open] { padding-bottom: 2px; }
summary { cursor: pointer; font-weight: 600; color: var(--accent); }
details[open] summary { margin-bottom: 10px; }

.gdpr, .note { color: var(--muted); font-size: .9rem; }
button {
  display: block; width: 100%; padding: 14px; border: 0; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700; font-size: 1.05rem; cursor: pointer;
}
button:hover { filter: brightness(1.08); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.done h1 { color: var(--ok); }
.foot { color: var(--muted); font-size: .85rem; text-align: center; margin-top: 24px; }
.prose p { margin: 0 0 10px; }

/* admin */
.wide { max-width: 1100px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.tablewrap { overflow-x: auto; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat { flex: 1 1 140px; }
.stat b { display: block; font-size: 1.6rem; }
.btn { display: inline-block; padding: 8px 14px; border: 1px solid var(--accent); border-radius: 8px; text-decoration: none; font-weight: 600; }
