/* Wettico – Grundlagen: Schrift, Farben (Schwarz, Rot, Weiß), Bausteine */

@font-face {
  font-family: 'Readex Pro';
  font-style: normal;
  font-display: swap;
  font-weight: 160 700;
  src: url('/fonts/readex-pro-latin-wght-normal.woff2') format('woff2-variations');
  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: 'Readex Pro';
  font-style: normal;
  font-display: swap;
  font-weight: 160 700;
  src: url('/fonts/readex-pro-latin-ext-wght-normal.woff2') format('woff2-variations');
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Readex Pro';
  font-style: normal;
  font-display: swap;
  font-weight: 160 700;
  src: url('/fonts/readex-pro-arabic-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Big Shoulders';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/big-shoulders-display-latin-wght-normal.woff2') format('woff2-variations');
  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: 'Big Shoulders';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/big-shoulders-display-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Farbsystem „Anstoß“: Schwarz #121418 als Fläche, Rot #E8112D nur für Live, Auswahl und Hauptaktion */
  --ink-0: #121418; /* Seite */
  --ink-1: #171a1f; /* Zeilen, Tafeln */
  --ink-2: #1e2228; /* Quotenfelder, Eingaben */
  --ink-3: #2a2f37; /* Linien, Hover */
  --ink-4: #3a4049; /* Ränder */
  --bar: #0d0f12; /* Kopfleiste */
  --paper: #f4f5f7;
  --text: #f3f4f6;
  --text-2: #b3b9c3;
  --text-3: #8e95a0;
  --red: #e8112d; /* Logo-Rot „Anstoß“ */
  --red-hi: #c90e27; /* Hover dunkler, damit weiße Schrift lesbar bleibt */
  --on-red: #ffffff; /* Schrift auf Rot: 4,62:1 */
  --red-on-light: #c90e27; /* rote Schrift auf Papier: 5,4:1 */
  --red-deep: #4a0d16;
  --red-ink: #ff5a6a; /* rote Schrift auf Schwarz */
  --up: #3ecf7a; /* Quote steigt */
  --focus: #f4f5f7;

  --font: 'Readex Pro', 'Segoe UI', 'Noto Sans', 'Noto Sans Arabic', sans-serif;
  --display: 'Big Shoulders', 'Readex Pro', 'Arial Narrow', sans-serif;

  --r-s: 3px;
  --r-m: 4px;
  --r-l: 6px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.64, 0, 0.78, 0);
  --t-fast: 120ms;
  --t-med: 220ms;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px;

  --fs-xs: 0.75rem;
  --fs-s: 0.8125rem;
  --fs-m: 0.9375rem;
  --fs-l: 1.0625rem;
  --fs-xl: 1.5rem;
  --fs-xxl: clamp(2rem, 1.6rem + 2vw, 3rem);

  color-scheme: dark;
}

.big-text { font-size: 118%; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-m);
  line-height: 1.45;
  color: var(--text);
  background: var(--ink-0);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'tnum' 1;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
img, svg { display: block; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-s); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.icon { width: 20px; height: 20px; flex: none; }
.icon.s { width: 16px; height: 16px; }
.icon.l { width: 24px; height: 24px; }
.icon.xl { width: 32px; height: 32px; }
[dir='rtl'] .flip-rtl { transform: scaleX(-1); }
/* Arabisch ist Schreibschrift: Sperrung reißt die verbundenen Buchstaben auseinander */
:lang(ar) { letter-spacing: normal !important; }

.num { font-variant-numeric: tabular-nums; }
.disp { font-family: var(--display); letter-spacing: 0.01em; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo .wordmark { height: 28px; width: auto; flex: none; display: block; color: var(--text); }
.logo-word {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: lowercase;
}
.logo-word b { color: var(--red-ink); font-weight: 800; }
/* Marke des Mandanten: eigenes Logo oder Name als Wortmarke */
.brand-logo { height: 32px; width: auto; max-width: 180px; object-fit: contain; display: block; flex: none; }
.brand-word { font-family: var(--display); font-weight: 800; font-size: 1.5rem; letter-spacing: 0.01em; line-height: 1; color: var(--text); white-space: nowrap; }
.brand-word::first-letter { color: var(--red-ink); }
/* Seite beim Mandanten abgeschaltet */
.brand-off { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: var(--s-5, 24px); background: var(--ink-0); color: var(--text); }
.brand-off-in { max-width: 34rem; text-align: center; display: grid; gap: 14px; justify-items: center; }
.brand-off h1 { font-family: var(--display); font-size: clamp(1.6rem, 4vw, 2.6rem); line-height: 1.1; margin: 0; }
.brand-off p { color: var(--text-2, #c9ccd3); font-size: 1.05rem; margin: 0 0 8px; }

/* ---------- Knöpfe ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 44px; padding: 0 var(--s-4);
  border-radius: var(--r-m);
  font-weight: 600;
  background: var(--ink-3);
  color: var(--text);
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  text-decoration: none;
}
.btn:hover { background: var(--ink-4); }
.btn:active { transform: scale(0.98); }
.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--red); color: var(--on-red); font-weight: 600; }
.btn-primary:hover { background: var(--red-hi); }
.btn-light { background: var(--paper); color: var(--ink-0); font-weight: 600; }
.btn-light:hover { background: oklch(0.9 0.005 25); }
.btn-ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--ink-4); }
.btn-ghost:hover { background: var(--ink-2); }
.btn-block { width: 100%; }
.btn-lg { min-height: 52px; font-size: var(--fs-l); border-radius: var(--r-m); }
.btn-icon { width: 44px; padding: 0; }

/* ---------- Quotenknopf ---------- */
.odd {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 44px; min-width: 56px;
  padding: 3px 8px;
  border-radius: var(--r-s);
  background: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--ink-3);
  color: var(--text);
  transition: background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.odd:hover { background: var(--ink-3); }
.odd .lbl { font-size: 0.72rem; color: var(--text-2); line-height: 1.25; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.odd .val { font-weight: 600; font-size: 0.98rem; line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.odd[aria-pressed='true'] { background: var(--red); box-shadow: none; color: var(--on-red); }
.odd[aria-pressed='true'] .lbl { color: var(--on-red); }
.odd.susp, .odd:disabled { cursor: not-allowed; }
.odd.susp .val, .odd:disabled .val { opacity: 0.4; }
.odd.locked { background: transparent; box-shadow: inset 0 0 0 1px var(--ink-3); }
.odd.locked .dir, .odd.susp .dir { display: none; }
.odd .dir { position: absolute; top: 3px; inset-inline-end: 3px; width: 0; height: 0; border-inline: 4px solid transparent; }
.odd .dir.up { border-bottom: 6px solid var(--up); }
.odd .dir.down { border-top: 7px solid var(--red-ink); }
.odd.flash-up { animation: flashUp 1.6s var(--ease); }
.odd.flash-down { animation: flashDown 1.6s var(--ease); }
@keyframes flashUp { 0% { box-shadow: inset 0 0 0 2px var(--up); } 100% { box-shadow: inset 0 0 0 1px var(--ink-3); } }
@keyframes flashDown { 0% { box-shadow: inset 0 0 0 2px var(--red-ink); } 100% { box-shadow: inset 0 0 0 1px var(--ink-3); } }
.odd[aria-pressed='true'].flash-up, .odd[aria-pressed='true'].flash-down { animation: none; }

/* ---------- Kleinteile ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 20px; padding: 0 6px; border-radius: var(--r-s);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.02em;
  background: var(--ink-3); color: var(--text-2);
  white-space: nowrap;
}
.pill.live { background: var(--red); color: var(--on-red); }
.pill.live::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--paper); animation: pulse 1.6s ease-in-out infinite; }
.pill.white { background: var(--paper); color: var(--ink-0); }
.pill.red { background: var(--red); color: var(--on-red); }
.pill.outline { background: transparent; box-shadow: inset 0 0 0 1px var(--ink-4); }
@keyframes pulse { 50% { opacity: 0.35; } }

.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.red { color: var(--red-ink); }

.hr { height: 1px; background: var(--ink-3); border: 0; margin: 0; }

.toggle { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 48px; cursor: pointer; }
.toggle input { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 999px; background: var(--ink-4); position: relative; flex: none; cursor: pointer; transition: background var(--t-fast) var(--ease); margin: 0; }
.toggle input::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); transition: transform var(--t-med) var(--ease); }
.toggle input:checked { background: var(--red); }
.toggle input:checked::after { transform: translateX(18px); }
[dir='rtl'] .toggle input:checked::after { transform: translateX(-18px); }
.toggle input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.field { display: flex; align-items: center; gap: var(--s-2); background: var(--ink-2); border-radius: var(--r-m); box-shadow: inset 0 0 0 1px var(--ink-4); padding: 0 var(--s-3); min-height: 48px; }
.field:focus-within { box-shadow: inset 0 0 0 2px var(--paper); }
.field input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; height: 46px; font-size: var(--fs-l); }
.field .unit { color: var(--text-2); }

/* ---------- Hinweise ---------- */
.toasts { position: fixed; z-index: 130; top: calc(env(safe-area-inset-top) + 64px); inset-inline: 0; display: flex; flex-direction: column; align-items: center; gap: var(--s-2); pointer-events: none; padding: 0 var(--s-3); }
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: var(--s-3);
  max-width: 460px; width: 100%;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-m);
  background: var(--paper); color: var(--ink-0);
  box-shadow: 0 8px 24px oklch(0 0 0 / 0.4);
  font-weight: 500;
  animation: toastIn var(--t-med) var(--ease);
}
.toast.red { background: var(--red); color: var(--on-red); }
.toast.dark { background: var(--ink-2); color: var(--text); box-shadow: 0 10px 30px oklch(0 0 0 / 0.5), inset 0 0 0 1px var(--ink-4); }
.toast.out { animation: toastOut 200ms var(--ease-in) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px); } }

.banner { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-4); font-size: var(--fs-s); font-weight: 500; }
.banner.offline { background: var(--red-deep); color: var(--paper); }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton { background: linear-gradient(90deg, var(--ink-2), var(--ink-3), var(--ink-2)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--r-s); }
@keyframes shimmer { to { background-position: -200% 0; } }

.empty { padding: var(--s-6) var(--s-4); text-align: center; color: var(--text-2); display: grid; gap: var(--s-2); justify-items: center; }
.empty .icon { width: 32px; height: 32px; color: var(--text-3); }

.type-badge { white-space: nowrap; font-size: 0.7em; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 6px; border-radius: var(--r-s); background: var(--ink-3); color: var(--text); }

/* Sport-Symbole und Flaggen */
.sport-ic { width: 18px; height: 18px; flex: none; }
.flag { width: 18px; height: 12px; flex: none; border-radius: 1px; box-shadow: 0 0 0 1px oklch(1 0 0 / 0.08); }
.demo-badge { font-size: var(--fs-xs); color: var(--text-3); letter-spacing: 0.02em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
