/* ============================================================
   qu4nt3dge Trading-Dokumentation — Stylesheet
   Dunkles, zurückhaltendes Design. Keine externen Abhängigkeiten.
   ============================================================ */

:root {
  --bg: #0b0f14;
  --bg-soft: #0e141b;
  --surface: #111823;
  --surface-2: #16202e;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #e8eef4;
  --text-muted: #93a1b0;
  --accent: #2dd4a7;
  --accent-soft: rgba(45, 212, 167, 0.12);
  --warn: #f0b35e;
  --radius: 14px;
  --max-width: 920px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Dezenter Hintergrund-Schein oben */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  height: 420px;
  background: radial-gradient(
    60% 100% at 50% 0%,
    rgba(45, 212, 167, 0.07) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

main,
header,
footer {
  position: relative;
  z-index: 1;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Kopfzeile ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(11, 15, 20, 0.82);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* Hervorgehobene Ziffern: 4 und 3 im Akzentgrün */
.brand-mark .mk-dg,
.brand-text .dg {
  color: var(--accent);
  font-weight: 800;
}

.brand-text .dg {
  font-size: 1.02em;
}

.brand small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 4px;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14.5px;
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

/* ---------- Sprach-Umschalter ---------- */

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  padding-left: 12px;
  border-left: 1px solid var(--border-strong);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.lang-switch a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 6px;
  border-radius: 6px;
}

.lang-switch a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.lang-switch a.active {
  color: var(--accent);
}

.lang-sep {
  color: var(--text-muted);
  opacity: 0.5;
}

/* ---------- Hero ---------- */

.hero {
  padding: 84px 0 56px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(45, 212, 167, 0.25);
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 22px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 212, 167, 0.18);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

.hero h1 {
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero .lead {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 640px;
}

/* ---------- Karten ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 44px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
}

.card-icon {
  font-size: 20px;
  margin-bottom: 10px;
  display: block;
}

.card h3 {
  font-size: 15.5px;
  font-weight: 700;
  margin-bottom: 6px;
}

.card p {
  font-size: 14px;
  color: var(--text-muted);
}

/* ---------- Abschnitte ---------- */

section {
  padding: 56px 0;
  border-top: 1px solid var(--border);
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

section h2 {
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

section .section-text {
  color: var(--text-muted);
  max-width: 680px;
  font-size: 16px;
}

/* ---------- Portfolio-Zusammenfassung ---------- */

.portfolio-note {
  margin-top: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 24px;
  font-size: 15px;
  color: var(--text-muted);
}

.portfolio-note strong {
  color: var(--text);
}

/* ---------- Myfxbook ---------- */

.live-card {
  margin-top: 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.live-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(45, 212, 167, 0.25);
  border-radius: 999px;
  padding: 4px 12px;
}

.live-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
}

.live-refresh {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.live-body {
  padding: 26px 18px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(50% 90% at 50% 0%, rgba(45, 212, 167, 0.05) 0%, transparent 70%);
}

.widget-frame iframe {
  display: block;
  width: 100%;
  height: 560px;
  border: 0;
}

.live-body img {
  display: block;
  max-width: 600px;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  transition: transform 0.15s ease;
}

#myfxbook-widget-link {
  display: block;
  line-height: 0;
}

#myfxbook-widget-link:hover img {
  transform: translateY(-2px);
}

.setup-hint {
  padding: 36px 28px;
}

.setup-hint ol {
  margin: 14px 0 0 18px;
  color: var(--text-muted);
  font-size: 14.5px;
}

.setup-hint li {
  margin-bottom: 8px;
}

.setup-hint code {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 13px;
  color: var(--accent);
}

.widget-actions {
  margin-top: 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #06251c;
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
  border-radius: 10px;
  padding: 11px 20px;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.button:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

/* ---------- Backtest ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 30px 0 8px;
}

.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tile .k {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.tile .v {
  font-size: 21px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}

.tile .s {
  font-size: 12.5px;
  color: var(--text-muted);
}

.bt-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 10px 0 10px;
}

.seg {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  overflow: hidden;
}

.seg-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  padding: 7px 14px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.seg-btn:hover {
  color: var(--text);
}

.seg-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.bt-chart-wrap {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 8px 4px;
}

.bt-chart-wrap svg {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
}

.bt-chart-wrap text {
  font-family: inherit;
}

.bt-tip {
  position: absolute;
  pointer-events: none;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-muted);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  z-index: 5;
}

.bt-tip b {
  display: block;
  color: var(--text);
  margin-bottom: 2px;
}

.bt-footnote {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-muted);
  max-width: 760px;
}

.bt-monthly {
  margin-top: 20px;
}

.bt-monthly summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 14px;
  padding: 6px 0;
}

.bt-monthly summary:hover {
  color: var(--text);
}

.bt-monthly table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 13px;
}

#bt-monthly-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.bt-monthly th,
.bt-monthly td {
  padding: 7px 8px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

.bt-monthly th:first-child,
.bt-monthly td:first-child {
  text-align: left;
}

.bt-monthly th {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.bt-monthly td.na {
  color: rgba(147, 161, 176, 0.4);
}

.bt-monthly td.pos {
  color: #7fe6c4;
}

.bt-monthly td.neg {
  color: #f19392;
}

/* ---------- Risikohinweis & Datenschutz ---------- */

.risk-box {
  margin-top: 24px;
  background: rgba(240, 179, 94, 0.07);
  border: 1px solid rgba(240, 179, 94, 0.25);
  border-radius: var(--radius);
  padding: 20px 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.risk-box strong {
  color: var(--warn);
}

.datenschutz {
  font-size: 14px;
  color: var(--text-muted);
}

.datenschutz p {
  margin: 0 0 10px;
}

.datenschutz code {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 12.5px;
}

.live-declined {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: 8px 0 2px;
}

.live-declined a {
  color: var(--accent);
}

/* ---------- Cookie-Einwilligung ---------- */

.consent-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 100;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  padding: 16px 20px;
  max-width: 760px;
  margin: 0 auto;
}

.consent-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.consent-text {
  flex: 1 1 340px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

.consent-text strong {
  color: var(--text);
}

.consent-text a {
  color: var(--accent);
}

.consent-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.consent-actions .button {
  font-size: 13.5px;
  padding: 10px 16px;
}

.consent-decline {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 13.5px;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.consent-decline:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: 30px 0 40px;
  color: var(--text-muted);
  font-size: 13.5px;
}

footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Mobil ---------- */

@media (max-width: 620px) {
  .nav a {
    padding: 8px 10px;
    font-size: 13.5px;
  }

  .hero {
    padding: 56px 0 40px;
  }

  .widget-frame iframe {
    height: 480px;
  }
}
