/* Jedna barwa akcentowa (indygo) w kilku natężeniach, neutralne tło i tekst.
   Zieleń i czerwień tylko jako informacja zwrotna. Motyw: papier milimetrowy i linia wykresu. */
:root {
  --bg: #f2f3f8;
  --surface: #ffffff;
  --ink: #14132b;
  --muted: #5d5f73;
  --line: #dfe1ec;
  --grid: rgba(74, 53, 232, 0.07);
  --accent: #4a35e8;
  --accent-deep: #2c1fa6;
  --accent-soft: #eceafe;
  --accent-mid: #c9c3fb;
  --good: #19794e;
  --good-soft: #e2f4ea;
  --bad: #b3302a;
  --bad-soft: #fbe8e6;
  --note: #fff5d9;
  --note-ink: #5b4300;
  --r: 22px;
  --shadow: 0 1px 2px rgba(20, 19, 43, 0.05), 0 8px 24px -12px rgba(20, 19, 43, 0.18);
  --display: ui-rounded, "SF Pro Rounded", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --data: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.5 var(--body); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.015em; line-height: 1.12; margin: 0; }
h1 { font-size: 32px; font-weight: 750; }
h2 { font-size: 22px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 650; letter-spacing: 0; }
p { margin: 0; }
a { color: var(--accent); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 10px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 12px 16px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 8px; }

#app { max-width: 620px; margin: 0 auto; padding: 16px 16px 130px; min-height: 100vh; outline: none; }
.stack > * + * { margin-top: 16px; }
.stack-l > * + * { margin-top: 28px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pill { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 650; cursor: pointer; text-decoration: none; color: var(--ink); text-align: center; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; width: 100%; font-family: var(--display); font-size: 18px; font-weight: 700; min-height: 58px; box-shadow: 0 5px 0 var(--accent-deep); transition: transform 0.08s, box-shadow 0.08s; }
.btn.primary:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--accent-deep); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--accent); padding: 0 8px; }
.btn[disabled] { background: var(--line); border-color: var(--line); color: var(--muted); box-shadow: 0 5px 0 #c9ccda; cursor: not-allowed; }
.btn.wide { width: 100%; }

.chip { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--bg); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.chip.doc { background: var(--accent-soft); color: var(--accent-deep); border-color: transparent; }
.chip.model { background: var(--surface); border-style: dashed; }

/* ---------- ekran główny ---------- */
.hero { background: var(--ink); color: #fff; border-radius: 28px; padding: 22px 22px 20px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px); background-size: 24px 24px; mask-image: linear-gradient(120deg, transparent 30%, #000); -webkit-mask-image: linear-gradient(120deg, transparent 30%, #000); }
.hero > * { position: relative; }
.hero .eyebrow { color: #a9a6d6; }
.hero h1 { font-size: 30px; margin-top: 6px; }
.hero svg.spark { position: absolute; right: -6px; bottom: 0; width: 62%; height: 74px; opacity: 0.9; }
.meters { display: flex; gap: 22px; margin-top: 18px; }
.meter b { display: block; font-family: var(--data); font-size: 24px; font-weight: 700; line-height: 1.1; }
.meter span { font-size: 12px; color: #b9b7dd; }

.stage { margin-top: 26px; }
.stage-head { background: var(--accent); color: #fff; border-radius: 22px; padding: 16px 18px; box-shadow: 0 5px 0 var(--accent-deep); display: grid; gap: 10px; position: relative; z-index: 2; }
.stage-head .eyebrow { color: #d6d1ff; }
.stage-head h2 { font-size: 22px; }
.stage-head .count { font-family: var(--data); font-size: 14px; font-weight: 700; }
.stage-bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,0.22); overflow: hidden; }
.stage-bar i { display: block; height: 100%; border-radius: 99px; background: #fff; }
.stage.locked .stage-head { background: #c4c7d6; box-shadow: 0 5px 0 #a6a9bb; }
.stage.locked .stage-head .eyebrow { color: #f0f1f6; }

.path { position: relative; margin: -14px -16px 0; padding-top: 14px; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 26px 26px; background-position: center top; }
.path svg.road { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.road .base { fill: none; stroke: #dcdfeb; stroke-width: 26; stroke-linecap: round; }
.road .done { fill: none; stroke: var(--accent-mid); stroke-width: 26; stroke-linecap: round; }
.road .dash { fill: none; stroke: #fff; stroke-width: 3; stroke-dasharray: 2 12; stroke-linecap: round; }
.node { position: absolute; transform: translate(-50%, -50%); width: 78px; height: 78px; padding: 0; border: 0; background: none; cursor: pointer; }
.node .dot { width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); box-shadow: 0 7px 0 var(--accent-deep), 0 0 0 7px var(--bg); transition: transform 0.08s, box-shadow 0.08s; }
.node:active .dot { transform: translateY(5px); box-shadow: 0 2px 0 var(--accent-deep), 0 0 0 7px var(--bg); }
.node .dot svg { width: 34px; height: 34px; stroke: #fff; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.node.locked { cursor: not-allowed; }
.node.locked .dot { background: #d7dae6; box-shadow: 0 7px 0 #b9bccd, 0 0 0 7px var(--bg); }
.node.locked .dot svg { stroke: #8e91a6; }
.node.current .dot { box-shadow: 0 7px 0 var(--accent-deep), 0 0 0 7px var(--bg), 0 0 0 11px var(--accent); animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 7px 0 var(--accent-deep), 0 0 0 7px var(--bg), 0 0 0 16px rgba(74, 53, 232, 0.22); } }
.node .badge { position: absolute; right: -4px; top: -4px; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); display: grid; place-items: center; }
.node .badge svg { width: 16px; height: 16px; stroke: var(--accent); fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.flag { position: absolute; transform: translate(-50%, -100%); background: #fff; color: var(--accent-deep); border: 2px solid var(--accent); font-family: var(--display); font-weight: 750; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 12px; border-radius: 12px; white-space: nowrap; pointer-events: none; animation: bob 1.8s ease-in-out infinite; z-index: 2; }
.flag::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 12px; height: 12px; background: #fff; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: translateX(-50%) rotate(45deg); }
@keyframes bob { 50% { transform: translate(-50%, calc(-100% - 6px)); } }
.tag { position: absolute; transform: translateY(-50%); display: grid; gap: 2px; pointer-events: none; }
.tag b { font-family: var(--display); font-size: 16px; line-height: 1.2; font-weight: 700; background: var(--bg); box-shadow: 0 0 0 4px var(--bg); border-radius: 4px; }
.tag span { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--bg); box-shadow: 0 0 0 4px var(--bg); width: fit-content; }
.tag.left { text-align: right; justify-items: end; }
.tag.locked b { color: #8e91a6; }
.tag .st { color: var(--accent); letter-spacing: 2px; }
.cta { position: sticky; bottom: 78px; z-index: 4; padding: 16px 0 8px; background: linear-gradient(to top, var(--bg) 72%, transparent); }

/* ---------- dolna nawigacja ---------- */
#tabs { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,0.94); backdrop-filter: blur(12px); border-top: 1px solid var(--line); display: flex; justify-content: center; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); z-index: 5; }
#tabs[hidden] { display: none; }
#tabs a { flex: 1; max-width: 150px; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 650; border-radius: 16px; }
#tabs a[aria-current="page"] { color: var(--accent-deep); background: var(--accent-soft); }
#tabs svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- odtwarzacz lekcji i quizu ---------- */
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.close { width: 48px; height: 48px; border-radius: 50%; border: 0; background: transparent; font-size: 28px; line-height: 1; color: var(--muted); cursor: pointer; flex: none; }
.bar { flex: 1; height: 14px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; min-width: 14px; background: var(--accent); border-radius: 999px; transition: width 0.3s ease; box-shadow: inset 0 3px 0 rgba(255,255,255,0.3); }
.big { font-family: var(--display); font-size: 24px; line-height: 1.32; font-weight: 600; letter-spacing: -0.01em; }
.foot { position: fixed; left: 0; right: 0; bottom: 0; padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); z-index: 6; }
.foot .inner { max-width: 588px; margin: 0 auto; }
.foot.good { background: var(--good-soft); border-color: transparent; }
.foot.bad { background: var(--bad-soft); border-color: transparent; }
.foot .verdict { font-family: var(--display); font-size: 19px; font-weight: 750; margin-bottom: 4px; }
.foot.good .verdict { color: var(--good); }
.foot.bad .verdict { color: var(--bad); }
.opts { display: grid; gap: 12px; }
.opt { text-align: left; min-height: 58px; padding: 14px 16px; border-radius: 18px; border: 2px solid var(--line); border-bottom-width: 5px; background: var(--surface); cursor: pointer; font-weight: 550; line-height: 1.4; }
.opt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.opt.right { border-color: var(--good); background: var(--good-soft); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.src { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.src a { color: var(--muted); }
.where { font-family: var(--data); font-size: 14px; line-height: 1.7; background: var(--ink); color: #e9e8ff; border-radius: 16px; padding: 14px 16px; }
.fictional { font-size: 13px; color: var(--muted); border-left: 3px solid var(--accent-mid); padding-left: 10px; }

/* schematy */
.dg { display: grid; gap: 10px; }
.dg .item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; line-height: 1.35; box-shadow: var(--shadow); }
.dg .num { width: 34px; height: 34px; border-radius: 12px; background: var(--accent); color: #fff; display: grid; place-items: center; font-family: var(--data); font-size: 15px; font-weight: 700; flex: none; }
.dg-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.ladder { display: grid; gap: 8px; font-family: var(--data); font-size: 14px; }
.ladder div { padding: 12px 14px; border-radius: 14px; border: 1.5px dashed var(--accent-mid); background: var(--surface); }
.ladder .pay { border: 2px solid var(--accent); background: var(--accent-soft); font-weight: 700; color: var(--accent-deep); }
.rings { display: grid; place-items: center; }
.rings svg { width: 100%; max-width: 310px; height: auto; }
.bars { display: grid; gap: 14px; }
.bars .b-label { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.bars .b-label span:last-child { font-family: var(--data); white-space: nowrap; }
.bars .track { height: 22px; border-radius: 8px; background: var(--line); overflow: hidden; }
.bars .track i { display: block; height: 100%; border-radius: 8px; background: var(--accent-mid); }
.bars .strong .track i { background: var(--accent); }

/* ---------- atlas ---------- */
.search { width: 100%; min-height: 54px; border-radius: 18px; border: 1.5px solid var(--line); padding: 0 18px; background: var(--surface); box-shadow: var(--shadow); }
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.filters select { min-height: 48px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); padding: 0 12px; }
.list { display: grid; gap: 10px; }
.item-link { display: block; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; min-height: 48px; box-shadow: var(--shadow); }
.item-link b { font-family: var(--display); font-size: 18px; display: block; line-height: 1.25; }
.names { display: grid; gap: 4px; font-size: 14px; }
.names span b { font-family: var(--data); font-weight: 700; font-size: 11px; color: var(--accent-deep); background: var(--accent-soft); border-radius: 6px; padding: 2px 6px; margin-right: 8px; }
.rel { display: grid; gap: 4px; padding: 14px 0; border-top: 1px solid var(--line); }
.rel a { font-weight: 650; text-decoration: none; }
.graph { padding: 8px; }
.graph svg { width: 100%; height: auto; display: block; }
.graph text { font: 600 12px var(--body); fill: var(--ink); }

/* ---------- symulatory ---------- */
.simnote { position: sticky; top: 8px; z-index: 4; background: var(--note); color: var(--note-ink); border: 1px solid #ecd9a0; border-radius: 14px; padding: 10px 14px; font-size: 13px; font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kpi { background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); }
.kpi .v { font-family: var(--data); font-size: 23px; font-weight: 700; }
.kpi .d { font-family: var(--data); font-size: 12px; color: var(--muted); }
.kpi.hit { border-color: var(--good); background: var(--good-soft); }
.kpi.miss { border-color: var(--bad); background: var(--bad-soft); }
.ctl { display: grid; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); }
.ctl:first-of-type { border-top: 0; padding-top: 0; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.seg button { min-height: 48px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 650; cursor: pointer; padding: 4px; }
.seg button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep); }
input[type="range"] { width: 100%; height: 48px; accent-color: var(--accent); }
.why { border-left: 3px solid var(--accent); padding-left: 12px; }
.stars { font-size: 40px; letter-spacing: 8px; color: var(--accent); line-height: 1; }
.stars .off { color: var(--line); }
.month { display: flex; align-items: flex-end; gap: 2px; height: 150px; position: relative; padding-top: 6px; border-bottom: 2px solid var(--ink); }
.month i { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 0; }
.month i.off { background: transparent; border-bottom: 3px dotted var(--line); }
.month i.over { background: var(--accent-deep); }
.month .rule { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--muted); font-family: var(--data); font-size: 11px; color: var(--muted); }
.month .rule span { position: absolute; right: 0; top: -17px; background: var(--surface); padding: 0 4px; }

/* ---------- rozmowy ---------- */
.who { display: flex; align-items: center; gap: 12px; }
.avatar { width: 52px; height: 52px; border-radius: 18px; background: var(--ink); color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 750; font-size: 20px; flex: none; }
.bubble { border-radius: 20px; padding: 14px 16px; max-width: 90%; line-height: 1.45; }
.bubble.them { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; box-shadow: var(--shadow); }
.bubble.me { background: var(--accent); color: #fff; margin-left: auto; border-bottom-right-radius: 6px; }

/* ---------- formularze ---------- */
label.field { display: grid; gap: 6px; font-weight: 600; }
label.field input, label.field select { min-height: 52px; border-radius: 14px; border: 1.5px solid var(--line); padding: 0 14px; background: var(--surface); font-weight: 400; }
.checks { display: grid; gap: 6px; }
.checks label { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--line); }
.checks input { width: 22px; height: 22px; accent-color: var(--accent); }

@media (min-width: 760px) {
  #app { padding-top: 32px; }
  h1 { font-size: 38px; }
  .path { margin-left: 0; margin-right: 0; border-radius: 0 0 24px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- ilustracje w lekcjach ---------- */
.lead { font-size: 19px; line-height: 1.45; font-weight: 500; }
.viz { margin: 0; padding: 18px 16px 14px; border-radius: 24px; background-color: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 22px 22px; }
.viz svg { display: block; width: 100%; height: auto; max-width: 340px; margin: 0 auto; }
.viz figcaption { margin-top: 12px; font-size: 13px; color: var(--muted); text-align: center; }
.v-num { font: 750 46px var(--display); fill: var(--ink); }
.v-sub { font: 600 12px var(--body); fill: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.v-tick { font: 600 11px var(--data); fill: var(--muted); }
.v-lbl { font: 600 13px var(--body); fill: var(--muted); }
.v-lbl.strong { font-weight: 750; fill: var(--accent-deep); }
.v-note { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }
.v-flag { background: var(--accent-deep); color: #fff; font-size: 11px; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 8px; border-radius: 8px; white-space: nowrap; }
.v-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.v-seg i { height: 14px; border-radius: 5px; background: var(--line); }
.v-seg i.on { background: var(--accent); }

.v-meters { display: grid; gap: 14px; }
.v-meter { background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px; padding: 12px 14px; display: grid; gap: 8px; }
.v-meter.mark { border-color: var(--accent-deep); box-shadow: 0 0 0 4px var(--accent-soft); }
.v-meter-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.v-meter-top b { font-family: var(--display); font-size: 16px; }

.v-tiles { display: grid; gap: 10px; }
.v-tiles.c2 { grid-template-columns: 1fr 1fr; }
.v-tile { background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px; padding: 14px; display: grid; gap: 8px; align-content: start; }
.v-tiles.c1 .v-tile { display: flex; align-items: center; gap: 14px; }
.v-tiles.c1 .v-tile b { flex: 1; }
.v-tiles.c1 .v-tile .v-note { flex: none; max-width: 42%; text-align: right; }
.v-tile b { font-family: var(--display); font-size: 15px; line-height: 1.25; }
.v-ic { width: 48px; height: 48px; border-radius: 15px; background: var(--accent); color: #fff; display: grid; place-items: center; font: 750 18px var(--data); flex: none; box-shadow: 0 4px 0 var(--accent-deep); }

.v-serp { background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px; padding: 10px; display: grid; gap: 6px; }
.v-search { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 99px; padding: 8px 14px; font-size: 14px; color: var(--muted); }
.v-search span { width: 12px; height: 12px; border: 2px solid var(--muted); border-radius: 50%; flex: none; }
.v-group { font-size: 11px; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-deep); margin-top: 4px; }
.v-row { position: relative; border-radius: 12px; padding: 7px 10px; display: grid; gap: 5px; border: 1.5px solid transparent; }
.v-row i { display: block; height: 7px; border-radius: 5px; background: var(--line); width: 82%; }
.v-row i.short { width: 55%; }
.v-row.ad { background: var(--bg); border-color: var(--line); }
.v-row.ad i { background: var(--accent-mid); }
.v-row .v-badge:empty { display: none; }
.v-row .v-badge { font-size: 10px; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.v-row.you { background: var(--accent-soft); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(74, 53, 232, 0.12); }
.v-row.you i { background: var(--accent); }
.v-row em { position: absolute; right: 10px; top: 8px; font-style: normal; font-size: 11px; font-weight: 750; background: var(--muted); color: #fff; padding: 3px 8px; border-radius: 8px; }
.v-row.you em { background: var(--accent-deep); }

.v-lanes { display: grid; gap: 10px; }
.v-lane { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px; padding: 12px; }
.v-lane b { font-family: var(--display); font-size: 16px; line-height: 1.25; display: block; }
.v-lane .v-ic { width: 44px; height: 44px; border-radius: 14px; box-shadow: none; }
.v-lane.ok { border-color: var(--good); background: var(--good-soft); }
.v-lane.ok .v-ic { background: var(--good); }
.v-lane.no { background: var(--bad-soft); border-color: transparent; }
.v-lane.no .v-ic { background: var(--bad); }

.v-queries { display: grid; gap: 6px; justify-items: center; }
.v-kw { font-family: var(--data); font-weight: 700; font-size: 15px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 12px; text-align: center; }
.v-arrow { font-size: 22px; color: var(--accent); line-height: 1; }
.v-qlist { display: grid; gap: 8px; width: 100%; }
.v-q { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 99px; padding: 8px 8px 8px 16px; font-size: 15px; }
.v-q b { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--muted); flex: none; }
.v-q.ok { border-color: var(--good); }
.v-q.ok b { background: var(--good); color: #fff; }
.v-q.no { border-color: var(--bad); color: var(--muted); }
.v-q.no b { background: var(--bad); color: #fff; }

.v-month { display: flex; align-items: flex-end; gap: 2px; height: 150px; position: relative; border-bottom: 2px solid var(--ink); }
.v-month i { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; }
.v-month i.over { background: var(--accent-deep); }
.v-month i.off { border-bottom: 3px dotted var(--line); background: none; }
.v-rule { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--accent-deep); }
.v-rule.dot { border-top: 2px dotted var(--muted); }
.v-rule span { position: absolute; right: 0; top: -19px; font: 700 11px var(--data); color: var(--accent-deep); background: var(--surface); padding: 0 4px; border-radius: 4px; }
.v-rule.dot span { color: var(--muted); }

.v-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.v-cal .h { font: 700 11px var(--data); color: var(--muted); text-align: center; }
.v-cal i { aspect-ratio: 1; border-radius: 9px; background: var(--line); }
.v-cal i.on { background: var(--accent); }
.v-sum { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.v-sum b { color: var(--accent-deep); text-align: right; }

.v-time { list-style: none; margin: 0; padding: 0 0 0 6px; display: grid; }
.v-time li { position: relative; padding: 0 0 18px 26px; border-left: 3px solid var(--line); display: grid; gap: 2px; }
.v-time li:last-child { padding-bottom: 0; border-left-color: transparent; }
.v-time li::before { content: ""; position: absolute; left: -9.5px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--muted); box-sizing: border-box; }
.v-time li.now::before { background: var(--accent); border-color: var(--accent-deep); box-shadow: 0 0 0 5px var(--accent-soft); }
.v-time time { font: 750 13px var(--data); color: var(--muted); }
.v-time li.now time { color: var(--accent-deep); }
.v-time span { font-family: var(--display); font-size: 16px; font-weight: 650; line-height: 1.3; }

.v-cols { display: flex; align-items: flex-end; justify-content: center; gap: 14px; }
.v-col { flex: 1; max-width: 110px; display: grid; gap: 6px; text-align: center; }
.v-col b { font: 750 14px var(--data); }
.v-colbar { height: 130px; display: flex; align-items: flex-end; }
.v-colbar i { display: block; width: 100%; border-radius: 12px 12px 4px 4px; background: var(--accent-mid); }
.v-col.strong .v-colbar i { background: var(--accent); box-shadow: inset 0 -5px 0 var(--accent-deep); }
.v-col.strong b { color: var(--accent-deep); }
.v-col span { font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.25; }

.v-duel { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 8px; }
.v-side { position: relative; background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px; padding: 16px 12px 12px; display: grid; gap: 10px; }
.v-side.win { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.v-side .v-flag { position: absolute; top: -11px; left: 12px; }
.v-side b { font-family: var(--display); font-size: 16px; }
.v-kv { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.v-kv em { font: 750 15px var(--data); font-style: normal; color: var(--ink); }

.v-spanbar { height: 54px; border-radius: 14px; background: var(--accent); box-shadow: inset 0 -6px 0 var(--accent-deep); display: grid; place-items: center; color: #fff; padding: 0 10px; text-align: center; }
.v-spanbar b { font-family: var(--display); font-size: 15px; }

.viz-panel { padding: 0; background-image: none; overflow: hidden; border: 0; }
.v-win { background: var(--ink); color: #e9e8ff; }
.v-winbar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); font: 600 12px var(--data); color: #a9a6d6; }
.v-winbar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); }
.v-winbar span { margin-left: 8px; }
.v-win ol { list-style: none; margin: 0; padding: 16px 16px 18px; display: grid; }
.v-win li { position: relative; display: flex; align-items: center; gap: 12px; padding: 0 0 14px; font-weight: 600; line-height: 1.3; }
.v-win li:not(.last)::after { content: ""; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px; background: rgba(255, 255, 255, 0.25); }
.v-win li span { width: 30px; height: 30px; border-radius: 10px; background: rgba(255, 255, 255, 0.14); display: grid; place-items: center; font: 700 13px var(--data); flex: none; }
.v-win li.last { padding-bottom: 0; color: #fff; }
.v-win li.last span { background: var(--accent); box-shadow: 0 0 0 4px rgba(125, 108, 255, 0.35); }

/* dobór typu kampanii */
.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pick .opt { text-align: center; font-family: var(--display); font-weight: 700; display: grid; place-items: center; min-height: 64px; }
.opt.mid { border-color: var(--muted); background: var(--bg); }

/* ---------- atlas: lista ---------- */
.hero-sub { color: #c9c7ea; margin-top: 8px; font-size: 15px; }
.hero .search { margin-top: 16px; border-color: transparent; }
.fchips { display: flex; gap: 8px; overflow-x: auto; padding: 14px 16px 6px; margin: 0 -16px; scrollbar-width: none; }
.fchips::-webkit-scrollbar { display: none; }
.fchips.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 8px 0 12px; }
.fchip { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 16px; border: 1.5px solid var(--line); border-bottom-width: 4px; background: var(--surface); font-weight: 650; font-size: 15px; white-space: nowrap; cursor: pointer; color: var(--ink); flex: none; }
.fchip svg { color: var(--accent); }
.fchip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent-deep); color: #fff; }
.fchip[aria-pressed="true"] svg { color: #fff; }
.fmore { margin-top: 6px; }
.fmore summary { min-height: 44px; display: inline-flex; align-items: center; font-weight: 650; color: var(--accent); cursor: pointer; }
.cgroup { margin-top: 26px; }
.cgroup h2 { display: flex; align-items: center; gap: 10px; font-size: 20px; margin-bottom: 12px; }
.cgroup h2 small { font: 700 13px var(--data); color: var(--muted); background: var(--line); border-radius: 99px; padding: 2px 9px; }
.cgrid { display: grid; gap: 10px; }
.ccard { display: grid; grid-template-columns: 46px 1fr auto; gap: 14px; align-items: center; text-decoration: none; color: inherit; background: var(--surface); border: 1.5px solid var(--line); border-bottom-width: 4px; border-radius: 20px; padding: 14px; min-height: 72px; transition: transform 0.08s; }
.ccard:active { transform: translateY(2px); border-bottom-width: 2px; }
.ccard.tall { min-height: 84px; }
.ctext { display: grid; gap: 2px; min-width: 0; }
.ctext b { font-family: var(--display); font-size: 17px; line-height: 1.22; }
.ctext span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cic { width: 46px; height: 46px; border-radius: 15px; background: var(--accent-soft); color: var(--accent-deep); display: grid; place-items: center; flex: none; }
.cic.sm { width: 34px; height: 34px; border-radius: 11px; }
.cic.lg { width: 60px; height: 60px; border-radius: 20px; background: var(--accent); color: #fff; box-shadow: 0 5px 0 var(--accent-deep); }
.ccnt { display: inline-flex; align-items: center; gap: 6px; font: 700 13px var(--data); color: var(--accent-deep); background: var(--accent-soft); border-radius: 99px; padding: 5px 10px; }
.ccnt i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: -5px 0 0 -1px var(--accent-mid), 5px 0 0 -1px var(--accent-mid); margin: 0 4px; }
.cstars { color: var(--accent); letter-spacing: 2px; font-size: 15px; }
.cstars i { color: var(--line); font-style: normal; }
@media (min-width: 560px) { .cgrid { grid-template-columns: 1fr 1fr; } }

/* ---------- atlas: karta pojęcia i mapa myśli ---------- */
.ctitle { display: grid; grid-template-columns: 60px 1fr; gap: 16px; align-items: center; }
.trail { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.trail .eyebrow { margin-right: 4px; }
.trail a { color: var(--muted); text-decoration: none; background: var(--surface); border: 1px solid var(--line); padding: 4px 10px; border-radius: 99px; }
.trail b { background: var(--accent-soft); color: var(--accent-deep); padding: 4px 10px; border-radius: 99px; }
.trail i { color: var(--muted); font-style: normal; }
.mm { position: relative; border-radius: 28px; background-color: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden;
  background-image: radial-gradient(circle at 50% 50%, var(--accent-soft) 0, transparent 46%), linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: auto, 22px 22px, 22px 22px; }
.mm svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mm-edge path { fill: none; stroke: var(--accent-mid); stroke-width: 3; stroke-linecap: round; }
.mm-edge.d-with path { stroke: #b9bccd; }
.mm-edge.d-combo path { stroke: #b9bccd; stroke-dasharray: 3 8; }
.mm-edge .mm-arrow { fill: var(--accent); }
.mm-edge.on path { stroke: var(--accent-deep); stroke-width: 5; }
.mm-edge.on .mm-arrow { fill: var(--accent-deep); }
.mm-center { position: absolute; transform: translate(-50%, -50%); width: 104px; min-height: 72px; padding: 10px 8px; border-radius: 24px; background: var(--accent); color: #fff; display: grid; place-items: center; text-align: center; box-shadow: 0 6px 0 var(--accent-deep), 0 0 0 8px rgba(255, 255, 255, 0.85); z-index: 2; }
.mm-center span { font-family: var(--display); font-weight: 750; font-size: 14px; line-height: 1.2; overflow-wrap: anywhere; }
.mm-node { position: absolute; transform: translate(-50%, -50%); width: 104px; min-height: 48px; padding: 7px 8px; border-radius: 16px; background: var(--surface); border: 2px solid var(--accent-mid); border-bottom-width: 4px; cursor: pointer; display: grid; place-items: center; text-align: center; z-index: 1; }
.mm-node span { font-size: 12.5px; font-weight: 650; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.mm-node.d-with, .mm-node.d-combo { border-color: #c4c7d6; }
.mm-node.model { border-style: dashed; }
.mm-node[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; z-index: 3; box-shadow: 0 0 0 5px var(--accent-soft); }
.mm-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.mm-legend span { display: inline-flex; align-items: center; gap: 8px; }
.mm-legend i { width: 26px; height: 0; border-top: 3px solid var(--accent); position: relative; }
.mm-legend i.l-out::after, .mm-legend i.l-in::after { content: ""; position: absolute; top: -6.5px; border: 5px solid transparent; }
.mm-legend i.l-out::after { right: -4px; border-left-color: var(--accent); }
.mm-legend i.l-in::after { left: -4px; border-right-color: var(--accent); }
.mm-legend i.l-with { border-top-color: #b9bccd; }
.mm-legend i.l-combo { border-top: 3px dotted #b9bccd; }
.mm-detail { margin-top: 12px; display: grid; gap: 12px; border-color: var(--ink); border-width: 2px; }
.mm-sent { font-family: var(--display); font-size: 17px; line-height: 1.6; }
.mm-sent b { background: var(--accent-soft); color: var(--accent-deep); padding: 2px 8px; border-radius: 8px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.mm-sent em { font-style: normal; color: var(--muted); font-size: 14px; white-space: nowrap; }
details.card summary { font-family: var(--display); font-weight: 650; cursor: pointer; min-height: 32px; }

.v-tile b, .v-tile .v-note { min-width: 0; overflow-wrap: anywhere; }
.v-tiles.c1 .v-tile b { flex: 1 1 0; }
