:root {
  /* GSAP.com-inspired palette — lime accent, technical, dev-first feel.
     Lime #88ce02 to signature kolor GSAP.com (kojarzy się z greenscreen/code) */

  /* Surface elevation hierarchy */
  --surface-0: #0e0e10;     /* GSAP near-black z lekkim ciepłem */
  --surface-1: #15161a;     /* karty */
  --surface-2: #1d1e23;     /* elevated */
  --surface-3: #26272d;     /* highest layer */
  --surface-4: #2e2f36;     /* legacy alias */

  /* Text scale */
  --text-strong: #f1f1f4;
  --text:        #c8c9ce;
  --text-muted:  #888a92;
  --text-faint:  #5a5c64;
  --text-dim:    #393b42;

  /* Akcent — Lime green à la GSAP.com (signature). Hi-vis, code-feel. */
  --accent:      #88ce02;   /* lime — GSAP signature */
  --accent-soft: rgba(136, 206, 2, 0.14);
  --accent-glow: rgba(136, 206, 2, 0.45);

  /* Trading semantics — różny odcień zielonego dla good (mint) vs accent (lime) */
  --good:        #34d399;   /* emerald-400 — łagodna mięta, dla zysków */
  --good-soft:   rgba(52, 211, 153, 0.12);
  --bad:         #fb7185;   /* rose-400 — koral dla strat */
  --bad-soft:    rgba(251, 113, 133, 0.12);
  --warn:        #fbbf24;   /* amber-400 */
  --warn-soft:   rgba(251, 191, 36, 0.12);
  --info:        #88ce02;   /* aliased z accent */

  /* Bordery — bardziej widoczne niż w Linear (GSAP używa wyraźnych) */
  --border-1: #25262c;
  --border-2: #34353c;

  /* Typography */
  --font-display: 'Geist', system-ui, sans-serif;
  --font-mono:    'Geist Mono', 'SF Mono', Consolas, monospace;

  /* Spacing scale (4-base) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* Elevation shadows */
  --shadow-1: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-2: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-3: 0 12px 32px rgba(0,0,0,0.5);

  /* Radii — GSAP-style sharper (mniej "rounded SaaS", więcej technical) */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-display);
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  background: var(--surface-0);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }

.sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 220px; background: #0d1117; border-right: 1px solid #21262d; padding: 0; z-index: 100; overflow-y: auto; }
.logo { padding: 20px; border-bottom: 1px solid #21262d; }
.logo-title { font-size: 15px; font-weight: 600; color: #e6edf3; margin-bottom: 3px; }
.logo-sub { font-size: 11px; color: #484f58; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #34d399; margin-right: 6px; box-shadow: 0 0 6px #34d399; }
.status-dot.stale { background: #fbbf24; box-shadow: 0 0 6px #fbbf24; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

.section-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: #30363d; padding: 16px 20px 6px; }

/* NYSE state badge w sidebarze — nad version badge, kompaktowy widget
   pokazujący stan giełdy (PRE/OPEN/AFTER/CLOSED) + countdown 1s tick. */
.sidebar-nyse {
  margin-top: auto;
  padding: 12px 20px 10px;
  border-top: 1px solid #21262d;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  user-select: none;
}
.sidebar-nyse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-muted);
  box-shadow: 0 0 0 0 rgba(0,0,0,0);
  transition: background 0.2s, box-shadow 0.2s;
}
.sidebar-nyse-dot.is-open    { background: var(--good); box-shadow: 0 0 8px rgba(136,206,2,0.5); animation: nyse-dot-pulse 2.4s ease-in-out infinite; }
.sidebar-nyse-dot.is-pre,
.sidebar-nyse-dot.is-after   { background: var(--warn); box-shadow: 0 0 6px rgba(251,191,36,0.45); }
.sidebar-nyse-dot.is-closed  { background: var(--text-muted); }
@keyframes nyse-dot-pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(136,206,2,0.4); }
  50%      { box-shadow: 0 0 12px rgba(136,206,2,0.7); }
}
.sidebar-nyse-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.sidebar-nyse-state {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
  text-transform: uppercase;
}
.sidebar-nyse-eta {
  font-size: 9px;
  color: var(--text-faint);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Version badge na dole sidebara — klikalne, prowadzi na /#changelog */
.sidebar-version {
  padding: 14px 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s;
}
.sidebar-version:hover { background: #161b22; }
.sidebar-version .version-semver {
  color: var(--accent);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.sidebar-version .version-sha {
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: 0.04em;
  font-size: 10px;
}
.sidebar-version .version-date {
  color: var(--text-faint);
  font-size: 9px;
}

/* === Changelog page (/#changelog) === */
.changelog-content { font-size: 13px; line-height: 1.6; }
.changelog-content .cl-title { display: none; }  /* H1 z markdown, ukryte — tytuł w page-header */
.changelog-content .cl-version {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 24px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #21262d;
}
.changelog-content .cl-version:first-child { margin-top: 0; }
.changelog-content .cl-version-tag {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.changelog-content .cl-version-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}
.changelog-content .cl-section { font-size: 13px; color: var(--text-dim); margin: 12px 0 6px; }
.changelog-content .cl-cat {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 3px 9px;
  border-radius: 4px;
  margin: 14px 0 6px;
}
.changelog-content .cl-cat-added    { background: rgba(136, 206, 2, 0.12);  color: var(--accent); }
.changelog-content .cl-cat-changed  { background: rgba(96, 165, 250, 0.12); color: #60a5fa; }
.changelog-content .cl-cat-fixed    { background: rgba(251, 191, 36, 0.12); color: #fbbf24; }
.changelog-content .cl-cat-removed  { background: rgba(251, 113, 133, 0.12); color: var(--bad); }
.changelog-content .cl-cat-security { background: rgba(168, 85, 247, 0.12); color: #a855f7; }
.changelog-content .cl-cat-deprecated { background: rgba(156, 163, 175, 0.12); color: #9ca3af; }
.changelog-content .cl-list { list-style: none; padding: 0 0 0 4px; margin: 0 0 8px; }
.changelog-content .cl-list li {
  position: relative;
  padding: 3px 0 3px 18px;
  color: var(--text);
  font-size: 13px;
}
.changelog-content .cl-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  top: 3px;
  color: var(--text-faint);
  font-size: 11px;
}
.changelog-content .cl-list code {
  background: #161b22;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
  color: var(--accent);
}
.changelog-content .cl-para {
  color: var(--text-muted);
  margin: 6px 0;
  font-size: 13px;
}
.changelog-content .cl-sep {
  border: none;
  border-top: 1px dashed #21262d;
  margin: 28px 0;
}
.sidebar { display: flex; flex-direction: column; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 20px; cursor: pointer; font-size: 13px; color: #8b949e; border-left: 2px solid transparent; transition: all 0.12s; }
.nav-item:hover { color: #e6edf3; background: #161b22; }
.nav-item.active { color: #e6edf3; background: #161b22; border-left-color: #88ce02; }
.nav-icon { font-size: 14px; width: 18px; text-align: center; }
.nav-badge { margin-left: auto; font-size: 10px; padding: 1px 7px; border-radius: 10px; background: #1c1507; color: #fbbf24; }

.main { margin-left: 220px; padding: 28px 32px; min-height: 100vh; }
.page { display: none; } .page.active { display: block; }

.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-title { font-size: 20px; font-weight: 600; color: #e6edf3; }
.page-sub { font-size: 13px; color: #484f58; margin-top: 4px; }
.last-update { font-size: 11px; color: #30363d; white-space: nowrap; }
.paper-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: #fbbf24; background: #1c1507; border: 1px solid #3d2e0a; border-radius: 20px; padding: 3px 10px; margin-left: 10px; vertical-align: middle; }
.live-tag  { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: #34d399; background: #0a2b1e; border: 1px solid #1a4731; border-radius: 20px; padding: 3px 10px; margin-left: 10px; vertical-align: middle; }
.live-tag::before { content: '●'; animation: pulse 2s infinite; }

.banner { background: #1c1507; border: 1px solid #3d2e0a; border-radius: 8px; padding: 14px 18px; margin-bottom: 22px; font-size: 13px; color: #fbbf24; }
.banner.info { background: #0d1f2d; border-color: #1f3a52; color: #88ce02; }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 14px; margin-bottom: 22px; }
.metric-card { background: #0d1117; border: 1px solid #21262d; border-radius: 8px; padding: 18px; }
.metric-label { font-size: 11px; color: #484f58; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.metric-value { font-size: 26px; font-weight: 500; color: #e6edf3; line-height: 1; }
.metric-change { font-size: 11px; margin-top: 8px; color: #30363d; }
.green { color: #34d399; } .red { color: #fb7185; } .blue { color: #88ce02; } .yellow { color: #fbbf24; }

/* ─── TICKER ICON — gradient avatar + optional real logo overlay ─────────────
   Default: gradient avatar (background generated z hash + 1-2 literki).
   Hybrid: jeśli /static/tickers/{TICKER}.png istnieje, <img> nakłada się na
   avatar. Brak layout shift bo .ticker-icon ma fixed width/height.
   Smooth load: <img> ma opacity:0 + transition → onload ustawia opacity:1. */
.ticker-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-right: 10px;
  flex-shrink: 0;
  border-radius: 50%;  /* circle (Slack/Discord style) */
  overflow: hidden;
  background: #0d1117;  /* fallback bg podczas ładowania */
}
.ticker-avatar {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  /* font-size inline (proporcjonalny do size) */
  font-weight: 800;
  letter-spacing: 0.02em;
  color: rgba(13, 17, 23, 0.92);  /* dark text na jasnym gradient — kontrast */
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.25);
  user-select: none;
}
.ticker-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;  /* większość logo wektorów ma transparent — biały bg dla czytelności */
  border-radius: 50%;  /* clip do koła (parent overflow:hidden i tak by ciął, ale belt+suspenders) */
  opacity: 0;
  transition: opacity 0.22s ease-out;
}

/* Exit proximity meter — bar 0-100% z dual-purpose:
   • Loss side (czerwone tiery): proximity do stop-loss (-10% od entry)
   • Profit side (zielone tiery): proximity do bounce target (+5% SELL signal)
   Tier per side: cool (0-50%) → warm (50-80%) → hot (>80%, pulse). */
.sl-bar {
  position: relative;
  width: 80px;
  height: 16px;
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 3px;
  overflow: hidden;
}
.sl-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  transition: width 0.4s ease, background 0.3s ease;
  opacity: 0.6;
}
.sl-bar-label {
  position: relative;
  display: block;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 0.04em;
  color: var(--text);
  text-shadow: 0 0 4px rgba(0,0,0,0.7);
}

/* Loss side — drift do stop-loss (-10%). Lekki amber → palący red pulse. */
.sl-bar-loss-cool .sl-bar-fill  { background: #d97706; opacity: 0.4; }
.sl-bar-loss-cool .sl-bar-label { color: #fbbf24; }
.sl-bar-loss-warm .sl-bar-fill  { background: #fbbf24; }
.sl-bar-loss-warm .sl-bar-label { color: #fcd34d; }
.sl-bar-loss-hot  .sl-bar-fill  { background: #fb7185; animation: sl-pulse 1.5s ease-in-out infinite; }
.sl-bar-loss-hot  .sl-bar-label { color: #fda4af; font-weight: 800; }

/* Profit side — drift do bounce target (+5%). Lekki teal → soczysty green pulse (good signal). */
.sl-bar-profit-cool .sl-bar-fill  { background: #14b8a6; opacity: 0.35; }
.sl-bar-profit-cool .sl-bar-label { color: #5eead4; }
.sl-bar-profit-warm .sl-bar-fill  { background: #34d399; opacity: 0.55; }
.sl-bar-profit-warm .sl-bar-label { color: #6ee7b7; }
.sl-bar-profit-hot  .sl-bar-fill  { background: #34d399; animation: sl-pulse 1.5s ease-in-out infinite; }
.sl-bar-profit-hot  .sl-bar-label { color: #a7f3d0; font-weight: 800; }

@keyframes sl-pulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 0.95; }
}

.tip { width: 15px; height: 15px; border-radius: 50%; background: #161b22; border: 1px solid #30363d; color: #484f58; font-size: 9px; display: inline-flex; align-items: center; justify-content: center; cursor: help; position: relative; flex-shrink: 0; }
.tip::after { content: attr(data-tip); position: absolute; left: 22px; top: -2px; background: #1c2128; border: 1px solid #30363d; border-radius: 6px; padding: 8px 12px; font-size: 11px; color: #c9d1d9; line-height: 1.6; width: 240px; z-index: 999; pointer-events: none; opacity: 0; transition: opacity 0.15s; }
.tip:hover::after { opacity: 1; }

.chart-card { background: #0d1117; border: 1px solid #21262d; border-radius: 8px; padding: 20px; margin-bottom: 22px; }
.chart-title { font-size: 13px; font-weight: 500; color: #e6edf3; margin-bottom: 4px; }
.chart-sub { font-size: 11px; color: #484f58; margin-bottom: 16px; }

.table-card { background: #0d1117; border: 1px solid #21262d; border-radius: 8px; overflow: hidden; margin-bottom: 22px; }
.table-header { padding: 14px 20px; border-bottom: 1px solid #21262d; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.table-title { font-size: 13px; font-weight: 500; color: #e6edf3; }
.table-sub { font-size: 11px; color: #484f58; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: #484f58; font-weight: 400; padding: 10px 20px; border-bottom: 1px solid #21262d; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.signal-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.signal-filters .chip-btn {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--surface-1); color: var(--text-muted);
  border: 1px solid var(--border-1); border-radius: var(--r-sm);
  padding: 5px 10px; cursor: pointer;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
}
.signal-filters .chip-btn:hover { color: var(--text); border-color: var(--border-2); }
.signal-filters .chip-btn.active {
  background: var(--accent-soft); color: var(--accent);
  border-color: rgba(136,206,2,0.4);
}
.sortable-th { cursor: pointer; user-select: none; transition: color 0.12s; position: relative; padding-right: 26px; }
.sortable-th:hover { color: var(--text); }
.sortable-th::after { content: '↕'; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); opacity: 0.35; font-size: 10px; }
.sortable-th.sort-asc::after  { content: '↑'; opacity: 1; color: var(--accent); }
.sortable-th.sort-desc::after { content: '↓'; opacity: 1; color: var(--accent); }
.sortable-th.sort-active { color: var(--text-strong); }
td { padding: 11px 20px; border-bottom: 1px solid #0f1117; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #161b22; }

/* Sticky table headers — przy długich listach (history 50 trades, signals 50)
   header pozostaje widoczny przy scrollowaniu, user wie co sortuje. */
.table-card thead th {
  position: sticky;
  top: 0;
  background: #0d1117;
  z-index: 5;
  border-bottom: 1px solid #21262d;
}

/* Tabela footer — dynamiczne sumy (np. tabela "Otwarte pozycje") */
tfoot .totals-row td {
  background: #0a0d12;
  border-top: 1px solid #21262d;
  border-bottom: none;
  padding-top: 14px;
  padding-bottom: 14px;
  font-weight: 600;
  font-size: 13px;
}
tfoot .totals-row .totals-label {
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 600;
}
tfoot .totals-row .totals-label span {
  color: var(--accent);
}
tfoot .totals-row:hover td { background: #0a0d12; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 500; }
.badge-buy        { background: #0a2b1e; color: #34d399; border: 1px solid #1a4731; }
.badge-sell       { background: #2d1515; color: #fb7185; border: 1px solid #5c2323; }
.badge-stop_loss  { background: #2d1515; color: #fb7185; border: 1px solid #5c2323; }
.badge-wait       { background: #161b22; color: #8b949e; border: 1px solid #21262d; }
.badge-hold       { background: #1c1507; color: #fbbf24; border: 1px solid #3d2e0a; }

/* WCAG: color-only signaling jest niedostępne dla color-blind users (~8% mężczyzn).
   Dodajemy unicode glify (↑/↓/—) jako prefix do każdego badge'a — kolor + kształt. */
.badge-buy::before        { content: '↑ '; opacity: 0.85; }
.badge-sell::before       { content: '↓ '; opacity: 0.85; }
.badge-stop_loss::before  { content: '⊗ '; opacity: 0.85; }
.badge-hold::before       { content: '◇ '; opacity: 0.7; }
.badge-wait::before       { content: '— '; opacity: 0.6; }
.badge-pdt_hold   { background: #1c1507; color: #fbbf24; border: 1px solid #3d2e0a; }
.badge-filter     { background: #1a1a2e; color: #8b94c9; border: 1px solid #2a2a44; }
.badge-filter     { background: #1d1233; color: #a371f7; border: 1px solid #4d3a99; }

.ticker { font-family: 'SF Mono', 'Consolas', monospace; font-size: 12px; font-weight: 600; color: #88ce02; }
.mono { font-family: 'SF Mono', 'Consolas', monospace; font-size: 12px; }
.empty { text-align: center; padding: 40px 20px; color: #30363d; font-size: 13px; }

details.wiki { background: #0d1117; border: 1px solid #21262d; border-radius: 8px; margin-bottom: 22px; overflow: hidden; }
details.wiki summary { padding: 14px 20px; cursor: pointer; font-size: 13px; font-weight: 600; color: #88ce02; list-style: none; display: flex; align-items: center; gap: 10px; user-select: none; transition: background 0.12s; }
details.wiki summary::-webkit-details-marker { display: none; }
details.wiki summary::before { content: '▶'; font-size: 9px; transition: transform 0.18s ease; color: #88ce02; flex-shrink: 0; }
details.wiki[open] summary::before { transform: rotate(90deg); }
details.wiki summary:hover { background: #161b22; }
details.wiki summary .wiki-hint { margin-left: auto; font-size: 11px; color: #484f58; font-weight: 400; }
.wiki-content { padding: 4px 24px 20px; border-top: 1px solid #21262d; }
.wiki-content h4 { font-size: 13px; color: #e6edf3; font-weight: 600; margin-top: 18px; margin-bottom: 8px; }
.wiki-content h4:first-child { margin-top: 12px; }
.wiki-content p, .wiki-content li { font-size: 13px; color: #8b949e; line-height: 1.7; }
.wiki-content ul, .wiki-content ol { margin-left: 20px; margin-bottom: 8px; }
.wiki-content strong { color: #c9d1d9; }
.wiki-content .ok { color: #34d399; } .wiki-content .bad { color: #fb7185; } .wiki-content .info { color: #fbbf24; }
.wiki-step { background: #161b22; border-left: 3px solid #88ce02; padding: 12px 16px; border-radius: 4px; margin-bottom: 10px; }
.wiki-step strong { color: #88ce02; }

/* ───────── WIKI v2 — typographic hierarchy ───────── */
.wiki2 { background: var(--surface-1); border: 1px solid var(--border-1); border-radius: var(--r-md); margin-bottom: var(--s-4); overflow: hidden; }
.wiki2 > summary { padding: var(--s-4) var(--s-5); cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: var(--s-3); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); transition: background 0.15s; }
.wiki2 > summary::-webkit-details-marker { display: none; }
.wiki2 > summary::before { content: '+'; font-weight: 700; color: var(--accent); margin-right: var(--s-2); display: inline-block; }
.wiki2[open] > summary::before { content: '−'; }
.wiki2 > summary:hover { background: var(--surface-2); color: var(--text); }
.wiki2 > summary .head-num { color: var(--text-faint); font-weight: 400; margin-right: var(--s-2); }
.wiki2 > summary .head-title { color: var(--text-strong); flex: 1; }
.wiki2 > summary .head-tag { font-size: 10px; color: var(--text-faint); white-space: nowrap; }

.wiki2-body { padding: var(--s-5) var(--s-6) var(--s-6); border-top: 1px solid var(--border-1); }
.wiki2-lead { font-size: 15px; line-height: 1.55; color: var(--text); margin-bottom: var(--s-5); max-width: 65ch; }
.wiki2-lead strong { color: var(--text-strong); font-weight: 600; }

.wiki2 h5 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); font-weight: 500; margin-top: var(--s-5); margin-bottom: var(--s-3); }

.rule-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rule-table td { padding: var(--s-3) var(--s-4) var(--s-3) 0; border-bottom: 1px solid var(--border-1); vertical-align: top; }
.rule-table tr:last-child td { border-bottom: none; }
.rule-table .col-tag { font-family: var(--font-mono); font-size: 11px; color: var(--accent); white-space: nowrap; padding-right: var(--s-5); width: 1%; }
.rule-table .col-label { font-weight: 600; color: var(--text-strong); white-space: nowrap; padding-right: var(--s-4); }
.rule-table .col-detail { color: var(--text-muted); }

.code-block { background: var(--surface-3); border-radius: var(--r-sm); padding: var(--s-4) var(--s-5); font-family: var(--font-mono); font-size: 12px; line-height: 1.7; color: var(--text-strong); overflow-x: auto; white-space: pre-wrap; }

/* Mermaid diagrams — wiki flowcharts (BUY flow w sec #16, slippage etc).
   Container ma dark bg + center alignment. SVG sam ma wbudowane stylowanie via
   themeVariables w mermaid.initialize() — overrides only minimal layout tu. */
.mermaid {
  background: var(--surface-3);
  border-radius: var(--r-sm);
  padding: var(--s-5) var(--s-4);
  margin: var(--s-3) 0;
  overflow-x: auto;
  text-align: center;
  min-height: 240px;  /* placeholder space przed render — no layout jump */
  position: relative;
}
/* Pre-render: ukryj raw DSL via transparent text + pokazuj loading message.
   Po render data-rendered="1" → pseudo-element znika, SVG wypełnia. */
.mermaid:not([data-rendered="1"]) {
  color: transparent;
  font-size: 0;
  user-select: none;
}
.mermaid:not([data-rendered="1"])::before {
  content: '⌛ Renderowanie diagramu…';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}
.mermaid[data-rendered="error"]::before {
  content: '⚠ Błąd renderowania diagramu';
  color: var(--bad);
}
.mermaid[data-rendered="1"] {
  color: inherit;
  font-size: inherit;
  min-height: auto;
}
.mermaid svg {
  max-width: 100%;
  height: auto;
}
.code-block .comment { color: var(--text-faint); }
.code-block .key { color: var(--accent); }

.flag { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 11px; padding: 2px 6px; border-radius: var(--r-sm); }
.flag.good { background: var(--good-soft); color: var(--good); }
.flag.bad  { background: var(--bad-soft); color: var(--bad); }
.flag.warn { background: var(--warn-soft); color: var(--warn); }
.flag.info { background: rgba(88,166,255,0.10); color: var(--info); }

/* ───────── HERO — Revolut-style: focal number + change + stats grid ───────── */
.page-hero {
  position: relative;
  padding: var(--s-7) var(--s-6) var(--s-5);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 80% at 80% 0%, var(--accent-soft) 0%, transparent 60%),
    linear-gradient(180deg, var(--surface-2) 0%, var(--surface-1) 100%);
  margin-bottom: var(--s-5);
  overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  mask: linear-gradient(180deg, transparent 0%, black 30%, black 70%, transparent 100%);
}
.page-hero-inner { position: relative; z-index: 1; }
.page-hero-eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-muted); display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-3);
}
.page-hero-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(52,211,153,0.18); animation: pulse-soft 2s infinite; }
.page-hero-title {
  font-family: var(--font-mono); font-weight: 600;
  font-size: clamp(48px, 8vw, 84px); line-height: 0.95; letter-spacing: -0.04em;
  color: var(--text-strong);
  display: flex; align-items: baseline; gap: var(--s-3); flex-wrap: wrap;
  font-feature-settings: 'tnum';
}
.page-hero-title .currency { font-size: 0.38em; color: var(--text-faint); font-weight: 500; }
.page-hero-sub {
  margin-top: var(--s-3);
  font-family: var(--font-mono); font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap;
}

/* Today's change indicator (Revolut-style: arrow + delta + pct pill) */
.page-hero-change {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: var(--s-3);
  font-family: var(--font-mono); font-size: 16px; font-weight: 600;
  color: var(--text-muted);
}
.page-hero-change.up   { color: var(--good); }
.page-hero-change.down { color: var(--bad); }
.page-hero-change-arrow { font-size: 13px; opacity: 0.85; }
.page-hero-change-pct {
  font-size: 13px; font-weight: 600;
  padding: 3px 8px; border-radius: 5px;
  background: rgba(139,148,158,0.10);
  letter-spacing: 0.01em;
}
.page-hero-change.up   .page-hero-change-pct { background: rgba(52,211,153,0.14); }
.page-hero-change.down .page-hero-change-pct { background: rgba(251,113,133,0.14); }
.page-hero-change-period {
  font-size: 11px; color: var(--text-faint); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em;
}

/* Mini-card grid below hero (replaces strip) */
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: var(--s-3);
  margin-top: var(--s-5);
}
.hero-stat {
  position: relative;
  background: rgba(255,255,255,0.018);
  border: 1px solid var(--border-1);
  border-radius: var(--r-md);
  padding: var(--s-4);
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}
.hero-stat::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--accent); opacity: 0; transition: opacity 0.2s;
}
.hero-stat:hover {
  border-color: var(--accent);
  background: rgba(136,206,2,0.04);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 0 1px var(--accent-soft);
}
.hero-stat:hover::before { opacity: 1; }

/* Tier 1 (primary) — większy padding, mocniejsze borders */
.hero-stat.is-primary {
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.012));
  border-color: var(--border-2);
}

/* Risk HALT state — amber border accent */
.hero-stat.is-warning {
  border-color: rgba(251, 191, 36, 0.4);
  background: linear-gradient(180deg, rgba(251,191,36,0.05), rgba(255,255,255,0.012));
}
.hero-stat.is-warning::before { background: var(--warn); opacity: 1; }
.hero-stat-key {
  font-family: var(--font-mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--text-faint);
}
.hero-stat-val {
  font-family: var(--font-mono); font-size: 22px; font-weight: 600;
  color: var(--text-strong); letter-spacing: -0.02em;
  margin-top: 6px; line-height: 1.1;
  font-feature-settings: 'tnum';
}
.hero-stat-val.good { color: var(--good); }
.hero-stat-val.bad  { color: var(--bad); }
.hero-stat-val.warn { color: var(--warn); }
.hero-stat-sub {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text-faint); margin-top: 4px;
}
@media (max-width: 720px) {
  .hero-stats-grid { grid-template-columns: repeat(2, 1fr); gap: var(--s-2); }
  .hero-stat { padding: var(--s-3); }
  .hero-stat-val { font-size: 18px; }
  .hero-stat-key { font-size: 9px; letter-spacing: 0.10em; }
  .hero-stat-sub { font-size: 10px; }
}
@media (max-width: 380px) {
  .hero-stats-grid { grid-template-columns: 1fr; }
}

/* === NYSE CLOCK — top-right hero === */
.page-hero { position: relative; }
.nyse-clock {
  position: absolute;
  top: var(--s-5); right: var(--s-5);
  display: flex; align-items: center; gap: var(--s-4);
  padding: var(--s-3) var(--s-4);
  background: rgba(18, 21, 27, 0.55);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid var(--border-1);
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  z-index: 5;
  transition: border-color 0.3s;
}
.nyse-clock:hover { border-color: var(--border-2); }
.nyse-clock-icon {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: var(--good);
  filter: drop-shadow(0 0 6px currentColor);
  transition: color 0.5s, filter 0.5s;
}
.nyse-clock-icon.is-closed  { color: var(--text-muted); filter: drop-shadow(0 0 4px rgba(139,148,158,0.3)); }
.nyse-clock-icon.is-pre,
.nyse-clock-icon.is-after   { color: var(--warn); filter: drop-shadow(0 0 5px rgba(251,191,36,0.4)); }
.nyse-clock-icon.is-open    { color: var(--good); animation: nyse-sun-pulse 4s ease-in-out infinite; }
@keyframes nyse-sun-pulse {
  0%, 100% { filter: drop-shadow(0 0 4px var(--good)); }
  50%      { filter: drop-shadow(0 0 12px var(--good)); }
}
.nyse-clock-info {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.nyse-clock-status {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--text-strong);
  font-feature-settings: 'tnum';
}
.nyse-clock-eta {
  font-size: 10px; color: var(--text-faint);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.nyse-clock-label {
  font-size: 9px; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: 0.16em;
}
.nyse-clock-countdown {
  font-size: 14px; font-weight: 700;
  color: var(--accent);
  font-feature-settings: 'tnum';
  line-height: 1.1;
}
.nyse-clock-divider {
  width: 1px; height: 28px;
  background: var(--border-2);
}
.nyse-clock-risk-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700;
  color: var(--good);
  font-feature-settings: 'tnum';
  line-height: 1.1;
}
.nyse-risk-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 6px var(--good);
}
.nyse-clock-risk.is-halt .nyse-clock-risk-status { color: var(--warn); }
.nyse-clock-risk.is-halt .nyse-risk-dot {
  background: var(--warn);
  box-shadow: 0 0 8px var(--warn);
  animation: nyse-risk-pulse 1.6s ease-in-out infinite;
}
.nyse-risk-sub {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: 2px;
  line-height: 1.1;
  text-transform: lowercase;
}
.nyse-clock-risk.is-halt .nyse-risk-sub { color: var(--warn); font-weight: 600; }

.nyse-kill-btn {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em;
  background: rgba(251,113,133,0.10);
  color: var(--bad);
  border: 1px solid rgba(251,113,133,0.35);
  border-radius: var(--r-sm);
  padding: 6px 10px; cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  white-space: nowrap;
}
.nyse-kill-btn:hover {
  background: rgba(251,113,133,0.22);
  border-color: var(--bad);
}
.nyse-kill-btn.is-active {
  background: var(--bad); color: #0e0e10;
  animation: nyse-risk-pulse 1.6s ease-in-out infinite;
}

/* === AUTH UI === */
.auth-corner {
  position: fixed; top: 16px; right: 20px; z-index: 150;
  display: flex; align-items: center; gap: 8px;
}

/* Single button — Login (gdy wylogowany) */
.auth-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: rgba(20, 22, 28, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-strong);
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  padding: 9px 16px; cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
}
.auth-btn:hover { border-color: var(--accent); color: var(--accent); }
.auth-btn-login {
  border-color: rgba(136,206,2,0.4);
  color: var(--accent);
  background: rgba(136,206,2,0.08);
}
.auth-btn-login:hover {
  background: var(--accent); color: var(--surface-0); border-color: var(--accent);
}

/* Logged-in state: user pill + logout button */
.auth-user-group {
  display: inline-flex; align-items: stretch; gap: 6px;
}
.auth-user-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  background: rgba(20, 22, 28, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  border: 1px solid var(--border-1);
  border-radius: var(--r-md);
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em;
  user-select: none;
}
.auth-user-pill svg { color: var(--text-muted); flex-shrink: 0; }
.auth-btn-logout {
  /* Reset domyślnego buttona — używamy class auth-btn z dodatkami */
  border-color: var(--border-2);
}
.auth-btn-logout:hover {
  border-color: var(--bad);
  color: var(--bad);
  background: rgba(251,113,133,0.08);
}

/* Hide protected nav-items gdy nie zalogowany.
   Globalny `body.is-logged-in` toggle'owany w JS po /api/me. */
body:not(.is-logged-in) [data-auth="protected"] { display: none !important; }
body:not(.is-logged-in) .auth-required-section { display: none !important; }

/* Admin/viewer role visibility — body.is-admin / body.is-viewer toggle'owane w renderAuthUI. */
body:not(.is-admin) .admin-only { display: none !important; }
body.is-admin .viewer-only { display: none !important; }

/* Admin panel buttons — kompaktowe akcje w tabeli userów */
.admin-btn {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  color: var(--text-strong);
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  font-size: 14px;
  cursor: pointer;
  margin-right: 4px;
  transition: all 0.12s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.admin-btn:hover { border-color: var(--accent); color: var(--accent); }
.admin-btn.admin-btn-warn:hover { border-color: var(--warn); color: var(--warn); }
.admin-btn.admin-btn-bad:hover { border-color: var(--bad); color: var(--bad); }

.auth-modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(8, 10, 14, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: auth-modal-fade 0.18s ease-out;
}
@keyframes auth-modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.auth-modal-card {
  width: 100%; max-width: 420px;
  background: var(--surface-1);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-3);
  animation: auth-modal-pop 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
}
@keyframes auth-modal-pop {
  from { transform: translateY(8px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.auth-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--border-1);
}
.auth-modal-title { font-size: 14px; font-weight: 600; letter-spacing: 0.02em; color: var(--text-strong); }
.auth-modal-close {
  background: transparent; border: none; cursor: pointer;
  font-size: 24px; line-height: 1; color: var(--text-muted);
  padding: 0 6px; transition: color 0.12s;
}
.auth-modal-close:hover { color: var(--text-strong); }
.auth-modal-body { padding: var(--s-5); }
.auth-modal-sub {
  font-size: 12px; color: var(--text-muted);
  margin-bottom: var(--s-5);
  line-height: 1.5;
}
.auth-modal-label {
  display: block;
  font-family: var(--font-mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.auth-modal-label:not(:first-child) { margin-top: var(--s-4); }
.auth-modal-input {
  width: 100%;
  padding: 12px 12px;
  background: var(--surface-0);
  color: var(--text-strong);
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  /* font-size 16px wymagany na iOS żeby uniknąć auto-zoom przy focus.
     Na desktop dziedziczy ten sam rozmiar — fine, monospace czyta się dobrze. */
  font-family: var(--font-mono); font-size: 16px;
  outline: none; transition: border-color 0.12s, box-shadow 0.12s;
  min-height: 44px;  /* WCAG touch target */
}
.auth-modal-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(136, 206, 2, 0.15);
}
.auth-modal-error {
  margin-top: var(--s-3);
  padding: 8px 12px;
  background: rgba(251,113,133,0.10);
  border: 1px solid rgba(251,113,133,0.3);
  border-radius: var(--r-sm);
  color: var(--bad);
  font-size: 12px;
}
.auth-modal-submit {
  width: 100%; margin-top: var(--s-5);
  padding: 12px;
  background: var(--accent); color: var(--surface-0);
  border: none; border-radius: var(--r-md);
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer; transition: filter 0.12s;
}
.auth-modal-submit:hover { filter: brightness(1.1); }
.auth-modal-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.auth-modal-switch {
  margin-top: var(--s-4);
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}
.auth-modal-switch a {
  color: var(--accent); text-decoration: none; font-weight: 600;
}
.auth-modal-switch a:hover { text-decoration: underline; }

/* Bot power toggle button — Konfiguracja → Bot control */
.bot-power-btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 28px;
  font-family: var(--font-mono); font-size: 14px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--bad); color: #0e0e10;
  border: none; border-radius: var(--r-md);
  cursor: pointer; transition: filter 0.12s, transform 0.08s, background 0.2s;
  min-width: 160px; justify-content: center;
}
.bot-power-btn:hover { filter: brightness(1.08); }
.bot-power-btn:active { transform: scale(0.97); }
.bot-power-btn.is-stopped {
  background: var(--good); color: #0e0e10;
  animation: power-pulse 2s ease-in-out infinite;
}
.bot-power-icon { font-size: 16px; line-height: 1; }
.bot-power-label { line-height: 1; }
@keyframes power-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0.5); }
  50%      { box-shadow: 0 0 0 12px rgba(52,211,153,0); }
}

.bot-power-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--good); box-shadow: 0 0 8px var(--good);
  animation: power-dot-pulse 2s ease-in-out infinite;
}
.bot-power-dot.is-stopped {
  background: var(--bad); box-shadow: 0 0 8px var(--bad);
  animation: none;
}
@keyframes power-dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(1.3); }
}
@keyframes nyse-risk-pulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(1.4); opacity: 0.6; }
}
@media (max-width: 720px) {
  /* NYSE clock — relative na pełną szerokość, sekcje równo rozłożone */
  .nyse-clock {
    position: relative; top: auto; right: auto;
    margin-bottom: var(--s-4); flex-wrap: wrap;
    width: 100%; justify-content: space-between;
    gap: var(--s-3); padding: var(--s-3);
  }
  .nyse-clock-divider { display: none; }            /* dividery zbyt ciasne na mobile */
  .nyse-clock-info { flex: 1 1 30%; min-width: 0; } /* 3 kolumny, każda 1/3 */
  .nyse-clock-status, .nyse-clock-eta { font-size: 11px; }
}
@media (max-width: 480px) {
  /* Bardzo wąsko — sekcje stack'ują się 2x2 lub osobno */
  .nyse-clock-info { flex-basis: 45%; }
  .nyse-clock-icon { width: 24px; height: 24px; }
  .nyse-clock { padding: var(--s-2); gap: var(--s-2); }
}

/* Legacy strip (back-compat — narrow inline version, mostly unused now) */
.page-hero-strip {
  margin-top: var(--s-5); display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5);
  align-items: center; font-family: var(--font-mono); font-size: 13px; color: var(--text-muted);
}
.page-hero-strip-item { display: inline-flex; align-items: baseline; gap: 6px; }
.page-hero-strip-key { color: var(--text-faint); text-transform: uppercase; font-size: 10px; letter-spacing: 0.12em; }
.page-hero-strip-val { color: var(--text-strong); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.page-hero-strip-sep { color: var(--text-dim); }

/* ───────── HERO v2 — sparkline, scan tick, value flash ───────── */
@keyframes scan-sweep {
  0%   { transform: translateX(-100%); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}
@keyframes value-flash-up   { 0% { color: var(--text-strong); } 30% { color: var(--good); } 100% { color: var(--text-strong); } }
@keyframes value-flash-down { 0% { color: var(--text-strong); } 30% { color: var(--bad);  } 100% { color: var(--text-strong); } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,0.5); } 100% { box-shadow: 0 0 0 14px rgba(52,211,153,0); } }
@keyframes tick-bump  { 0% { transform: scale(1); } 50% { transform: scale(1.015); } 100% { transform: scale(1); } }

.page-hero { transition: border-color 0.4s; position: relative; }

/* Scan-sweep light — sweeps across hero co 60s (z scan_interval bota) */
.page-hero::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 80px; left: 0;
  background: linear-gradient(90deg, transparent, var(--accent-soft), transparent);
  filter: blur(8px); pointer-events: none; opacity: 0;
  animation: scan-sweep 60s linear infinite;
  z-index: 0;
}

.page-hero-eyebrow .dot { position: relative; }
.page-hero-eyebrow .dot::after {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  animation: pulse-ring 2s ease-out infinite;
}

/* Sparkline na prawej krawędzi hero */
.hero-sparkline {
  position: absolute; right: var(--s-6); top: var(--s-5);
  width: 220px; height: 64px;
  pointer-events: none;
  z-index: 1;
}
.hero-sparkline svg { width: 100%; height: 100%; overflow: visible; }
.hero-sparkline .spark-area { fill: url(#sparkAreaGrad); }
.hero-sparkline .spark-line { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.hero-sparkline .spark-dot { fill: var(--accent); }
.hero-sparkline-label {
  position: absolute; right: 0; top: -18px;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint);
}
.hero-sparkline-pct {
  font-family: var(--font-mono); font-size: 11px;
  margin-left: var(--s-2); color: var(--text-strong); font-weight: 600;
}
@media (max-width: 980px) { .hero-sparkline { display: none; } }

/* Value flash — JS adds class for 1.2s */
.flash-up   { animation: value-flash-up 1.2s ease-out; }
.flash-down { animation: value-flash-down 1.2s ease-out; }
.tick-bump  { animation: tick-bump 0.6s cubic-bezier(0.16,1,0.3,1); }

/* Table row reveal stagger */
@keyframes row-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.row-stagger > tr { animation: row-in 0.35s cubic-bezier(0.16,1,0.3,1) both; }
.row-stagger > tr:nth-child(1)  { animation-delay: 0.02s; }
.row-stagger > tr:nth-child(2)  { animation-delay: 0.04s; }
.row-stagger > tr:nth-child(3)  { animation-delay: 0.06s; }
.row-stagger > tr:nth-child(4)  { animation-delay: 0.08s; }
.row-stagger > tr:nth-child(5)  { animation-delay: 0.10s; }
.row-stagger > tr:nth-child(6)  { animation-delay: 0.12s; }
.row-stagger > tr:nth-child(7)  { animation-delay: 0.14s; }
.row-stagger > tr:nth-child(8)  { animation-delay: 0.16s; }
.row-stagger > tr:nth-child(n+9) { animation-delay: 0.18s; }

/* Hover lift on rows */
table tbody tr { transition: background 0.15s; }
table tbody tr:hover td { background: var(--surface-3); }

/* Banner slide-in */
@keyframes banner-slide-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.banner { animation: banner-slide-down 0.4s cubic-bezier(0.16,1,0.3,1); }

/* Range buttons subtle glow */
/* Chart/table card subtle border glow */
.chart-card, .table-card { transition: border-color 0.25s, box-shadow 0.25s; }
.chart-card:hover, .table-card:hover { border-color: var(--border-2); }

/* Period selector buttons — Revolut-style segmented control */
.range-buttons {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border-1);
  border-radius: 8px;
  padding: 3px;
  gap: 0;
}
.range-btn {
  padding: 6px 14px;
  background: transparent;
  border: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.04em;
  min-height: 32px;  /* desktop fine; mobile bumps do 44px niżej */
}
@media (max-width: 768px) {
  .range-btn { padding: 10px 14px; min-height: 44px; font-size: 13px; }
}
.range-btn:hover { color: var(--text-strong); transform: none; }
.range-btn.active {
  background: var(--accent);
  color: var(--surface-0);
  box-shadow: none;
}
.equity-pct { font-size: 14px; font-weight: 600; margin-left: 8px; font-family: var(--font-mono); }

/* ───────── LANDING PAGE ───────── */
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse-soft { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }
@keyframes draw-line { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }

.page-home { display: none; position: relative; }
.page-home.active { display: block; }

.hero {
  position: relative;
  padding: var(--s-8) var(--s-6) var(--s-7);
  overflow: hidden;
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(136,206,2,0.10) 0%, transparent 60%),
    linear-gradient(180deg, var(--surface-2) 0%, var(--surface-1) 100%);
  margin-bottom: var(--s-5);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  mask: linear-gradient(180deg, transparent 0%, black 30%, black 70%, transparent 100%);
}
.hero-inner { position: relative; z-index: 1; max-width: 100%; }
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-muted);
  display: flex; align-items: center; gap: var(--s-2);
  animation: fade-up 0.5s ease both;
}
.hero-eyebrow .live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--good); box-shadow: 0 0 0 4px rgba(52,211,153,0.18);
  animation: pulse-soft 2s ease-in-out infinite;
}
.hero-equity {
  font-family: var(--font-mono); font-weight: 700;
  font-size: clamp(56px, 9vw, 120px); line-height: 0.95; letter-spacing: -0.04em;
  color: var(--text-strong); margin-top: var(--s-4);
  animation: fade-up 0.7s 0.1s ease both;
  display: flex; align-items: baseline; gap: var(--s-3); flex-wrap: wrap;
}
.hero-equity .currency { font-size: 0.45em; color: var(--text-faint); font-weight: 500; }
.hero-delta {
  margin-top: var(--s-3); font-family: var(--font-mono);
  font-size: 16px; font-weight: 500;
  display: flex; align-items: center; gap: var(--s-3);
  animation: fade-up 0.7s 0.2s ease both;
}
/* Terminal-style headline row — inline data, separated by · */
.hero-headline {
  margin-top: var(--s-6);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--s-3) var(--s-4);
  animation: fade-up 0.7s 0.3s ease both;
}
.hero-headline-item { display: inline-flex; align-items: baseline; gap: 6px; }
.hero-headline-key { color: var(--text-faint); text-transform: uppercase; font-size: 10px; letter-spacing: 0.12em; }
.hero-headline-val { color: var(--text-strong); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.hero-headline-sep { color: var(--text-dim); margin: 0 var(--s-1); }

/* Schedule strip — small caption row above headline */
.hero-schedule {
  margin-top: var(--s-7);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  display: flex; gap: var(--s-3); align-items: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  animation: fade-up 0.7s 0.4s ease both;
}
.hero-schedule code { background: var(--surface-3); padding: 2px var(--s-2); border-radius: var(--r-sm); color: var(--accent); font-weight: 600; }
.hero-chart {
  position: absolute; right: -40px; top: 0; bottom: 0;
  width: 60%; max-width: 700px;
  opacity: 0.30; pointer-events: none;
  mask: linear-gradient(90deg, transparent 0%, black 35%);
}
.hero-chart svg { width: 100%; height: 100%; }
.hero-chart svg path { animation: draw-line 2.5s ease-out forwards; stroke-dasharray: 1000; stroke-dashoffset: 1000; }

/* Ticker tape */
.ticker-tape { background: var(--surface-2); border: 1px solid var(--border-1); border-radius: var(--r-md); overflow: hidden; position: relative; margin-bottom: var(--s-5); }
.ticker-tape::before, .ticker-tape::after { content: ''; position: absolute; top: 0; bottom: 0; width: 80px; z-index: 2; pointer-events: none; }
.ticker-tape::before { left: 0; background: linear-gradient(90deg, var(--surface-2), transparent); }
.ticker-tape::after  { right: 0; background: linear-gradient(-90deg, var(--surface-2), transparent); }
.ticker-track { display: flex; gap: var(--s-7); padding: var(--s-4) var(--s-5); white-space: nowrap; animation: ticker-scroll 40s linear infinite; width: max-content; }
.ticker-item { display: inline-flex; align-items: center; gap: var(--s-3); font-family: var(--font-mono); font-size: 13px; }
.ticker-symbol { font-weight: 600; color: var(--text-strong); }
.ticker-price { color: var(--text); }
.ticker-chg { font-size: 11px; padding: 2px var(--s-2); border-radius: var(--r-sm); font-weight: 500; }
.ticker-chg.up { color: var(--good); background: var(--good-soft); }
.ticker-chg.down { color: var(--bad); background: var(--bad-soft); }
.ticker-chg.flat { color: var(--text-faint); background: var(--surface-3); }

/* ───────── LANDING SHOWCASE (brand mode) ───────── */
@keyframes drift { 0% { transform: translate(0,0); } 100% { transform: translate(40px,-40px); } }
@keyframes glow { 0%,100% { opacity: 0.45; } 50% { opacity: 0.85; } }

.lp-section { padding: var(--s-9) 0; position: relative; }
.lp-section + .lp-section { border-top: 1px solid var(--border-1); }
.lp-eyebrow {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.22em; text-transform: uppercase;
  background: linear-gradient(135deg, #88CE02 0%, #22d3ee 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  display: inline-flex; gap: var(--s-2); align-items: center;
  margin-bottom: var(--s-4);
}
.lp-eyebrow::before {
  content: ''; width: 24px; height: 2px;
  background: linear-gradient(90deg, #88CE02 0%, #22d3ee 100%);
  border-radius: 1px;
}

/* HERO */
.lp-hero { position: relative; padding: var(--s-9) var(--s-2) var(--s-8); overflow: hidden; }
.lp-hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 80% 30%, var(--accent-soft) 0%, transparent 70%),
    radial-gradient(40% 40% at 20% 70%, rgba(88,166,255,0.08) 0%, transparent 70%);
  animation: drift 18s ease-in-out infinite alternate;
}
.lp-hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask: radial-gradient(70% 60% at 50% 40%, black 30%, transparent 90%);
}
.lp-hero-inner { position: relative; max-width: 980px; }
.lp-h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 5.4vw, 76px);   /* ↓ z 44/7vw/92 — mniej rozjeżdża */
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--text-strong);
  margin-top: var(--s-3);
  margin-bottom: var(--s-4);
  max-width: 16ch;                        /* limit szerokości — nie więcej niż ~16 znaków na linię */
}
.lp-h1 .accent { color: var(--accent); position: relative; display: inline-block; }
.lp-h1 .accent::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--accent); transform-origin: left; opacity: 0.55;
}

/* Hero wordmark — Logo C (SVG) + "atchdip." (Comfortaa Bold + gradient) */
.hero-wordmark {
  display: inline-flex; align-items: center; gap: 0;
  line-height: 0.9;
}
.hero-wordmark .hero-c {
  height: 1em;            /* match font-size of wordmark text */
  width: auto;
  vertical-align: middle;
  margin-right: -0.04em;  /* kissing 'a' — Logo C = first letter */
}
.hero-wordmark-text {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #88CE02 0%, #22d3ee 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.lp-lead {
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 52ch;
  margin-bottom: var(--s-5);
}
.lp-lead strong { color: var(--text); font-weight: 600; }

.lp-cta-row { display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: center; }
.lp-btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-4) var(--s-5);
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: lowercase;
  text-decoration: none;
  border-radius: var(--r-sm);
  transition: transform 0.18s cubic-bezier(0.16,1,0.3,1);
}
.lp-btn-primary {
  background: linear-gradient(135deg, #88CE02 0%, #22d3ee 100%);
  color: var(--surface-0);
}
.lp-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(34, 211, 238, 0.25), 0 4px 14px rgba(136, 206, 2, 0.18);
}
.lp-btn-ghost { color: var(--text); border: 1px solid var(--border-2); }
.lp-btn-ghost:hover {
  background: var(--surface-2);
  border-image: linear-gradient(135deg, #88CE02, #22d3ee) 1;
}

.lp-hero-status {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--font-mono); font-size: 11px; color: var(--text-muted);
  margin-top: var(--s-6);
}
.lp-hero-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); animation: pulse-soft 2s infinite; box-shadow: 0 0 0 4px rgba(52,211,153,0.18); }

/* Hero v6 — chart FIXED jako tło CAŁEJ strony page-home (nie tylko hero).
   Animacja chartu scrubowana przez cały scroll page-home, nie pinowana. */

/* AMBIENT — pojedynczy radial gradient w hero (statyczny, GPU-friendly).
   Wcześniej: 4× position:fixed blob z blur(140px) + mix-blend-mode:screen + 28 particles
   = repaint całego viewportu na każdy scroll/animation tick. Wycięte. */
.lp-ambient {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(900px 600px at 15% 10%, rgba(136,206,2,0.12), transparent 60%),
    radial-gradient(700px 500px at 85% 30%, rgba(52,211,153,0.08), transparent 60%);
}
.lp-aurora, .lp-particle { display: none; }

/* LAYER 1 — chart bg tylko w hero (nie fixed na całej stronie).
   Wcześniej: position:fixed pod całym page-home + GSAP ScrollTrigger scrub
   przez 25 m-cy backtestu = scroll = recompute timeline na każdą klatkę. */
.lp-page-chart-bg {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.45;
}
.lp-page-chart-bg svg {
  width: 100%; height: 100%;
  display: block;
}
.lp-page-chart-mask {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 0%, transparent 70%, var(--surface-0) 100%);
  pointer-events: none;
}
.lp-chart-marker {
  fill: var(--good);
  stroke: var(--surface-0);
  stroke-width: 1.5;
  filter: drop-shadow(0 0 6px rgba(52,211,153,0.55));
}

/* Wszystkie sekcje na page-home na warstwie nad chartem */
.page-home > section,
.page-home > .lp-final,
.page-home > .lp-disclaimer { position: relative; z-index: 1; }

/* Hero — bez fixed bg już, tylko padding jak normalna sekcja */
.lp-hero {
  position: relative;
  min-height: 720px;
  padding: var(--s-8) var(--s-7) var(--s-7);
}

@media (max-width: 768px) {
  .lp-page-chart-bg, .lp-ambient { left: 0; }
}
/* Reduced motion — wyłącz aurora animations dla użytkowników z prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .lp-aurora, .lp-ambient .lp-particle { animation: none; }
}

/* LAYER 2 — content nad chartem */
.lp-hero-content {
  position: relative; z-index: 2;
  max-width: 640px;                      /* ↓ z 720 — gęściej */
  width: 100%;
}

/* Storytelling list — 2-column grid (kompaktowo), dot markers */
.lp-story {
  list-style: none;
  margin: var(--s-5) 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-2) var(--s-6);
  max-width: 580px;
}
.lp-story li {
  position: relative;
  padding: var(--s-2) 0 var(--s-2) var(--s-4);
  font-size: 13px; color: var(--text-muted); line-height: 1.5;
  opacity: 0.45;
  transition: opacity 0.4s, color 0.4s;
  border-left: 1px solid var(--border-1);
}
.lp-story li::before {
  content: ''; position: absolute; left: -3.5px; top: 50%;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--border-2); transform: translateY(-50%);
  transition: background 0.4s, box-shadow 0.4s;
}
.lp-story li.is-active { opacity: 1; color: var(--text); }
.lp-story li.is-active::before {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(136,206,2,0.22);
}
.lp-story li.is-active strong { color: var(--text-strong); }
.lp-story strong {
  color: var(--text); font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
  margin-right: 6px;
}

@media (max-width: 980px) {
  .lp-hero { min-height: auto; padding: var(--s-8) var(--s-5) var(--s-7); }
}

/* STRATEGY STEPS */
.lp-steps {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; margin-top: var(--s-7);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.lp-step {
  padding: var(--s-6) var(--s-5);
  border-right: 1px solid var(--border-1);
  position: relative;
  background: var(--surface-1);
  transition: background 0.2s;
}
.lp-step:last-child { border-right: none; }
.lp-step:hover { background: var(--surface-2); }
.lp-step-num {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.18em; color: var(--text-faint);
  margin-bottom: var(--s-3);
}
.lp-step-title {
  font-size: 18px; font-weight: 700; color: var(--text-strong);
  letter-spacing: -0.02em; margin-bottom: var(--s-3);
}
.lp-step-body { font-size: 13px; color: var(--text-muted); line-height: 1.55; }
.lp-step-tag {
  display: inline-block; margin-top: var(--s-3);
  font-family: var(--font-mono); font-size: 11px;
  padding: 2px 8px; border-radius: var(--r-sm);
  background: var(--surface-3); color: var(--accent);
}
@media (max-width: 880px) {
  .lp-steps { grid-template-columns: 1fr; }
  .lp-step { border-right: none; border-bottom: 1px solid var(--border-1); }
  .lp-step:last-child { border-bottom: none; }
}

/* PROOF NUMBERS — 3-column grid, kompaktowe (zamiast 5 w rzędzie z overflow) */
.lp-numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-7) var(--s-6);
  margin-top: var(--s-6);
}
.lp-num {
  border-left: 2px solid var(--accent);
  padding-left: var(--s-4);
  min-width: 0;                          /* żeby grid items mogły się skalować */
}
.lp-num-key {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: var(--s-2);
}
.lp-num-val {
  font-family: var(--font-mono); font-weight: 700;
  font-size: clamp(28px, 2.6vw, 42px);    /* ↓ z 36/4.5vw/56 — gęściej */
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-strong);
  font-feature-settings: 'tnum';
}
.lp-num-val.good {
  background: linear-gradient(135deg, #88CE02 0%, #22d3ee 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.lp-num-val.bad  { color: var(--bad); }
.lp-num-sub { font-size: 12px; color: var(--text-faint); margin-top: var(--s-2); font-family: var(--font-mono); }
@media (max-width: 980px) {
  .lp-numbers { grid-template-columns: repeat(2, 1fr); gap: var(--s-6) var(--s-5); }
}
@media (max-width: 540px) {
  .lp-numbers { grid-template-columns: 1fr; }
}

/* VS SPY comparison */
.lp-vs-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--s-4); margin-top: var(--s-6);
}
.lp-vs-card {
  padding: var(--s-6); border-radius: var(--r-md);
  border: 1px solid var(--border-1); background: var(--surface-1);
  transition: transform 0.2s, border-color 0.2s;
}
.lp-vs-card:hover { transform: translateY(-2px); }
.lp-vs-bot {
  background: linear-gradient(180deg, rgba(52,211,153,0.08) 0%, var(--surface-1) 100%);
  border-color: rgba(52,211,153,0.3);
}
.lp-vs-bot:hover { border-color: var(--good); }
.lp-vs-spy {
  background: linear-gradient(180deg, rgba(139,148,158,0.06) 0%, var(--surface-1) 100%);
}
.lp-vs-name {
  font-family: var(--font-mono); font-size: 14px; font-weight: 700;
  color: var(--text-strong); margin-bottom: var(--s-3);
  display: flex; align-items: center; gap: var(--s-2);
}
.lp-vs-tag {
  font-size: 10px; font-weight: 500; padding: 2px 8px; border-radius: var(--r-sm);
  background: var(--surface-3); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em;
}
.lp-vs-bot .lp-vs-tag { background: rgba(52,211,153,0.15); color: var(--good); }
.lp-vs-return {
  font-family: var(--font-mono); font-weight: 800;
  font-size: clamp(36px, 5vw, 56px); line-height: 1; letter-spacing: -0.04em;
  color: var(--text-strong); margin-bottom: var(--s-4);
}
.lp-vs-bot .lp-vs-return { color: var(--good); }
.lp-vs-stats { display: flex; gap: var(--s-5); flex-wrap: wrap; }
.lp-vs-stats > span { display: flex; flex-direction: column; gap: 2px; font-family: var(--font-mono); }
.lp-vs-stats .k { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-faint); }
.lp-vs-stats strong { font-size: 14px; color: var(--text-strong); font-weight: 600; }

.lp-vs-chart {
  margin-top: var(--s-5);
  padding: var(--s-5);
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-radius: var(--r-md);
}
@media (max-width: 720px) {
  .lp-vs-grid { grid-template-columns: 1fr; }
}

/* DISCLAIMER */
.lp-disclaimer {
  margin-top: var(--s-7); padding: var(--s-5) var(--s-6);
  border: 1px solid var(--border-1);
  border-left: 3px solid var(--warn);
  border-radius: var(--r-md);
  background: var(--surface-1);
  font-size: 12px; line-height: 1.65; color: var(--text-muted);
}
.lp-disclaimer strong { color: var(--warn); display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: var(--s-2); }

/* FEATURES */
.lp-features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s-4);
  margin-top: var(--s-6);
}
.lp-feature {
  padding: var(--s-5);
  border: 1px solid var(--border-1);
  border-radius: var(--r-md);
  background: var(--surface-1);
  transition: border-color 0.2s, transform 0.2s;
}
.lp-feature:hover { border-color: var(--accent); transform: translateY(-2px); }
.lp-feature-icon {
  color: var(--accent); margin-bottom: var(--s-4); display: flex;
  width: 48px; height: 48px;
  border: 1px solid var(--border-1);
  border-radius: var(--r-sm);
  align-items: center; justify-content: center;
  background: rgba(136, 206, 2, 0.04);
  transition: border-color 0.3s, background 0.3s;
}
.lp-feature:hover .lp-feature-icon {
  border-color: var(--accent);
  background: rgba(136, 206, 2, 0.10);
}

/* === ANIMATED FEATURE ICONS — GSAP-style ============================ */

/* 1. Shield — scan-line sweeps, check stroke draw, outer pulse */
[data-anim="shield"] .anim-shield-outer {
  stroke-dasharray: 90;
  stroke-dashoffset: 0;
  animation: shield-pulse 3s ease-in-out infinite;
}
[data-anim="shield"] .anim-shield-inner {
  stroke-dasharray: 14;
  stroke-dashoffset: 14;
  animation: shield-check 3s ease-in-out infinite;
}
[data-anim="shield"] .anim-shield-scan {
  opacity: 0;
  animation: shield-scan 3s ease-in-out infinite;
}
@keyframes shield-pulse {
  0%, 100% { filter: drop-shadow(0 0 0 transparent); }
  50%      { filter: drop-shadow(0 0 6px var(--accent-glow)); }
}
@keyframes shield-check {
  0%, 30% { stroke-dashoffset: 14; }
  60%, 100% { stroke-dashoffset: 0; }
}
@keyframes shield-scan {
  0%, 100% { opacity: 0; transform: translateY(0); }
  50%      { opacity: 0.7; transform: translateY(22px); }
}

/* 2. Bars — sequential growth, infinite loop */
[data-anim="bars"] .anim-bar {
  transform-origin: bottom;
  animation: bars-grow 2.5s ease-in-out infinite;
}
[data-anim="bars"] .anim-bar-1 { animation-delay: 0s; }
[data-anim="bars"] .anim-bar-2 { animation-delay: 0.2s; }
[data-anim="bars"] .anim-bar-3 { animation-delay: 0.4s; }
@keyframes bars-grow {
  0%, 100% { transform: scaleY(0.3); opacity: 0.5; }
  50%      { transform: scaleY(1);   opacity: 1; }
}

/* 3. Terminal — lines "typing" w sekwencji */
[data-anim="terminal"] .anim-term-line {
  animation: term-type 3s ease-in-out infinite;
}
[data-anim="terminal"] .anim-term-1 { animation-delay: 0s; }
[data-anim="terminal"] .anim-term-2 { animation-delay: 0.4s; }
[data-anim="terminal"] .anim-term-3 { animation-delay: 0.8s; }
@keyframes term-type {
  0%, 100% { x2: 7; opacity: 0.4; }
  20%      { x2: 7; opacity: 1; }
  60%      { x2: 24; opacity: 1; }
  90%      { x2: 24; opacity: 0.4; }
}
/* Fallback dla browserów bez SMIL/CSS x2 animacji — używamy stroke-dasharray */
[data-anim="terminal"] .anim-term-line {
  stroke-dasharray: 17;
  stroke-dashoffset: 17;
  animation: term-stroke 3s ease-in-out infinite;
}
@keyframes term-stroke {
  0%, 100% { stroke-dashoffset: 17; opacity: 0.4; }
  30%      { stroke-dashoffset: 0;  opacity: 1; }
  70%      { stroke-dashoffset: 0;  opacity: 1; }
}

/* 4. Papers — front paper "rotates in" sequentially */
[data-anim="papers"] .anim-paper {
  transform-origin: top left;
  animation: paper-flip 3.6s ease-in-out infinite;
}
[data-anim="papers"] .anim-paper-back  { animation-delay: 0s; }
[data-anim="papers"] .anim-paper-mid   { animation-delay: 0.3s; }
[data-anim="papers"] .anim-paper-front { animation-delay: 0.6s; }
@keyframes paper-flip {
  0%, 5%   { transform: translate(0, 0) rotate(0deg); }
  15%      { transform: translate(-1px, -2px) rotate(-1.5deg); }
  85%      { transform: translate(0, 0) rotate(0deg); }
  100%     { transform: translate(0, 0) rotate(0deg); }
}

/* Reduced-motion: wyłącz wszystkie SVG anim */
@media (prefers-reduced-motion: reduce) {
  [data-anim="shield"] *, [data-anim="bars"] *,
  [data-anim="terminal"] *, [data-anim="papers"] * {
    animation: none !important;
  }
}
.lp-feature-title { font-size: 15px; font-weight: 600; color: var(--text-strong); margin-bottom: var(--s-2); }
.lp-feature-body { font-size: 13px; color: var(--text-muted); line-height: 1.55; }

/* DIAGRAM */
.lp-diagram {
  margin-top: var(--s-6);
  padding: var(--s-6) var(--s-5);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  background: var(--surface-1);
  position: relative;
  overflow: hidden;
}
.lp-diagram-flow {
  display: flex; align-items: stretch; justify-content: space-between;
  gap: var(--s-4); flex-wrap: wrap;
}
.lp-node {
  flex: 1; min-width: 140px;
  padding: var(--s-4) var(--s-5);
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  text-align: center;
}
.lp-node-key { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint); margin-bottom: var(--s-2); }
.lp-node-val { font-size: 14px; font-weight: 600; color: var(--text-strong); }
.lp-node-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; font-family: var(--font-mono); }
.lp-arrow {
  display: flex; align-items: center;
  color: var(--accent); font-size: 18px;
  font-family: var(--font-mono);
  position: relative;
  /* Animation: pulse poprzez nodes — strzałka świeci sequentially */
  animation: lp-arrow-flow 3s ease-in-out infinite;
}
.lp-arrow:nth-of-type(2) { animation-delay: 0.0s; }    /* 1st arrow */
.lp-arrow:nth-of-type(4) { animation-delay: 0.4s; }    /* 2nd */
.lp-arrow:nth-of-type(6) { animation-delay: 0.8s; }    /* 3rd */
.lp-arrow:nth-of-type(8) { animation-delay: 1.2s; }    /* 4th */
@keyframes lp-arrow-flow {
  0%, 100% { color: var(--text-faint); transform: translateX(0); }
  50%      { color: var(--accent);     transform: translateX(4px); filter: drop-shadow(0 0 6px var(--accent-glow)); }
}

/* Node — soft glow gdy active w flow chain */
.lp-node { transition: border-color 0.3s, background 0.3s; }
.lp-node:hover {
  border-color: var(--accent);
  background: rgba(136, 206, 2, 0.04);
}
.lp-node::before {
  content: ''; position: absolute; inset: -1px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--accent), transparent);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s;
}
.lp-node { position: relative; }

/* FINAL CTA */
.lp-final {
  text-align: center; padding: var(--s-9) var(--s-4) var(--s-7);
  border: 1px solid var(--border-1); border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface-1) 100%);
  margin-top: var(--s-7);
  position: relative; overflow: hidden;
}
.lp-final::before {
  content: ''; position: absolute; top: -50%; left: 50%; transform: translateX(-50%);
  width: 60%; height: 100%; background: radial-gradient(50% 50% at 50% 50%, var(--accent-soft), transparent 70%);
  animation: glow 4s ease-in-out infinite;
  pointer-events: none;     /* nie blokuj klików w przycisk */
}
.lp-final .lp-btn { position: relative; z-index: 1; }   /* button nad ::before */
.lp-final-h2 {
  position: relative;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(28px, 4vw, 44px); letter-spacing: -0.03em;
  color: var(--text-strong);
  margin-bottom: var(--s-3);
}
.lp-final-sub {
  position: relative;
  font-size: 14px; color: var(--text-muted); margin-bottom: var(--s-5);
  font-family: var(--font-mono);
}

.lp-h2 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(28px, 3.5vw, 40px); letter-spacing: -0.03em; line-height: 1.1;
  color: var(--text-strong); margin-top: var(--s-3); margin-bottom: var(--s-4);
}
.lp-h2-sub { font-size: 15px; color: var(--text-muted); max-width: 60ch; margin-bottom: var(--s-6); line-height: 1.55; }

/* Stale .home-grid / .home-card removed (used for old landing) */

/* ───────── ANIMATIONS — vanilla, no motion dep ───────── */
@keyframes letter-reveal { from { opacity: 0; transform: translateY(40%); } to { opacity: 1; transform: translateY(0); } }
@keyframes float-y { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes spin-glow { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.split-letter { display: inline-block; opacity: 0; animation: letter-reveal 0.55s cubic-bezier(0.16,1,0.3,1) forwards; }
.split-word { display: inline-block; white-space: nowrap; }

/* Animated floating particles in hero bg */
.lp-particle {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(0.5px);
  animation: float-y 6s ease-in-out infinite;
}

/* Magnetic shimmer on primary button */
.lp-btn-primary { position: relative; overflow: hidden; }
.lp-btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.30) 50%, transparent 70%);
  background-size: 200% 100%; background-position: -200% 0;
  pointer-events: none;
}
.lp-btn-primary:hover::before { animation: shimmer 1s ease-in-out; }

/* Reveal-on-scroll — controlled by IntersectionObserver */
.lp-reveal-init { opacity: 0; transform: translateY(28px); transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1); }
.lp-reveal-in { opacity: 1 !important; transform: translateY(0) !important; }

/* Eyebrow line drawing effect */
.lp-eyebrow::before { transition: width 0.6s ease-out; }
.lp-eyebrow.in-view::before { width: 24px; }
.lp-eyebrow:not(.in-view)::before { width: 0; }

/* Glowing accent ring around final CTA button */
.lp-final .lp-btn-primary {
  box-shadow: 0 0 0 0 rgba(136,206,2,0.5), 0 8px 24px rgba(136,206,2,0.25);
  animation: glow-ring 2.5s ease-in-out infinite;
}
@keyframes glow-ring {
  0%,100% { box-shadow: 0 0 0 0 rgba(136,206,2,0), 0 8px 24px rgba(136,206,2,0.25); }
  50%     { box-shadow: 0 0 0 12px rgba(136,206,2,0), 0 8px 32px rgba(136,206,2,0.45); }
}

/* Number value initial state */
.lp-num-val { transition: color 0.3s; }

/* Sidebar logo: Λ + ALPH (white) + CORE (lime accent) — mono elegant brand */
.logo-link { display: block; text-decoration: none; color: inherit; transition: background 0.12s; }
.logo-link:hover { background: var(--surface-2); }
.logo-mark {
  display: inline-flex; align-items: center; gap: 1px;
  line-height: 1;
}
.logo-mark .logo-c {
  display: inline-block;
  flex-shrink: 0;
  margin-right: -2px; /* Logo C = first letter of wordmark, kissing 'a' */
}
.logo-mark .brand-wordmark {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #88CE02 0%, #22d3ee 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Mobile menu trigger + backdrop */
.hamburger { display: none; position: fixed; top: 12px; left: 12px; z-index: 200; background: #161b22; border: 1px solid #30363d; color: #c9d1d9; width: 44px; height: 44px; border-radius: 8px; font-size: 18px; cursor: pointer; align-items: center; justify-content: center; }
.backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 99; }
.backdrop.open { display: block; }

/* Mobile responsive (≤ 768px) */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .sidebar { transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: 4px 0 16px rgba(0,0,0,0.4); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; padding: 64px 14px 20px; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .page-title { font-size: 17px; }
  .page-hero-title { font-size: clamp(36px, 11vw, 56px); }
  .page-hero-change { font-size: 13px; }
  .metrics { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .metric-card { padding: 14px; }
  .metric-value { font-size: 20px; }
  .metric-label { font-size: 10px; }
  .chart-card, .table-card { padding: 14px; margin-bottom: 16px; overflow-x: auto; }
  .table-header { padding: 12px 14px; flex-direction: column; align-items: stretch; gap: 10px; }
  .signal-filters { gap: 4px; }
  .signal-filters .chip-btn { padding: 4px 8px; font-size: 10px; }
  .equity-controls { flex-wrap: wrap; gap: 8px; }
  th, td { padding: 8px 12px; font-size: 12px; white-space: nowrap; }
  .sortable-th { padding-right: 22px; }
  .ticker, .mono { font-size: 11px; }
  .banner { padding: 12px 14px; font-size: 12px; }
  .wiki-content { padding: 4px 14px 16px; }
}
@media (max-width: 380px) {
  .main { padding: 56px 8px 16px; }
  .page-hero-title { font-size: clamp(28px, 12vw, 42px); }
  .signal-filters .chip-btn { padding: 3px 6px; font-size: 9px; }
}

/* Bardzo wąskie ekrany (≤ 380px) */
@media (max-width: 380px) {
  .metric-value { font-size: 18px; }
  .main { padding: 60px 10px 16px; }
}
