@font-face { font-family: 'Lato'; font-weight: 400; font-display: swap; src: url(/static/vendor/lato-400.woff2) format('woff2'); }
@font-face { font-family: 'Lato'; font-weight: 700; font-display: swap; src: url(/static/vendor/lato-700.woff2) format('woff2'); }
@font-face { font-family: 'Lora'; font-weight: 500; font-display: swap; src: url(/static/vendor/lora-500.woff2) format('woff2'); }
@font-face { font-family: 'Lora'; font-weight: 600; font-display: swap; src: url(/static/vendor/lora-600.woff2) format('woff2'); }
@font-face { font-family: 'Lora'; font-style: italic; font-weight: 500; font-display: swap; src: url(/static/vendor/lora-500-italic.woff2) format('woff2'); }

/* Farben aus Logo und Webseite (weißes Papier, Logo-Rosé, Lora/Lato) */
:root {
  --paper: #ffffff;
  --ink: #2b2624;
  --muted: #6f6763;
  --brand: #ae8a78;        /* Logo-Rosé: Markenelemente, Linien mit Bedeutung */
  --accent: #8a6553;       /* dunkleres Rosé: Aktionen, ausreichender Kontrast auf Weiß */
  --accent-strong: #6f4f40;
  --accent-soft: #f6f1ee;  /* nur Hover/Auswahl */
  --accent-line: #e8e0db;
  --line-input: #d9cfc9;   /* Rahmen von Eingabefeldern und Auswahlknöpfen */
  --line-soft: #f1ebe7;    /* Trennlinien in Listen und Tabellen */
  --ok: #4d6b52;
  --ok-soft: #edf3ee;
  --warn: #8a5f1c;
  --warn-soft: #faf2e3;
  --bad: #a3413b;
  --bad-soft: #f9ebea;
  --radius: 8px;           /* Controls */
  --radius-card: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Lato', system-ui, sans-serif; font-size: 16px; line-height: 1.5;
  color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
[x-cloak] { display: none !important; }
h1, h2, h3 { font-family: 'Lora', Georgia, serif; font-weight: 600; line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.005em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.script { font-family: 'Lora', serif; color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  border: 1px solid var(--accent); background: var(--accent); color: #fff;
  padding: .6em 1.1em; border-radius: var(--radius); font: inherit; font-weight: 700; font-size: .95rem;
  cursor: pointer; text-decoration: none; transition: background .15s; white-space: normal; text-align: center;
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--accent); border-color: var(--accent-line); }
.btn.ghost:hover { border-color: var(--accent); background: transparent; }
.btn.subtle { background: var(--accent-soft); color: var(--accent-strong); border-color: transparent; }
.btn.subtle:hover { background: var(--accent-line); }
.btn.danger { background: transparent; color: var(--bad); border-color: transparent; padding-left: 0; padding-right: 0; }
.btn.danger:hover { text-decoration: underline; }
.btn.sm { padding: .35em .75em; font-size: .85rem; white-space: nowrap; }
.btn.lg { padding: .85em 1.5em; font-size: 1.05rem; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.icon-btn { border: 0; background: none; cursor: pointer; color: var(--muted); padding: .3em .45em; border-radius: 4px; font-size: .95rem; }
.icon-btn:hover { background: var(--accent-soft); color: var(--ink); }

/* Formulare */
label.field { display: block; margin-bottom: 16px; }
label.field > span:not(.hint):not(.field-error), .field-label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 6px; }
.hint { display: block; font-size: .82rem; font-weight: 400; color: var(--muted); margin-top: 4px; }
.req { color: var(--accent); font-weight: 700; margin-left: .15em; }
.req-legend { font-size: .82rem; color: var(--muted); margin: 0 0 1rem; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=password], input[type=search], select, textarea {
  width: 100%; font: inherit; color: inherit; background: #fff;
  border: 1px solid var(--line-input); border-radius: var(--radius); padding: .6em .75em;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(138, 101, 83, .16); }
.invalid input, .invalid select, .invalid textarea, input.invalid { border-color: var(--bad); background: #fffafa; }
.invalid .choice, .invalid.consent { border-color: var(--bad); }
.field-error { display: block; color: var(--bad); font-size: .875rem; font-weight: 400; margin-top: 6px; }
textarea { resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1rem; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 1rem; }
@media (max-width: 640px) { .grid2, .grid3, .grid4 { grid-template-columns: 1fr; } }

.choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.choice {
  display: inline-flex; align-items: center; gap: .5em; cursor: pointer; user-select: none; position: relative;
  border: 1px solid var(--line-input); background: #fff; border-radius: var(--radius); padding: .55em .95em; font-size: .95rem;
  transition: border-color .15s, background .15s;
}
.choice:hover { border-color: var(--accent); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); font-weight: 700; }
.choices.vertical { flex-direction: column; align-items: stretch; }
.choice-note { display: block; font-size: .82rem; font-weight: 400; color: var(--muted); }

.consent { display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1rem; border-radius: var(--radius); border: 1px solid var(--accent-line); cursor: pointer; }
.consent input { width: 1.2rem; height: 1.2rem; margin-top: .15rem; accent-color: var(--accent); flex: none; }

/* Flächen: Linien statt Schatten */
.card { background: var(--paper); border: 1px solid var(--accent-line); border-radius: var(--radius-card); padding: 24px; }
@media (max-width: 640px) { .card { padding: 20px; } }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.spacer { flex: 1; }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: .15em .55em; border-radius: 4px; background: var(--accent-soft); color: var(--accent-strong); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.notice { padding: 12px 16px; border-radius: var(--radius); background: var(--accent-soft); font-size: .92rem; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100;
  background: var(--ink); color: #fff; padding: .7em 1.2em; border-radius: var(--radius); font-size: .92rem;
  box-shadow: 0 6px 24px rgba(0,0,0,.18); max-width: calc(100% - 32px);
}
.toast.error { background: var(--bad); }

table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: .82rem; color: var(--muted); font-weight: 700; padding: .5rem .6rem; border-bottom: 1px solid var(--accent-line); }
table.list td { padding: .6rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: var(--accent-soft); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.sigpad { width: 100%; height: 180px; border: 1px dashed var(--brand); border-radius: var(--radius); background: #fff; touch-action: none; display: block; }
.invalid .sigpad { border-color: var(--bad); }
