@font-face { font-family: 'Hanken Grotesk'; font-weight: 400; src: url(/fonts/hanken-grotesk-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-weight: 600; src: url(/fonts/hanken-grotesk-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-weight: 300; src: url(/fonts/hanken-grotesk-latin-300-normal.woff2) format('woff2'); }

:root {
  --bg: #F9F9F7; --olive: #59624C; --olive-dark: #474F3C; --sand: #D3C3A9; --text: #1C1F26; --gold: #B9A170;
  --tint: #F1EDE5; --muted: #6E7068; --line: #E4DCCD; --white: #FFFFFF; --danger: #A4453A;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
html { scroll-padding-bottom: 120px; scroll-padding-top: 24px; }
body { font-family: 'Hanken Grotesk', system-ui, sans-serif; font-size: 17px; line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }

/* Kopf */
.topbar { background: var(--olive); color: var(--bg); border-bottom: 3px solid var(--gold); }
.topbar .inner { max-width: 880px; margin: 0 auto; padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar .eyebrow { color: var(--gold); }
.topbar h1 { margin: 2px 0 0; font-size: 24px; font-weight: 600; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; }
.topbar form button { background: none; border: 1px solid rgba(249, 249, 247, 0.35); color: var(--bg); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: 14px; }

main { max-width: 880px; margin: 0 auto; padding: 24px 24px 140px; }

/* Abschnitte */
.section { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px 28px; margin-top: 20px; }
.section h2 { display: flex; align-items: baseline; gap: 12px; margin: 0; font-size: 22px; font-weight: 600; color: var(--olive); }
.section h2 .n { font-size: 13px; color: var(--gold); letter-spacing: 0.08em; }
.section .hint { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; margin-top: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field > label, .field > .label { font-weight: 600; font-size: 15px; }
.field .req { color: var(--gold); margin-left: 4px; }
.field .sub { color: var(--muted); font-size: 13px; }

input[type=text], input[type=email], input[type=tel], input[type=number], textarea {
  width: 100%; border: 1.5px solid var(--line); background: var(--bg); border-radius: 8px; padding: 12px 14px; font-size: 18px; outline: none;
  transition: border-color 0.15s, background 0.15s;
}
input:focus, textarea:focus { border-color: var(--olive); background: var(--white); }
textarea { min-height: 96px; resize: vertical; }
.invalid input, .invalid .tagbox { border-color: var(--danger); }
.error-text { color: var(--danger); font-size: 14px; }

.unit { position: relative; }
.unit input { padding-right: 76px; }
.unit span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 15px; pointer-events: none; }
.range { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.range > span { color: var(--muted); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { border: 1.5px solid var(--line); background: var(--bg); border-radius: 999px; padding: 10px 18px; cursor: pointer; font-size: 17px;
  display: inline-flex; align-items: center; gap: 8px; transition: all 0.12s; user-select: none; }
.chip:hover { border-color: var(--sand); }
.chip[aria-pressed=true] { background: var(--olive); border-color: var(--olive); color: var(--bg); }
.chip .box { width: 18px; height: 18px; border: 1.5px solid currentColor; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; opacity: 0.7; }
.chip[aria-pressed=true] .box::after { content: '✓'; }

/* Tags */
.tagbox { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: var(--bg); border-radius: 8px; padding: 8px; }
.tagbox:focus-within { border-color: var(--olive); background: var(--white); }
.tagbox input { border: none !important; background: transparent !important; flex: 1; min-width: 160px; padding: 6px; }
.tag { background: var(--tint); border-radius: 6px; padding: 6px 6px 6px 12px; display: inline-flex; align-items: center; gap: 6px; }
.tag button { border: none; background: none; cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; padding: 0 4px; }

/* Logo */
.logo-row { display: flex; align-items: center; gap: 14px; }
.logo-prev { height: 56px; max-width: 160px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: var(--white); }
.btn-ghost { border: 1.5px solid var(--line); background: var(--bg); border-radius: 8px; padding: 10px 16px; cursor: pointer; }
.btn-ghost:hover { border-color: var(--sand); }

/* Aktionsleiste */
.actions { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(249, 249, 247, 0.96); border-top: 1px solid var(--line); backdrop-filter: blur(6px); }
.actions .inner { max-width: 880px; margin: 0 auto; padding: 16px 24px; display: flex; align-items: center; gap: 12px; }
.actions .spacer { flex: 1; }
.btn { border: none; border-radius: 999px; padding: 14px 26px; font-weight: 600; font-size: 17px; cursor: pointer; transition: background 0.15s; }
.btn-primary { background: var(--olive); color: var(--bg); }
.btn-primary:hover { background: var(--olive-dark); }
.btn-secondary { background: var(--tint); color: var(--olive); }
.btn-secondary:hover { background: var(--line); }
.btn-link { background: none; border: none; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: 15px; padding: 8px; }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.status { font-size: 15px; color: var(--muted); }
.status.ok { color: var(--olive); }
.status.err { color: var(--danger); }

/* Mail-Dialog */
dialog { border: none; border-radius: var(--radius); padding: 28px; width: min(480px, 92vw); box-shadow: 0 20px 60px rgba(28, 31, 38, 0.25); }
dialog::backdrop { background: rgba(28, 31, 38, 0.35); }
dialog h3 { margin: 0 0 6px; color: var(--olive); font-size: 20px; }
dialog p { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
dialog .row { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* Login */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login form { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--olive); border-radius: var(--radius); padding: 36px; width: min(420px, 100%); }
.login h1 { margin: 4px 0 20px; font-size: 24px; color: var(--olive); }
.login .eyebrow { color: var(--gold); }
.login button { width: 100%; margin-top: 16px; }
.login .brand { display: block; height: 18px; margin: 24px auto 0; }
