/* Avolié Design: dieselben Farben, Schrift und Bausteine wie die Website (avolie.net).
   Palette: chalk (Seite), paper (Karten), ink (Text), slate (Nebentext), brass (der eine Akzent). Schrift: Bricolage Grotesque. */

@font-face { font-family: "Bricolage Grotesque"; src: url("/assets/fonts/bricolage-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("/assets/fonts/bricolage-700.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --chalk: #f2f3ef; --paper: #ffffff; --ink: #17202b; --slate: #556070;
  --brass: #8a6420; --brass-soft: #eadfc6; --brass-light: #e3c377; --line: #d6d9d0;
  --danger: #a3302a; --danger-soft: #f6e3e1; --ok: #2b6b46; --ok-soft: #e0efe6;
  --radius: 14px; --gutter: clamp(20px, 4vw, 48px); --max: 1180px;
  --font: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --chalk: #0e1218; --paper: #161b24; --ink: #f2f4f7; --slate: #a3adbd;
  --brass: #d1a85c; --brass-soft: #2d2514; --brass-light: #e3c377; --line: #2a3140;
  --danger: #ee7b72; --danger-soft: #3a1f1d; --ok: #6fcf97; --ok-soft: #14301f;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--chalk); color: var(--ink); font-family: var(--font); font-size: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem); line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--slate); }
.small { font-size: 0.92rem; }
.hive { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; display: block; }

/* Kopfzeile wie auf der Website */
.site-head { position: sticky; top: 0; z-index: 60; padding-block: 12px; background: color-mix(in srgb, var(--chalk) 84%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid transparent; transition: border-color .3s ease; }
.site-head.is-stuck { border-bottom-color: var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { text-decoration: none; font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.brand__sub { font-weight: 400; color: var(--slate); }
.tools { display: flex; align-items: center; gap: 8px; }
.tools__who { color: var(--slate); font-size: .92rem; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.langsw { display: inline-flex; padding: 3px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); }
.langsw button, .seg button { font: inherit; font-size: .85rem; font-weight: 700; padding: 5px 11px; border: 0; border-radius: 999px; background: none; color: var(--slate); cursor: pointer; transition: background-color .2s, color .2s; }
.langsw button:hover, .seg button:hover { color: var(--ink); }
.langsw button[aria-pressed="true"] { background: var(--ink); color: var(--chalk); }
.themebtn { display: grid; place-items: center; width: 38px; height: 38px; border: 1.5px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--ink); cursor: pointer; transition: border-color .2s; padding: 0; }
.themebtn:hover { border-color: var(--brass); }
@media (max-width: 36em) { .brand__sub, .tools__who { display: none; } .langsw button { padding: 5px 9px; } .tools { gap: 6px; } }

/* Knöpfe und Links */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .85em 1.35em; border: 2px solid transparent; border-radius: 10px; font: 700 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.btn--primary { background: var(--ink); color: var(--chalk); }
.btn--primary:hover:not(:disabled) { background: var(--brass); color: #fff; }
html[data-theme="dark"] .btn--primary:hover:not(:disabled) { color: #1a1405; }
.btn--line { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--line:hover:not(:disabled) { border-color: var(--brass); }
.btn--danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.btn--small { padding: .6em 1em; font-size: .95rem; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.textlink { font: inherit; font-weight: 700; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .25em; text-decoration-color: var(--brass); justify-self: start; }
.textlink:hover { color: var(--brass); }

/* Formulare */
.field { display: grid; gap: 6px; }
.field > span, .field > label { font-weight: 700; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], select, textarea {
  font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); width: 100%;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
input::placeholder { color: color-mix(in srgb, var(--slate) 70%, transparent); }
.error, .ok-box, .notice { border-radius: 10px; padding: 12px 14px; font-size: .98rem; }
.error { color: var(--danger); background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); }
.ok-box { color: var(--ok); background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); }
.notice { background: var(--brass-soft); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); display: grid; gap: 16px; align-content: start; box-shadow: 0 1px 2px rgba(23,32,43,.05), 0 14px 36px rgba(23,32,43,.06); }
html[data-theme="dark"] .card { box-shadow: 0 18px 40px rgba(0,0,0,.35); }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: var(--chalk); padding: 11px 18px; border-radius: 10px; font-size: .95rem; font-weight: 700; z-index: 90; max-width: calc(100vw - 32px); }
.toast.bad { background: var(--danger); color: #fff; }
[hidden] { display: none !important; }
