@font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url(/static/inter-Regular.woff2) format('woff2')}
@font-face{font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;src:url(/static/inter-SemiBold.woff2) format('woff2')}
@font-face{font-family:'Inter';font-style:normal;font-weight:700;font-display:swap;src:url(/static/inter-Bold.woff2) format('woff2')}

:root {
  color-scheme: light;
  --orange: #ff5c00;
  --orange-deep: #e43d03;
  --rust: #a8381e;
  --slate: #3c4b54;
  --bg: #f3f4f5;
  --surface: #ffffff;
  --text: #22292e;
  --heading: #3c4b54;
  --muted: #656565;
  --line: #dadde0;
  --field: #ffffff;
  --accent: #d94800;
  --accent-soft: #fff1e8;
  --accent-text: #ffffff;
  --warn-bg: #fff4e0;
  --warn-line: #e3a530;
  --warn-text: #6b4500;
  --danger: #b42318;
  --ok: #1d7a46;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #15191c; --surface: #1e2428; --text: #e6e9eb; --heading: #f0f2f3; --muted: #a3abb1;
    --line: #353e44; --field: #15191c; --accent: #ff7a2e; --accent-soft: #3a2416; --accent-text: #1a0d05;
    --warn-bg: #3a2c12; --warn-line: #b8862a; --warn-text: #f3d9a4; --danger: #ff8a80; --ok: #6fd39b;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15191c; --surface: #1e2428; --text: #e6e9eb; --heading: #f0f2f3; --muted: #a3abb1;
  --line: #353e44; --field: #15191c; --accent: #ff7a2e; --accent-soft: #3a2416; --accent-text: #1a0d05;
  --warn-bg: #3a2c12; --warn-line: #b8862a; --warn-text: #f3d9a4; --danger: #ff8a80; --ok: #6fd39b;
}
*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "calt", "kern";
}

/* Kopfleiste wie im Briefbogen */
.masthead { position: relative; background: #ffffff; height: 76px; overflow: hidden; }
.masthead .logo { position: absolute; left: max(1.25rem, calc((100% - 46rem) / 2 + 1.25rem)); top: 50%; transform: translateY(-50%); height: 40px; width: auto; display: block; }
.masthead .band {
  position: absolute; top: 0; bottom: 14px; right: 0; width: 64%;
  background: linear-gradient(90deg, #ff4a0a 0%, var(--orange-deep) 45%, var(--rust) 100%);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 9% 100%);
  display: flex; align-items: center; justify-content: flex-end; gap: 1.4rem; padding-right: max(1.25rem, calc((100vw - 46rem) / 2 + 1.25rem));
  color: #fff; font-size: .9rem; font-weight: 500;
}
.band span { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; }
.band svg { width: 15px; height: 15px; flex: none; }
@media (max-width: 640px) {
  .masthead .band { width: 38%; }
  .band span { display: none; }
}
.rule { height: 3px; background: linear-gradient(90deg, var(--orange), var(--rust)); }

main { max-width: 46rem; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
h1 { margin: 0; font-size: 2rem; line-height: 1.15; font-weight: 700; color: var(--heading); letter-spacing: -.01em; }
h1 em { font-style: normal; color: var(--orange); }
.subtitle { margin: .15rem 0 1rem; font-size: 1.25rem; color: var(--heading); font-weight: 400; }
.lead { margin: 0 0 1.75rem; color: var(--muted); max-width: 38rem; }
.draft {
  margin: 0 0 1.5rem; padding: .6rem .9rem; border-radius: 8px; font-size: .88rem;
  background: var(--accent-soft); color: var(--text); border: 1px dashed var(--orange);
}
form { display: grid; gap: 1.25rem; }
section.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.3rem 1.3rem 1.45rem; display: grid; gap: 1rem;
}
section.card > h2 { margin: 0; font-size: 1.08rem; font-weight: 700; color: var(--heading); }
.row { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }
label.f { display: grid; align-content: start; gap: .3rem; font-size: .93rem; font-weight: 600; color: var(--heading); }
.opt { color: var(--muted); font-weight: 400; font-size: .84rem; }
.help { color: var(--muted); font-size: .85rem; font-weight: 400; }
input[type=text], input[type=email], input[type=datetime-local], select, textarea {
  font: inherit; font-weight: 400; color: var(--text); background: var(--field);
  border: 1px solid var(--line); border-radius: 8px; padding: .58rem .7rem; width: 100%;
}
input:hover, select:hover, textarea:hover { border-color: #bfbfbf; }
textarea { resize: vertical; min-height: 5.5rem; }
textarea.mono, input.mono { font-family: ui-monospace, "DejaVu Sans Mono", monospace; font-size: .85rem; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
input:user-invalid, textarea:user-invalid, select:user-invalid { border-color: var(--danger); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .6rem; }
.tile { position: relative; }
.tile input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tile span {
  display: block; height: 100%; padding: .75rem .9rem; border: 1px solid var(--line);
  border-radius: 10px; background: var(--field); cursor: pointer;
}
.tile b { display: block; font-size: .94rem; font-weight: 600; color: var(--heading); }
.tile small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.4; margin-top: .15rem; }
.tile input:checked + span { border-color: var(--orange); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--orange); }
.tile input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }

.sev { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.sev .tile span { text-align: center; }
.sev .tile b { font-size: 1.02rem; }
.notice {
  border-left: 4px solid var(--warn-line); background: var(--warn-bg); color: var(--warn-text);
  padding: .85rem 1rem; border-radius: 0 10px 10px 0; font-size: .91rem; display: grid; gap: .5rem;
}
.notice p { margin: 0; }
.notice label { display: flex; gap: .55rem; align-items: flex-start; font-weight: 600; }
.notice input { margin-top: .25rem; accent-color: var(--orange); }
.softwarn { color: var(--warn-text); background: var(--warn-bg); padding: .5rem .75rem; border-radius: 8px; font-size: .87rem; margin: 0; }

.checks { display: flex; flex-wrap: wrap; gap: .4rem .9rem; }
.checks label, .inline { display: flex; gap: .45rem; align-items: center; font-size: .92rem; }
input[type=checkbox], input[type=radio] { accent-color: var(--orange); }

.drop {
  border: 2px dashed var(--line); border-radius: 12px; padding: 1.3rem; text-align: center;
  background: var(--field); cursor: pointer;
}
.drop.over { border-color: var(--orange); background: var(--accent-soft); }
.drop p { margin: .2rem 0; color: var(--heading); }
.drop .help { display: block; }
.files { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.files li {
  display: flex; justify-content: space-between; gap: .75rem; align-items: center;
  padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 8px; font-size: .9rem; background: var(--surface);
}
.files li .name { overflow-wrap: anywhere; }
.files button { font: inherit; font-size: .85rem; background: none; border: 0; color: var(--danger); cursor: pointer; }
.harwarn { font-size: .85rem; color: var(--warn-text); margin: 0; }

details.preview { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .95rem 1.2rem; }
details.preview summary { cursor: pointer; font-weight: 600; color: var(--heading); }
details.preview pre {
  margin: .8rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .82rem;
  font-family: ui-monospace, "DejaVu Sans Mono", monospace; color: var(--muted);
}
a { color: var(--accent); }
.actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
button.primary {
  font: inherit; font-size: 1.05rem; font-weight: 700; cursor: pointer;
  background: linear-gradient(90deg, #e85000, var(--orange-deep)); color: #ffffff;
  border: 0; border-radius: 10px; padding: .8rem 1.6rem;
}
button.primary:hover { background: linear-gradient(90deg, var(--orange-deep), var(--rust)); }
.result { font-weight: 600; color: var(--ok); }
.hidden { display: none !important; }

footer { border-top: 3px solid var(--orange); background: var(--surface); }
footer .in { max-width: 46rem; margin: 0 auto; padding: 1.1rem 1.25rem 1.4rem; font-size: .8rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .4rem 2rem; }
footer a { color: var(--muted); }

.done { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem 1.4rem; }
.done h2 { margin: 0 0 .5rem; color: var(--heading); }
.done p { margin: 0; }
.errors { border-left: 4px solid var(--danger); background: var(--surface); padding: .85rem 1rem; border-radius: 0 10px 10px 0; color: var(--danger); }
.errors ul { margin: .3rem 0 0; padding-left: 1.2rem; }
button.primary[disabled] { opacity: .6; cursor: progress; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
