/* SKELO Trader AI – Designsprache „Iris“ (Schicht über styles.css; überschreibt Tokens und ergänzt eigene Bausteine).
   Leitidee: ein ruhiger Instrumentenstand für Risiko. Tiefes Blau-Schwarz, ein einziger Signalton (Iris) für alles KI-Bezogene,
   Zustandsfarben nur für Zustände. Daten-Herkunft (Live / Demo / Simulation) ist IMMER sichtbar und nie nur farbig kodiert. */
:root {
  --bg: #090d13; --surface: #0f1620; --surface-2: #17202d; --border: #222d3d; --border-input: #62748c;
  --text: #eef2f8; --text-muted: #9aa9bf; --accent: #8e9cff; --on-accent: #0a0e22;
  --ok: #3fd9a4; --reduced: #efc85a; --warn: #ffa05a; --breach: #ff6f7f; --sim: #b79bff; --aqua: #52ddf0;
  --font: 'Inter Variable', Inter, 'Google Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --shadow: none; --pop: 0 24px 60px rgba(0, 0, 0, .6);
  --aurora: radial-gradient(120% 70% at 20% -10%, rgba(142, 156, 255, .16), transparent 62%), radial-gradient(90% 50% at 100% 0, rgba(82, 221, 240, .08), transparent 60%);
  --card-bg: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0) 38%), var(--surface);
  --iris-grad: linear-gradient(135deg, #8e9cff, #52ddf0);
}
:root[data-theme="light"] {
  --bg: #edf1f7; --surface: #ffffff; --surface-2: #f2f5fa; --border: #dbe2ed; --border-input: #66768f; --text: #0f1724; --text-muted: #47566e;
  --accent: #4552d8; --on-accent: #ffffff; --ok: #07694a; --reduced: #6f5400; --warn: #8f4700; --breach: #b52238; --sim: #5a3fc0; --aqua: #076575;
  --pop: 0 24px 60px rgba(30, 50, 90, .22);
  --aurora: radial-gradient(120% 70% at 20% -10%, rgba(69, 82, 216, .10), transparent 62%), radial-gradient(90% 50% at 100% 0, rgba(10, 127, 147, .06), transparent 60%);
  --card-bg: var(--surface); --iris-grad: linear-gradient(135deg, #4552d8, #0a7f93);
}
body { font-feature-settings: 'cv11', 'ss01'; letter-spacing: -.003em; }
#app::before { content: ''; position: fixed; inset: 0; z-index: -1; background: var(--aurora); pointer-events: none; }
h1 { font-size: 28px; font-weight: 700; letter-spacing: -.025em; } h2 { font-size: 21px; font-weight: 650; letter-spacing: -.02em; } h3 { font-size: 16px; font-weight: 650; }

/* Kopfzeile */
.top { background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); padding-bottom: 8px; }
.brand { font-weight: 700; letter-spacing: -.03em; } .brand svg { border-radius: 9px; }
.iconbtn { position: relative; width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 14px; border: 0; background: transparent; color: var(--text); cursor: pointer; }
.iconbtn:active { background: var(--surface-2); transform: scale(.94); } .iconbtn .badge { top: 3px; left: auto; right: 2px; }

/* Navigation: fünf Hauptbereiche, KI in der Mitte */
.nav { background: color-mix(in srgb, var(--surface) 94%, transparent); border-top: 1px solid var(--border); padding: 4px 6px calc(4px + var(--safe-b)); grid-auto-columns: 1fr; align-items: end; }
.nav a, .nav button.navbtn { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; padding: 6px 2px; border: 0; background: none; color: var(--text-muted); font: 600 11.5px/1.1 var(--font); text-decoration: none; cursor: pointer; border-radius: 14px; }
.nav a[aria-current="page"] { color: var(--text); } .nav a[aria-current="page"] svg { color: var(--accent); }
.nav a:active, .nav button.navbtn:active { transform: scale(.95); }
.nav .more-item { display: none; }
.nav a.ai { color: var(--text); } .nav a.ai .orb { width: 46px; height: 46px; margin-top: -16px; border-radius: 50%; display: grid; place-items: center; background: var(--iris-grad); color: #07101f; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 38%, transparent), 0 0 0 4px var(--bg); }
.nav a.ai .orb svg { width: 24px; height: 24px; color: #07101f; } .nav a.ai[aria-current="page"] .orb { box-shadow: 0 6px 22px color-mix(in srgb, var(--accent) 55%, transparent), 0 0 0 4px var(--bg), 0 0 0 6px var(--accent); }
@media (min-width: 900px) {
  .nav { background: transparent; border-right: 1px solid var(--border); } .nav .more-item { display: flex; } .nav button.navbtn { display: none; }
  .nav a, .nav button.navbtn { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 0 14px; font-size: 14.5px; min-height: 46px; } .nav a[aria-current="page"] { background: var(--surface-2); }
  .nav a.ai .orb { width: 30px; height: 30px; margin: 0; box-shadow: none; } .nav a.ai .orb svg { width: 18px; height: 18px; } .nav a.ai[aria-current="page"] .orb { box-shadow: none; }
}

/* Karten und Bausteine */
.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; }
.card.sub { background: var(--surface-2); border-radius: var(--r-md); }
.btn { border-radius: 14px; min-height: 46px; font-weight: 600; background: var(--surface-2); border-color: var(--border); }
.btn.primary { background: var(--iris-grad); border-color: transparent; color: #07101f; font-weight: 700; } :root[data-theme="light"] .btn.primary { color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.chip { border: 0; background: color-mix(in srgb, var(--text) 8%, transparent); padding: 4px 11px; font-weight: 600; } .chip.sm { font-size: 12.5px; }
.chip.lv-ok, .chip.lv-reduced, .chip.lv-warn, .chip.lv-breach { background: color-mix(in srgb, currentColor 14%, transparent); border: 0; }
.tabs { border-bottom: 0; gap: 6px; padding: 2px 0 4px; } .tabs button { border: 0; border-radius: 99px; padding: 8px 16px; min-height: 40px; background: transparent; }
.tabs button[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text); border: 0; }
.input { border-radius: 14px; background: color-mix(in srgb, var(--surface-2) 70%, var(--bg)); }
.kpi .v { font-weight: 600; letter-spacing: -.02em; } .kpi.big .v { font-size: 34px; font-weight: 500; letter-spacing: -.035em; }
.banner { border-radius: var(--r-md); border: 0; background: color-mix(in srgb, var(--text) 7%, transparent); }
.banner.warn { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); } .banner.breach { background: color-mix(in srgb, var(--breach) 16%, var(--surface)); } .banner.info { background: color-mix(in srgb, var(--accent) 13%, var(--surface)); }
.sheet { border-radius: 26px 26px 0 0; background: var(--surface); } .modebar { border-radius: var(--r-md); }
.mode-card { border-radius: var(--r-lg); } .mode-card.sel { box-shadow: 0 0 0 1.5px var(--accent) inset; }
.view-in { animation: viewin 220ms var(--ease) both; } @keyframes viewin { from { opacity: 0; transform: translateY(8px); } }

/* Herkunft der Daten: Live / Demo / Simulation – nie nur Farbe, immer Wort + Form */
.src { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.src i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.src.live { color: var(--ok); background: color-mix(in srgb, var(--ok) 15%, transparent); } .src.demo { color: var(--reduced); background: color-mix(in srgb, var(--reduced) 15%, transparent); }
.src.sim { color: var(--sim); background: color-mix(in srgb, var(--sim) 16%, transparent); } .src.sim i { border-radius: 2px; transform: rotate(45deg); }
.src.test { color: var(--aqua); background: color-mix(in srgb, var(--aqua) 14%, transparent); } .src.off { color: var(--text-muted); background: color-mix(in srgb, var(--text) 8%, transparent); }
.src.stale { color: var(--warn); background: color-mix(in srgb, var(--warn) 15%, transparent); }
[data-src="sim"] { position: relative; overflow: hidden; }
[data-src="sim"]::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 5px; background: repeating-linear-gradient(135deg, var(--sim) 0 6px, transparent 6px 12px); opacity: .85; }
[data-src="demo"]::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--reduced); opacity: .8; } [data-src="demo"] { position: relative; overflow: hidden; }

/* Das SKELO-Instrument: drei Ringe (Tagesverlust, Gesamtverlust, Ziel), Kern atmet im Takt des Zustands */
.core { position: relative; width: min(74vw, 300px); aspect-ratio: 1; margin: 4px auto; }
.core svg { width: 100%; height: 100%; display: block; overflow: visible; }
.core .track { fill: none; stroke: color-mix(in srgb, var(--text) 9%, transparent); stroke-linecap: round; }
.core .arc { fill: none; stroke-linecap: round; transition: stroke-dashoffset 900ms var(--ease), stroke 400ms; } .core .tick { stroke: color-mix(in srgb, var(--text) 35%, transparent); stroke-width: 1.5; }
.core .orb { transform-box: fill-box; transform-origin: center; animation: breathe 5s ease-in-out infinite; }
.core[data-level="reduced"] .orb { animation-duration: 3.4s; } .core[data-level="warn"] .orb { animation-duration: 2.2s; } .core[data-level="breach"] .orb { animation: none; } .core[data-level="none"] .orb { animation: none; }
.core .halo { transform-box: fill-box; transform-origin: center; animation: halo 5s ease-in-out infinite; } .core[data-level="warn"] .halo { animation-duration: 2.2s; } .core[data-level="breach"] .halo, .core[data-level="none"] .halo { animation: none; }
.core .ping { fill: none; stroke: var(--accent); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; } .core.pinged .ping { animation: ping 1s ease-out; }
.core .mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 31%; pointer-events: none; }
.core .mid b { font-size: clamp(16px, 5vw, 21px); font-weight: 650; letter-spacing: -.03em; line-height: 1.1; } .core .mid span { font-size: 12.5px; color: var(--text); opacity: .86; line-height: 1.3; }
@keyframes breathe { 50% { transform: scale(1.045); } } @keyframes halo { 50% { opacity: .55; transform: scale(1.08); } } @keyframes ping { 0% { opacity: .9; transform: scale(.92); } 100% { opacity: 0; transform: scale(1.25); } }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; font-size: 12.5px; color: var(--text-muted); } .legend span { display: inline-flex; align-items: center; gap: 6px; } .legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* Start: Gesamtstand und Konto-Kacheln */
.hero { display: flex; flex-direction: column; gap: 14px; padding: 4px 2px 0; }
.hero .big { font-size: clamp(38px, 11vw, 52px); font-weight: 300; letter-spacing: -.045em; line-height: 1; } .hero .big small { font-size: .38em; font-weight: 500; letter-spacing: 0; color: var(--text-muted); margin-left: 6px; }
.acard { display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: inherit; padding: 18px; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--card-bg); } .acard:active { transform: scale(.985); }
.acard .eq { font-size: 31px; font-weight: 400; letter-spacing: -.035em; } .acard .spark { height: 44px; width: 100%; } .acard .spark path.l { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.minirings { width: 78px; height: 78px; flex: none; } .minirings .track { fill: none; stroke: color-mix(in srgb, var(--text) 10%, transparent); } .minirings .arc { fill: none; stroke-linecap: round; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; } .stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); } .stat .l { font-size: 12.5px; color: var(--text-muted); } .stat .v { font-size: 19px; font-weight: 600; letter-spacing: -.02em; }

/* Positionen als Zeilen statt Tabelle */
.prow { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 13px 0; border-top: 1px solid var(--border); } .prow:first-child { border-top: 0; }
.prow .sym { font-weight: 650; font-size: 16px; } .prow .meta { font-size: 12.5px; color: var(--text-muted); } .prow .pl { font-size: 17px; font-weight: 600; text-align: right; letter-spacing: -.02em; }
.side { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; margin-right: 6px; } .side.buy { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); } .side.sell { background: color-mix(in srgb, var(--breach) 18%, transparent); color: var(--breach); }

/* KI-Zentrum */
.aihead { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.chips-scroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; max-width: 100%; } .chips-scroll::-webkit-scrollbar { display: none; }
.pill { flex: none; min-height: 40px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 600 14px var(--font); cursor: pointer; } .pill[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 20%, var(--surface)); border-color: var(--accent); }
.ins { display: grid; grid-template-columns: 44px 1fr; gap: 6px 14px; align-items: start; } .ins .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); } .ins .ico svg { width: 22px; height: 22px; }
.ins h3 { font-size: 16px; } .ins .src { margin-top: 2px; } .ins .body { grid-column: 2; } .ins .why { grid-column: 2; font-size: 12.5px; color: var(--text-muted); }
.phase { display: flex; align-items: center; gap: 12px; } .phase svg { width: 74px; height: 38px; flex: none; } .phase path { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Mehr-Menü */
.menu { display: grid; gap: 2px; } .menu a { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 8px; border-radius: 14px; color: var(--text); text-decoration: none; font-weight: 600; } .menu a:active { background: var(--surface-2); } .menu a svg { color: var(--accent); flex: none; }
.menu .grow2 { flex: 1; } .menu .badge { position: static; }
.empty { padding: 28px 12px; } .empty svg { color: var(--accent); }
.risk-note { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .core .orb, .core .halo { animation: none !important; } .core.pinged .ping { animation: none !important; } .view-in { animation: none; } }
.hero-card { display: flex; flex-direction: column; gap: 12px; padding: 24px 14px 18px; } .who { display: none; } @media (min-width: 700px) { .who { display: inline; } }
.nav button.navbtn.on { color: var(--text); }
.kpi .v { font-size: clamp(18px, 5.2vw, 22px); } .kpi.big .v { font-size: clamp(28px, 8vw, 34px); }
.card.kpi { padding: 14px 16px; }
.narrow { max-width: 720px; margin-inline: auto; width: 100%; }
details.settings > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 650; color: var(--text); } details.settings[open] > summary { margin-bottom: 12px; } details.settings > summary svg { color: var(--accent); }
details.settings > .col { gap: 12px; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; line-height: 1.5; } .steps li::marker { color: var(--accent); font-weight: 700; } .steps a { word-break: break-all; }
.pairing-code { font-size: clamp(19px, 6vw, 32px); white-space: nowrap; text-align: center; font-weight: 700; letter-spacing: .05em; padding: 12px 8px; user-select: all; background: var(--surface-2); border-radius: var(--r-md); width: 100%; }
.acard-wrap { position: relative; } .acard-wrap .kebab { position: absolute; top: 8px; right: 6px; z-index: 2; } .acard-wrap .acard h3 { padding-right: 38px; }
.check input[type=radio] { width: 20px; height: 20px; accent-color: var(--accent); flex: none; margin-top: 2px; }
