/* =========================================================================
   Mistrzowskie Trzy Ruchy — makieta
   Układ: granatowy panel boczny (rola, nawigacja, status notowań) obok
   płynnej przestrzeni roboczej. Najgłośniejszy element: tablica wyników.
   ========================================================================= */

/* ---------- tokeny (stały tryb ciemny) ---------- */
:root {
  --bg: #060c19;
  --surface: #0e182b;
  --surface-2: #142035;
  --surface-3: #1a2842;
  --ink: #e9eef7;
  --muted: #93a0ba;
  --line: #1f2d47;
  --line-strong: #364866;
  --hi: rgb(255 255 255 / 0.06);
  --accent: #86a6ff;
  --accent-ink: #0b1430;
  --accent-soft: #19284d;
  --gold: #e8b552;
  --gold-bright: #f5c86c;
  --gold-soft: #2f240e;
  --up: #3fd48c;
  --up-soft: #0e2a1c;
  --down: #ff7466;
  --down-soft: #351614;
  --long: #86a6ff;
  --long-soft: #19284d;
  --short: #f2a55e;
  --short-soft: #33210e;
  --silver: #8d99ae;
  --bronze: #b0703f;

  --side: #0a1430;
  --side-2: #12214c;
  --side-ink: #eaeffb;
  --side-muted: #a2b0d2;
  --side-line: #22325a;
  --side-up: #45d995;
  --side-down: #ff7a6b;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.35);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 30px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 2px 6px rgb(0 0 0 / 0.35), 0 24px 56px rgb(0 0 0 / 0.5);
  --glow-gold: 0 0 0 1px rgb(245 200 108 / 0.35), 0 8px 32px rgb(245 200 108 / 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --display: 'Big Shoulders Display', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --body: 'Instrument Sans', 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  color-scheme: dark;
}

/* ---------- baza ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding: 16px max(16px, env(safe-area-inset-right)) 16px max(16px, env(safe-area-inset-left));
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--gold-bright) 45%, transparent); }
[hidden] { display: none !important; }

.num { font-variant-numeric: tabular-nums; }
.tk { font-family: var(--mono); font-weight: 600; font-size: 0.86em; letter-spacing: -0.01em; }
.up { color: var(--up); }
.down { color: var(--down); }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.xs { font-size: 12.5px; }
.strong { font-weight: 650; }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- powłoka ---------- */
.app {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 20px;
  max-width: 1460px;
  margin: 0 auto;
  align-items: start;
}

.side {
  position: sticky;
  top: 16px;
  min-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 16px 16px;
  border-radius: var(--r-xl);
  color: var(--side-ink);
  background:
    radial-gradient(120% 60% at 0% 0%, rgb(240 181 74 / 0.12), transparent 60%),
    linear-gradient(180deg, var(--side-2), var(--side));
  box-shadow: var(--shadow);
}

.brand { display: flex; align-items: center; gap: 12px; padding: 0 6px; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; flex: none; filter: drop-shadow(0 4px 12px rgb(240 181 74 / 0.35)); }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 23px; line-height: 1; letter-spacing: 0.01em; }
.brand-sub { font-size: 12.5px; color: var(--side-muted); margin-top: 2px; }

/* Pasek „Brak internetu” nad treścią strony. */
.offline {
  padding: 8px 14px;
  border: 1px solid var(--gold);
  border-radius: var(--r-md);
  background: var(--gold-soft);
  color: var(--gold-bright);
  font-size: 14px;
  font-weight: 600;
}
.offline[hidden] { display: none; }

/* Konto w panelu bocznym: przycisk logowania albo zalogowana osoba. */
.account { display: grid; gap: 6px; }
.account-me {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--side-line);
  border-radius: var(--r-md);
  background: rgb(255 255 255 / 0.05);
  color: var(--side-ink);
  text-decoration: none;
  transition: background 0.2s;
}
.account-me:hover, .account-me[aria-current='page'] { background: rgb(255 255 255 / 0.1); }
.account-me b { display: block; font-size: 14px; }
.account-sub { display: block; font-size: 12px; color: var(--side-muted); text-decoration: none; text-align: center; }
.account-me .account-sub { text-align: left; }
a.account-sub:hover { color: var(--side-ink); }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group {
  padding: 12px 10px 4px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--side-muted);
}
.nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 10px;
  border-radius: var(--r-md);
  color: var(--side-ink);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.15s;
}
.nav a:hover { background: rgb(255 255 255 / 0.06); }
.nav a[aria-current='page'] { background: rgb(255 255 255 / 0.11); font-weight: 650; }
.nav a[aria-current='page']::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--gold-bright);
}
.nav svg { width: 19px; height: 19px; flex: none; opacity: 0.9; }
.nav .badge {
  margin-left: auto;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--gold-bright);
  color: #1a1204;
  font-size: 12px;
  font-weight: 700;
}

.feed {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--side-line);
  border-radius: var(--r-lg);
  background: rgb(0 0 0 / 0.12);
  font-size: 13px;
}
.feed-top { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.feed .muted { color: var(--side-muted); }
.feed-row { display: flex; justify-content: space-between; gap: 8px; }
.pips { display: grid; grid-template-columns: repeat(20, 1fr); gap: 3px; margin-top: 4px; }
.pip { height: 8px; border-radius: 2px; background: var(--side-line); }
.pip.done { background: var(--side-muted); }
.pip.now { background: var(--gold-bright); animation: blink 1.6s ease-in-out infinite; }


.dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 99px;
  background: var(--side-up);
  animation: pulse 1.8s infinite;
}
.live-chip .dot { background: var(--up); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--up) 55%, transparent); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@keyframes blink { 50% { opacity: 0.45; } }

.tabbar { display: none; }

/* ---------- treść ---------- */
.main { min-width: 0; display: flex; flex-direction: column; gap: 20px; padding-bottom: 32px; }
.main > * { animation: rise 0.45s var(--ease) both; }
.main > *:nth-child(2) { animation-delay: 0.04s; }
.main > *:nth-child(3) { animation-delay: 0.08s; }
.main > *:nth-child(4) { animation-delay: 0.12s; }
.main > *:nth-child(n + 5) { animation-delay: 0.16s; }
.main.still > * { animation: none; }
@keyframes rise { from { opacity: 0.4; transform: translateY(10px); } }

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 8px 2px 0;
}
.top-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--muted); }
.title {
  margin-top: 4px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(36px, 4.8vw, 56px);
  line-height: 0.95;
  letter-spacing: 0.005em;
}
.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13.5px;
  box-shadow: var(--shadow-sm);
}
.live-chip b { font-weight: 650; }

.card {
  min-width: 0;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .card-head { padding: 18px 22px 0; }
.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 14px;
}
.card-title { font-size: 17px; font-weight: 650; letter-spacing: -0.005em; }
.card-sub { font-size: 13.5px; color: var(--muted); }

.grid { display: grid; gap: 20px; }
.cols-main { grid-template-columns: minmax(0, 1.75fr) minmax(290px, 1fr); align-items: start; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.col { display: grid; gap: 20px; align-content: start; }

/* ---------- tablica wyników ---------- */
.board {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 24px 26px;
  border-radius: var(--r-xl);
  color: var(--side-ink);
  background:
    radial-gradient(70% 140% at 100% 0%, rgb(240 181 74 / 0.16), transparent 60%),
    linear-gradient(135deg, var(--side-2), var(--side));
  box-shadow: var(--shadow-lg);
}
.board::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 3px, rgb(255 255 255 / 0.022) 3px 4px);
}
.cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 2px 22px; border-left: 1px solid var(--side-line); }
.cell:first-child { border-left: 0; padding-left: 0; }
.cell-label { font-size: 13px; color: var(--side-muted); }
.cell-big {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(40px, 4.6vw, 68px);
  line-height: 0.9;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.cell-big.gold { color: var(--gold-bright); }
.cell-big .of { font-size: 0.42em; color: var(--side-muted); }
.cell-big .plus { font-size: 0.5em; color: var(--gold-bright); }
.cell-foot { font-size: 13px; color: var(--side-muted); }
.board .up { color: var(--side-up); }
.board .down { color: var(--side-down); }

.chg { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 700; }

/* ---------- pigułki ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.pill.L { background: var(--long-soft); color: var(--long); }
.pill.S { background: var(--short-soft); color: var(--short); }
.pill.ok { background: var(--up-soft); color: var(--up); }
.pill.err { background: var(--down-soft); color: var(--down); }
.pill.warn { background: var(--gold-soft); color: var(--gold); }
.pill.neutral { background: var(--surface-3); color: var(--muted); }
.pill.me { background: var(--gold-bright); color: #1a1204; }

/* ---------- karty ruchów ---------- */
.move { display: flex; flex-direction: column; gap: 12px; transition: transform 0.2s var(--ease), box-shadow 0.2s; }
.move:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.move-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.move-id { display: flex; align-items: center; gap: 8px; }
.move-body { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.move .go { cursor: pointer; }
.move-link { align-self: flex-start; color: var(--accent); text-decoration: none; font-weight: 600; }
.move-link:hover { text-decoration: underline; }
.move-r { font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; }
.move-contrib { text-align: right; font-size: 13px; color: var(--muted); }
.move-contrib b { display: block; font-size: 15px; }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.kv.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kv.auto { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* ---------- wykresy ---------- */
.chart-wrap { position: relative; }
svg.chart { display: block; width: 100%; height: auto; overflow: visible; }
svg.chart text { font-family: var(--body); }
.tip {
  position: absolute;
  top: 0;
  z-index: 5;
  min-width: 170px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  pointer-events: none;
  transform: translateX(-50%);
}
.tip-h { margin-bottom: 6px; font-weight: 650; }
.tip-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.tip-row i { width: 10px; height: 3px; border-radius: 2px; }
.tip-row b { font-variant-numeric: tabular-nums; }

.legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13.5px;
  transition: border-color 0.15s, background 0.15s;
}
button.chip:hover { border-color: var(--line-strong); }
.chip[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-soft); }
.chip.plain { border: 0; padding: 0; min-height: 0; background: none; }
.swatch { width: 14px; height: 4px; flex: none; border-radius: 2px; }

.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.seg button {
  min-height: 34px;
  padding: 6px 14px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}
.seg button[aria-pressed='true'] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- rywale, bonusy ---------- */
.rivals { display: flex; flex-direction: column; gap: 4px; }
.rival {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-md);
}
.rival.me { background: var(--gold-soft); }
.rival .p { font-family: var(--display); font-weight: 800; font-size: 24px; }
.rival-gap { font-weight: 700; font-size: 14px; }

.attn { display: flex; flex-direction: column; gap: 8px; }
.attn-item {
  display: grid;
  grid-template-columns: 5px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.attn-item .stripe { align-self: stretch; border-radius: 3px; }
.attn-text { min-width: 0; }
.attn-meta { text-align: right; font-size: 13px; }

.progress { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.progress span { display: block; height: 100%; border-radius: 3px; background: var(--gold); transition: width 0.7s var(--ease); }

/* ---------- tabele ---------- */
.tbl-wrap { overflow-x: auto; }
.card:not(.flush) .tbl-wrap { margin: 0 -22px; }
table.tbl { width: 100%; min-width: 760px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl th:first-child, .tbl td:first-child { padding-left: 22px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 22px; }
.tbl .r { text-align: right; }
.tbl tr.row { cursor: pointer; }
.tbl tr.row:hover td { background: var(--surface-2); }
.tbl tr.row.sel td { background: var(--accent-soft); }
.tbl tr.mine td { background: var(--gold-soft); }
.tbl tr.top3 .pos { color: var(--gold); }
.tbl tr.expand > td { padding: 16px 22px 20px; background: var(--surface-2); }
.tbl tr.cutoff td { border-bottom: 2px dashed var(--line-strong); }
.pos { display: inline-block; min-width: 30px; font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1; }
.namebtn { padding: 6px 0; border: 0; background: none; font-weight: 650; text-align: left; }
.namebtn:hover { text-decoration: underline; text-underline-offset: 3px; }
.big-ret { font-family: var(--display); font-weight: 800; font-size: 25px; }
.tag-row { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; margin-left: 4px; }

.mchips { display: flex; flex-wrap: wrap; gap: 6px; }
.mchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: 12.5px;
  white-space: nowrap;
}
.mchips.one-line { flex-wrap: nowrap; }
.mchip.bad { border-color: var(--down); background: var(--down-soft); }
.mchip .d { padding: 0 4px; border-radius: 4px; font-size: 10.5px; font-weight: 800; }
.mchip .d.L { background: var(--long-soft); color: var(--long); }
.mchip .d.S { background: var(--short-soft); color: var(--short); }
.fix { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.fix s { color: var(--muted); }
.fix .arrow { color: var(--muted); }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.kpi {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.kpi-v { font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi-l { font-size: 13px; color: var(--muted); }

/* ---------- mapa instrumentów ---------- */
.heat { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 8px; }
.tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 108px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: transform 0.2s var(--ease);
}
.tile:hover { transform: translateY(-2px); }
.tile .r { font-family: var(--display); font-weight: 800; font-size: 27px; line-height: 1; font-variant-numeric: tabular-nums; }
.lsbar { display: flex; height: 5px; margin-top: auto; border-radius: 3px; overflow: hidden; background: var(--line); }
.lsbar span:first-child { background: var(--long); }
.lsbar span:last-child { background: var(--short); }

/* ---------- podium ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 14px; align-items: end; }
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.step .medal {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  font-family: var(--display);
  font-weight: 800;
  font-size: 36px;
  line-height: 1;
  color: #fff;
}
.step.p2 .medal { background: linear-gradient(145deg, #c3ccdb, var(--silver)); }
.step.p3 .medal { background: linear-gradient(145deg, #d99a68, var(--bronze)); }
.step.first {
  padding-block: 30px;
  border-color: transparent;
  color: var(--side-ink);
  background:
    radial-gradient(80% 80% at 50% 0%, rgb(240 181 74 / 0.25), transparent 70%),
    linear-gradient(160deg, var(--side-2), var(--side));
  box-shadow: var(--shadow-lg);
}
.step.first .medal {
  width: 84px;
  height: 84px;
  font-size: 50px;
  color: #1a1204;
  background: linear-gradient(145deg, #ffd88a, var(--gold-bright));
  box-shadow: 0 0 0 6px rgb(240 181 74 / 0.18);
}
.step .who { font-size: 18px; font-weight: 700; }
.step .pts { font-family: var(--display); font-weight: 700; font-size: 26px; }
.step.first .muted { color: var(--side-muted); }

.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 44px; gap: 12px; align-items: center; font-size: 14px; }
.bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { display: flex; height: 20px; overflow: hidden; border-radius: 6px; background: var(--surface-2); }
.bar-track span { display: block; height: 100%; transition: width 0.7s var(--ease); }
.b1 { background: var(--accent); }
.b2 { background: color-mix(in srgb, var(--accent) 45%, var(--surface)); }
.bb { background: var(--gold-bright); }

/* ---------- formularze ---------- */
.form-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 180px; min-width: 0; }
.field.sym { flex-basis: 150px; }
.field label { font-size: 13.5px; font-weight: 550; }
.input {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.ok { border-color: var(--up); }
.input.err { border-color: var(--down); box-shadow: 0 0 0 3px var(--down-soft); }
.input.sm { width: auto; height: 40px; }
.input.upper { font-family: var(--mono); font-weight: 600; text-transform: uppercase; }

.dirsw { display: inline-flex; height: 46px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 10px; }
.dirsw button { padding: 0 18px; border: 0; background: var(--surface); color: var(--muted); font-weight: 700; transition: background 0.15s, color 0.15s; }
.dirsw button[aria-pressed='true'].L { background: var(--long); color: var(--surface); }
.dirsw button[aria-pressed='true'].S { background: var(--short); color: var(--surface); }

.move-form { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.move-form-head { display: flex; justify-content: space-between; align-items: center; }
.step-n {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--side);
  color: var(--side-ink);
  font-size: 13px;
  font-weight: 700;
}
.hint { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 26px; font-size: 14px; }

/* Podpowiedzi wyszukiwarki instrumentów w formularzu zgłoszenia. */
.sug-list {
  display: grid;
  gap: 2px;
  margin-top: 8px;
  max-height: 280px;
  overflow: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.sug-item {
  display: grid;
  grid-template-columns: minmax(88px, auto) 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.sug-item:hover, .sug-item:focus-visible { background: var(--surface-2); outline: none; }
.sug-item.off { opacity: 0.55; }
.sug-item .tk { white-space: nowrap; }
.sug-name { display: grid; gap: 2px; min-width: 0; }
.sug-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn.primary { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.gold { border-color: transparent; background: var(--gold-bright); color: #1a1204; }
.btn.danger { border-color: var(--down); color: var(--down); }
.btn.sm { min-height: 34px; padding: 0 12px; border-radius: 8px; font-size: 13.5px; }
.btn.lg { min-height: 52px; padding: 0 28px; font-size: 16px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn svg { width: 16px; height: 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); }

.banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  font-size: 14px;
}
.banner.warn { background: var(--gold-soft); }
.banner.ok { background: var(--up-soft); }

.preview { position: sticky; top: 16px; }
.preview-move { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.preview-move:last-child { border-bottom: 0; }
.ok-mark, .no-mark { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 800; }
.ok-mark { background: var(--up-soft); color: var(--up); }
.no-mark { background: var(--down-soft); color: var(--down); }
.checklist { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 14px; }
.checklist li { display: flex; align-items: center; gap: 10px; }

/* ---------- panel admina ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.tabs button {
  min-height: 38px;
  padding: 6px 14px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--muted);
  font-weight: 600;
}
.tabs button[aria-selected='true'] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.tabs .n { margin-left: 6px; padding: 0 7px; border-radius: 999px; background: var(--down); color: #fff; font-size: 12px; }
.log { display: flex; flex-direction: column; }
.log-item { display: grid; grid-template-columns: 100px 110px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.log-item:last-child { border-bottom: 0; }
.confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; border-radius: 10px; background: var(--down-soft); font-size: 14px; }
.pipeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.pipe { position: relative; padding: 14px 16px 14px 0; }
.pipe + .pipe { padding-left: 16px; border-left: 1px solid var(--line); }
.pipe-n { font-family: var(--display); font-weight: 800; font-size: 13px; letter-spacing: 0.08em; color: var(--gold); text-transform: uppercase; }
.pipe-t { margin: 2px 0 4px; font-weight: 650; }

/* ---------- zasady ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 34px 32px;
  border-radius: var(--r-xl);
  color: var(--side-ink);
  background:
    radial-gradient(60% 120% at 100% 0%, rgb(240 181 74 / 0.22), transparent 60%),
    linear-gradient(135deg, var(--side-2), var(--side));
  box-shadow: var(--shadow-lg);
}
.hero-title { max-width: 18ch; font-family: var(--display); font-weight: 800; font-size: clamp(38px, 5vw, 64px); line-height: 0.95; }
.hero-title em { font-style: normal; color: var(--gold-bright); }
.hero p { max-width: 58ch; margin-top: 14px; color: var(--side-muted); font-size: 16px; }
.hero .btn-row { margin-top: 22px; }
.hero .btn:not(.gold) { border-color: var(--side-line); background: rgb(255 255 255 / 0.06); color: var(--side-ink); }
.hero-art { position: absolute; right: 24px; bottom: -10px; width: 300px; opacity: 0.9; pointer-events: none; }

.timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tl { position: relative; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.tl.now { border-color: var(--gold); background: var(--gold-soft); }
.tl-k { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.tl-t { margin-top: 2px; font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1.05; }
.formula { padding: 16px; border-radius: var(--r-md); background: var(--surface-2); }
.formula code { display: block; margin-top: 6px; font-family: var(--mono); font-size: 14px; font-weight: 600; }
.ptable { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; align-items: end; height: 170px; }
.pcol { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.pbar { width: 100%; border-radius: 6px 6px 2px 2px; background: color-mix(in srgb, var(--accent) 70%, var(--surface)); }
.pcol:first-child .pbar { background: var(--gold-bright); }
.pcol b { font-family: var(--display); font-size: 20px; line-height: 1; }
.pcol span { font-size: 12px; color: var(--muted); }
.rules-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.rules-list li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; font-size: 14.5px; }
.rules-list .ic { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 800; }
.ic.yes { background: var(--up-soft); color: var(--up); }
.ic.no { background: var(--down-soft); color: var(--down); }
.ic.info { background: var(--accent-soft); color: var(--accent); }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--muted); font-size: 20px; line-height: 1; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { padding: 0 0 14px; color: var(--muted); font-size: 14.5px; }

/* ---------- powiadomienia ---------- */
.toasts {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right));
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(380px, calc(100vw - 32px));
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: var(--side);
  color: var(--side-ink);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  animation: rise 0.25s var(--ease);
}
.toast svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--side-up); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* =========================================================================
   AKCENTY — głębia, poświata i detale, które ożywiają ciemny motyw
   ========================================================================= */

/* tło: delikatne światło i siatka jak na terminalu giełdowym */
body {
  background:
    radial-gradient(1100px 620px at 88% -12%, rgb(134 166 255 / 0.11), transparent 62%),
    radial-gradient(900px 520px at 12% 108%, rgb(245 200 108 / 0.07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--hi) 1px, transparent 1px),
    linear-gradient(90deg, var(--hi) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 75% 0%, #000, transparent 70%);
  mask-image: radial-gradient(ellipse 70% 55% at 75% 0%, #000, transparent 70%);
  opacity: 0.6;
}

.content { min-width: 0; display: flex; flex-direction: column; gap: 14px; }

/* pasek notowań */
.tape {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(14 24 43 / 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.tape-track { display: flex; width: max-content; animation: tape 70s linear infinite; }
.tape:hover .tape-track { animation-play-state: paused; }
.tape-run { display: flex; }
.tape-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 20px;
  border-right: 1px solid var(--line);
  font-size: 13px;
  white-space: nowrap;
}
.tape-item .tk { color: var(--muted); }
.tape-chg { font-weight: 700; font-size: 12px; }
@keyframes tape { to { transform: translateX(-50%); } }

/* karty: górna krawędź światła i lekki gradient */
.card, .kpi, .step:not(.first), .tl, .formula, .move-form {
  background-image: linear-gradient(180deg, rgb(255 255 255 / 0.028), transparent 46%);
  box-shadow: inset 0 1px 0 var(--hi), var(--shadow-sm);
}
.card { border-color: rgb(255 255 255 / 0.07); }

/* nagłówki stron */
.title {
  background: linear-gradient(180deg, #ffffff 35%, #a8b6d8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}
.top .kicker { flex-wrap: nowrap; align-items: flex-start; }
.top .kicker::before {
  content: '';
  flex: none;
  margin-top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 12px var(--gold-bright);
}
.live-chip { border-color: color-mix(in srgb, var(--up) 28%, var(--line)); background: color-mix(in srgb, var(--up) 6%, var(--surface)); }

/* tablica wyników: liczby świecą */
.board { border: 1px solid rgb(255 255 255 / 0.07); }
.board .cell-big.up { text-shadow: 0 0 28px rgb(69 217 149 / 0.35); }
.board .cell-big.down { text-shadow: 0 0 28px rgb(255 122 107 / 0.35); }
.cell-big.gold { text-shadow: 0 0 30px rgb(245 200 108 / 0.4); }

/* karty ruchów: akcent kierunku */
.move { position: relative; overflow: hidden; }
.move::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--dc, var(--line-strong)), transparent 70%);
}
.move::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--dc, transparent) 14%, transparent), transparent 70%);
  pointer-events: none;
}
.move.L { --dc: var(--long); }
.move.S { --dc: var(--short); }
.move.bad { --dc: var(--down); }
.move:hover { border-color: color-mix(in srgb, var(--dc, var(--line)) 45%, var(--line)); }

/* awatary */
.av {
  --s: 32px;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--s);
  height: var(--s);
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--c) 18%, var(--surface));
  color: var(--c);
  font-size: calc(var(--s) * 0.38);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.who-cell { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.step .who-cell { gap: 8px; }
.av-stack { display: inline-flex; align-items: center; }
.av-stack .av { margin-right: -6px; box-shadow: 0 0 0 2px var(--surface); }
.av-stack .xs { margin-left: 12px; }

/* KPI */
.kpi { position: relative; overflow: hidden; gap: 4px; }
.kpi::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 75%);
  opacity: 0.7;
}
.kpi-v.up { text-shadow: 0 0 22px rgb(63 212 140 / 0.3); }
.kpi-v.down { text-shadow: 0 0 22px rgb(255 116 102 / 0.3); }
.kpi-x { margin-top: 8px; min-height: 28px; display: flex; align-items: flex-end; }
.kpi-x > svg { margin: 0 -2px; }
.split { display: flex; width: 100%; height: 6px; overflow: hidden; border-radius: 3px; background: var(--surface-3); gap: 2px; }
.split span { display: block; height: 100%; border-radius: 3px; }

/* tabele */
.tbl th { background: transparent; border-bottom-color: var(--line-strong); }
.tbl tbody tr { transition: background 0.15s; }
.tbl tbody tr:hover td { background: rgb(255 255 255 / 0.025); }
.tbl tr.top3 td:first-child { box-shadow: inset 3px 0 0 var(--gold-bright); }
.tbl tr.top3 .pos { text-shadow: 0 0 18px rgb(245 200 108 / 0.35); }
.tbl tr.mine td { background: color-mix(in srgb, var(--gold) 10%, var(--surface)); }
.tbl tr.row.sel td { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }

/* rywale */
.rival.me { background: color-mix(in srgb, var(--gold) 12%, var(--surface)); box-shadow: inset 0 0 0 1px rgb(245 200 108 / 0.3); }

/* przyciski */
.btn { background: var(--surface-2); border-color: var(--line-strong); }
.btn:hover { border-color: var(--accent); }
.btn.primary { border-color: transparent; background: linear-gradient(180deg, #a3baff, #7090f2); color: #0b1430; box-shadow: 0 6px 20px rgb(112 144 242 / 0.25); }
.btn.gold { background: linear-gradient(180deg, #ffd88a, var(--gold-bright)); box-shadow: 0 6px 22px rgb(245 200 108 / 0.3); }
.btn.gold:hover { filter: brightness(1.06); }

/* zakładki i segmenty */
.tabs { background: rgb(255 255 255 / 0.025); }
.tabs button[aria-selected='true'], .seg button[aria-pressed='true'] {
  background: var(--surface-3);
  color: var(--ink);
  box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1px var(--line-strong);
}
.chip[aria-pressed='true'] { box-shadow: 0 0 0 3px rgb(134 166 255 / 0.12); }

/* mapa instrumentów, oś czasu, podium */
.tile:hover { box-shadow: var(--shadow); border-color: var(--line-strong); }
.tl.now { box-shadow: var(--glow-gold); }
.step.first { box-shadow: var(--shadow-lg), var(--glow-gold); }

/* formularz */
.input { background: var(--surface-2); }
.input:focus { box-shadow: 0 0 0 3px rgb(134 166 255 / 0.18); }

/* notowania */
.market-filters { margin: 0; padding: 0 22px 14px; }
.ex-badge {
  display: inline-grid;
  place-items: center;
  flex: none;
  min-width: 58px;
  height: 26px;
  padding: 0 6px;
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
}
.ex-gpw { --c: #ff8a7a; }
.ex-usa { --c: #86a6ff; }
.ex-eu { --c: #c79bff; }
.delta { display: inline-block; padding: 3px 8px; border-radius: 7px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta.up { background: var(--up-soft); }
.delta.down { background: var(--down-soft); }
.hold { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
/* Wykres na całą szerokość, lista graczy pod nim. */
.market-detail { grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
/* Szczegóły instrumentu w szerokiej tabeli: zawsze w widocznej szerokości (szerokość ustawia tvchart.js). */
.tbl-wrap .market-detail { position: sticky; left: 0; }
.tape-item { color: inherit; text-decoration: none; transition: background 0.15s; }
.tape-item:hover { background: rgb(255 255 255 / 0.05); }

/* ---------- responsywność ---------- */
@media (max-width: 1150px) {
  .cols-main { grid-template-columns: minmax(0, 1fr); }
  .preview { position: static; }
  .hero-art { display: none; }
}

@media (max-width: 900px) {
  body { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  .app { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .side {
    position: static;
    min-height: 0;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 14px;
  }
  .brand { flex: 1 1 auto; padding: 0; }
  .role { flex: 0 0 210px; }
  .nav, .feed { display: none; }

  .tabbar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 40;
    display: grid;
    grid-auto-columns: 1fr;
    grid-auto-flow: column;
    padding: 6px;
    border: 1px solid var(--side-line);
    border-radius: 18px;
    background: color-mix(in srgb, var(--side) 92%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow-lg);
  }
  .tabbar a {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 7px 2px;
    border-radius: 12px;
    color: var(--side-muted);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
  }
  .tabbar a svg { width: 20px; height: 20px; }
  .tabbar a { font-size: 10.5px; }
  .tabbar a[aria-current='page'] { background: rgb(255 255 255 / 0.1); color: var(--side-ink); }
  .tabbar .badge {
    position: absolute;
    top: 3px;
    left: calc(50% + 6px);
    min-width: 18px;
    padding: 0 5px;
    border-radius: 99px;
    background: var(--gold-bright);
    color: #1a1204;
    font-size: 10.5px;
    font-weight: 800;
    text-align: center;
  }
  .toasts { bottom: calc(100px + env(safe-area-inset-bottom)); }

  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; padding: 20px; }
  .cell:nth-child(3) { border-left: 0; padding-left: 0; }
  .timeline, .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-detail { grid-template-columns: minmax(0, 1fr); }
  .pipe:nth-child(3) { padding-left: 0; border-left: 0; }
}

@media (max-width: 560px) {
  body { font-size: 14.5px; }
  .role { flex: 1 1 100%; order: 3; }
  .card { padding: 16px; }
  .card.flush > .card-head { padding: 16px 16px 0; }
  .market-filters { padding: 0 16px 12px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px; }
  .kpi-v { font-size: 26px; }
  .kpi-x .xs { font-size: 11.5px; }
  .card:not(.flush) .tbl-wrap { margin: 0 -16px; }
  .tbl th:first-child, .tbl td:first-child { padding-left: 16px; }
  .podium { grid-template-columns: 1fr 1fr; gap: 10px; }
  .podium .first { order: -1; grid-column: 1 / -1; padding-block: 22px; }
  .step { padding: 16px 10px; }
  .step .medal { width: 48px; height: 48px; font-size: 28px; }
  .step .who { font-size: 16px; }
  .bar-row { grid-template-columns: 100px minmax(0, 1fr) 34px; }
  .log-item { grid-template-columns: 70px minmax(0, 1fr); }
  .log-item .who { display: none; }
  .hero { padding: 26px 20px; }
  .ptable { height: 140px; gap: 4px; }
  .pcol b { font-size: 16px; }
  .timeline, .pipeline { grid-template-columns: minmax(0, 1fr); }
  .pipe + .pipe { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .move-r { font-size: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- podgląd bez JavaScriptu (np. pliki w komunikatorze) ---------- */
.noscript {
  position: relative;
  z-index: 100;
  margin: 16px;
  padding: 16px 18px;
  border: 1px solid var(--gold-bright);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}
.noscript strong { display: block; margin-bottom: 4px; color: var(--gold-bright); }
