/* ============================================================
   SIEDEM KRĘGÓW ZBRODNI — system designu
   Archiwalny dark mode: czerń, grafit, przygaszona biel,
   stonowana czerwień i sepia. Paleta ciemnieje ku jądru (tier 1).
   ============================================================ */

:root {
  --bg0: #0a0a0c;
  --bg1: #101013;
  --panel: #14141a;
  --panel2: #191922;
  --line: #262630;
  --line-soft: #1d1d25;
  --ink: #e9e4d8;
  --ink-dim: #c6bfb1;
  --muted: #8d867a;
  --faint: #5f5a51;
  --red: #9c3a33;
  --red-bright: #c05248;
  --sepia: #b08d57;
  --sepia-dim: #8a6f45;
  --accent: var(--sepia);
  /* akcent per tier: 1 = najgłębsza czerwień, 7 = sepia */
  --t1: #a12f2c; --t2: #953a33; --t3: #8d4438; --t4: #8c503d;
  --t5: #8b5f45; --t6: #8a6f50; --t7: #8a7a5f;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --maxw: 1140px;
  --radius: 10px;
}
body[data-tier="1"] { --accent: var(--t1); --bg0: #070607; --bg1: #0c0a0b; }
body[data-tier="2"] { --accent: var(--t2); --bg0: #080708; --bg1: #0d0b0c; }
body[data-tier="3"] { --accent: var(--t3); --bg0: #090808; }
body[data-tier="4"] { --accent: var(--t4); }
body[data-tier="5"] { --accent: var(--t5); }
body[data-tier="6"] { --accent: var(--t6); }
body[data-tier="7"] { --accent: var(--t7); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background:
    radial-gradient(1200px 700px at 50% -200px, rgba(176, 141, 87, 0.05), transparent 60%),
    radial-gradient(1000px 800px at 50% 115%, rgba(156, 58, 51, 0.06), transparent 55%),
    var(--bg0);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

h1, h2, h3, .brand-text strong { font-family: var(--font-display); font-weight: 600; letter-spacing: 0.01em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); line-height: 1.15; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); margin-bottom: 0.6em; }
h3 { font-size: 1.12rem; }
p { margin-bottom: 1em; }
a { color: var(--ink-dim); text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--ink); text-decoration-color: var(--accent); }
img { max-width: 100%; display: block; }
::selection { background: color-mix(in srgb, var(--red) 45%, black); color: var(--ink); }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--red); color: #fff; padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- nagłówek ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg0) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  grid-template-areas:
    "brand primary"
    "brand tools";
  column-gap: 22px;
  row-gap: 3px;
  min-height: 78px;
  padding-block: 7px;
}
.brand {
  grid-area: brand;
  align-self: center;
  display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex-shrink: 0;
}
.brand-mark {
  width: 38px; height: 38px; border: 1px solid var(--accent); color: var(--accent);
  display: grid; place-items: center; font-family: var(--font-display);
  font-size: 0.95rem; letter-spacing: 0.05em; border-radius: 50%;
  background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.02rem; }
.brand-text small { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.09em; text-transform: uppercase; }
.site-nav {
  grid-area: primary;
  display: flex; align-items: center; justify-content: flex-end; gap: 4px;
  max-width: 100%; margin-left: auto; overflow-x: auto; scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  color: var(--ink-dim); text-decoration: none; font-size: 0.92rem;
  padding: 8px 11px; border-radius: 7px; white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); background: var(--panel2); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--panel2); box-shadow: inset 0 -2px 0 var(--accent); }
.header-tools {
  grid-area: tools;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--line-soft);
  padding-top: 4px;
}
.language-nav { flex: 0 0 auto; display: flex; align-items: center; gap: 3px; }
.search-btn {
  flex: 0 1 340px;
  min-width: 0;
  max-width: 340px;
  display: inline-flex; align-items: center; justify-content: flex-start; gap: 9px;
  background: var(--panel); color: var(--muted); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 11px; font: inherit; font-size: 0.88rem; cursor: pointer;
  white-space: nowrap;
}
.search-btn:hover,
.search-btn:focus-visible { color: var(--ink); border-color: var(--faint); background: var(--panel2); }
.search-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.search-btn__icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}
.search-btn__label { flex: 1 1 auto; overflow: hidden; text-align: left; text-overflow: ellipsis; }
.search-btn kbd {
  flex: 0 0 auto; font-family: inherit; font-size: 0.75rem; border: 1px solid var(--line);
  border-radius: 4px; padding: 0 6px; color: var(--faint);
}

/* ---------- stopka ---------- */
.site-footer { border-top: 1px solid var(--line-soft); margin-top: 70px; padding: 34px 0 44px; background: var(--bg1); }
.site-footer .wrap { display: grid; gap: 10px; }
.footer-nota { color: var(--ink-dim); font-size: 0.92rem; max-width: 70ch; }
.footer-memorial { font-family: var(--font-display); color: var(--sepia); font-size: 1.02rem; }
.footer-links { color: var(--muted); font-size: 0.87rem; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--ink); }

/* ---------- hero (strona główna) ---------- */
.hero { padding: 72px 0 30px; text-align: center; }
.hero .kicker { color: var(--accent); letter-spacing: 0.22em; text-transform: uppercase; font-size: 0.78rem; margin-bottom: 14px; }
.hero h1 { max-width: 17ch; margin: 0 auto 18px; }
.hero .lede { color: var(--ink-dim); max-width: 62ch; margin: 0 auto 22px; font-size: 1.06rem; }
.hero-stats { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; color: var(--muted); font-size: 0.9rem; letter-spacing: 0.04em; }
.hero-stats strong { color: var(--ink); font-family: var(--font-display); font-size: 1.25rem; display: block; }
.nota-chip {
  display: inline-block; margin-top: 26px; padding: 9px 16px; border: 1px solid var(--line);
  border-radius: 100px; color: var(--muted); font-size: 0.83rem; background: var(--panel);
}

/* ---------- diagram kręgów ---------- */
.rings-section { padding: 40px 0 10px; }
.rings-layout { display: grid; grid-template-columns: minmax(320px, 640px) minmax(300px, 1fr); gap: 42px; align-items: center; }
#rings { width: 100%; height: auto; }
#rings a.ring { outline: none; }
#rings a.ring circle { fill: none; stroke-width: 36; transition: opacity 0.25s ease, filter 0.25s ease, stroke-width 0.25s ease; cursor: pointer; }
#rings a.ring[data-tier="7"] circle { stroke: #6e685e; }
#rings a.ring[data-tier="6"] circle { stroke: #615a52; }
#rings a.ring[data-tier="5"] circle { stroke: #554d47; }
#rings a.ring[data-tier="4"] circle { stroke: #49413d; }
#rings a.ring[data-tier="3"] circle { stroke: #3e3434; }
#rings a.ring[data-tier="2"] circle { stroke: #34272b; }
#rings a.ring:hover circle, #rings a.ring:focus-visible circle { filter: brightness(1.45); stroke-width: 40; }
#rings a.ring:focus-visible circle {
  filter: brightness(1.8) drop-shadow(0 0 7px color-mix(in srgb, var(--accent) 78%, transparent));
  stroke-width: 43;
}
#rings a.ring.dim circle { opacity: 0.38; }
#rings .core-disc { fill: url(#core-glow); stroke: #4a2226; stroke-width: 1.5; transition: filter 0.25s ease; cursor: pointer; }
#rings a.ring:hover .core-disc, #rings a.ring:focus-visible .core-disc { filter: brightness(1.6); }
#rings a.ring:focus-visible .core-disc {
  filter: brightness(1.9) drop-shadow(0 0 7px color-mix(in srgb, var(--accent) 78%, transparent));
}
#rings .ring-num { font-family: var(--font-display); font-size: 21px; fill: #98917f; letter-spacing: 0.1em; text-anchor: middle; pointer-events: none; }
#rings .core-num { font-family: var(--font-display); font-size: 30px; fill: #b98a83; text-anchor: middle; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  #rings a.ring circle, #rings .core-disc { transform-origin: 360px 360px; animation: ring-in 0.9s ease both; }
  #rings a.ring[data-tier="7"] circle { animation-delay: 0.05s; }
  #rings a.ring[data-tier="6"] circle { animation-delay: 0.13s; }
  #rings a.ring[data-tier="5"] circle { animation-delay: 0.21s; }
  #rings a.ring[data-tier="4"] circle { animation-delay: 0.29s; }
  #rings a.ring[data-tier="3"] circle { animation-delay: 0.37s; }
  #rings a.ring[data-tier="2"] circle { animation-delay: 0.45s; }
  #rings .core-disc { animation-delay: 0.55s; }
  @keyframes ring-in { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: scale(1); } }
}

.ring-list { list-style: none; display: grid; gap: 6px; }
.ring-list a {
  display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center;
  padding: 11px 14px; border: 1px solid transparent; border-radius: var(--radius);
  text-decoration: none; color: var(--ink-dim); transition: background 0.2s ease, border-color 0.2s ease;
}
.ring-list a:hover, .ring-list li.active a { background: var(--panel); border-color: var(--line); color: var(--ink); }
.ring-list a:focus-visible {
  background: var(--panel2);
  border-color: color-mix(in srgb, var(--accent) 72%, var(--line));
  color: var(--ink);
  outline: 3px solid color-mix(in srgb, var(--accent) 76%, white);
  outline-offset: 2px;
}
.ri-roman {
  font-family: var(--font-display); font-size: 1.25rem; color: var(--muted);
  border-right: 1px solid var(--line-soft); text-align: center; padding-right: 12px;
}
.ring-list li.active .ri-roman, .ring-list a:hover .ri-roman, .ring-list a:focus-visible .ri-roman { color: var(--accent-list, var(--sepia)); }
.ring-list li[data-tier="1"] { --accent-list: var(--t1); }
.ring-list li[data-tier="2"] { --accent-list: var(--t2); }
.ring-list li[data-tier="3"] { --accent-list: var(--t3); }
.ring-list li[data-tier="4"] { --accent-list: var(--t4); }
.ring-list li[data-tier="5"] { --accent-list: var(--t5); }
.ring-list li[data-tier="6"] { --accent-list: var(--t6); }
.ring-list li[data-tier="7"] { --accent-list: var(--t7); }
.ring-list strong { display: block; font-family: var(--font-display); font-weight: 600; }
.ring-list small { color: var(--muted); font-size: 0.82rem; }

/* ---------- sekcje ogólne ---------- */
.section { padding: 56px 0 8px; }
.section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 24px; }
.section-head .rule { flex: 1; height: 1px; background: var(--line-soft); }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.link-card {
  display: block; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 20px 18px; text-decoration: none; color: var(--ink-dim);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.link-card:hover { transform: translateY(-2px); border-color: var(--faint); color: var(--ink); }
.link-card h3 { color: var(--ink); margin-bottom: 6px; }
.link-card p { color: var(--muted); font-size: 0.9rem; margin: 0; }

[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-reveal].visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }

/* ---------- strona kręgu ---------- */
.tier-head { padding: 58px 0 30px; border-bottom: 1px solid var(--line-soft); background:
  radial-gradient(700px 340px at 50% -80px, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%); }
.tier-eyebrow { display: flex; align-items: center; gap: 14px; color: var(--accent); letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.78rem; margin-bottom: 12px; }
.tier-eyebrow .tier-ring-ico { width: 30px; height: 30px; border: 1px solid var(--accent); border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-size: 0.85rem; letter-spacing: 0; }
.tier-head h1 { margin-bottom: 10px; }
.tier-criterion { color: var(--ink-dim); max-width: 70ch; font-size: 1.04rem; }
.tier-desc { color: var(--muted); max-width: 76ch; margin-top: 14px; }
.tier-nav { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.tier-nav a {
  font-size: 0.85rem; color: var(--muted); text-decoration: none;
  border: 1px solid var(--line); border-radius: 100px; padding: 6px 14px;
}
.tier-nav a:hover { color: var(--ink); border-color: var(--faint); }
.tier-nav a.current { color: var(--accent); border-color: var(--accent); }

.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding: 26px 0 6px; }
.filters input[type="search"], .filters select {
  background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  border-radius: 8px; padding: 9px 13px; font: inherit; font-size: 0.92rem; min-width: 220px;
}
.filters .count { color: var(--muted); font-size: 0.88rem; margin-left: auto; }

.persona-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; padding: 22px 0; }
.persona-card {
  display: grid; grid-template-columns: 84px 1fr; gap: 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; text-decoration: none; color: var(--ink-dim);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.persona-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: var(--panel2); }
.card-thumb { width: 84px; height: 106px; border-radius: 6px; overflow: hidden; position: relative; background: var(--bg1); border: 1px solid var(--line-soft); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) sepia(0.14) contrast(1.02) brightness(0.92); }
.card-thumb .monogram { position: absolute; inset: 0; display: none; place-items: center; font-family: var(--font-display); font-size: 1.5rem; color: var(--faint); background: radial-gradient(circle at 50% 35%, var(--panel2), var(--bg1)); }
.card-thumb.img-failed img, .card-thumb.no-img img { display: none; }
.card-thumb.img-failed .monogram, .card-thumb.no-img .monogram { display: grid; }
.persona-card h3 { color: var(--ink); font-size: 1.06rem; margin-bottom: 2px; }
.persona-card .years { color: var(--faint); font-size: 0.82rem; letter-spacing: 0.04em; }
.persona-card .role { color: var(--muted); font-size: 0.88rem; margin: 6px 0 10px; line-height: 1.45; }

.badge {
  display: inline-block; font-size: 0.74rem; letter-spacing: 0.05em;
  border: 1px solid var(--line); border-radius: 100px; padding: 3px 10px; color: var(--muted);
}
.badge[data-verdict="stracony"] { color: #c9847c; border-color: #59322f; }
.badge[data-verdict="samobojstwo"] { color: #b39a6f; border-color: #55462e; }
.badge[data-verdict="wiezienie"] { color: #9aa38a; border-color: #3e4436; }
.badge[data-verdict="uniknal"] { color: #a08e9c; border-color: #473d45; }
.badge[data-verdict="uniewinniony"] { color: #b7a68c; border-color: #5b4d3a; }
.badge[data-verdict="zmarl_przed_rozliczeniem"] { color: #8f9aa8; border-color: #38414d; }
.badge[data-verdict="zginal"] { color: #8f9aa8; border-color: #38414d; }
.badge[data-verdict="nieznany"] { color: #8d867a; border-color: var(--line); }

/* ---------- profil postaci ---------- */
.breadcrumbs { padding: 20px 0 0; color: var(--faint); font-size: 0.85rem; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumbs span[aria-hidden] { margin: 0 7px; }

.profile-grid { display: grid; grid-template-columns: 320px 1fr; gap: 42px; padding: 28px 0 20px; align-items: start; }
.dossier { position: sticky; top: 84px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.portrait-frame { position: relative; aspect-ratio: 3 / 3.8; background: var(--bg1); border-bottom: 1px solid var(--line-soft); }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: top; filter: grayscale(1) sepia(0.16) contrast(1.03) brightness(0.9); }
.portrait-frame .monogram { position: absolute; inset: 0; display: none; place-items: center; font-family: var(--font-display); font-size: 3.4rem; letter-spacing: 0.08em; color: var(--faint); background: radial-gradient(circle at 50% 32%, var(--panel2), var(--bg1)); }
.portrait-frame.img-failed img, .portrait-frame.no-img img { display: none; }
.portrait-frame.img-failed .monogram, .portrait-frame.no-img .monogram { display: grid; }
.portrait-credit { padding: 8px 14px; color: var(--faint); font-size: 0.72rem; line-height: 1.45; border-bottom: 1px solid var(--line-soft); }
.portrait-credit a { color: var(--faint); }
.dossier dl { display: grid; grid-template-columns: 1fr; }
.dossier .meta-row { display: grid; grid-template-columns: 118px 1fr; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line-soft); font-size: 0.86rem; }
.dossier .meta-row:last-child { border-bottom: none; }
.dossier dt { color: var(--faint); }
.dossier dd { color: var(--ink-dim); }
.chip-tier {
  display: inline-flex; align-items: center; gap: 9px; margin: 14px; padding: 7px 14px;
  border: 1px solid var(--accent); border-radius: 100px; color: var(--accent);
  font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
}
.chip-tier:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }

.profile-main .status-strip { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0 20px; }
.profile-main .lead { font-size: 1.12rem; color: var(--ink-dim); font-family: var(--font-display); line-height: 1.6; margin-bottom: 26px; }
.profile-main section { margin-bottom: 34px; }
.profile-main h2 { display: flex; align-items: baseline; gap: 14px; }
.profile-main h2::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.crime-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.crime-tags .tag { font-size: 0.78rem; color: var(--ink-dim); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; }

.stat-box { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; padding: 16px 18px; margin: 18px 0; }
.stat-box .big { font-family: var(--font-display); font-size: 1.5rem; color: var(--ink); }
.stat-box .note { color: var(--muted); font-size: 0.84rem; margin-top: 6px; }
.uncertainty { border-left-color: var(--sepia-dim); }
.uncertainty .note { margin-top: 0; }

.sources-list { list-style: none; display: grid; gap: 8px; }
.sources-list li { padding-left: 20px; position: relative; font-size: 0.94rem; color: var(--ink-dim); }
.sources-list li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }

.related { border-top: 1px solid var(--line-soft); padding: 26px 0 10px; }
.related-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; }
.related-list a {
  display: inline-block; text-decoration: none; color: var(--ink-dim); font-size: 0.88rem;
  border: 1px solid var(--line); border-radius: 100px; padding: 7px 15px;
}
.related-list a:hover { color: var(--ink); border-color: var(--accent); }
.connections .conn-group { margin: 14px 0 0; }
.connections .conn-group:first-of-type { margin-top: 4px; }
.connections .conn-label {
  display: block; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--faint); margin-bottom: 8px;
}
.connections .related-list { margin: 0; }
.connections .conn-more { margin: 20px 0 0; font-size: 0.9rem; }
.connections .conn-more a { color: var(--accent); text-decoration: none; }
.connections .conn-more a:hover { text-decoration: underline; }

/* ---------- graf sieci ---------- */
.graph-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 8px auto 14px; }
.graph-controls input[type="search"] {
  background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  border-radius: 8px; padding: 9px 13px; font: inherit; font-size: 0.92rem; min-width: 240px;
}
.graph-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.graph-chip {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; user-select: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: 100px;
  padding: 6px 12px; font-size: 0.85rem; color: var(--ink-dim);
}
.graph-chip input { accent-color: var(--sepia); }
.graph-chip .dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.graph-btn, #graph-reset {
  background: var(--panel); border: 1px solid var(--line); color: var(--ink-dim);
  border-radius: 8px; padding: 8px 14px; font: inherit; font-size: 0.85rem; cursor: pointer;
}
.graph-btn:hover { color: var(--ink); border-color: var(--faint); }

.graph-stage { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: stretch; }
.graph-canvas-wrap { position: relative; background: var(--bg1); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
#graph-canvas { display: block; width: 100%; height: 560px; cursor: grab; touch-action: none; }
.graph-hint {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  color: var(--muted); font-size: 0.9rem; background: color-mix(in srgb, var(--bg0) 70%, transparent);
  padding: 8px 16px; border-radius: 100px; border: 1px solid var(--line); pointer-events: none; margin: 0;
}
.graph-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; overflow-y: auto; max-height: 560px; }
.graph-panel-empty { color: var(--muted); font-size: 0.9rem; }
.gp-title { color: var(--ink); margin-bottom: 4px; }
.gp-sub { color: var(--muted); font-size: 0.85rem; margin-bottom: 10px; }
.gp-desc { color: var(--ink-dim); font-size: 0.9rem; margin-bottom: 10px; }
.gp-link { display: inline-block; color: var(--accent); text-decoration: none; font-size: 0.9rem; margin-bottom: 12px; }
.gp-link:hover { text-decoration: underline; }
.gp-group { margin-top: 12px; }
.gp-glabel { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); margin-bottom: 6px; }
.gp-group ul { list-style: none; display: grid; gap: 4px; }
.gp-group li { font-size: 0.9rem; color: var(--ink-dim); }
.gp-group em { color: var(--muted); font-style: normal; font-size: 0.82rem; }
.gp-node, .gp-ctx { background: none; border: none; padding: 0; color: var(--ink-dim); cursor: pointer; font: inherit; font-size: 0.9rem; text-align: left; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 50%, transparent); text-underline-offset: 2px; }
.gp-node:hover, .gp-ctx:hover { color: var(--ink); text-decoration-color: var(--accent); }
.gp-ctx { color: var(--sepia); }
.graph-legend { color: var(--muted); font-size: 0.85rem; margin: 12px 0 0; }
.graph-legend .lg { font-weight: 600; }
.graph-textlist h3 { font-family: var(--font-display); color: var(--ink); margin: 22px 0 6px; }
.graph-tl-group { display: grid; grid-template-columns: minmax(160px, 240px) 1fr; gap: 4px 18px; }
.graph-tl-group dt { color: var(--ink-dim); font-weight: 600; font-size: 0.92rem; padding: 5px 0; }
.graph-tl-group dd { color: var(--muted); font-size: 0.9rem; padding: 5px 0; border-bottom: 1px solid var(--line-soft); }
.graph-tl-group dd a { color: var(--ink-dim); }
.graph-tl-group dd a:hover { color: var(--ink); }

@media (max-width: 900px) {
  .graph-stage { grid-template-columns: 1fr; }
  .graph-panel { max-height: none; }
  #graph-canvas { height: 440px; }
  .graph-tl-group { grid-template-columns: 1fr; }
  .graph-tl-group dt { padding-top: 12px; }
}

/* ---------- oś czasu ---------- */
.timeline { position: relative; margin: 30px 0; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 10px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(var(--line), var(--red-dim, #6e2a26), var(--line)); }
.tl-item { position: relative; margin-bottom: 30px; }
.tl-item::before { content: ""; position: absolute; left: -29px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg0); border: 2px solid var(--accent); }
.tl-year { font-family: var(--font-display); font-size: 1.2rem; color: var(--accent); letter-spacing: 0.03em; }
.tl-item h3 { margin: 4px 0 6px; }
.tl-item p { color: var(--ink-dim); font-size: 0.96rem; max-width: 76ch; margin-bottom: 6px; }
.tl-item .tl-links { font-size: 0.85rem; color: var(--muted); }
.tl-item.tl-trial::before { border-color: var(--sepia); }

/* ---------- słownik ---------- */
.glossary dt { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); padding-top: 22px; }
.glossary dd { color: var(--ink-dim); max-width: 78ch; padding: 6px 0 14px; border-bottom: 1px solid var(--line-soft); }
.alpha-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0; }
.alpha-nav a { text-decoration: none; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 3px 10px; font-size: 0.85rem; }
.alpha-nav a:hover { color: var(--ink); border-color: var(--faint); }

/* ---------- pamięć ofiar ---------- */
.memorial-hero { text-align: center; padding: 70px 0 30px; }
.memorial-hero h1 { color: var(--sepia); }
.memorial-hero .lede { color: var(--ink-dim); max-width: 62ch; margin: 16px auto 0; }
.victim-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; margin: 34px 0; }
.victim-card { background: var(--panel); border: 1px solid var(--line); border-top: 2px solid var(--sepia-dim); border-radius: var(--radius); padding: 20px; }
.victim-card .num { font-family: var(--font-display); font-size: 1.6rem; color: var(--sepia); }
.victim-card h3 { margin: 4px 0 8px; }
.victim-card p { color: var(--muted); font-size: 0.9rem; margin: 0; }
.memorial-quote { text-align: center; font-family: var(--font-display); font-size: 1.3rem; color: var(--ink-dim); max-width: 40ch; margin: 50px auto; line-height: 1.7; }
.memorial-quote cite { display: block; font-size: 0.85rem; color: var(--muted); margin-top: 14px; font-style: normal; }

/* ---------- źródła / tabele ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin: 20px 0; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 640px; }
table.data th { text-align: left; background: var(--panel2); color: var(--ink-dim); padding: 10px 14px; border-bottom: 1px solid var(--line); font-weight: 600; }
table.data td { padding: 10px 14px; border-bottom: 1px solid var(--line-soft); color: var(--ink-dim); vertical-align: top; }
table.data tr:last-child td { border-bottom: none; }
.lic-green, table.data td.lic-green { color: #9aa38a; }
.lic-amber, table.data td.lic-amber { color: var(--sepia); }
.lic-red, table.data td.lic-red { color: #c9847c; }

.callout { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--red); border-radius: 8px; padding: 16px 18px; margin: 22px 0; color: var(--ink-dim); font-size: 0.95rem; }
.callout.sepia { border-left-color: var(--sepia); }

/* metodologia — listy dokumentacyjne */
.doc-list { color: var(--ink-dim); max-width: 82ch; margin: 12px 0; padding-left: 22px; }
.doc-list li { margin-bottom: 8px; line-height: 1.6; }
.doc-list .doc-list { margin: 8px 0; }
.callout .doc-list { max-width: none; }
.tier-legend { list-style: none; counter-reset: none; margin: 16px 0; padding: 0; display: grid; gap: 10px; max-width: 82ch; }
.tier-legend li { display: flex; align-items: baseline; gap: 12px; color: var(--ink-dim); line-height: 1.55; }
.tl-roman { flex: 0 0 auto; width: 30px; height: 30px; border: 1px solid var(--accent); border-radius: 50%; display: inline-grid; place-items: center; font-family: var(--font-display); font-size: 0.85rem; color: var(--accent); align-self: center; }
.tl-count { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }

/* ---------- wyszukiwarka ---------- */
.search-overlay {
  position: fixed; inset: 0; z-index: 90; display: none;
  background: color-mix(in srgb, var(--bg0) 78%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: 12vh 18px 0;
}
.search-overlay.open { display: block; }
.search-panel { position: relative; max-width: 620px; margin: 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,0.55); }
.search-panel input {
  width: 100%; background: transparent; border: none; border-bottom: 1px solid var(--line);
  color: var(--ink); font: inherit; font-size: 1.05rem; padding: 17px 58px 17px 20px; outline: none;
}
.search-close {
  position: absolute; z-index: 2; top: 9px; right: 10px;
  width: 38px; height: 38px; border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: var(--muted); font: inherit; font-size: 1.35rem; cursor: pointer;
}
.search-close:hover,
.search-close:focus-visible { border-color: var(--line); background: var(--panel2); color: var(--ink); }
.search-close:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.search-results { list-style: none; max-height: 46vh; overflow-y: auto; }
.search-results li a {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center;
  padding: 11px 18px; text-decoration: none; color: var(--ink-dim);
}
.search-results li a:hover, .search-results li.sel a { background: var(--panel2); color: var(--ink); }
.search-results .sr-roman { font-family: var(--font-display); color: var(--muted); text-align: center; }
.search-results .sr-role { display: block; color: var(--muted); font-size: 0.8rem; }
.search-results .sr-status { color: var(--faint); font-size: 0.78rem; white-space: nowrap; }
.search-empty { padding: 20px; color: var(--muted); text-align: center; font-size: 0.92rem; }
.search-hint { padding: 10px 18px; border-top: 1px solid var(--line-soft); color: var(--faint); font-size: 0.78rem; }

/* ---------- responsywność ---------- */
@media (max-width: 980px) {
  .rings-layout { grid-template-columns: 1fr; gap: 20px; }
  .profile-grid { grid-template-columns: 1fr; }
  .dossier { position: static; max-width: 420px; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .brand-text small { display: none; }
  .hero { padding: 46px 0 20px; }
  .persona-grid { grid-template-columns: 1fr; }
  .dossier .meta-row { grid-template-columns: 104px 1fr; }
}

/* ---------- druk ---------- */
@media print {
  body { background: #fff; color: #111; }
  .site-header, .site-footer, .search-btn, .filters, .related { display: none; }
  a { color: #111; text-decoration: none; }
}

/* ---------- atlas archiwum ---------- */
.archive-hero {
  padding: 58px 0 30px;
  border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(720px 280px at 12% 0%, color-mix(in srgb, var(--sepia) 13%, transparent), transparent 72%),
    linear-gradient(140deg, var(--bg1), var(--bg0));
}
.archive-hero h1 { margin-bottom: 12px; }
.archive-hero .lede { max-width: 72ch; color: var(--ink-dim); }
.archive-section { padding-top: 34px; }
.archive-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.archive-results-status { margin: 0; color: var(--ink-dim); font-family: var(--font-display); font-size: 1.08rem; }
.archive-clear {
  border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--ink-dim);
  padding: 8px 12px; font: inherit; cursor: pointer;
}
.archive-clear:hover:not(:disabled) { color: var(--ink); border-color: var(--faint); }
.archive-clear:disabled { color: var(--faint); cursor: not-allowed; }
.archive-filters {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
}
.archive-search-field { display: grid; gap: 7px; max-width: 620px; }
.archive-search-field label { color: var(--ink-dim); font-size: 0.9rem; }
.archive-search-field input {
  width: 100%; background: var(--bg1); border: 1px solid var(--line); border-radius: 7px;
  color: var(--ink); padding: 10px 12px; font: inherit;
}
.archive-facets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.archive-facet { background: var(--bg1); border: 1px solid var(--line-soft); border-radius: 7px; }
.archive-facet summary {
  display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 11px 12px;
  color: var(--ink); cursor: pointer; list-style: none;
}
.archive-facet summary::-webkit-details-marker { display: none; }
.archive-facet summary::after { content: "+"; color: var(--sepia); font-size: 1.2rem; line-height: 1; order: 2; }
.archive-facet[open] summary::after { content: "−"; }
.archive-facet-label { font-weight: 600; }
.archive-facet-summary { margin-left: auto; color: var(--muted); font-size: 0.8rem; }
.archive-facet fieldset { margin: 0; border: 0; border-top: 1px solid var(--line-soft); padding: 10px 12px 12px; }
.archive-facet-options { display: grid; gap: 7px; max-height: 264px; overflow: auto; padding-right: 4px; }
.archive-option { display: flex; align-items: start; gap: 9px; }
.archive-option input { margin: 4px 0 0; accent-color: var(--sepia); }
.archive-option label { display: flex; justify-content: space-between; gap: 10px; width: 100%; color: var(--ink-dim); cursor: pointer; font-size: 0.87rem; line-height: 1.35; }
.archive-option small { color: var(--faint); white-space: nowrap; }
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; list-style: none; margin: 24px 0 0; padding: 0; }
.archive-card {
  display: flex; flex-direction: column; height: 100%; background: var(--panel); border: 1px solid var(--line);
  border-top: 2px solid color-mix(in srgb, var(--sepia) 60%, var(--line)); border-radius: var(--radius); padding: 18px;
}
.archive-card-title { margin: 0 0 5px; color: var(--ink); font-size: 1.18rem; }
.archive-card-circle { color: var(--sepia); font-size: 0.84rem; margin: 0 0 16px; }
.archive-card-details { display: grid; gap: 9px; margin: 0; }
.archive-card-field { display: grid; grid-template-columns: 116px 1fr; gap: 10px; }
.archive-card-field dt { color: var(--muted); font-size: 0.78rem; }
.archive-card-field dd { color: var(--ink-dim); font-size: 0.88rem; line-height: 1.42; margin: 0; }
.archive-card-crimes { margin-top: 16px; }
.archive-card-crimes h3 { color: var(--muted); font-family: var(--font-body); font-size: 0.78rem; font-weight: 600; margin: 0 0 8px; }
.archive-card-tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.archive-card-tags li { color: var(--ink-dim); background: var(--bg1); border: 1px solid var(--line-soft); border-radius: 999px; font-size: 0.75rem; padding: 3px 8px; }
.archive-card-link {
  display: inline-flex; width: fit-content; margin-top: auto; padding-top: 18px; color: var(--sepia);
  font-size: 0.88rem; text-underline-offset: 3px;
}
.archive-card-link:hover { color: var(--ink); }
.archive-no-results, .archive-fallback {
  background: var(--panel); border-left: 3px solid var(--sepia-dim); color: var(--ink-dim); margin: 24px 0 0; padding: 16px 18px;
}
.archive-fallback h2 { margin-top: 0; }
.archive-fallback ol { columns: 2; margin-bottom: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.archive-page :is(a, button, input, summary):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--sepia) 75%, white); outline-offset: 3px;
}
@media (max-width: 700px) {
  .archive-hero { padding-top: 42px; }
  .archive-toolbar { align-items: flex-start; flex-direction: column; }
  .archive-facets { grid-template-columns: 1fr; }
  .archive-fallback ol { columns: 1; }
}
@media print {
  .archive-filters, .archive-toolbar { display: none; }
  .archive-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Localized research editions ---------- */
.lang-switch {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 27px;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  text-decoration: none;
}
.lang-switch--current {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
  background: var(--panel2);
  box-shadow: inset 0 -2px 0 var(--accent);
  cursor: default;
}
.lang-flag {
  width: 28px;
  height: 18px;
  object-fit: cover;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 2px;
  filter: grayscale(0.72) saturate(0.38) brightness(0.52);
  opacity: 0.68;
  transition: filter 160ms ease, opacity 160ms ease, border-color 160ms ease;
}
.lang-switch:hover,
.lang-switch:focus-visible { border-color: color-mix(in srgb, var(--accent) 72%, var(--line)); background: var(--panel2); }
.lang-switch:hover .lang-flag,
.lang-switch:focus-visible .lang-flag {
  filter: none;
  opacity: 1;
  border-color: color-mix(in srgb, var(--ink) 42%, transparent);
}
.lang-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.localized-page .site-nav--localized { gap: 2px; }
.localized-page .site-nav--localized a { padding-inline: 6px; }
@media (min-width: 721px) {
  .localized-page .site-header .wrap {
    grid-template-areas:
      "brand tools"
      "primary primary";
  }
  .localized-page .site-nav--localized {
    justify-content: flex-start;
    margin-left: 0;
    width: 100%;
  }
}
.localized-hero {
  text-align: left;
  background:
    radial-gradient(860px 420px at 20% 0%, color-mix(in srgb, var(--sepia) 10%, transparent), transparent 70%);
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 56px;
}
.localized-hero h1, .localized-hero .lede { margin-left: 0; margin-right: 0; max-width: 24ch; }
.localized-hero .lede { max-width: 68ch; }
.localized-hero .hero-stats { justify-content: flex-start; text-align: left; }
.localized-hero .nota-chip { max-width: 78ch; border-radius: var(--radius); }
.section-intro, .compact-lede { max-width: 76ch; color: var(--ink-dim); }
.compact-lede { font-size: 1.05rem; }
.section-muted {
  border-block: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--panel) 38%, transparent);
  margin-top: 50px;
  padding-bottom: 56px;
}
.text-link { color: var(--sepia); font-weight: 600; }
.localized-tier-legend { max-width: none; }
.localized-tier-legend li {
  display: grid;
  grid-template-columns: 34px minmax(220px, 1fr) auto;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  padding: 8px 0;
}
.link-card h2 { color: var(--ink); font-size: 1.2rem; margin-bottom: 8px; }
.link-card small { display: block; color: var(--faint); margin-top: 14px; line-height: 1.45; }
.profile-link-card { display: flex; flex-direction: column; }
.profile-link-card .eyebrow { color: var(--accent); font-size: 0.72rem; letter-spacing: 0.13em; text-transform: uppercase; }
.profile-link-card .badge { width: fit-content; margin-top: auto; }
.people-circle { scroll-margin-top: 74px; }
.prose-wide { max-width: 82ch; color: var(--ink-dim); }
.prose-wide p { margin-bottom: 1.25em; }
.prose-wide h2 { color: var(--ink); margin-top: 1.7em; }
.principles-list { display: grid; gap: 10px; padding-left: 22px; }
.mechanism-dossier > section { margin-top: 48px; }
.region-dossier > section { margin-top: 48px; }
.region-grid { margin-top: 24px; }
.region-card .eyebrow { color: var(--accent); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }
.responsibility-chain.responsibility-chain--regional { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.responsibility-chain {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 6px;
}
.responsibility-chain li {
  position: relative;
  min-height: 118px;
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink-dim);
  font-size: 0.88rem;
}
.responsibility-chain li:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -10px;
  top: 44%;
  z-index: 2;
  color: var(--accent);
}
.chain-step-number {
  display: block;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.portrait--monogram .portrait-frame { min-height: 280px; }
.localized-page .profile-main > .eyebrow,
.mechanism-dossier > .eyebrow {
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin-bottom: 8px;
}
.localized-page .profile-main section { scroll-margin-top: 84px; }

@media (max-width: 900px) {
  .responsibility-chain { grid-template-columns: 1fr; }
  .responsibility-chain li { min-height: auto; }
  .responsibility-chain li:not(:last-child)::after {
    content: "↓";
    right: auto;
    left: 50%;
    top: auto;
    bottom: -18px;
  }
}
@media (max-width: 720px) {
  .localized-tier-legend li { grid-template-columns: 34px 1fr; }
  .localized-tier-legend .tl-count { grid-column: 2; white-space: normal; }
  .site-header .wrap {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "brand" "primary" "tools";
    gap: 6px;
    padding-block: 9px;
  }
  .site-nav,
  .localized-page .site-nav--localized {
    justify-content: flex-start;
    margin-left: 0;
    max-width: 100%;
    padding-bottom: 2px;
    width: 100%;
  }
  .header-tools { justify-content: space-between; width: 100%; }
  .localized-page [id] { scroll-margin-top: 154px; }
}

@media (prefers-reduced-motion: reduce) {
  .lang-flag { transition: none; }
}

/* ============================================================
   EDYCJA DOKUMENTACYJNA 2026 — wspólny motyw PL/EN/DE/RU/FR
   Warstwa wizualna inspirowana kartoteką, papierem kancelaryjnym
   i pracą ze źródłem. Bez dekoracyjnej stylizacji sprawców.
   ============================================================ */

html[lang="pl"] {
  --doc-label-hero: "OPRACOWANIE DOKUMENTACYJNE / 1933–1945";
  --doc-label-editorial: "OPRACOWANIE / MATERIAŁ REDAKCYJNY";
  --doc-label-tier: "KARTOTEKA ODPOWIEDZIALNOŚCI";
  --doc-label-archive: "KARTOTEKA ODPOWIEDZIALNOŚCI / A–Ż";
  --doc-label-biography: "DANE BIOGRAFICZNE";
  --doc-label-map: "ATLAS ŹRÓDEŁ KARTOGRAFICZNYCH";
}

html[lang="en"] {
  --doc-label-hero: "DOCUMENTARY RECORD / 1933–1945";
  --doc-label-editorial: "EDITORIAL RESEARCH / DOCUMENTED MATERIAL";
  --doc-label-tier: "RESPONSIBILITY FILE";
  --doc-label-archive: "RESPONSIBILITY FILE / A–Z";
  --doc-label-biography: "BIOGRAPHICAL DATA";
  --doc-label-map: "ATLAS OF CARTOGRAPHIC SOURCES";
}

html[lang="de"] {
  --doc-label-hero: "DOKUMENTARISCHE AKTE / 1933–1945";
  --doc-label-editorial: "REDAKTIONELLE RECHERCHE / DOKUMENTIERTES MATERIAL";
  --doc-label-tier: "VERANTWORTUNGSREGISTER";
  --doc-label-archive: "VERANTWORTUNGSREGISTER / A–Z";
  --doc-label-biography: "BIOGRAFISCHE DATEN";
  --doc-label-map: "ATLAS KARTOGRAFISCHER QUELLEN";
}

html[lang="ru"] {
  --doc-label-hero: "ДОКУМЕНТАЛЬНОЕ ДОСЬЕ / 1933–1945";
  --doc-label-editorial: "РЕДАКЦИОННОЕ ИССЛЕДОВАНИЕ / ДОКУМЕНТАЛЬНЫЙ МАТЕРИАЛ";
  --doc-label-tier: "КАРТОТЕКА ОТВЕТСТВЕННОСТИ";
  --doc-label-archive: "КАРТОТЕКА ОТВЕТСТВЕННОСТИ / А–Я";
  --doc-label-biography: "БИОГРАФИЧЕСКИЕ ДАННЫЕ";
  --doc-label-map: "АТЛАС КАРТОГРАФИЧЕСКИХ ИСТОЧНИКОВ";
}

html[lang="fr"] {
  --doc-label-hero: "DOSSIER DOCUMENTAIRE / 1933–1945";
  --doc-label-editorial: "RECHERCHE ÉDITORIALE / CONTENU DOCUMENTÉ";
  --doc-label-tier: "DOSSIER DE RESPONSABILITÉ";
  --doc-label-archive: "DOSSIER DE RESPONSABILITÉ / A–Z";
  --doc-label-biography: "DONNÉES BIOGRAPHIQUES";
  --doc-label-map: "ATLAS DES SOURCES CARTOGRAPHIQUES";
}

html[lang] body {
  --bg0: #d7c9a4;
  --bg1: #202620;
  --panel: #f1eadb;
  --panel2: #e7ddc7;
  --line: #aa9d7e;
  --line-soft: #c8bda3;
  --ink: #29241b;
  --ink-dim: #5e5748;
  --muted: #756c58;
  --faint: #8f836b;
  --red: #7b342b;
  --red-bright: #8d3d31;
  --sepia: #775b31;
  --sepia-dim: #a38c60;
  --accent: #775b31;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: Georgia, "Times New Roman", serif;
  --font-mono: "American Typewriter", "Courier Prime", "Courier New", monospace;
  --maxw: 1240px;
  --radius: 0;
  background:
    repeating-linear-gradient(0deg, rgba(66, 51, 27, 0.018) 0 1px, transparent 1px 6px),
    #d7c9a4;
  color: var(--ink);
  font-size: 17px;
}

html[lang] body main {
  background:
    repeating-linear-gradient(0deg, rgba(66, 51, 27, 0.016) 0 1px, transparent 1px 6px),
    #d7c9a4;
}

html[lang] :is(h1, h2, h3) {
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}

html:not([lang="pl"]) :is(h1, h2, h3) {
  hyphens: auto;
  overflow-wrap: break-word;
}

html[lang] .site-header {
  position: relative;
  top: auto;
  border-bottom: 1px solid #0f120f;
  background: #1c221e;
  box-shadow: 0 8px 24px rgba(27, 23, 15, 0.14);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[lang] .site-header .wrap {
  grid-template-columns: minmax(220px, auto) minmax(0, 1fr);
  grid-template-areas:
    "brand primary"
    "brand tools";
  gap: 5px 34px;
  min-height: 112px;
  padding-block: 16px 10px;
}

@media (min-width: 821px) {
  html:not([lang="pl"]) .localized-page .site-header .wrap {
    grid-template-areas:
      "brand tools"
      "primary primary";
  }

  html:not([lang="pl"]) .localized-page .site-nav--localized {
    justify-content: flex-start;
    margin-left: 0;
    width: 100%;
  }
}

html:not([lang="pl"]) .site-nav--localized {
  scrollbar-color: #90846b transparent;
  scrollbar-width: thin;
}

html:not([lang="pl"]) .site-nav--localized::-webkit-scrollbar {
  display: block;
  height: 4px;
}

html:not([lang="pl"]) .site-nav--localized::-webkit-scrollbar-thumb {
  background: #90846b;
}

html[lang] .brand {
  align-self: center;
  color: #f0e5cc;
}

html[lang] .brand-mark {
  display: none;
}

html[lang] .brand-text strong {
  color: #f0e5cc;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

html[lang] .brand-text small {
  margin-top: 5px;
  color: #90846b;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
}

html[lang] .site-nav {
  gap: 5px;
  padding-top: 2px;
}

html[lang] .site-nav a {
  border: 1px solid #5f5948;
  border-bottom: 0;
  border-radius: 0;
  background: #c4b183;
  color: #363125;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.045em;
  padding: 8px 11px;
  text-transform: uppercase;
}

html[lang] .site-nav a:hover {
  background: #d8c9a7;
  color: #201d16;
}

html[lang] .site-nav a[aria-current] {
  background: #f0e7d3;
  color: #211e17;
  box-shadow: inset 0 3px 0 #803b30;
}

html[lang] .header-tools {
  justify-content: flex-end;
  border-top: 1px solid #394038;
  padding-top: 7px;
}

html[lang] .search-btn {
  max-width: 280px;
  border: 1px solid #5c6157;
  border-radius: 0;
  background: #262d27;
  color: #b8ae98;
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

html[lang] .search-btn:hover,
html[lang] .search-btn:focus-visible {
  border-color: #b5a57e;
  background: #303830;
  color: #f0e5cc;
}

html[lang] .hero {
  padding: 76px 0 64px;
  text-align: left;
}

html[lang] .hero .wrap {
  position: relative;
  border: 1px solid #7b6d4f;
  background:
    repeating-linear-gradient(0deg, rgba(76, 57, 26, 0.024) 0 1px, transparent 1px 5px),
    #e8dcbb;
  padding: clamp(46px, 7vw, 86px);
  box-shadow: 0 20px 48px rgba(45, 36, 21, 0.16);
}

html[lang] .hero .wrap::before {
  content: var(--doc-label-hero);
  position: absolute;
  bottom: 100%;
  left: 26px;
  min-width: min(370px, calc(100% - 52px));
  max-width: calc(100% - 52px);
  border: 1px solid #7b6d4f;
  border-bottom: 0;
  background: #c2ae7a;
  color: #473e2f;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  line-height: 1.3;
  overflow-wrap: anywhere;
  padding: 9px 18px;
}

html[lang] .hero .kicker {
  color: #775b31;
  font-family: var(--font-mono);
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

html[lang] .hero h1 {
  max-width: 12ch;
  margin: 0 0 24px;
  color: #29241b;
  font-size: clamp(3.2rem, 7vw, 6.6rem);
  line-height: 0.96;
  text-wrap: balance;
}

html[lang] .hero .lede {
  max-width: 76ch;
  margin: 0 0 30px;
  color: #5e5748;
  font-size: clamp(1.05rem, 1.4vw, 1.22rem);
}

html[lang] .hero-stats {
  justify-content: flex-start;
  gap: 0;
  border-block: 1px solid #a79876;
  color: #6a604e;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-align: left;
}

html[lang] .hero-stats > div {
  min-width: 190px;
  padding: 14px 22px 14px 0;
}

html[lang] .hero-stats > div + div {
  border-left: 1px solid #a79876;
  padding-left: 22px;
}

html[lang] .hero-stats strong {
  color: #30291e;
  font-size: 1.35rem;
}

html[lang] .nota-chip {
  max-width: 78ch;
  border: 1px solid #a79876;
  border-left: 4px solid #803b30;
  border-radius: 0;
  background: #f1e8d3;
  color: #655b49;
  font-size: 0.8rem;
}

@media (max-width: 820px) {
  html[lang] .site-header .wrap {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "brand" "primary" "tools";
    gap: 9px;
  }

  html[lang] .site-nav {
    justify-content: flex-start;
    margin-left: 0;
  }

  html[lang] .header-tools {
    justify-content: space-between;
  }
}

@media (max-width: 620px) {
  html[lang] body { font-size: 15.5px; }
  html[lang] .hero { padding-top: 64px; }
  html[lang] .hero .wrap { padding: 40px 22px 30px; }
  html[lang] .hero .wrap::before { left: 12px; min-width: min(330px, calc(100% - 24px)); }
  html[lang] .hero h1 { font-size: clamp(2.75rem, 15vw, 4.2rem); }
  html[lang] .hero-stats { display: grid; }
  html[lang] .hero-stats > div { padding: 12px 0; }
  html[lang] .hero-stats > div + div { border-top: 1px solid #a79876; border-left: 0; padding-left: 0; }
}

/* Wspólne powierzchnie i typografia wszystkich edycji */
html[lang] a {
  color: #514126;
  text-decoration-color: rgba(123, 91, 49, 0.48);
}

html[lang] a:hover { color: #211d16; }

html[lang] ::selection {
  background: #8b463a;
  color: #fff8e8;
}

html[lang] .skip-link {
  background: #7b342b;
  color: #fff8e8;
  font-family: var(--font-mono);
}

html[lang] .section {
  padding-block: 48px 12px;
}

html[lang] .section-head {
  gap: 18px;
  margin-bottom: 28px;
}

html[lang] .section-head .rule,
html[lang] .profile-main h2::after {
  background: #9f9274;
}

html[lang] .section-head h1 {
  font-size: clamp(2.7rem, 5.8vw, 5.4rem);
  line-height: 0.98;
}

html[lang] main > .wrap > .section:first-child {
  position: relative;
  margin-top: 74px;
  border: 1px solid #7b6d4f;
  background: #ece2ca;
  padding: clamp(42px, 6vw, 72px);
  box-shadow: 0 16px 38px rgba(48, 38, 22, 0.12);
}

html[lang] main > .wrap > .section:first-child::before {
  content: var(--doc-label-editorial);
  position: absolute;
  bottom: 100%;
  left: 24px;
  max-width: calc(100% - 48px);
  border: 1px solid #7b6d4f;
  border-bottom: 0;
  background: #c2ae7a;
  color: #493f2e;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.075em;
  line-height: 1.3;
  overflow-wrap: anywhere;
  padding: 8px 16px;
}

html[lang] .grid-cards {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

html[lang] .link-card {
  border: 1px solid #a99b7c;
  border-radius: 0;
  background: #f1eadb;
  color: #5d5547;
  padding: 24px;
  box-shadow: 2px 3px 0 rgba(67, 53, 30, 0.09);
  transform: none;
}

html[lang] .link-card:hover {
  border-color: #7e6f52;
  background: #f6efe1;
  color: #2a251c;
  transform: none;
}

html[lang] .link-card h3,
html[lang] .link-card h2 { color: #29241b; }
html[lang] .link-card p { color: #6b6251; }

html[lang] .callout,
html[lang] .stat-box {
  border: 1px solid #a99b7c;
  border-left: 4px solid #7b342b;
  border-radius: 0;
  background: #eee5d1;
  color: #5e5748;
}

/* Strona główna — rejestr zamiast diagramu-gadżetu */
html[lang] .rings-section {
  padding: 28px 0 12px;
}

html[lang] .rings-layout {
  display: block;
}

html[lang] #rings {
  display: none;
}

html[lang] .ring-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

html[lang] .ring-list a {
  min-height: 126px;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: start;
  border: 1px solid #a99b7c;
  border-radius: 0;
  background: #f0e8d6;
  color: #5e5748;
  padding: 22px;
}

html[lang] .ring-list a:hover,
html[lang] .ring-list li.active a {
  border-color: #7e6e50;
  background: #f5eddd;
  color: #29241b;
}

html[lang] .ri-roman {
  border-right: 1px solid #a99b7c;
  color: #775b31;
  font-size: 1.45rem;
  text-align: left;
}

html[lang] .ring-list strong {
  color: #2e281e;
  font-size: 1.15rem;
}

html[lang] .ring-list small {
  color: #706653;
  line-height: 1.45;
}

/* Strony siedmiu obszarów odpowiedzialności */
html[lang] .tier-head {
  position: relative;
  width: min(calc(100% - 44px), var(--maxw));
  margin: 70px auto 0;
  border: 1px solid #796b4e;
  background: #e9ddbd;
  padding: clamp(42px, 6vw, 70px);
  box-shadow: 0 16px 38px rgba(48, 38, 22, 0.13);
}

html[lang] .tier-head::before {
  content: var(--doc-label-tier);
  position: absolute;
  bottom: 100%;
  left: 24px;
  max-width: calc(100% - 48px);
  border: 1px solid #796b4e;
  border-bottom: 0;
  background: #c2ae7a;
  color: #493f2e;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.075em;
  line-height: 1.3;
  overflow-wrap: anywhere;
  padding: 8px 16px;
}

html[lang] .tier-eyebrow {
  color: #775b31;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

html[lang] .tier-eyebrow .tier-ring-ico {
  width: 34px;
  height: 28px;
  border: 1px solid #8d7b58;
  border-radius: 0;
  color: #5b482a;
  font-family: var(--font-mono);
}

html[lang] .tier-head h1 {
  max-width: 18ch;
  color: #29241b;
  font-size: clamp(2.8rem, 6vw, 5.3rem);
  line-height: 0.98;
}

html[lang] .tier-criterion { color: #514a3e; }
html[lang] .tier-desc { color: #716754; }

html[lang] .tier-nav a,
html[lang] .alpha-nav a,
html[lang] .badge,
html[lang] .chip-tier {
  border: 1px solid #9f9274;
  border-radius: 0;
  background: #eee5d1;
  color: #655a47;
  font-family: var(--font-mono);
}

html[lang] .tier-nav a.current,
html[lang] .chip-tier {
  border-color: #7b5b32;
  background: #ded0ad;
  color: #4d3b22;
}

html[lang] .filters,
html[lang] .archive-filters,
html[lang] .graph-controls {
  border: 1px solid #171a16;
  background: #303832;
  color: #efe5cf;
  padding: 20px;
  box-shadow: 0 10px 24px rgba(42, 34, 21, 0.12);
}

html[lang] .filters input[type="search"],
html[lang] .filters select,
html[lang] .archive-search-field input,
html[lang] .graph-controls input {
  border: 1px solid #8e8061;
  border-radius: 0;
  background: #f3ebda;
  color: #29241b;
}

html[lang] .persona-grid {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}

html[lang] .persona-card {
  grid-template-columns: 82px minmax(0, 1fr);
  border: 1px solid #a99b7c;
  border-radius: 0;
  background: #f1eadb;
  color: #5d5547;
  box-shadow: 0 5px 12px rgba(62, 49, 28, 0.07);
  transform: none;
}

html[lang] .persona-card:hover {
  border-color: #7d6d50;
  background: #f6efe1;
  color: #29241b;
  transform: none;
}

html[lang] .card-thumb {
  border: 1px solid #9f9274;
  border-radius: 0;
  background: #d8d0bc;
}

html[lang] .card-thumb img {
  filter: grayscale(1) contrast(0.96);
}

html[lang] .persona-card h3 { color: #29241b; }
html[lang] .persona-card .role { color: #6a604f; }

/* Kartoteka wszystkich rekordów */
html[lang] .archive-hero {
  width: min(calc(100% - 44px), var(--maxw));
  margin: 70px auto 0;
  border: 1px solid #796b4e;
  background: #e8dcbb;
  padding: 0;
  box-shadow: 0 18px 42px rgba(48, 38, 22, 0.14);
}

html[lang] .archive-hero .wrap {
  position: relative;
  max-width: none;
  padding: clamp(44px, 7vw, 80px);
}

html[lang] .archive-hero .wrap::before {
  content: var(--doc-label-archive);
  position: absolute;
  bottom: 100%;
  left: 24px;
  max-width: calc(100% - 48px);
  border: 1px solid #796b4e;
  border-bottom: 0;
  background: #c2ae7a;
  color: #493f2e;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.075em;
  line-height: 1.3;
  overflow-wrap: anywhere;
  padding: 8px 16px;
}

html[lang] .archive-hero h1 {
  max-width: 14ch;
  color: #29241b;
  font-size: clamp(3rem, 6vw, 5.8rem);
  line-height: 0.98;
}

html[lang] .archive-hero .lede { color: #5e5748; }

html[lang] .archive-results-status {
  color: #4d4538;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

html[lang] .archive-clear,
html[lang] .graph-btn {
  border: 1px solid #8e8061;
  border-radius: 0;
  background: #e8dec8;
  color: #463d30;
  font-family: var(--font-mono);
}

html[lang] .archive-search-field label { color: #e8dcc5; }

html[lang] .archive-facets {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

html[lang] .archive-facet {
  border: 1px solid #677065;
  border-radius: 0;
  background: #262e28;
}

html[lang] .archive-facet summary { color: #eee3cc; }
html[lang] .archive-facet-options { background: #f1eadb; padding: 10px; }
html[lang] .archive-option label { color: #514a3e; }

html[lang] .archive-grid {
  grid-template-columns: 1fr;
  gap: 14px;
}

html[lang] .archive-card {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr) 150px;
  gap: 20px 28px;
  border: 1px solid #a99b7c;
  border-top: 1px solid #a99b7c;
  border-radius: 0;
  background: #f1eadb;
  color: #5d5547;
  padding: 24px;
  box-shadow: 0 5px 12px rgba(62, 49, 28, 0.07);
}

html[lang] .archive-card > *,
html[lang] .archive-card-head > * {
  min-width: 0;
}

html[lang] .archive-card-head {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

html[lang] .archive-card-thumb {
  position: relative;
  width: 70px;
  height: 88px;
  overflow: hidden;
  border: 1px solid #9f9274;
  background: #d8d0bc;
}

html[lang] .archive-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  filter: grayscale(1) contrast(0.96);
}

html[lang] .archive-card-thumb .monogram {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #756b58;
  font-family: var(--font-mono);
  background: #ded5c2;
}

html[lang] .archive-card-thumb img + .monogram { z-index: -1; }
html[lang] .archive-card-thumb.img-failed img { display: none; }
html[lang] .archive-card-thumb.img-failed .monogram { z-index: 0; }

html[lang] .archive-card-title {
  color: #29241b;
  font-size: 1.45rem;
  overflow-wrap: anywhere;
}

html[lang] .archive-card-circle {
  color: #775b31;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

html[lang] .archive-card-details {
  border-left: 1px solid #b7aa8d;
  padding-left: 24px;
}

html[lang] .archive-card-field dd {
  color: #514a3e;
  overflow-wrap: anywhere;
}

html[lang] .archive-card-crimes {
  grid-column: 2;
  margin-top: 0;
  border-left: 1px solid #b7aa8d;
  padding-left: 24px;
}

html[lang] .archive-card-tags li,
html[lang] .crime-tags .tag {
  border: 1px solid #b3a587;
  border-radius: 0;
  background: #e8dec8;
  color: #625846;
}

html[lang] .archive-card-link {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
  border-left: 1px solid #b7aa8d;
  color: #4d3b22;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 20px 0 20px 24px;
  text-transform: uppercase;
}

/* Dossier biograficzne */
html[lang] .breadcrumbs {
  color: #776d59;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding-top: 28px;
}

html[lang] .profile-grid {
  grid-template-columns: minmax(270px, 330px) minmax(0, 1fr);
  gap: clamp(34px, 6vw, 76px);
  margin-top: 40px;
  border: 1px solid #796b4e;
  background: #e8dcbb;
  padding: clamp(34px, 5vw, 64px);
  box-shadow: 0 18px 42px rgba(48, 38, 22, 0.14);
}

html[lang] .dossier {
  position: sticky;
  top: 20px;
  overflow: visible;
  border: 1px solid #9f9274;
  border-radius: 0;
  background: #f1eadb;
  box-shadow: 0 7px 18px rgba(62, 49, 28, 0.09);
}

html[lang] .dossier::before {
  content: var(--doc-label-biography);
  display: block;
  width: 68%;
  margin: -34px 0 0 -1px;
  border: 1px solid #9f9274;
  border-bottom: 0;
  background: #d2bf91;
  color: #4b4131;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.07em;
  padding: 9px 14px;
}

html[lang] .portrait-frame {
  margin: 22px 22px 0;
  border: 1px solid #b6aa8f;
  background: #ded6c4;
}

html[lang] .portrait-frame img {
  filter: grayscale(1) contrast(0.97);
}

html[lang] .portrait-credit {
  max-height: 2.9em;
  overflow: hidden;
  border-bottom: 1px solid #c2b69d;
  color: #8a7f6a;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  line-height: 1.35;
  padding: 8px 22px;
}

html:not([lang="pl"]) .portrait-credit {
  max-height: none;
  overflow: visible;
}

html[lang] .portrait-credit__byline {
  display: block;
  margin-top: 0.25rem;
}

html[lang] .dossier .meta-row {
  grid-template-columns: 112px minmax(0, 1fr);
  border-bottom: 1px solid #c4b9a0;
}

html[lang] .dossier dt { color: #766d5a; }
html[lang] .dossier dd { color: #3f392e; }

html[lang] .profile-main h1 {
  color: #29241b;
  font-size: clamp(3rem, 6vw, 5.7rem);
  line-height: 0.96;
}

html[lang] .profile-main .lead {
  color: #4e473b;
  font-size: clamp(1.08rem, 1.5vw, 1.24rem);
}

html[lang] .profile-main section {
  border-top: 1px solid #9f9274;
  padding-top: 26px;
}

html[lang] .profile-main h2 {
  color: #2d281f;
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
}

html[lang] .sources-list li { border-bottom-color: #c2b69d; }

html[lang] .related,
html[lang] .connections {
  border: 1px solid #a99b7c;
  background: #eee5d1;
  padding: 24px;
}

/* Oś czasu, słownik, pamięć, źródła i sieć */
html[lang] .timeline {
  padding-left: 44px;
}

html[lang] .timeline::before {
  left: 13px;
  background: #9b8b6b;
}

html[lang] .tl-item {
  border: 1px solid #b0a285;
  background: #f0e8d6;
  padding: 20px 24px;
}

html[lang] .tl-item::before {
  left: -38px;
  border: 2px solid #775b31;
  border-radius: 0;
  background: #d7c9a4;
}

html[lang] .tl-year { color: #775b31; }
html[lang] .tl-item p { color: #5e5748; }

html[lang] .glossary dt {
  border-top: 1px solid #9f9274;
  color: #2d281f;
  font-size: 1.4rem;
  padding-top: 28px;
}

html[lang] .glossary dd {
  border-bottom: 0;
  color: #5e5748;
  padding-bottom: 24px;
}

html[lang] .memorial-hero {
  position: relative;
  width: min(calc(100% - 44px), var(--maxw));
  margin: 70px auto 0;
  border: 1px solid #796b4e;
  background: #e9dfc8;
  padding: 70px 40px;
  text-align: left;
}

html[lang] .memorial-hero h1 { color: #3a3124; }
html[lang] .memorial-hero .lede { margin-left: 0; color: #5e5748; }

html[lang] .victim-card {
  border: 1px solid #a99b7c;
  border-top: 3px solid #775b31;
  border-radius: 0;
  background: #f0e8d6;
}

html[lang] .victim-card .num { color: #6f522d; }
html[lang] .victim-card p { color: #665d4c; }

html[lang] .table-scroll {
  border-color: #9f9274;
  border-radius: 0;
  background: #f1eadb;
}

html[lang] table.data th {
  border-bottom-color: #9f9274;
  background: #d8c8a4;
  color: #3c3529;
  font-family: var(--font-mono);
}

html[lang] table.data td {
  border-bottom-color: #c5baa1;
  color: #514a3e;
}

html[lang] .graph-stage {
  margin-top: 20px;
}

html[lang] .graph-canvas-wrap,
html[lang] .graph-panel {
  border: 1px solid #9f9274;
  border-radius: 0;
  background: #efe7d5;
}

html[lang] .search-overlay {
  background: rgba(28, 34, 30, 0.9);
}

html[lang] .search-panel {
  border: 1px solid #8e8061;
  border-radius: 0;
  background: #f1eadb;
}

html[lang] .search-panel input {
  border-bottom-color: #a99b7c;
  color: #29241b;
}

html[lang] .search-results li a:hover,
html[lang] .search-results li.sel a { background: #e5dac1; }

/* Atlas map */
html[lang] .maps-page .maps-hero {
  padding: 72px 0 34px;
}

html[lang] .maps-page .maps-hero-sheet {
  position: relative;
  border: 1px solid #796b4e;
  background: #e8dcbb;
  padding: clamp(44px, 7vw, 78px);
  box-shadow: 0 18px 42px rgba(48, 38, 22, 0.14);
}

html[lang] .maps-page .maps-hero-sheet::before {
  content: var(--doc-label-map);
  position: absolute;
  bottom: 100%;
  left: 24px;
  max-width: calc(100% - 48px);
  border: 1px solid #796b4e;
  border-bottom: 0;
  background: #c2ae7a;
  color: #493f2e;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.075em;
  line-height: 1.3;
  overflow-wrap: anywhere;
  padding: 8px 16px;
}

html[lang] .maps-page .maps-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.65fr);
  gap: clamp(34px, 7vw, 90px);
  align-items: end;
}

html[lang] .maps-page h1 {
  max-width: 11ch;
  color: #29241b;
  font-size: clamp(3rem, 6vw, 5.8rem);
  line-height: 0.98;
}

html[lang] .maps-lede { color: #5e5748; }

html[lang] .map-thumbnails {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 38px;
  list-style: none;
}

html[lang] .map-thumbnail {
  display: grid;
  grid-template-rows: 170px 1fr;
  height: 100%;
  border: 1px solid #9f9274;
  background: #f1eadb;
  color: #29241b;
  text-decoration: none;
}

html[lang] .map-thumbnail img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  object-position: center;
  filter: grayscale(0.35) saturate(0.65) contrast(0.95);
}

html[lang] .map-thumbnail-copy {
  display: grid;
  gap: 4px;
  padding: 16px;
}

html[lang] .map-thumbnail-id,
html[lang] .map-status {
  color: #775b31;
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

html[lang] .map-thumbnail small { color: #756b58; }

html[lang] .map-collection {
  display: grid;
  gap: 28px;
  margin-top: 30px;
}

html[lang] .map-entry {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(28px, 5vw, 64px);
  border: 1px solid #9f9274;
  background: #f1eadb;
  padding: clamp(20px, 4vw, 40px);
}

html[lang] .map-entry-media {
  display: grid;
  place-items: center;
  min-height: 380px;
  border: 1px solid #b3a587;
  background: #d8d0bc;
  padding: 14px;
}

html[lang] .map-entry-media img {
  width: 100%;
  max-height: 680px;
  object-fit: contain;
}

html[lang] .map-entry h2 {
  color: #2d281f;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

html[lang] .map-entry p { color: #5e5748; }

html[lang] .map-facts {
  margin: 24px 0;
  border-top: 1px solid #a99b7c;
}

html[lang] .map-facts div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  border-bottom: 1px solid #c2b69d;
  padding: 10px 0;
}

html[lang] .map-facts dt {
  color: #756b58;
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

html[lang] .map-facts dd { margin: 0; color: #3f392e; }

html[lang] .map-method {
  margin-top: 46px;
  border-block: 1px solid #111510;
  background: #2d352f;
  color: #eee4ce;
  padding: 60px 0;
}

html[lang] .map-method h2 { color: #f1e6cf; }
html[lang] .map-method p { color: #d2c8b4; }

/* Stopka */
html[lang] .site-footer {
  margin-top: 70px;
  border-top: 1px solid #10130f;
  background: #181d19;
  color: #d8cfbb;
  padding: 42px 0 52px;
}

html[lang] .site-footer .wrap {
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.6fr);
  gap: 10px 46px;
}

html[lang] .footer-nota { color: #c5bcaa; }
html[lang] .footer-memorial { color: #d1bc8f; }
html[lang] .footer-links { grid-column: 2; grid-row: 1 / span 2; }
html[lang] .footer-links a { color: #bcb19b; }

@media (max-width: 1080px) {
  html[lang] .archive-facets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html[lang] .archive-card { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr); }
  html[lang] .archive-card-link { grid-column: 1 / -1; grid-row: auto; justify-self: start; border-top: 1px solid #b7aa8d; border-left: 0; padding: 16px 0 0; }
  html[lang] .map-thumbnails { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  html[lang] .ring-list,
  html[lang] .profile-grid,
  html[lang] .maps-page .maps-intro,
  html[lang] .map-entry { grid-template-columns: 1fr; }
  html[lang] .dossier { position: static; max-width: 430px; }
  html[lang] .archive-card { grid-template-columns: 1fr; }
  html[lang] .archive-card-details,
  html[lang] .archive-card-crimes { grid-column: 1; border-left: 0; padding-left: 0; }
  html[lang] .archive-card-link { grid-column: 1; }
  html[lang] .site-footer .wrap { grid-template-columns: 1fr; }
  html[lang] .footer-links { grid-column: auto; grid-row: auto; }
}

@media (max-width: 620px) {
  html[lang] main > .wrap > .section:first-child { margin-top: 58px; padding: 38px 22px; }
  html[lang] .ring-list { grid-template-columns: 1fr; }
  html[lang] .tier-head,
  html[lang] .archive-hero,
  html[lang] .memorial-hero { width: min(calc(100% - 24px), var(--maxw)); }
  html[lang] .tier-head { padding: 38px 22px; }
  html[lang] .archive-hero .wrap { padding: 40px 22px; }
  html[lang] .profile-grid { margin-top: 34px; padding: 34px 16px 24px; }
  html[lang] .archive-facets { grid-template-columns: 1fr; }
  html[lang] .archive-card { padding: 18px; }
  html[lang] .archive-card-head { grid-template-columns: 58px minmax(0, 1fr); }
  html[lang] .archive-card-thumb { width: 58px; height: 72px; }
  html[lang] .map-thumbnails { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(230px, 82vw); overflow-x: auto; padding-bottom: 12px; }
  html[lang] .map-entry { padding: 16px; }
  html[lang] .map-entry-media { min-height: 260px; }
}

@media print {
  html[lang] body,
  html[lang] body main {
    background: #fff !important;
    color: #111 !important;
  }

  html[lang] :is(
    .hero .wrap,
    main > .wrap > .section:first-child,
    .tier-head,
    .archive-hero,
    .archive-card,
    .profile-grid,
    .dossier,
    .link-card,
    .persona-card,
    .tl-item,
    .victim-card,
    .table-scroll,
    .graph-canvas-wrap,
    .graph-panel,
    .related,
    .connections
  ) {
    background: #fff !important;
    box-shadow: none !important;
  }

  html[lang] :is(
    .hero .wrap,
    main > .wrap > .section:first-child,
    .tier-head,
    .archive-hero .wrap,
    .dossier,
    .maps-page .maps-hero-sheet
  )::before {
    display: none;
  }
}
