/* Prawda o TK — minimalizm: dużo światła, wyraźna typografia, czerwień flagi jako jedyny akcent.
   Fonty wyłącznie systemowe (brak zapytań do zewnętrznych serwerów). */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --paper: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #424245;
  --muted: #6e6e73;          /* 5,1:1 na bieli */
  --rule: #e5e5ea;
  --rule-strong: #d2d2d7;

  --red: #dc143c;            /* czerwień flagi */
  --red-ink: #c0102f;        /* tekst/linki: 6:1 na bieli */
  --red-soft: #fdecef;
  --white-flag: #ffffff;

  --st-current: #1a7f37;
  --st-former: #6e6e73;
  --st-disputed: #b25000;
  --st-unsworn: #6e4bc3;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Inter", "Segoe UI", Roboto, "Noto Sans", "DejaVu Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 18px;
  --radius-sm: 12px;
  --measure: 68ch;
  --ease: cubic-bezier(.25, .1, .25, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #111113;
    --paper: #1c1c1e;
    --ink: #f5f5f7;
    --ink-2: #d1d1d6;
    --muted: #98989d;
    --rule: #2c2c2e;
    --rule-strong: #3a3a3c;
    --red: #ff375f;
    --red-ink: #ff5c7a;
    --red-soft: #3a0f19;
    --white-flag: #f5f5f7;
    --st-current: #30d158;
    --st-former: #98989d;
    --st-disputed: #ff9f0a;
    --st-unsworn: #bf5af2;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--font);
  letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga";
  hanging-punctuation: first;
}
a { color: var(--red-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.1; font-weight: 600; letter-spacing: -.025em; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); margin: .15em 0 .35em; letter-spacing: -.035em; font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 3.5rem 0 1rem; }
h3 { font-size: 1.12rem; margin: 1.2rem 0 .4rem; letter-spacing: -.015em; }
p { margin: .4em 0 1em; max-width: var(--measure); text-wrap: pretty; }
code { font: .88em var(--mono); background: var(--bg-alt); padding: 2px 6px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 22px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--paper); padding: 6px 10px; z-index: 10; }

/* wstęga flagi — biel i czerwień */
.flag-band { height: 6px; background: linear-gradient(to bottom, var(--white-flag) 0 50%, var(--red) 50% 100%); border-top: 1px solid var(--rule); }

/* nagłówek: przezroczysty pasek */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: saturate(1.8) blur(20px); -webkit-backdrop-filter: saturate(1.8) blur(20px); border-bottom: 1px solid color-mix(in srgb, var(--rule-strong) 60%, transparent); }
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 52px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; }
.brand-mark { width: 22px; height: 16px; border-radius: 3px; overflow: hidden; display: grid; grid-template-rows: 1fr 1fr; box-shadow: 0 0 0 1px var(--rule-strong); flex: none; }
.brand-mark::before { content: ""; background: var(--white-flag); }
.brand-mark::after { content: ""; background: var(--red); }
.brand-mark span { display: none; }
.brand-text { font-weight: 600; font-size: 1rem; letter-spacing: -.02em; }
.brand-text small { display: none; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; margin-left: auto; }
.nav a { color: var(--ink-2); padding: 6px 10px; font-size: .8rem; font-weight: 400; letter-spacing: -.005em; text-decoration: none; opacity: .88; transition: opacity .2s var(--ease), color .2s var(--ease); position: relative; }
.nav a:hover { opacity: 1; color: var(--ink); text-decoration: none; }
.nav a.active { color: var(--ink); opacity: 1; font-weight: 600; }
.nav a.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--red); }
.nav-toggle { display: none; margin-left: auto; font: inherit; font-size: .88rem; background: none; border: 0; color: var(--ink); padding: 6px 4px; }
@media (max-width: 920px) {
  .nav-toggle { display: block; }
  .nav { display: none; width: 100%; flex-direction: column; padding: 4px 0 16px; }
  .nav.open { display: flex; }
  .nav a { font-size: 1.05rem; padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .nav a.active::after { display: none; }
}

main { padding-top: 40px; padding-bottom: 88px; min-height: 60vh; }
main:focus { outline: none; }

/* stopka */
.site-footer { background: var(--bg-alt); color: var(--muted); font-size: .8rem; line-height: 1.55; }
.site-footer .wrap { padding-top: 22px; padding-bottom: 28px; }
.site-footer p { max-width: none; }
.site-footer .motto { color: var(--ink-2); font-size: .95rem; border-bottom: 1px solid var(--rule-strong); padding-bottom: 14px; margin-bottom: 14px; }

/* hero */
.hero { text-align: center; padding: clamp(24px, 6vw, 72px) 0 clamp(32px, 5vw, 56px); }
.hero .eyebrow { justify-content: center; }
.hero h1 { font-size: clamp(2.6rem, 7.5vw, 5rem); line-height: 1.04; margin: .3em auto .3em; max-width: 14ch; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero .lede { margin: 0 auto; text-align: center; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; gap: 6px; font-size: 1.05rem; font-weight: 400; text-decoration: none !important; transition: opacity .2s var(--ease); }
.btn-primary { background: var(--red); color: #fff !important; padding: 11px 22px; border-radius: 99px; }
.btn-primary:hover { opacity: .88; }
.btn-ghost { color: var(--red-ink) !important; padding: 11px 0; }
.btn-ghost::after { content: "›"; font-size: 1.25em; line-height: 0; margin-left: 2px; }
.btn-ghost:hover { text-decoration: underline !important; }

.quote { text-align: center; padding: clamp(40px, 7vw, 80px) 22px; margin: 8px 0 0; background: var(--bg-alt); border-radius: var(--radius); }
.quote blockquote { margin: 0 auto; max-width: 30ch; font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1.3; font-weight: 600; letter-spacing: -.025em; color: var(--ink); text-wrap: balance; }
.quote figcaption { margin-top: 16px; font-size: .88rem; color: var(--muted); }

/* bloki */
.lede { font-size: clamp(1.1rem, 2vw, 1.35rem); line-height: 1.45; color: var(--muted); max-width: 40em; letter-spacing: -.015em; font-weight: 400; }
.card { background: var(--bg-alt); border-radius: var(--radius); padding: 24px 28px; }
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stats { margin-top: 20px; }
.stat-card { text-align: left; }
.stat { font-size: clamp(2.4rem, 5vw, 3.2rem); font-weight: 700; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat-label { font-size: .9rem; color: var(--muted); margin-top: 10px; }
.notice { background: var(--bg-alt); padding: 18px 22px; border-radius: var(--radius-sm); margin: 24px 0; max-width: none; }
.notice.info { background: var(--bg-alt); }
.notice p:last-child { margin-bottom: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 600; color: var(--red-ink); margin: 0; letter-spacing: -.005em; }
.eyebrow::before { content: ""; width: 16px; height: 11px; border-radius: 2px; background: linear-gradient(to bottom, var(--white-flag) 0 50%, var(--red) 50% 100%); box-shadow: 0 0 0 1px var(--rule-strong); flex: none; }
.eyebrow a { color: inherit; }
.footnotes .eyebrow::before { display: none; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 3.5rem 0 1rem; }
.section-title h2 { margin: 0; }
.section-title a { font-size: 1rem; }
.section-title a::after { content: " ›"; }
.page-lede { margin-bottom: 28px; }

/* plan 15 miejsc */
.seats { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
@media (max-width: 820px) { .seats { grid-template-columns: 1fr; } }
.seat-svg { width: 100%; height: auto; display: block; max-width: 520px; margin: 0 auto; }
.seat-svg.legend-dot { width: 12px; height: 12px; display: inline-block; margin: 0; flex: none; }
.seat-svg.legend-dot circle { stroke: none; }
.seat-svg circle { stroke: var(--bg-alt); stroke-width: 3; transition: transform .2s var(--ease); transform-box: fill-box; transform-origin: center; }
.seat-svg a:hover circle, .seat-svg a:focus circle { transform: scale(1.12); }
.seat-svg .s-current { fill: var(--st-current); }
.seat-svg .s-disputed { fill: var(--st-disputed); }
.seat-svg .s-former { fill: var(--muted); }
.seat-svg .s-unsworn { fill: var(--st-unsworn); }
.seat-svg .s-vacant { fill: none; stroke: var(--rule-strong); stroke-dasharray: 4 3; stroke-width: 2; }
.seat-svg text { font: 600 12px var(--font); fill: var(--bg-alt); pointer-events: none; }
.seat-svg text.s-vacant-t { fill: var(--muted); }
.seat-svg .bench { fill: none; stroke: var(--rule-strong); stroke-width: 1; }
.seat-svg .center-t { font: 700 40px var(--font); fill: var(--ink); letter-spacing: -.04em; }
.seat-svg .center-s { font: 400 12px var(--font); fill: var(--muted); }
.seat-list { list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.leadership { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin: 8px 0 8px; }
.leadership .card h3 { margin-top: 4px; }
.seat-list li { display: flex; gap: 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.seat-list li:last-child { border-bottom: 0; }
.seat-list .no { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .8rem; width: 1.6em; flex: none; text-align: right; }

/* status */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 500; white-space: nowrap; vertical-align: middle; letter-spacing: -.005em; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.st-current { color: var(--st-current); }
.st-former { color: var(--st-former); }
.st-disputed { color: var(--st-disputed); }
.st-unsworn { color: var(--st-unsworn); }
.tag { display: inline-block; font-size: .76rem; font-weight: 500; padding: 2px 10px; border-radius: 99px; background: var(--bg-alt); color: var(--ink-2); margin: 0 4px 4px 0; }
.law { display: block; margin-top: 4px; font-size: .84rem; color: var(--muted); }
.law::before { content: "§ "; color: var(--red-ink); font-weight: 600; }

/* filtry */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0 24px; }
.filters input[type=search], .filters select {
  font: inherit; font-size: .95rem; padding: 10px 16px; border: 0; border-radius: 12px;
  background: var(--bg-alt); color: var(--ink); min-width: 0; -webkit-appearance: none; appearance: none;
}
.filters select { padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.filters input[type=search] { flex: 1 1 280px; }
.filters input[type=search]:focus, .filters select:focus { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 35%, transparent); }
.segmented { display: inline-flex; flex-wrap: wrap; background: var(--bg-alt); border-radius: 10px; padding: 3px; gap: 2px; }
.chip { font: inherit; font-size: .86rem; font-weight: 500; padding: 6px 14px; border-radius: 8px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease); }
.chip:hover { color: var(--ink); }
.chip[aria-pressed=true] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04); }
@media (prefers-color-scheme: dark) { .chip[aria-pressed=true] { background: #3a3a3c; } }
.count { font-size: .86rem; color: var(--muted); margin-left: 6px; font-variant-numeric: tabular-nums; }

/* lista osób */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.person { display: block; color: inherit; background: var(--bg-alt); border-radius: var(--radius); padding: 22px 24px; transition: transform .25s var(--ease), background .25s var(--ease); text-decoration: none !important; }
.person:hover { transform: scale(1.015); color: inherit; }
.person h3 { margin: 0 0 6px; font-size: 1.15rem; }
.person .meta { font-size: .86rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-top: 4px; }
.person .sum { font-size: .9rem; color: var(--ink-2); margin: 12px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.person .more { display: inline-block; margin-top: 12px; font-size: .9rem; color: var(--red-ink); }
.person .more::after { content: " ›"; }

/* profil */
.profile-hero { padding: 8px 0 12px; border-bottom: 1px solid var(--rule); margin-bottom: 8px; }
.profile-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.profile-head h1 { margin: .2em 0 .1em; }
.facts { list-style: none; padding: 0; margin: 0; }
.facts li { padding: 14px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 20px; }
.facts li:last-child { border-bottom: 0; }
.facts .k { color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; padding-top: 1px; }
.facts .v { max-width: var(--measure); }
@media (max-width: 640px) { .facts li { grid-template-columns: 1fr; gap: 2px; } }
.section { margin-top: 48px; }
.section > h2 { margin: 0 0 8px; font-size: 1.45rem; }
.legal { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.legal:last-child { border-bottom: 0; }
.legal .by { font-weight: 600; font-size: .86rem; color: var(--ink); margin-bottom: 4px; }
.legal .by span { color: var(--muted); font-weight: 400; }

/* przypisy */
sup.cite { font-size: .66em; line-height: 0; margin-left: 2px; white-space: nowrap; }
sup.cite a { padding: 0 2px; font-weight: 600; color: var(--red-ink); font-variant-numeric: tabular-nums; }
.footnotes { font-size: .84rem; color: var(--ink-2); margin-top: 64px; border-top: 1px solid var(--rule-strong); padding-top: 14px; }
.footnotes h2 { font-size: .84rem; font-weight: 600; color: var(--muted); margin: 0 0 8px; letter-spacing: 0; }
.footnotes ol { padding-left: 2.2em; margin: 0; }
.footnotes li { margin: 6px 0; word-break: break-word; padding: 2px 6px; border-radius: 6px; transition: background .4s var(--ease); }
.footnotes li.hl { background: var(--red-soft); }
.src-type { font-size: .72rem; color: var(--muted); margin-left: 6px; white-space: nowrap; }
.src-type::before { content: "· "; }
.nosrc { color: var(--st-disputed); font-size: .76rem; font-weight: 600; }

/* oś czasu */
.tl { list-style: none; padding: 0; margin: 0; }
.tl li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 28px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.tl .d { font-variant-numeric: tabular-nums; font-size: .88rem; color: var(--muted); padding-top: 2px; }
.tl h3 { margin: 0 0 4px; font-size: 1.08rem; }
.tl p { margin: 0 0 6px; color: var(--ink-2); }
.tl .year { grid-column: 1 / -1; font-weight: 700; font-size: 2rem; letter-spacing: -.04em; padding-top: 32px; color: var(--ink); }
.tl li.year-row { border-bottom: 0; padding-bottom: 0; }
@media (max-width: 640px) { .tl li { grid-template-columns: 1fr; gap: 2px; } }

/* tabele */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .94rem; }
th, td { text-align: left; padding: 14px 14px 14px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 600; font-size: .8rem; color: var(--muted); border-bottom-color: var(--rule-strong); }
tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* podstawy prawne */
.act { padding: 28px 0; border-bottom: 1px solid var(--rule); }
.act:last-child { border-bottom: 0; }
.act h3 { font-size: 1.25rem; margin: 6px 0 4px; }
.act .meta { font-size: .88rem; color: var(--muted); }
.provision { margin: 16px 0 0; padding: 14px 18px; background: var(--bg-alt); border-radius: var(--radius-sm); max-width: 78ch; }
.provision b { display: block; font-size: .82rem; font-weight: 600; color: var(--red-ink); margin-bottom: 4px; }
.provision q { quotes: "„" "”"; color: var(--ink); }
.status-pill { font-size: .78rem; font-weight: 600; }
.status-pill.in-force { color: var(--st-current); }
.status-pill.repealed { color: var(--muted); }

/* wykres kadencji */
.gantt-wrap { overflow-x: auto; background: var(--bg-alt); border-radius: var(--radius); padding: 12px 0; }
.gantt text { font-family: var(--font); fill: var(--ink-2); font-size: 11px; }
.gantt .axis line { stroke: var(--rule-strong); stroke-width: .5; }
.gantt .row:hover rect.bg { fill: color-mix(in srgb, var(--red) 8%, transparent); }
.gantt a, .seat-svg a { text-decoration: none !important; }
.gantt a:hover text { fill: var(--red-ink); }
/* paleta kategorialna (zwalidowana pod kątem daltonizmu: tryb jasny i ciemny osobno) */
:root { --p1: #2a78d6; --p2: #eb6834; --p3: #1baf7a; --p4: #eda100; --p5: #e87ba4; --p6: #008300; --p7: #6250d6; --p8: #e34948; --p0: #c7c7cc; --hatch: #1d1d1f; --unsworn: #6250d6; }
@media (prefers-color-scheme: dark) {
  :root { --p1: #3987e5; --p2: #d95926; --p3: #199e70; --p4: #c98500; --p5: #d55181; --p6: #008300; --p7: #9085e9; --p8: #e66767; --p0: #48484a; --hatch: #f5f5f7; --unsworn: #9085e9; }
}
.pf-p1 { fill: var(--p1); } .pf-p2 { fill: var(--p2); } .pf-p3 { fill: var(--p3); } .pf-p4 { fill: var(--p4); }
.pf-p5 { fill: var(--p5); } .pf-p6 { fill: var(--p6); } .pf-p7 { fill: var(--p7); } .pf-p8 { fill: var(--p8); }
.pf-p0 { fill: var(--p0); }
.g-hatch { stroke: var(--hatch); opacity: .55; }
.g-unsworn { fill: none; stroke: var(--unsworn); stroke-dasharray: 3 2; stroke-width: 1.5; }
.gantt text.g-lab { font-size: 9.5px; fill: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .86rem; color: var(--ink-2); margin: 14px 0 18px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }

/* powiązania */
.net { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.net-group { background: var(--bg-alt); border-radius: var(--radius); padding: 22px 24px; }
.net-group h3 { margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.net-sejm { margin: 10px 0; font-size: .92rem; }
.net-sejm b { font-weight: 500; color: var(--muted); font-size: .82rem; display: block; }

.org-notes { grid-column: 1 / -1; }
.org-notes .footnotes { margin-top: 8px; }
.loading { color: var(--muted); }
.empty { padding: 40px; text-align: center; color: var(--muted); background: var(--bg-alt); border-radius: var(--radius); max-width: none; }

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

/* ---------- animacje ----------
   Spokojne i krótkie; całkowicie wyłączane przy „ograniczeniu ruchu” w systemie. */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { opacity: 0; transform: scale(.4); } 70% { opacity: 1; transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes wave { from { background-position: 0 0; } to { background-position: 200% 0; } }

main.page-enter { animation: fade .35s var(--ease) both; }
.hero .eyebrow, .hero h1, .hero .lede, .hero .cta { animation: rise .9s cubic-bezier(.16, 1, .3, 1) both; }
.hero h1 { animation-delay: .08s; }
.hero .lede { animation-delay: .2s; }
.hero .cta { animation-delay: .32s; }
.hero h1 em { background: linear-gradient(90deg, var(--red), color-mix(in srgb, var(--red) 55%, #ff9aa8), var(--red)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: wave 6s linear infinite; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s cubic-bezier(.16, 1, .3, 1), transform .8s cubic-bezier(.16, 1, .3, 1); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

.seat-svg .seat { animation: pop .55s cubic-bezier(.34, 1.56, .64, 1) both; animation-play-state: paused; transform-box: fill-box; transform-origin: center; }
.seat-svg.in .seat { animation-play-state: running; }
.gantt .bar { transform-box: fill-box; transform-origin: left center; animation: grow .9s cubic-bezier(.16, 1, .3, 1) both; }
.flag-band { background-size: 100% 100%; }
.site-header { transition: box-shadow .3s var(--ease), background .3s var(--ease); }
.site-header.scrolled { box-shadow: 0 1px 0 var(--rule), 0 8px 24px -16px rgba(0,0,0,.25); }
.person, .net-group, .card { will-change: transform; }

/* przejście kolorem przy najechaniu na wiersz osi czasu i fakty */
.tl li, .facts li { transition: background .25s var(--ease); }
.tl li:hover, .facts li:hover { background: color-mix(in srgb, var(--bg-alt) 70%, transparent); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .hero h1 em { color: var(--red); background: none; }
}

/* wykres publikacji */
.chart-box { position: relative; padding: 16px 12px 8px; }
.pubchart { width: 100%; height: auto; display: block; }
.pubchart .grid { stroke: var(--rule); }
.pubchart .base { stroke: var(--rule-strong); }
.pubchart .ax { fill: var(--muted); font: 11px var(--font); }
.pubchart .lab { fill: var(--ink-2); font: 600 11px var(--font); }
.pubchart .hit { fill: transparent; }
.pubchart .hit:hover { fill: var(--ink); fill-opacity: .05; }
.pubchart .bar { transform-box: fill-box; transform-origin: bottom; animation: rise-bar .9s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes rise-bar { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.chart-tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); font-size: .8rem; padding: 5px 10px; border-radius: 8px; opacity: 0; transition: opacity .15s; white-space: nowrap; }
.chart-tip.on { opacity: 1; }
.stat-text { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.tag-warn { color: var(--st-disputed); background: color-mix(in srgb, var(--st-disputed) 12%, transparent); text-decoration: none !important; }
details summary { cursor: pointer; color: var(--muted); margin: 10px 0; }
@media (prefers-reduced-motion: reduce) { .pubchart .bar { animation: none; } }

/* kadencje obecnego składu */
.termchart { width: 100%; min-width: 600px; height: auto; display: block; }
.termchart .grid { stroke: var(--rule); stroke-width: .5; }
.termchart .ax { fill: var(--muted); font: 11px var(--font); }
.termchart .nm { fill: var(--ink-2); font: 12px var(--font); }
.termchart .end { fill: var(--ink); font: 600 11px var(--font); font-variant-numeric: tabular-nums; }
.termchart .today { stroke: var(--red); stroke-width: 1.5; stroke-dasharray: 3 3; }
.termchart .today-t { fill: var(--red-ink); font: 600 11px var(--font); }
.termchart .s-current { fill: var(--st-current); }
.termchart .s-disputed { fill: var(--st-disputed); }
.tb-derived { fill: color-mix(in srgb, var(--st-unsworn) 18%, transparent); stroke: var(--st-unsworn); stroke-width: 1.5; stroke-dasharray: 4 3; }
.termchart a { text-decoration: none !important; }
.termchart a:hover .nm { fill: var(--red-ink); }
.termchart .bar { transform-box: fill-box; transform-origin: left center; animation: grow .9s cubic-bezier(.16, 1, .3, 1) both; }
.term-note { margin-top: 20px; }
@media (prefers-reduced-motion: reduce) { .termchart .bar { animation: none; } }

/* statystyki odwiedzin */
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.rank { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.rank li { counter-increment: r; display: grid; grid-template-columns: 1.6em minmax(0, 1fr) 30% 3.5em; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: .94rem; }
.rank li::before { content: counter(r) "."; color: var(--muted); font-size: .8rem; text-align: right; font-variant-numeric: tabular-nums; }
.rank li a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-bar { height: 8px; background: var(--bg-alt); border-radius: 4px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; width: 0; background: var(--p1); border-radius: 4px; transition: width .9s cubic-bezier(.16, 1, .3, 1); }
.rank .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.footer-links a { margin-right: 14px; }
