/* Inter (OFL) hostowany lokalnie — ten sam krój co w aplikacji, bez zewnętrznych serwerów. */
@font-face {
  font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/docs/images/fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/docs/images/fonts/inter-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root, :root[data-theme="light"] {
  --bg: #f6f7f9; --surface: #ffffff; --surface-alt: #f8fafc;
  --text: #0f172a; --text-2: #475569; --muted: #64748b;
  --border: #e2e8f0; --border-light: #eef2f6; --border-strong: #cbd5e1;
  --brand: #0b2545; --action: #0f766e; --action-text: #0f766e; --action-soft: #e6f4f2;
  --positive: #15803d; --negative: #b91c1c; --info: #1d4ed8; --info-bg: #eff6ff;
  --warning: #b45309; --warning-bg: #fffbeb; --editable: #eef6f5;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 1px rgba(15, 23, 42, 0.04);
}
:root[data-theme="dark"] {
  --bg: #0b1220; --surface: #111a2b; --surface-alt: #0f1726;
  --text: #e5e9f0; --text-2: #a3aec2; --muted: #8a95a9;
  --border: #233049; --border-light: #1b263b; --border-strong: #33415c;
  --brand: #e5e9f0; --action: #0f766e; --action-text: #2dd4bf; --action-soft: #10302e;
  --positive: #4ade80; --negative: #f87171; --info: #60a5fa; --info-bg: #0f1d33;
  --warning: #fbbf24; --warning-bg: #2a2010; --editable: #13263a;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: "Inter Variable", Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px; line-height: 1.65;
  background: var(--bg); color: var(--text);
  font-variant-numeric: tabular-nums;
}
a { color: var(--action-text); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }

/* Pasek górny */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 56px; padding: 0 20px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; }
.brand span span { color: var(--muted); font-weight: 500; }
.topbar-link {
  display: inline-flex; align-items: center; height: 32px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: 6px;
  color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; background: var(--surface);
}
.topbar-link:hover { background: var(--surface-alt); }

/* Układ */
.layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; max-width: 1080px; margin: 0 auto; padding: 32px 24px 64px; }
.toc { position: sticky; top: 88px; align-self: start; font-size: 14px; }
.toc p { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc li a { display: block; padding: 4px 0 4px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--text-2); text-decoration: none; }
.toc li a:hover { color: var(--text); }
.toc li a.active { color: var(--text); border-left-color: var(--action); }
.toc .sub a { padding-left: 26px; font-size: 13px; }

main { min-width: 0; max-width: 760px; }
.intro h1 { margin: 0 0 8px; font-size: 32px; line-height: 1.2; letter-spacing: -0.02em; color: var(--brand); font-weight: 650; }
.intro p { margin: 0; color: var(--text-2); font-size: 16px; }
main > section { padding-top: 40px; margin-top: 40px; border-top: 1px solid var(--border); scroll-margin-top: 72px; }
main > section:first-of-type { border-top: none; margin-top: 24px; padding-top: 0; }
h2 { margin: 0 0 6px; font-size: 22px; line-height: 1.3; font-weight: 600; }
h3 { margin: 28px 0 8px; font-size: 16px; font-weight: 600; scroll-margin-top: 72px; }
.lead { margin: 0 0 8px; color: var(--text-2); }
p, li { color: var(--text-2); }
strong { color: var(--text); font-weight: 600; }
ol.steps, ul.points { margin: 8px 0 0; padding-left: 22px; }
ol.steps li, ul.points li { margin: 4px 0; padding-left: 4px; }
ul.points li::marker { color: var(--muted); }
kbd {
  display: inline-block; padding: 0 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px;
  background: var(--surface); color: var(--text); font: 500 12px/1.6 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
.ui { white-space: nowrap; font-weight: 600; color: var(--text); }

.note {
  display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; padding: 12px 14px;
  border-radius: 6px; background: var(--info-bg); color: var(--text); font-size: 14px;
}
.note svg { flex-shrink: 0; margin-top: 3px; color: var(--info); }
.note p { margin: 0; color: var(--text); }
.note.warn { background: var(--warning-bg); }
.note.warn svg { color: var(--warning); }

/* Podglądy ekranów (statyczne, na przykładowych danych) */
figure.preview { margin: 20px 0 0; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
figure.preview figcaption { padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; }
.preview table { width: 100%; border-collapse: collapse; font-size: 13px; }
.preview th { padding: 8px 12px; text-align: right; font-weight: 500; font-size: 12px; color: var(--muted); background: var(--surface-alt); border-bottom: 1px solid var(--border); }
.preview th:first-child, .preview td:first-child { text-align: left; }
.preview td { padding: 8px 12px; text-align: right; border-bottom: 1px solid var(--border-light); color: var(--text); }
.preview tr:last-child td { border-bottom: none; }
.preview td.plan { background: var(--surface); }
.preview td.plan > span { display: block; white-space: nowrap; padding: 2px 6px; margin: -3px -6px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface); transition: border-color .3s, box-shadow .3s; }
.preview td.plan > span.is-filled { border-color: var(--action); box-shadow: 0 0 0 2px var(--action-soft); }
.preview td.zero { color: var(--muted); }
.preview th.today span { color: var(--action); }
.preview tr.buf td { background: color-mix(in srgb, var(--positive) 10%, var(--surface)); color: var(--positive); }
.preview.bud { position: relative; }
.bud-more { margin-left: 6px; padding: 0 5px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font: inherit; line-height: 18px; transition: background .2s; }
.bud-more.is-hover { background: var(--border-light); color: var(--text); }
.bud-menu, .bud-toast { position: absolute; z-index: 3; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; transform: translateY(4px); }
.bud-menu { left: 120px; bottom: 54px; padding: 4px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: 0 10px 28px rgba(15,23,42,.16); font-size: 12px; }
.bud-menu div { padding: 5px 10px; border-radius: 5px; white-space: nowrap; }
.bud-menu div.is-hover { background: var(--surface-alt); }
.bud-toast { right: 12px; bottom: 10px; padding: 6px 10px; border-radius: 6px; background: var(--text); color: var(--surface); font-size: 12px; }
.bud-menu.is-on, .bud-toast.is-on { opacity: 1; transform: none; }
.preview td.over { color: var(--negative); font-weight: 600; }
.preview tr.group td { font-weight: 600; background: var(--surface-alt); }
.preview .sub { padding-left: 34px; color: var(--text-2); }
.preview .cat { display: inline-flex; align-items: center; gap: 6px; }
.preview .cat > svg { color: var(--muted); flex-shrink: 0; }
.preview .cat-chev { display: inline-flex; width: 16px; color: var(--muted); }
.tx-icon { display: inline-flex; color: var(--muted); flex-shrink: 0; }
.tx { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border-light); font-size: 14px; }
.tx:last-child { border-bottom: none; }
.tx-day { padding: 6px 16px; font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--surface-alt); border-bottom: 1px solid var(--border); }
.tx-name { flex: 1; color: var(--text); }
.tx-name small { display: block; color: var(--muted); font-size: 12px; }
.tx-amt { font-weight: 600; color: var(--text); }
.tx-amt.in { color: var(--positive); }

.table-plain { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.table-plain th, .table-plain td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table-plain th { font-size: 12px; font-weight: 500; color: var(--muted); background: var(--surface-alt); }
.table-plain td:first-child { white-space: nowrap; color: var(--text); font-weight: 500; }
@media (max-width: 600px) { .table-plain td:first-child { white-space: normal; } }

.cta { margin-top: 48px; padding: 24px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.cta h2 { font-size: 18px; }
.cta p { margin: 0 0 16px; }
.btn { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 6px; background: var(--action); color: #fff; text-decoration: none; font-weight: 500; font-size: 14px; }
.btn:hover { filter: brightness(0.95); }

footer { max-width: 1080px; margin: 0 auto; padding: 16px 24px 32px; color: var(--muted); font-size: 13px; display: flex; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; gap: 24px; padding: 24px 16px 48px; }
  .toc { position: static; }
  .toc ol { columns: 2; border-left: none; }
  .toc li a { padding-left: 0; border-left: none; }
  .toc .sub { display: none; }
  .intro h1 { font-size: 26px; }
  .preview .hide-sm { display: none; }
}

/* Interaktywny przykład struktury kategorii */
.demo { margin: 20px 0 0; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.demo-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.demo-head strong { font-size: 14px; }
.demo-head span { display: block; font-size: 12px; color: var(--muted); }
.demo-actions { display: flex; gap: 6px; }
.demo-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 6px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
}
.demo-btn:hover { background: var(--surface-alt); }
/* Pasek postępu przykładu (jak w aplikacji): przeciąganie, klawisze i kliknięcie kroku przewijają animację. */
.demo-timeline { display: flex; align-items: center; gap: 10px; padding: 10px 16px 0; }
.demo-timeline + .demo-foot { margin-top: 10px; }
.demo-tl-btn { width: 28px; padding: 0; justify-content: center; flex-shrink: 0; }
.demo-track { position: relative; flex: 1; height: 22px; cursor: pointer; touch-action: none; outline: none; }
.demo-track-bar { position: absolute; left: 0; right: 0; top: 8px; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.demo-track-fill { position: absolute; top: 0; bottom: 0; left: 0; background: var(--action); }
.demo-track-tick { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--surface); }
.demo-track-thumb { position: absolute; top: 4px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; border: 2px solid var(--action); background: var(--surface); box-sizing: border-box; box-shadow: var(--shadow); }
.demo-track:hover .demo-track-thumb { transform: scale(1.15); }
.demo-track:focus-visible .demo-track-thumb { box-shadow: 0 0 0 3px var(--action-soft); }
.demo-track-label { min-width: 28px; text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.demo-step-btn { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.demo-step-btn:hover { color: var(--text); text-decoration: underline; }
.demo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 16px; }
.demo-panel { border: 1px solid var(--border-light); border-radius: 6px; background: var(--surface); min-width: 0; }
.demo-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border-light); background: var(--surface-alt); border-radius: 6px 6px 0 0; }
.demo-panel-head b { font-size: 13px; font-weight: 600; }
.demo-panel-head span { font-size: 13px; font-weight: 600; color: var(--text); }
.demo-tree { padding: 6px; min-height: 120px; }
.demo-tree ul { list-style: none; margin: 0; padding: 0; }
.demo-tree ul ul { margin-left: 15px; padding-left: 10px; border-left: 1px solid var(--border); }
.dn {
  display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px;
  cursor: grab; user-select: none; -webkit-user-select: none;
}
.dn:hover { background: var(--surface-alt); }
.dn-grip { display: inline-flex; color: var(--muted); touch-action: none; cursor: grab; padding: 4px 0; }
.dn-icon { display: inline-flex; color: var(--text-2); }
.dn-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--text); }
.dn.is-parent .dn-name { font-weight: 600; }
.dn-amt { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.dn.is-parent .dn-amt { color: var(--text); font-weight: 600; }
.dn.is-target { background: var(--action-soft); border-color: var(--action); }
.demo-tree li.is-hidden { visibility: hidden; }
.dn.is-dragging { opacity: 0.35; }
.dn.is-new { animation: dnIn 0.22s ease-out; }
.dn.is-moved { animation: dnMoved 1.4s ease-out; }
@keyframes dnIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
@keyframes dnMoved { 0%, 40% { background: var(--action-soft); } 100% { background: transparent; } }
.demo-root-drop {
  display: none; margin: 6px; padding: 8px; border: 1px dashed var(--border-strong); border-radius: 6px;
  font-size: 12px; color: var(--muted); text-align: center;
}
.demo.is-dragging .demo-root-drop { display: block; }
.demo-root-drop.is-target { border-color: var(--action); background: var(--action-soft); color: var(--text); }
.demo-ghost {
  position: fixed; z-index: 50; pointer-events: none; display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); color: var(--text); font-size: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}
.demo-foot { padding: 10px 16px 14px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.demo-foot p { margin: 0; }
.demo-foot p + p { margin-top: 4px; }
.demo-status { color: var(--text); font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .dn.is-new, .dn.is-moved { animation: none; } }
@media (max-width: 860px) { .demo-grid { grid-template-columns: 1fr; padding: 12px; } }

/* Animacja: menu kategorii pod prawym przyciskiem myszy i wybór ikony */
.ctx-stage {
  position: relative; height: 380px; overflow: hidden; border-bottom: 1px solid var(--border);
  background-color: var(--bg); background-image: radial-gradient(var(--border) 1px, transparent 1px); background-size: 20px 20px;
}
.ctx-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ctx-lines path { fill: none; stroke: var(--border-strong); stroke-width: 1.5; }
.ctx-node {
  position: absolute; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 14px; box-sizing: border-box;
  background: linear-gradient(90deg, var(--node-accent) 0 3px, var(--surface) 3px);
  border: 1px solid var(--border-strong); border-radius: 8px; box-shadow: var(--shadow);
  font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; transition: border-color .15s, box-shadow .15s;
}
.ctx-node-icon { display: inline-flex; min-width: 16px; color: var(--text-2); }
.ctx-node.is-hover { border-color: var(--muted); box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12); }
.ctx-node.is-done .ctx-node-icon { animation: ctxPop .5s ease-out; }
.ctx-menu, .ctx-picker {
  position: absolute; display: none; z-index: 3; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
}
.ctx-menu { min-width: 196px; padding: 4px; }
.ctx-picker { width: 262px; padding: 10px; box-sizing: border-box; }
.ctx-menu.is-open, .ctx-picker.is-open { display: block; animation: ctxFade .14s ease-out; }
.ctx-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 4px; font-size: 13px; color: var(--text); }
.ctx-item svg { color: var(--muted); flex-shrink: 0; }
.ctx-item.is-hover { background: var(--surface-alt); }
.ctx-item.danger, .ctx-item.danger svg { color: var(--negative); }
.ctx-sep { height: 1px; margin: 4px -4px; background: var(--border); }
.ctx-search { position: relative; margin-bottom: 4px; }
.ctx-search svg { position: absolute; left: 8px; top: 8px; color: var(--muted); }
.ctx-search input {
  width: 100%; height: 30px; box-sizing: border-box; padding: 0 8px 0 26px; border: 1px solid var(--border-strong); border-radius: 6px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 12px; pointer-events: none;
}
.ctx-search input.is-focus { border-color: var(--action); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.25); }
.ctx-group-title { margin: 6px 2px 4px; font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ctx-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.ctx-ic { display: inline-flex; align-items: center; justify-content: center; height: 28px; border-radius: 6px; color: var(--text-2); }
.ctx-ic.is-hover { background: var(--action-soft); color: var(--action-text); box-shadow: inset 0 0 0 1px var(--action); }
.ctx-cursor { position: absolute; left: 0; top: 0; z-index: 6; pointer-events: none; transition: transform .8s cubic-bezier(.4, 0, .2, 1); }
.ctx-click {
  position: absolute; left: 0; top: 0; z-index: 5; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%;
  background: var(--action); opacity: 0; pointer-events: none;
}
.ctx-click.is-on { animation: ctxRipple .45s ease-out; }
.ctx-badge {
  position: absolute; left: 0; top: 0; z-index: 6; padding: 2px 8px; border-radius: 999px; background: var(--text); color: var(--surface);
  font-size: 11px; font-weight: 500; white-space: nowrap; opacity: 0; transition: opacity .15s; pointer-events: none;
}
.ctx-badge.is-on { opacity: 1; }
.ctx-steps { margin: 0; padding: 12px 16px 14px 36px; font-size: 13px; }
.ctx-steps li { margin: 2px 0; color: var(--muted); transition: color .2s; }
.ctx-steps li.is-active { color: var(--text); font-weight: 500; }
.ctx-steps.is-static li { color: var(--text-2); }
@keyframes ctxFade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes ctxRipple { from { transform: scale(.3); opacity: .45; } to { transform: scale(1.6); opacity: 0; } }
@keyframes ctxPop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .ctx-cursor { transition: none; }
  .ctx-menu.is-open, .ctx-picker.is-open, .ctx-click.is-on, .ctx-node.is-done .ctx-node-icon { animation: none; }
}
@media (max-width: 600px) { .ctx-stage { height: 430px; } }

/* Animacja: dwa widoki kategorii (lista i mapa) — dodanie podkategorii */
.vw-switch { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px 0; }
.vw-seg { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-alt); }
.vw-seg-item { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 4px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.vw-seg-item.is-on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.vw-switch-note { font-size: 12px; color: var(--muted); }
.vw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 12px 16px 16px; }
.vw-panel { min-width: 0; border: 1px solid var(--border-light); border-radius: 6px; background: var(--surface); }
.vw-panel-head { display: flex; align-items: baseline; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border-light); background: var(--surface-alt); border-radius: 6px 6px 0 0; font-size: 13px; }
.vw-panel-head span { color: var(--muted); font-size: 12px; }
.vw-stage { position: relative; height: 260px; overflow: hidden; border-radius: 0 0 6px 6px; }
.vw-stage--map { background-color: var(--bg); background-image: radial-gradient(var(--border) 1px, transparent 1px); background-size: 20px 20px; }
.vw-list { padding: 10px 8px; }
.vw-children { margin-left: 15px; padding-left: 10px; border-left: 1px solid var(--border); }
.vw-row { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 4px; border: 1px solid transparent; border-radius: 6px; font-size: 13px; color: var(--text); }
.vw-row.is-parent .vw-name { font-weight: 600; }
.vw-row[hidden], .vw-node[hidden] { display: none; }
.vw-row.is-hover { background: var(--surface-alt); }
.vw-grip, .vw-tog, .vw-ic, .vw-more { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.vw-grip { color: var(--muted); }
.vw-tog { width: 16px; color: var(--muted); }
.vw-ic { width: 16px; color: var(--text-2); }
.vw-more { width: 26px; height: 26px; margin-left: auto; border-radius: 6px; color: var(--muted); }
.vw-more.is-hover { background: var(--surface-alt); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.vw-name { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.vw-name.is-editing {
  overflow: visible; padding: 1px 6px; border: 1px solid var(--action); border-radius: 4px; background: var(--surface);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.2);
}
.vw-name.is-editing::after { content: ""; display: inline-block; width: 1px; height: 14px; margin-left: 1px; vertical-align: -2px; background: var(--text); animation: vwBlink 1s steps(1) infinite; }
.vw-name .vw-sel { background: rgba(15, 118, 110, 0.22); }
.vw-row.is-new, .vw-node.is-new { animation: ctxFade .2s ease-out; }
.vw-ic.is-done, .vw-node .ctx-node-icon.is-done { animation: ctxPop .5s ease-out; }
.vw-node { width: 132px; height: 36px; padding: 0 10px 0 12px; font-size: 12px; }
.vw-node .vw-name { flex: 1; }
.vw-stage .ctx-picker { width: 224px; padding: 8px; }
.vw-skip { display: flex; justify-content: center; margin-bottom: 4px; padding: 4px; border: 1px solid var(--border-strong); border-radius: 6px; font-size: 12px; font-weight: 500; color: var(--text); }
@keyframes vwBlink { 50% { opacity: 0; } }
@media (max-width: 860px) { .vw-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .vw-row.is-new, .vw-node.is-new, .vw-ic.is-done, .vw-node .ctx-node-icon.is-done, .vw-name.is-editing::after { animation: none; }
}

/* ── Animacja: plan w module Zaplanuj (#planDemo) ─────────────────────── */
.pd-scroll { overflow-x: auto; border-bottom: 1px solid var(--border); }
.pd-stage { position: relative; min-width: 660px; height: 430px; overflow: hidden; background: var(--surface); }
.pd-toolbar { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--text-2); }
.pd-new { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 6px; background: var(--action); color: #fff; font-weight: 600; }
.pd-new.is-hover { box-shadow: 0 0 0 3px var(--action-soft); }
.pd-tool { display: inline-flex; align-items: center; height: 28px; padding: 0 8px; border-radius: 6px; }
.pd-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); }
.pd-names { border-right: 1px solid var(--border); }
.pd-names > div { height: 34px; line-height: 34px; padding: 0 10px 0 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; color: var(--text); }
.pd-names > .pd-head { height: 26px; line-height: 26px; color: var(--muted); font-size: 11px; border-bottom: 1px solid var(--border); }
.pd-names > .is-parent { font-weight: 600; }
.pd-names > [hidden] { display: block; visibility: hidden; }
.pd-axis { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); height: 26px; align-items: center; border-bottom: 1px solid var(--border); font-size: 10px; color: var(--muted); text-align: center; }
.pd-body { position: relative; height: 260px; }
.pd-col { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--border-light); }
.pd-today { position: absolute; top: 0; bottom: 0; border-left: 2px solid var(--action); z-index: 3; }
.pd-bar { position: absolute; height: 16px; margin-top: -8px; border-radius: 4px; overflow: hidden; z-index: 2;
  background: color-mix(in srgb, var(--info) 22%, var(--surface)); border: 1px solid color-mix(in srgb, var(--info) 55%, transparent); }
.pd-bar.is-parent { height: 8px; margin-top: -4px; border: 0; border-radius: 2px; background: var(--info); }
.pd-bar.is-quarterly { background: color-mix(in srgb, var(--action) 30%, var(--surface)); border-color: color-mix(in srgb, var(--action) 65%, transparent); }
.pd-bar.is-new { animation: pdGrow .5s ease-out; }
.pd-bar.is-hover { box-shadow: 0 0 0 2px var(--action-soft); }
.pd-bar[hidden], .pd-dep[hidden], .pd-ms[hidden] { display: none; }
.pd-progress { display: block; height: 100%; width: 0; background: color-mix(in srgb, var(--info) 60%, var(--surface)); transition: width .5s ease; }
.pd-dep i { position: absolute; background: var(--muted); z-index: 1; }
.pd-dep b { position: absolute; width: 0; height: 0; margin: -4px 0 0 -6px; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 6px solid var(--muted); z-index: 3; }
.pd-dep.is-new, .pd-ms.is-new { animation: pdFade .5s ease-out; }
.pd-ms { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--warning); z-index: 3; }
.pd-ms::before { content: ""; position: absolute; top: 3px; left: -6px; width: 11px; height: 11px; background: var(--warning); transform: rotate(45deg); }
.pd-ms > span { position: absolute; top: 1px; left: 10px; display: inline-flex; align-items: center; gap: 3px; padding: 0 4px; border-radius: 3px; background: var(--surface); color: var(--warning); font-size: 10px; white-space: nowrap; }
.pd-modal, .pd-check { position: absolute; z-index: 5; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 12px 32px rgba(15, 23, 42, .18); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(6px); transition: opacity .2s, transform .2s; }
.pd-modal.is-open, .pd-check.is-open { opacity: 1; transform: none; }
.pd-modal { left: 50%; top: 10px; width: 330px; margin-left: -165px; padding: 12px 14px 10px; }
.pd-sec { margin: 8px 0 4px; padding-top: 6px; border-top: 1px solid var(--border-light); color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.pd-dur { margin: -4px 0 6px; color: var(--muted); font-size: 11px; }
.pd-prog { display: flex; align-items: center; gap: 8px; }
.pd-slide { position: relative; flex: 1; height: 4px; border-radius: 2px; background: var(--border); }
.pd-slide i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--action); }
.pd-slide b { position: absolute; top: -5px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--surface); border: 2px solid var(--action); }
.pd-prog .pd-input { width: 54px; text-align: right; }
.pd-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pd-muted { color: var(--muted); font-size: 11px; }
.pd-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border-light); }
.pd-names > div[data-name] { display: flex; gap: 6px; }
.pd-tname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pd-pct { flex-shrink: 0; font-size: 11px; font-style: normal; font-weight: 600; color: var(--info); }
.pd-modal b { display: block; margin-bottom: 8px; font-size: 13px; }
.pd-field { margin-bottom: 8px; }
.pd-field label { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; }
.pd-input { height: 26px; line-height: 26px; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: 5px; color: var(--text); white-space: nowrap; overflow: hidden; }
.pd-input.is-editing::after { content: ""; display: inline-block; width: 1px; height: 13px; margin-left: 1px; vertical-align: -2px; background: var(--text); animation: vwBlink 1s steps(1) infinite; }
.pd-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pd-save { display: inline-flex; height: 26px; align-items: center; padding: 0 12px; border-radius: 6px; background: var(--action); color: #fff; font-weight: 600; }
.pd-save.is-hover { box-shadow: 0 0 0 3px var(--action-soft); }
.pd-check { right: 14px; bottom: 12px; width: 250px; padding: 10px 12px; }
.pd-check-head { display: flex; justify-content: space-between; margin-bottom: 6px; font-weight: 600; }
.pd-check ul { margin: 0; padding: 0; list-style: none; }
.pd-check li { display: flex; align-items: center; gap: 6px; margin: 3px 0; color: var(--text-2); }
.pd-box { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; border: 1px solid var(--border-strong); border-radius: 3px; color: #fff; }
.pd-check li.is-done { color: var(--text); }
.pd-check li.is-done .pd-box { background: var(--action); border-color: var(--action); }
@keyframes pdGrow { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes pdFade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .pd-bar.is-new, .pd-dep.is-new, .pd-ms.is-new { animation: none; }
  .pd-progress, .pd-modal, .pd-check { transition: none; }
}

/* ── Animacja: od mapy myśli do planu (#mindDemo) ─────────────────────── */
.md-stage { min-width: 660px; height: 380px; border-bottom: 0; }
.md-toolbar { position: absolute; top: 12px; left: 12px; z-index: 2; }
.md-node { width: 196px; }
.md-node .ctx-node-icon:empty { display: none; }
.md-node[hidden] { display: none; }
.md-node.is-new { animation: ctxFade .25s ease-out; }
.md-node.is-picked { border-color: var(--info); box-shadow: 0 0 0 3px color-mix(in srgb, var(--info) 25%, transparent); }
.md-node .vw-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.md-count { margin-left: auto; padding: 0 7px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-alt); font-size: 11px; color: var(--muted); }
.md-count:empty { display: none; }
.md-stage .ctx-lines path.is-picked { stroke: var(--info); }
.md-plan { right: 14px; bottom: 12px; width: 290px; }
.md-plan li { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 10px; align-items: center; }
.md-plan li[hidden] { display: none; }
.md-plan li.is-new { animation: pdFade .4s ease-out; }
.md-track { position: relative; height: 10px; border-radius: 3px; background: var(--surface-alt); border: 1px solid var(--border-light); }
.md-track i { position: absolute; top: 1px; bottom: 1px; border-radius: 2px; background: color-mix(in srgb, var(--info) 55%, var(--surface)); }
.md-track i.is-q { background: color-mix(in srgb, var(--action) 55%, var(--surface)); }
@media (prefers-reduced-motion: reduce) { .md-node.is-new, .md-plan li.is-new { animation: none; } }

/* ── Animacja: aplikacja na telefonie (#appDemo) ─────────────────────── */
.ap-stage { position: relative; height: 560px; display: flex; align-items: center; justify-content: center; background: var(--surface-alt); overflow: hidden; border-bottom: 1px solid var(--border); }
.ap-phone { position: relative; width: 272px; height: 524px; border: 8px solid #0f172a; border-radius: 34px; background: var(--surface); overflow: hidden; box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18); }
.ap-bar { display: flex; align-items: center; justify-content: space-between; height: 24px; padding: 0 14px; font-size: 11px; font-weight: 600; color: var(--text); }
.ap-bar .ap-net { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; }
.ap-bar .ap-net.is-off { color: var(--warning); }
.ap-home { position: absolute; inset: 24px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); align-content: start; gap: 18px 8px; padding: 26px 14px; background: linear-gradient(180deg, #dbeafe, #e0f2f1); }
.ap-ico { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 9px; color: #0f172a; }
.ap-ico i { display: block; width: 44px; height: 44px; border-radius: 11px; background: #94a3b8; }
.ap-ico.is-fp i { display: flex; align-items: center; justify-content: center; background: #0b2545; }
.ap-ico.is-hover i { box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.45); }
.ap-app { position: absolute; inset: 24px 0 0; display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--surface); opacity: 0; transform: scale(.94); transition: opacity .25s, transform .25s; pointer-events: none; }
.ap-app.is-open { opacity: 1; transform: none; }
.ap-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.ap-head b { font-size: 15px; }
.ap-chip { padding: 2px 8px; border-radius: 6px; background: var(--warning-bg); font-size: 10px; color: var(--text); }
.ap-chip.is-hover { box-shadow: 0 0 0 2px var(--action); }
.ap-amount { display: flex; align-items: center; gap: 6px; height: 46px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 8px; font-size: 22px; justify-content: flex-end; }
.ap-amount span:first-child { flex: 1; text-align: right; }
.ap-amount .is-placeholder { color: var(--muted); }
.ap-amount small { font-size: 14px; color: var(--muted); }
.ap-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ap-cat { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 58px; border: 1px solid var(--border); border-radius: 10px; font-size: 11px; color: var(--text); }
.ap-cat.is-hover { border-color: var(--action); background: var(--action-soft); }
.ap-toast { position: absolute; left: 10px; right: 10px; top: 8px; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 10px; border-radius: 8px; background: #f0fdf4; border: 1px solid rgba(21, 128, 61, .35); box-shadow: 0 8px 20px rgba(15, 23, 42, .15); font-size: 10.5px; color: #0f172a; opacity: 0; transform: translateY(-6px); transition: opacity .2s, transform .2s; }
.ap-toast.is-on { opacity: 1; transform: none; }
.ap-toast u { text-decoration: none; font-weight: 600; color: #0f766e; }
.ap-list { display: none; flex-direction: column; gap: 6px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; font-size: 11px; }
.ap-list.is-open { display: flex; animation: ctxFade .2s ease-out; }
.ap-list b { font-size: 12px; }
.ap-list p { margin: 0; padding: 6px 8px; border-radius: 6px; background: var(--info-bg); font-size: 10px; color: var(--text-2); }
.ap-row { display: flex; justify-content: space-between; gap: 6px; padding-top: 6px; border-top: 1px solid var(--border); }
.ap-row em { font-style: normal; color: var(--negative); font-weight: 600; }
.ap-row small { display: block; color: var(--muted); font-size: 9.5px; }
.ap-stage .ctx-steps { margin: 0; }
@media (prefers-reduced-motion: reduce) { .ap-app, .ap-toast { transition: none; } .ap-list.is-open { animation: none; } }

/* Przykładowa wiadomość e-mail (podsumowanie tygodnia) */
.mail-head { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-bottom: 1px solid var(--border-light); }
.mail-head b { font-size: 14px; color: var(--text); }
.mail-head span { font-size: 12px; color: var(--muted); }
.mail-body { padding: 12px 16px 14px; font-size: 13.5px; }
.mail-body p { margin: 0 0 8px; color: var(--text); }
.mail-body ul { margin: 0 0 8px; padding-left: 20px; }
.mail-body li { color: var(--text); }
.mail-sums { display: grid; grid-template-columns: max-content max-content; gap: 2px 16px; margin: 0 0 10px 12px; }
.mail-sums dt { color: var(--text-2); }
.mail-sums dd { margin: 0; color: var(--text); font-weight: 600; text-align: right; }
.mail-title { font-weight: 600; }
.mail-body u { color: var(--action-text); text-decoration: underline; }
.mail-foot { margin-top: 12px !important; padding-top: 10px; border-top: 1px solid var(--border-light); font-size: 12px; color: var(--muted) !important; }

/* ── Animacje: przegląd miesiąca, Moje / Wspólne, zaproszenie (#reviewDemo, #spaceDemo, #inviteDemo) ── */
.aw-stage { position: relative; height: 470px; padding: 16px; background: var(--surface-alt); border-bottom: 1px solid var(--border); overflow: hidden; }
.aw { position: relative; display: flex; flex-direction: column; height: 100%; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg); box-shadow: 0 8px 24px rgba(15, 23, 42, .10); overflow: hidden; font-size: 12.5px; color: var(--text); }
.aw-bar { display: flex; align-items: center; gap: 10px; flex-shrink: 0; height: 44px; padding: 0 12px; background: var(--surface); border-bottom: 1px solid var(--border); }
.aw-brand { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.aw-brand small { color: var(--muted); font-size: 12px; font-weight: 500; }
.aw-gap { flex: 1; }
.aw-who { font-size: 11px; color: var(--muted); white-space: nowrap; }
.aw-avatar { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: var(--surface); font-size: 11px; font-weight: 600; }
.aw-body { position: relative; flex: 1; min-height: 0; }
.aw-screen { position: absolute; inset: 0; padding: 14px 16px; overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .25s, transform .25s, visibility .25s; }
.aw-screen.is-on { opacity: 1; visibility: visible; transform: none; }
.aw-h { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 15px; font-weight: 600; color: var(--text); }
.aw-h svg { color: var(--text-2); }
.aw-p { margin: 0 0 10px; color: var(--text-2); font-size: 12.5px; line-height: 1.5; }
.aw-card { padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.aw-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); color: var(--text); font-size: 12px; font-weight: 500; white-space: nowrap; }
.aw-btn.is-primary { background: var(--action); border-color: var(--action); color: #fff; }
.aw-btn.is-danger { border-color: color-mix(in srgb, var(--negative) 55%, transparent); color: var(--negative); }
.aw-btn.is-disabled { opacity: .45; }
.aw-btn.is-hover, .aw-input.is-hover, .aw-select.is-hover, .aw-check.is-hover { box-shadow: 0 0 0 3px var(--action-soft); }
.aw-label { display: block; margin-bottom: 3px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.aw-input, .aw-select { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); color: var(--text); white-space: nowrap; overflow: hidden; }
.aw-input.num { justify-content: flex-end; }
.aw-input.is-placeholder, .aw-select.is-placeholder { color: var(--muted); }
.aw-input.is-editing { border-color: var(--action); }
.aw-input.is-editing::after { content: ""; display: inline-block; flex-shrink: 0; width: 1px; height: 13px; margin-left: -5px; background: var(--text); animation: vwBlink 1s steps(1) infinite; }
.aw-select { justify-content: space-between; padding-right: 7px; }
.aw-select > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.aw-select svg { flex-shrink: 0; color: var(--muted); }
.aw-menu { position: absolute; z-index: 4; display: none; min-width: 150px; padding: 4px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: 0 8px 24px rgba(15, 23, 42, .16); font-size: 12px; }
.aw-menu.is-open { display: block; animation: ctxFade .14s ease-out; }
.aw-menu > div { padding: 6px 9px; border-radius: 4px; white-space: nowrap; color: var(--text); }
.aw-menu > div small { margin-left: 6px; color: var(--muted); }
.aw-menu > div.is-hover { background: var(--surface-alt); }
.aw-notice { padding: 8px 10px; border-radius: 6px; background: var(--info-bg); color: var(--text); font-size: 12px; line-height: 1.45; }
.aw-notice.is-ok { background: color-mix(in srgb, var(--positive) 13%, var(--surface)); }
.aw-notice.is-warn { background: var(--warning-bg); }
.aw-notice u { text-decoration: underline; color: var(--action-text); }
.aw-check { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 15px; height: 15px; border: 1px solid var(--border-strong); border-radius: 3px; background: var(--surface); color: #fff; }
.aw-check.is-on { background: var(--action); border-color: var(--action); }
.aw-check svg { visibility: hidden; }
.aw-check.is-on svg { visibility: visible; }
.aw-new { animation: ctxFade .3s ease-out; }
.aw-flash { animation: dnMoved 1.6s ease-out; }
.aw-pos { color: var(--positive); }
.aw-neg { color: var(--negative); }
.aw-stage [hidden] { display: none !important; }
.aw-stage .ctx-cursor { z-index: 8; }
.aw-stage .ctx-click { z-index: 7; }
/* Przełącznik przestrzeni i osoba przy transakcji — jak w aplikacji */
.ws-switch { display: inline-flex; flex-shrink: 0; padding: 2px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); }
.ws-switch[hidden] { display: none; }
.ws-switch.is-new { animation: ctxPop .5s ease-out; }
.ws-btn { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 5px; color: var(--text-2); font-size: 12px; white-space: nowrap; }
.ws-btn.is-on { background: var(--action-soft); color: var(--action-text); font-weight: 600; }
.ws-btn.is-hover { box-shadow: inset 0 0 0 1px var(--action); }
.pc { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.pc i { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: var(--action-soft); color: var(--action-text); font-size: 10px; font-style: normal; font-weight: 600; }
.pc.is-pulse i { animation: awPulse 1.1s ease-out; }
@keyframes awPulse { 0% { box-shadow: 0 0 0 0 rgba(15, 118, 110, .55); } 100% { box-shadow: 0 0 0 9px rgba(15, 118, 110, 0); } }
/* Moje / Wspólne: transakcje */
.ws-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.ws-head b { font-size: 15px; }
.ws-space { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 11px; color: var(--text-2); white-space: nowrap; }
.ws-form { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 8px; align-items: end; margin-bottom: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.ws-form.is-personal { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) auto; }
.ws-form [hidden] { display: none; }
.ws-filter { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; color: var(--text-2); }
.ws-filter[hidden] { display: none; }
.ws-filter .aw-select { width: 130px; height: 28px; }
.ws-filter em { margin-left: auto; font-style: normal; color: var(--text); font-weight: 600; }
.ws-list { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); overflow: hidden; }
.ws-row { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--border-light); }
.ws-row:last-child { border-bottom: 0; }
.ws-row > span:first-child { display: inline-flex; color: var(--muted); }
.ws-name { flex: 1; min-width: 0; }
.ws-name b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-name small { display: block; color: var(--muted); font-size: 11px; }
.ws-meta { display: flex; align-items: center; gap: 8px; }
.ws-meta small { display: inline; }
.ws-amt { font-weight: 600; white-space: nowrap; }
.ws-list.is-swap { animation: ctxFade .3s ease-out; }
/* Przegląd miesiąca */
.rv-tabs { display: flex; gap: 2px; margin-bottom: 12px; border-bottom: 1px solid var(--border); overflow: hidden; }
.rv-tabs span { padding: 6px 10px; color: var(--text-2); white-space: nowrap; }
.rv-tabs span.is-on { color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--action); }
.rv-banner { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--action) 45%, transparent); border-radius: 8px; background: var(--action-soft); }
.rv-banner > span:first-child { display: inline-flex; color: var(--action-text); }
.rv-banner div { flex: 1; min-width: 0; }
.rv-banner strong { display: block; font-size: 13px; }
.rv-banner div span { display: block; color: var(--text-2); font-size: 11.5px; line-height: 1.4; }
.rv-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.rv-kpis > div { padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.rv-kpis span { display: block; color: var(--muted); font-size: 11px; }
.rv-kpis b { display: block; font-size: 15px; white-space: nowrap; }
.rv-kpis small { display: block; color: var(--muted); font-size: 10.5px; white-space: nowrap; }
.rv-week { padding: 10px; border: 1px dashed var(--border-strong); border-radius: 8px; color: var(--muted); font-size: 11.5px; }
.rv-title { margin: 0 0 2px; font-size: 15px; font-weight: 600; }
.rv-stepper { display: flex; gap: 6px; margin: 8px 0 12px; padding: 0; list-style: none; }
.rv-stepper li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.rv-stepper li i { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: var(--surface-alt); font-style: normal; font-size: 10.5px; font-weight: 600; }
.rv-stepper li.is-on { border-color: var(--action); color: var(--text); font-weight: 600; }
.rv-stepper li.is-on i { background: var(--action); color: #fff; }
.rv-stepper li.is-done i { background: var(--action-soft); color: var(--action-text); }
.rv-pane { display: none; }
.rv-pane.is-on { display: block; animation: ctxFade .25s ease-out; }
.rv-sub { margin: 0 0 6px; color: var(--text-2); font-size: 12px; line-height: 1.45; }
.rv-list { margin: 0 0 10px; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.rv-list li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--border-light); }
.rv-list li:last-child { border-bottom: 0; }
.rv-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 10px; margin-bottom: 8px; }
.rv-skip { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 12px; }
.rv-values { margin: 0 0 8px; padding: 0; list-style: none; }
.rv-values li { display: grid; grid-template-columns: minmax(0, 1fr) 130px; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border-light); }
.rv-values li span b { display: block; font-weight: 500; }
.rv-values li span small { display: block; color: var(--muted); font-size: 10.5px; }
.rv-actions { position: absolute; left: 16px; right: 16px; bottom: 14px; display: flex; justify-content: flex-end; gap: 8px; }
.rv-modal { position: absolute; z-index: 5; left: 50%; top: 50%; width: 280px; margin: -88px 0 0 -140px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: 0 12px 32px rgba(15, 23, 42, .2); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s, transform .2s, visibility .2s; }
.rv-modal.is-open { opacity: 1; visibility: visible; transform: none; }
.rv-modal b { display: block; margin-bottom: 8px; font-size: 13px; }
.rv-seg { display: inline-flex; gap: 2px; padding: 2px; margin-bottom: 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-alt); }
.rv-seg span { padding: 3px 9px; border-radius: 4px; font-size: 11.5px; color: var(--text-2); }
.rv-seg span.is-on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.rv-modal small { display: block; margin-bottom: 10px; color: var(--muted); font-size: 11px; }
.rv-modal .aw-btn { float: right; }
/* Zaproszenie */
.iv-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--text-2); }
.iv-people { margin: 0 0 10px; padding: 0; list-style: none; }
.iv-people li { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.iv-people li > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iv-people small { color: var(--muted); font-size: 11px; }
.iv-badge { padding: 1px 7px; border-radius: 999px; background: var(--surface-alt); border: 1px solid var(--border); color: var(--text-2); font-size: 10.5px; }
.iv-badge.is-owner { background: var(--info-bg); border-color: color-mix(in srgb, var(--info) 35%, transparent); color: var(--info); }
.iv-form { display: flex; gap: 8px; align-items: flex-end; }
.iv-form > div { flex: 1; min-width: 0; }
.iv-pending { margin-top: 10px; }
.iv-pending[hidden], .iv-stage .aw-notice[hidden] { display: none; }
.iv-pending p { margin: 0 0 4px; font-weight: 500; }
.iv-pending div { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--text-2); }
.iv-pending div span:first-child { display: inline-flex; color: var(--muted); }
.iv-pending div > span:nth-child(2) { flex: 1 1 220px; min-width: 0; }
.iv-pending small { color: var(--muted); }
.iv-mail { display: grid; grid-template-columns: 170px minmax(0, 1fr); height: 100%; margin: -14px -16px; }
.iv-inbox { border-right: 1px solid var(--border); background: var(--surface); }
.iv-inbox p { margin: 0; padding: 8px 10px; border-bottom: 1px solid var(--border-light); font-size: 11.5px; color: var(--muted); }
.iv-inbox p b { display: block; color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iv-inbox p.is-on { background: var(--action-soft); }
.iv-inbox p.is-on b::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--action); }
.iv-letter { padding: 12px 14px; background: var(--surface); font-size: 12px; line-height: 1.5; overflow: hidden; }
.iv-letter h4 { margin: 0 0 2px; font-size: 13px; }
.iv-letter small { display: block; margin-bottom: 8px; color: var(--muted); }
.iv-letter p { margin: 0 0 8px; color: var(--text); }
.iv-letter u { color: var(--action-text); text-decoration: underline; border-radius: 3px; word-break: break-all; }
.iv-letter u.is-hover { background: var(--action-soft); }
.iv-points { margin: 0 0 10px; padding-left: 18px; color: var(--text-2); font-size: 12px; line-height: 1.45; }
.iv-points li { margin: 3px 0; }
.iv-confirm { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
@media (max-width: 860px) { .rv-stepper li { padding-right: 3px; } .rv-stepper li span { display: none; } .rv-stepper li.is-on span { display: inline; } }
@media (max-width: 600px) {
  .aw-stage { padding: 8px; }
  .aw-screen { padding: 12px; }
  .aw-brand small, .aw-who { display: none; }
  .ws-form, .ws-form.is-personal { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ws-form > div:last-child { grid-column: 1 / -1; }
  .ws-form > div:last-child .aw-btn { width: 100%; }
  .rv-kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rv-kpis > div:last-child { grid-column: 1 / -1; }
  .rv-form { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .aw-stage { height: 540px; }
  .rv-banner { flex-wrap: wrap; }
  .rv-banner div { flex-basis: calc(100% - 40px); }
  .rv-banner .aw-btn { margin-left: 30px; }
  .rv-values li { grid-template-columns: minmax(0, 1fr) 104px; }
  .rv-actions { left: 12px; right: 12px; bottom: 12px; }
  .iv-mail { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); margin: -12px; }
  .iv-inbox { border-right: 0; border-bottom: 1px solid var(--border); }
  .iv-inbox p:not(.is-on) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .aw-screen, .rv-modal { transition: none; }
  .aw-new, .aw-flash, .ws-switch.is-new, .pc.is-pulse i, .ws-list.is-swap, .rv-pane.is-on, .aw-menu.is-open, .aw-input.is-editing::after { animation: none; }
}

/* ── Animacja: cel jako kamień milowy (#goalMsDemo) ── */
.gm-stage { height: 400px; }
.gm-tools { display: flex; align-items: center; gap: 8px; margin: -14px -16px 0; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--surface); }
.gm-grid { display: grid; grid-template-columns: 118px minmax(0, 1fr); margin: 0 -16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.gm-names { border-right: 1px solid var(--border); }
.gm-names > div { height: 30px; line-height: 30px; padding: 0 10px; border-bottom: 1px solid var(--border-light); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-names > .gm-head { height: 24px; line-height: 24px; font-size: 11px; color: var(--muted); background: var(--surface-alt); border-bottom-color: var(--border); }
.gm-names > .gm-lane-label { display: flex; align-items: center; gap: 5px; color: var(--text-2); background: var(--surface-alt); border-bottom-color: var(--border); }
.gm-chart { position: relative; overflow: hidden; }
.gm-axis { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); height: 24px; line-height: 24px; border-bottom: 1px solid var(--border); background: var(--surface-alt); font-size: 10px; color: var(--muted); text-align: center; }
.gm-lane { position: relative; height: 30px; background: var(--surface-alt); border-bottom: 1px solid var(--border); }
.gm-row { position: relative; height: 30px; border-bottom: 1px solid var(--border-light); }
.gm-bar { position: absolute; top: 8px; height: 14px; border-radius: 4px; background: color-mix(in srgb, var(--info) 28%, var(--surface)); border: 1px solid color-mix(in srgb, var(--info) 55%, transparent); }
.gm-line { position: absolute; top: 54px; bottom: 0; width: 0; border-left: 2px dashed var(--warning); opacity: .6; transition: left .5s ease; }
.gm-chip { position: absolute; top: 27px; z-index: 2; display: inline-flex; flex-direction: row-reverse; align-items: center; gap: 6px; height: 24px; white-space: nowrap; font-size: 11.5px; transform: translateX(calc(-100% + 7px)); transition: left .5s ease; }
.gm-chip b { font-weight: 600; }
.gm-diamond { flex-shrink: 0; width: 11px; height: 11px; margin: 0 1px; border-radius: 2px; background: var(--warning); transform: rotate(45deg); box-shadow: 0 0 0 2px var(--surface-alt); }
.gm-diamond.is-hover { box-shadow: 0 0 0 4px var(--action-soft); }
.gm-prog { display: inline-block; width: 40px; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.gm-prog i { display: block; height: 100%; width: 0; background: var(--positive); transition: width .6s ease; }
.gm-amount { color: var(--text-2); font-size: 11px; }
.gm-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.gm-dot.is-ok { background: var(--positive); }
.gm-dot.is-late { background: var(--negative); }
.gm-caption { margin: 10px 0 0; font-size: 12px; color: var(--text-2); line-height: 1.5; }
.gm-caption b { color: var(--text); }
.gm-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.gm-modal { position: absolute; z-index: 5; left: 50%; top: 46px; width: min(380px, calc(100% - 20px)); padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: 0 12px 32px rgba(15, 23, 42, .2); transform: translateX(-50%); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.gm-modal.is-open { opacity: 1; visibility: visible; }
.gm-modal > b { display: block; margin-bottom: 8px; font-size: 13px; }
.gm-modal .aw-label { margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-modal .rv-seg { margin: 4px 0 2px; }
.gm-modal .rv-seg span.is-hover { box-shadow: inset 0 0 0 1px var(--action); }
.gm-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.gm-toast { position: absolute; z-index: 4; right: 12px; bottom: 12px; max-width: calc(100% - 24px); padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--positive) 13%, var(--surface)); border: 1px solid color-mix(in srgb, var(--positive) 35%, transparent); font-size: 11.5px; color: var(--text); opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
.gm-toast.is-on { opacity: 1; transform: none; }
@media (max-width: 600px) {
  .gm-stage { height: 430px; }
  .gm-tools { margin: -12px -12px 0; }
  .gm-grid { grid-template-columns: 84px minmax(0, 1fr); margin: 0 -12px; }
  .gm-axis span:nth-child(even) { visibility: hidden; }
  .gm-amount { display: none; }
}
@media (prefers-reduced-motion: reduce) { .gm-line, .gm-chip, .gm-prog i, .gm-modal, .gm-toast { transition: none; } }

/* ── Animacja: plan z szablonu (#tplDemo) ── */
.tp-stage { height: 400px; }
.tp-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tp-card { display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-size: 11.5px; }
.tp-card b { font-size: 12px; }
.tp-card span { color: var(--text-2); line-height: 1.35; }
.tp-card i { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 7px; background: var(--action-soft); color: var(--action-text); }
.tp-card.is-hover { border-color: var(--action); box-shadow: 0 0 0 3px var(--action-soft); }
.tp-wizard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.tp-form { display: flex; flex-direction: column; gap: 6px; }
.tp-parts { display: flex; flex-direction: column; gap: 3px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; font-size: 11.5px; }
.tp-parts span { display: flex; align-items: center; gap: 6px; }
.tp-preview { padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-size: 11.5px; line-height: 1.5; }
.tp-preview b { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); font-weight: 600; }
.tp-preview p { margin: 0; color: var(--text); }
.tp-goal { font-weight: 600; }
.tp-run { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.tp-run div { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); font-size: 11.5px; }
.tp-run i { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: var(--surface-alt); font-style: normal; font-size: 10px; color: var(--text-2); }
.tp-run div.is-done i { background: var(--action); color: #fff; }
.tp-run div.is-running i { box-shadow: 0 0 0 3px var(--action-soft); }
.tp-run em { margin-left: auto; font-style: normal; color: var(--muted); font-size: 11px; }
.tp-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
@media (max-width: 600px) {
  .tp-stage { height: 470px; }
  .tp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-card span { display: none; }
  .tp-wizard { grid-template-columns: minmax(0, 1fr); }
  .tp-preview { display: none; }
}

/* ── Rozdziały na podstronach: spis, ścieżka, poprzedni / następny, strona startowa ── */
.toc .grp { margin: 14px 0 4px 14px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.toc .grp:first-child { margin-top: 0; }
.crumb { margin: 0 0 10px; font-size: 13px; }
.crumb a { text-decoration: none; }
.chapter h2 { margin-top: 36px; }
.chapter h2:first-of-type { margin-top: 28px; }
.faq { margin-top: 8px; }
.faq details { border-bottom: 1px solid var(--border); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--text); }
.faq details p { margin: 8px 0 0; }
.see-also { margin-top: 28px; font-size: 14px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 40px; }
.pager a { display: block; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); text-decoration: none; color: var(--text); font-weight: 600; font-size: 14px; }
.pager a small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.pager a.next { text-align: right; grid-column: 2; }
.pager a:hover { border-color: var(--border-strong); }
.quick { margin: 20px 0 0; padding: 0; list-style: none; counter-reset: q; display: grid; gap: 8px; }
.quick li { counter-increment: q; display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.quick li::before { content: counter(q); flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--action-soft); color: var(--action-text); font-weight: 600; font-size: 13px; display: grid; place-items: center; margin-top: 1px; }
.quick li p { margin: 0; color: var(--text); }
.quick li a { white-space: nowrap; }
.search { margin: 36px 0 0; }
.search input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
.cards-grp { margin: 24px 0 8px; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.card { display: block; padding: 14px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); text-decoration: none; box-shadow: var(--shadow); }
.card:hover { border-color: var(--action); }
.card b { display: block; color: var(--text); font-weight: 600; }
.card span { display: block; margin-top: 2px; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.no-hits { margin-top: 16px; color: var(--muted); }
@media (max-width: 860px) {
  .layout.has-chapters .toc { display: none; }
  .cards { grid-template-columns: 1fr; }
}
main > section.cards-sec { border-top: none; margin-top: 0; padding-top: 0; }
