/* beile.info — design tokens. See docs/DESIGN-SYSTEM.md.
   Static values below = default accent #6D5BFF (dark UI). /assets/accent.js overrides every
   accent/surface/text token inline on <html> from ONE hex (any colour). Names are a stable contract.
   Rules: no backdrop-filter anywhere; translucent cards via --glass; use tokens, never hard-coded colours. */

/* ---- Marken-Schriften, selbst gehostet (OFL 1.1, Latin + Latin-Ext, swap). Identisch zu fonts.css ---- */
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("/assets/fonts/plus-jakarta-sans-latin.woff2?v=f2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("/assets/fonts/plus-jakarta-sans-latin-ext.woff2?v=f2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 500 700; font-display: swap; src: url("/assets/fonts/fraunces-latin.woff2?v=f2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 500 700; font-display: swap; src: url("/assets/fonts/fraunces-latin-ext.woff2?v=f2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 500 700; font-display: swap; src: url("/assets/fonts/fraunces-italic-latin.woff2?v=f2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --accent: #7b6aff;
  --accent-rgb: 123 106 255;
  --accent-2: #dd79ff;
  --accent-2-rgb: 221 121 255;
  --accent-grad: linear-gradient(135deg, #7b6aff 0%, #dd79ff 100%);
  --accent-soft: rgb(123 106 255 / .16);
  --accent-glow: rgb(123 106 255 / .35);
  --accent-line: rgb(123 106 255 / .55);
  --accent-hover: #9b8eff;
  --accent-contrast: #0b0b10;

  --surface-0: #0a0a0d;
  --surface-1: #131219;
  --surface-2: #1b1a23;
  --surface-3: #24222f;
  --glass: rgb(19 18 25 / .78);
  --glass-2: rgb(27 26 35 / .78);
  --text: #f0f0f5;
  --text-muted: #b5b3c1;
  --text-faint: #9391a1;
  --border: rgb(255 255 255 / .09);
  --border-strong: rgb(255 255 255 / .22);
  --overlay: rgb(0 0 0 / .55);

  --danger: #ff6b6b;
  --ok: #3ddc84;
  --warn: #ffc53d;

  --radius-s: 12px;
  --radius-m: 20px;
  --radius-l: 28px;
  --radius-pill: 999px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --tap: 44px;

  --font-display: "Fraunces", "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-text: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --font: var(--font-text);

  --shadow-1: 0 1px 2px rgb(0 0 0 / .35), 0 2px 8px rgb(0 0 0 / .25);
  --shadow-2: 0 2px 6px rgb(0 0 0 / .3), 0 10px 24px rgb(0 0 0 / .35);
  --shadow-accent: 0 4px 14px var(--accent-glow);

  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --dur-1: 120ms;
  --dur-2: 220ms;
  --dur-3: 380ms;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --accent: #1c00ff; --accent-rgb: 28 0 255; --accent-2: #b200f0; --accent-2-rgb: 178 0 240;
  --accent-grad: linear-gradient(135deg, #1c00ff 0%, #b200f0 100%);
  --accent-soft: rgb(28 0 255 / .16); --accent-glow: rgb(28 0 255 / .35); --accent-line: rgb(28 0 255 / .55);
  --accent-hover: #1800db; --accent-contrast: #ffffff;
  --surface-0: #f2f2f5; --surface-1: #fefefe; --surface-2: #ebebef; --surface-3: #e3e2e9;
  --glass: rgb(254 254 254 / .82); --glass-2: rgb(235 235 239 / .82);
  --text: #151320; --text-muted: #535167; --text-faint: #504e5f;
  --border: rgb(0 0 0 / .1); --border-strong: rgb(0 0 0 / .26); --overlay: rgb(20 18 30 / .45);
  --danger: #c62828; --ok: #12803f; --warn: #8a5a00;
  --shadow-1: 0 1px 2px rgb(20 18 30 / .08), 0 2px 8px rgb(20 18 30 / .06);
  --shadow-2: 0 2px 6px rgb(20 18 30 / .08), 0 10px 24px rgb(20 18 30 / .12);
  color-scheme: light;
}
@media (prefers-reduced-motion: reduce) {
  :root { --dur-1: 0.01ms; --dur-2: 0.01ms; --dur-3: 0.01ms; }
}

/* ---- Schrift-Grundregeln (global): Formularelemente erben die Seitenschrift, nie die Browser-Standardschrift (Arial/Times) ---- */
html, body { font-family: var(--font-text); }
button, input, select, textarea, optgroup { font: inherit; letter-spacing: inherit; }
pre, code, kbd, samp { font-family: var(--font-mono); }

/* ---- shared helpers (opt-in) ---- */
.glass { background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius-m); }
.glass-2 { background: var(--glass-2); border: 1px solid var(--border); border-radius: var(--radius-m); }
.accent-text { color: var(--accent); }
.accent-bg { background: var(--accent); color: var(--accent-contrast); }
.accent-grad { background: var(--accent-grad); color: var(--accent-contrast); }

/* ---- accent picker (accent-picker.js) ---- */
.ap-backdrop { position: fixed; inset: 0; z-index: 2147483000; background: var(--overlay); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity var(--dur-2) var(--ease-out); }
.ap-backdrop.on { opacity: 1; }
.ap-sheet { width: min(100%, 440px); max-height: 92vh; overflow: auto; background: var(--surface-1); color: var(--text); font-family: var(--font-text); border: 1px solid var(--border); border-bottom: 0; border-radius: var(--radius-l) var(--radius-l) 0 0; padding: var(--space-4) var(--space-4) calc(var(--space-4) + var(--safe-bottom)); box-shadow: var(--shadow-2); transform: translateY(24px); transition: transform var(--dur-3) var(--ease-out); }
.ap-backdrop.on .ap-sheet { transform: none; }
@media (min-width: 560px) { .ap-backdrop { align-items: center; } .ap-sheet { border-bottom: 1px solid var(--border); border-radius: var(--radius-l); } }
.ap-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.ap-head h2 { margin: 0; font: 700 1.1rem/1.2 var(--font-text); }
.ap-x { min-width: var(--tap); min-height: var(--tap); border: 0; border-radius: var(--radius-pill); background: var(--surface-2); color: var(--text); font: inherit; font-size: 1.2rem; cursor: pointer; }
.ap-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--space-2); }
.ap-sw { position: relative; min-height: var(--tap); aspect-ratio: 1; border-radius: var(--radius-pill); border: 2px solid transparent; cursor: pointer; padding: 0; background-clip: padding-box; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .18); }
.ap-sw[aria-pressed="true"] { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface-1) inset; }
.ap-sw:focus-visible, .ap-x:focus-visible, .ap-btn:focus-visible, .ap-hex:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ap-row { display: flex; gap: var(--space-2); align-items: center; margin-top: var(--space-4); }
.ap-color { flex: none; width: var(--tap); height: var(--tap); padding: 0; border: 1px solid var(--border-strong); border-radius: var(--radius-s); background: none; cursor: pointer; }
.ap-hex { flex: 1; min-width: 0; min-height: var(--tap); padding: 0 var(--space-3); border-radius: var(--radius-s); border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font: 600 1rem var(--font-mono); text-transform: uppercase; }
.ap-hex[aria-invalid="true"] { border-color: var(--danger); }
.ap-btn { min-height: var(--tap); padding: 0 var(--space-4); border-radius: var(--radius-pill); border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font: 700 .9rem var(--font-text); cursor: pointer; }
.ap-prev { margin-top: var(--space-4); height: 44px; border-radius: var(--radius-s); background: var(--accent-grad); color: var(--accent-contrast); display: grid; place-items: center; font: 700 .9rem var(--font-text); }
.ap-inline, .ap-body { min-width: 0; max-width: 100%; }
.ap-inline .ap-grid { grid-template-columns: repeat(6, minmax(0, 44px)); justify-content: space-between; }
.ap-sw { min-width: 0; }

/* ---- season tiles in the accent picker (season.js) ---- */
.ap-h { margin: var(--space-5) 0 var(--space-2); font: 700 1rem/1.2 var(--font-text); }
.ap-seasons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.ap-sn { display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-width: 0; min-height: var(--tap); padding: 6px; border-radius: var(--radius-s); border: 2px solid var(--border); background: var(--surface-2); color: var(--text); font: 700 .88rem/1.2 var(--font-text); text-align: left; cursor: pointer; }
.ap-sn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.ap-sn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ap-sn-pv { display: block; height: 52px; border-radius: 8px; overflow: hidden; }
.ap-sn-pv svg { display: block; width: 100%; height: 100%; }
.ap-sn-sub { font-weight: 500; font-size: .72rem; color: var(--text-muted); }
.ap-sn-note { margin: var(--space-2) 0 0; font-size: .8rem; color: var(--text-muted); }
.ap-fx { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); min-height: 44px; margin-top: var(--space-2); cursor: pointer; }
.ap-fx input { width: 22px; height: 22px; accent-color: var(--accent); }
.ap-fx-t { font-weight: 600; }
.ap-fx-s { flex-basis: 100%; color: var(--text-muted); font-size: .78rem; }
