/* Eigene Schriften (SIL OFL 1.1, Adobe Source Sans 3 / Source Code Pro), keine System- oder Fremdschriften. */
@font-face { font-family: "Source Sans 3"; src: url("../fonts/SourceSans3VF-Upright.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/SourceSans3VF-Italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Code Pro"; src: url("../fonts/SourceCodeVF-Upright.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
:root {
  --accent: #1f4e79;
  --bg: #f6f7f9;
  --fg: #1b1f23;
  --muted: #5a6470;
  --card: #ffffff;
  --border: #d9dee5;
  --ok: #1f7a3a;
  --bad: #a3261e;
  --focus: #ffbf47;
  font-size: 17px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Source Sans 3", sans-serif;
  line-height: 1.5; color: var(--fg); background: var(--bg);
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px;
}
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem 1.25rem; background: #fff; border-bottom: 4px solid var(--accent);
}
.brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--fg); font-weight: 600; }
.brand img { height: 28px; }
.brand-sub { color: var(--muted); font-weight: 400; }
.nav { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.nav a { text-decoration: none; }
main { flex: 1; width: 100%; max-width: 920px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
main.wide { max-width: 1200px; }
.site-footer {
  display: flex; gap: 1.25rem; flex-wrap: wrap; justify-content: center;
  padding: 1rem; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--border); background: #fff;
}
h1 { font-size: 1.6rem; margin: 0 0 1rem; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 1.25rem; margin-bottom: 1.25rem; }
.card.narrow { max-width: 440px; margin: 2rem auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { display: flex; flex-direction: column; align-items: flex-start; }
.stat .num { font-size: 2rem; font-weight: 700; color: var(--accent); }
label { display: block; font-weight: 600; margin: .75rem 0 .25rem; }
input[type=text], input[type=email], input[type=password], input:not([type]), textarea, select {
  width: 100%; padding: .55rem .7rem; font: inherit; border: 1px solid #8a94a0; border-radius: 6px; background: #fff;
}
button, .button {
  margin-top: 1rem; padding: .6rem 1.1rem; font: inherit; font-weight: 600; color: #fff; background: var(--accent);
  border: 0; border-radius: 6px; cursor: pointer;
}
button:disabled { opacity: .5; cursor: not-allowed; }
button.secondary { background: #fff; color: var(--accent); border: 2px solid var(--accent); }
button.link { background: none; color: var(--accent); padding: 0; margin: 0; font-weight: 400; text-decoration: underline; }
form.inline { display: inline; }
.alert { background: #fbe9e7; border-left: 4px solid var(--bad); padding: .6rem .8rem; border-radius: 4px; }
.notice { background: #e8f3ea; border-left: 4px solid var(--ok); padding: .6rem .8rem; border-radius: 4px; }
.muted { color: var(--muted); }
.ok { color: var(--ok); font-weight: 600; }
.bad { color: var(--bad); font-weight: 600; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; }
code { background: #eef1f4; padding: .1rem .3rem; border-radius: 3px; font-size: .9em; }
small { color: var(--muted); }
@media (prefers-reduced-motion: no-preference) { button { transition: filter .15s; } button:hover { filter: brightness(1.1); } }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 1rem; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }
.doc-preview, .doc-scroll { background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 1rem 1.25rem; }
.doc-scroll { max-height: 55vh; overflow-y: auto; }
.doc-preview h1, .doc-scroll h1 { font-size: 1.3rem; } .doc-preview h2, .doc-scroll h2 { font-size: 1.1rem; }
label.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 600; margin-top: 1rem; }
label.check input { margin-top: .3rem; width: 1.2rem; height: 1.2rem; }
input.copy { font-family: "Source Code Pro", monospace; font-size: .9rem; }
table.small { font-size: .82rem; } table.small code { font-size: .78rem; white-space: pre-wrap; word-break: break-all; }
fieldset { border: 1px solid var(--border); border-radius: 6px; margin: .75rem 0; } legend { font-weight: 600; }
fieldset label { font-weight: 400; display: flex; gap: .5rem; align-items: flex-start; }
.small { font-size: .9rem; }
textarea { font-family: "Source Code Pro", monospace; font-size: .9rem; }

code, pre, kbd { font-family: "Source Code Pro", monospace; }

/* Typ B: Dokumentansicht und Signatur */
@font-face { font-family: "Caveat"; src: url("../fonts/CaveatVF.ttf") format("truetype"); font-weight: 400 700; font-display: swap; }
.doc-status { position: sticky; top: 0; z-index: 2; background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: .5rem .8rem; margin-bottom: .75rem; display: flex; gap: 1rem; justify-content: space-between; font-size: .95rem; }
.doc-status #scroll-hint { color: var(--bad); font-weight: 600; }
.doc-pages { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.25rem; }
.doc-page { margin: 0; background: #fff; border: 1px solid var(--border); box-shadow: 0 1px 4px rgba(0,0,0,.08); width: 100%; max-width: 900px; align-self: center; }
.doc-page img { display: block; width: 100%; height: auto; }
.doc-page figcaption { font-size: .8rem; color: var(--muted); text-align: right; padding: .2rem .5rem; border-top: 1px solid var(--border); }
.sig-mode { border: 0; padding: 0; margin: 0 0 .5rem; display: flex; gap: 1.5rem; flex-wrap: wrap; }
.sig-mode label { font-weight: 500; margin: 0; }
.sig-canvas { width: 100%; max-width: 700px; aspect-ratio: 700 / 220; border: 1px dashed #8a94a0; border-radius: 6px; background: #fff; touch-action: none; display: block; }
#sig-typed { max-width: 700px; }
label.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 500; }
label.check input { margin-top: .3rem; }
button.small { font-size: .85rem; padding: .35rem .7rem; }
