/* RingPass / RingDesk — system projektowy (kierunek wizualny v1, docs/design/HANDOFF.md).
 * Tokeny są wiążące; komponenty to klasy do użycia w szablonach wszystkich części (portal, na żywo,
 * ring, panel organizatora). Nowe komponenty dopisujemy tutaj, nie jako style w szablonie. */

/* ---------- Tokeny ---------- */
:root {
  --ds-ink: #0B1426; --ds-navy: #13284A; --ds-ring: #1F4E79;
  --ds-paper: #F6F4EF; --ds-surface: #FFFFFF; --ds-surface-2: #EFECE5;
  --ds-line: #E3DED3; --ds-line-strong: #D9D3C6;
  --ds-text-2: #2B3245; --ds-muted: #4A4F5C; --ds-muted-2: #6B7488;

  --ds-gold: #E4B23A; --ds-gold-soft: #F6D57E; --ds-gold-text: #9A6A00;
  --ds-red: #C8322B; --ds-red-soft: #EE8A83; --ds-red-text: #8E1F19; --ds-red-bg: #FCE6E4;
  --ds-blue: #2F5FD0; --ds-blue-soft: #93AEF0;
  --ds-silver: #8C95A6; --ds-silver-bg: #E6E9EF; --ds-silver-text: #3C4558;
  --ds-teal: #0E8A7A; --ds-bronze: #C9905A;

  --ds-ok: #1E9E5A; --ds-ok-bg: #DDF2E6; --ds-ok-text: #0F5E36;
  --ds-warn: #B07A00; --ds-warn-bg: #FFF1D6; --ds-warn-text: #7A4E00;
  --ds-neutral-bg: #E7EBF2; --ds-live: #1E9E5A; --ds-info-bg: #EEF2F8;

  --ds-font: "Archivo", system-ui, sans-serif;
  --ds-font-mono: "JetBrains Mono", ui-monospace, monospace;

  --ds-r-badge: 3px; --ds-r-btn: 6px; --ds-r-btn-lg: 10px; --ds-r-card: 14px; --ds-r-sheet: 20px; --ds-r-pill: 999px;
  --ds-hit: 48px; --ds-hit-ring: 64px;
  --ds-shadow-float: 0 24px 48px -12px rgba(0,0,0,.5);
  --ds-shadow-card: 0 1px 2px rgba(11,20,38,.06), 0 8px 24px -16px rgba(11,20,38,.25);
}

[data-theme="dark"] {
  --ds-paper: #0A1224; --ds-surface: #121C33; --ds-surface-2: #17223D;
  --ds-line: #22304F; --ds-line-strong: #2C3B5E;
  --ds-ink: #EEF1F7; --ds-text-2: #CBD3E3; --ds-muted: #9AA6BF; --ds-muted-2: #7D89A3;
  --ds-gold: #F2C14E; --ds-red: #FF6B5E; --ds-live: #3DDC84; --ds-info-bg: #17223D;
}
[data-theme="tv"] { --ds-paper: #070D1B; }

/* ---------- Podstawa ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--ds-font); font-size: 16px; line-height: 1.45;
  font-variant-numeric: tabular-nums; background: var(--ds-paper); color: var(--ds-ink);
}
a { color: var(--ds-ring); }
[data-theme="dark"] a { color: var(--ds-gold); }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--ds-gold); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Typografia ---------- */
.display { font-stretch: 125%; font-weight: 900; letter-spacing: -0.035em; line-height: .92; overflow-wrap: break-word; }  /* DE: długie złożenia na 360 px */
.display-num { font-stretch: 125%; font-weight: 900; letter-spacing: -0.05em; line-height: .82; }
.h-xl { font-size: clamp(44px, 7vw, 84px); }
.h-lg { font-size: 30px; }
.h-md { font-size: 24px; }
.h-sm { font-size: 17px; font-weight: 800; line-height: 1.2; }
.mono-label { font: 700 12px/1.3 var(--ds-font-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--ds-muted); }
.mono { font-family: var(--ds-font-mono); }
.muted { color: var(--ds-muted); }
.small { font-size: 13px; }
.lead { font-size: 20px; line-height: 1.45; color: var(--ds-text-2); }

/* ---------- Znak (logo) — logotyp marki z static/brand/<marka>/ (templates/_logo.html, config/brand.py) ---------- */
.logo { display: inline-flex; align-items: center; color: inherit; text-decoration: none; flex: none; }
.logo__img { display: block; width: auto; max-width: none; }
/* Rozeta: złoto → czerwień → granat z pierścieniem w kolorze tła (motyw z sygnetów obu marek). */
/* Medal za lokatę (I złoty, II srebrny, III brązowy — judging/medals.py): wyniki na żywo, portal wystawcy */
.medal { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; flex: none; }
.medal__disc { width: 18px; height: 18px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1.5px rgba(11,20,38,.3); }
.medal--gold .medal__disc { background: radial-gradient(circle at 35% 30%, #FFF3C4, #E4B23A 55%, #9A6A00); }
.medal--silver .medal__disc { background: radial-gradient(circle at 35% 30%, #FFFFFF, #C4CAD4 55%, #6F7888); }
.medal--bronze .medal__disc { background: radial-gradient(circle at 35% 30%, #F8D9BC, #C9905A 55%, #7E4E22); }
.rosette { width: 1.2em; height: 1.2em; border-radius: 50%; background: var(--ds-gold); display: grid; place-items: center; flex: none; }
.rosette > span { width: 68%; height: 68%; border-radius: 50%; background: var(--ds-red); display: grid; place-items: center; }
.rosette > span > span { width: 58%; height: 58%; border-radius: 50%; background: var(--ds-navy); box-shadow: 0 0 0 .08em var(--ds-paper); }
[data-theme="dark"] .rosette > span > span, [data-theme="tv"] .rosette > span > span { background: var(--ds-paper); box-shadow: none; }

/* ---------- Odznaki tytułów — zawsze z tekstem ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 6px 8px; border-radius: var(--ds-r-badge);
  font: 800 13px/1 var(--ds-font); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  background: var(--ds-neutral-bg); color: var(--ds-ink);
}
.badge::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; box-sizing: border-box; flex: none; }
.badge--sm { font-size: 11px; padding: 4px 8px; }
.badge--sm::before { display: none; }
.badge--gold { background: var(--ds-gold); color: #0B1426; }          /* BIS, zw. grupy */
.badge--red { background: #C8322B; color: #fff; }                     /* BOB, CWC */
.badge--blue { background: var(--ds-blue); color: #fff; }             /* CACIB */
.badge--blue-outline { background: #fff; color: var(--ds-blue); box-shadow: inset 0 0 0 2px var(--ds-blue); } /* Res. CACIB */
.badge--silver { background: var(--ds-silver-bg); color: var(--ds-silver-text); box-shadow: inset 0 0 0 2px var(--ds-silver); } /* BOS, Res. */
.badge--teal { background: var(--ds-teal); color: #fff; }             /* BOJ, Zw. Młodzieży */
.badge--bronze { background: var(--ds-bronze); color: #0B1426; }         /* 3. miejsce */
.badge--navy { background: var(--ds-navy); color: #fff; }             /* ranga wystawy */
.badge--plain { background: var(--ds-surface-2); color: var(--ds-ink); }

/* ---------- Statusy (pill) ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: var(--ds-r-pill);
  font: 600 13px/1.1 var(--ds-font); background: var(--ds-neutral-bg); color: var(--ds-ink); white-space: nowrap;
}
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ds-muted-2); flex: none; }
.pill--ok { background: var(--ds-ok-bg); color: var(--ds-ok-text); }
.pill--ok::before { background: var(--ds-ok); }
.pill--accepted { background: var(--ds-navy); color: #fff; }
.pill--accepted::before { background: var(--ds-gold); }
.pill--withdrawn { background: #fff; color: var(--ds-muted); box-shadow: inset 0 0 0 1px #C9CED8; text-decoration: line-through; }
.pill--withdrawn::before { display: none; }
.pill--warn { background: var(--ds-warn-bg); color: var(--ds-warn-text); }
.pill--warn::before { background: transparent; border: 2px solid var(--ds-warn); box-sizing: border-box; }
.pill--error { background: var(--ds-red-bg); color: var(--ds-red-text); }
.pill--error::before { background: #C8322B; border-radius: 1px; transform: rotate(45deg); }
.pill--verified::before { content: "✓"; width: auto; height: auto; background: none; font-weight: 800; }
.pill--deadline { background: var(--ds-red-bg); color: var(--ds-red-text); font-size: 12px; padding: 3px 8px; }
.pill--deadline::before, .pill--open::before { display: none; }
.pill--open { background: var(--ds-ok-bg); color: var(--ds-ok-text); font-size: 12px; padding: 3px 8px; }
[data-theme="dark"] .pill { background: #1B2745; color: var(--ds-ink); }
[data-theme="dark"] .pill--ok { background: rgba(61,220,132,.14); color: #9FF0C2; }

/* ---------- Przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--ds-hit);
  padding: 0 20px; border: 0; border-radius: var(--ds-r-btn); font: 700 16px/1.1 var(--ds-font);
  text-decoration: none; cursor: pointer; background: var(--ds-navy); color: #fff; text-align: center;
}
.btn:hover { filter: brightness(1.12); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; filter: none; }
.btn--accent { background: var(--ds-gold); color: #0B1426; font-weight: 800; }
.btn--secondary { background: transparent; color: var(--ds-navy); box-shadow: inset 0 0 0 2px var(--ds-navy); }
[data-theme="dark"] .btn--secondary { color: var(--ds-ink); box-shadow: inset 0 0 0 2px var(--ds-ink); }
.btn--ghost { background: transparent; color: var(--ds-ink); }
.btn--danger { background: #C8322B; }
.btn--ghost.danger, a.btn.danger { color: #B42318; }
[data-theme="dark"] .btn--ghost.danger, [data-theme="dark"] a.btn.danger { color: #FF8A80; }
.btn--lg { min-height: 52px; border-radius: var(--ds-r-btn-lg); font-size: 17px; }
.btn--block { width: 100%; }
.btn--icon { width: var(--ds-hit); padding: 0; background: transparent; color: var(--ds-ink); box-shadow: inset 0 0 0 1.5px var(--ds-line-strong); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 16px; border-radius: var(--ds-r-pill);
  border: 1.5px solid var(--ds-line-strong); background: var(--ds-surface); color: var(--ds-ink);
  font: 600 14px/1 var(--ds-font); white-space: nowrap; text-decoration: none; cursor: pointer;
}
.chip[aria-pressed="true"], .chip.is-active { background: var(--ds-navy); border-color: var(--ds-navy); color: #fff; }
.chip[aria-pressed="true"]::before, .chip.is-active::before { content: "✓"; }
.chip-row { display: flex; gap: 8px; overflow-x: auto; position: relative; padding-bottom: 4px; scrollbar-width: none; }
/* position: relative — .sr-only w aktywnym chipie nie wychodzi poza przewijany rząd (poziome przewijanie strony). */

.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 8px; background: #E7E3DA; }
.segmented a, .segmented button { border: 0; background: none; padding: 7px 12px; border-radius: 6px; font: 600 14px var(--ds-font);
  color: var(--ds-muted); text-decoration: none; cursor: pointer; }
.segmented .is-active { background: #fff; color: var(--ds-ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* ---------- Karty, arkusze, listy ---------- */
.card { background: var(--ds-surface); border-radius: var(--ds-r-card); box-shadow: var(--ds-shadow-card); overflow: hidden; }
.card__body { padding: 16px; }
.card--outline { box-shadow: none; border: 1px solid var(--ds-line); }
.sheet { background: var(--ds-surface); border-radius: var(--ds-r-sheet) var(--ds-r-sheet) 0 0; position: relative; }
.stack { display: flex; flex-direction: column; gap: var(--gap, 12px); }
.row { display: flex; align-items: center; gap: var(--gap, 12px); }
.row--between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.divider { height: 1px; background: var(--ds-line); border: 0; margin: 16px 0; }

/* Tabela (cennik, wyniki, panel) */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { font: 700 11px var(--ds-font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--ds-muted);
  background: var(--ds-surface-2); text-align: left; padding: 9px 12px; }
.table td { padding: 10px 12px; border-top: 1px solid var(--ds-line); vertical-align: middle; }
.table .num { text-align: right; }
.table .strong { font-weight: 700; }

/* Formularze */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .label { font-weight: 700; font-size: 14px; }
.field .help { font-size: 13px; color: var(--ds-muted); }
.field .errorlist { list-style: none; margin: 0; padding: 0; color: var(--ds-red-text); font-size: 13px; font-weight: 600; }
.input, .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea {
  width: 100%; min-height: var(--ds-hit); padding: 10px 14px; border: 1.5px solid var(--ds-line-strong); border-radius: 8px;
  background: var(--ds-surface); color: var(--ds-ink); font: 16px var(--ds-font);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ds-navy); box-shadow: 0 0 0 3px rgba(19,40,74,.15); }

/* Karta-opcja (radio) — kreator klasy */
.option { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--ds-line); border-radius: var(--ds-r-card);
  background: var(--ds-surface); cursor: pointer; }
.option input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--ds-navy); flex: none; }
/* Obrys wybranej opcji przez outline — bez przesuwania zawartości o grubość ramki. */
.option.is-suggested, .option:has(input:checked) { border-color: transparent; outline: 2px solid var(--ds-navy); outline-offset: -1px; }
.option.is-disabled { opacity: .55; cursor: not-allowed; background: var(--ds-surface-2); }
.note { background: var(--ds-info-bg); border-radius: 10px; padding: 12px 14px; font-size: 14px; color: var(--ds-text-2); }
.tag-suggest { display: inline-block; background: var(--ds-gold); color: #0B1426; font: 800 11px var(--ds-font); letter-spacing: .08em;
  text-transform: uppercase; padding: 3px 7px; border-radius: 3px; }

/* Pasek postępu kreatora */
.steps { display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); gap: 6px; }
.steps span { height: 4px; border-radius: 2px; background: var(--ds-line-strong); }
.steps .done { background: var(--ds-navy); } .steps .current { background: var(--ds-gold); }
.progress { height: 6px; border-radius: 3px; background: var(--ds-line); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--ds-gold); }

/* Odliczanie do terminu */
.countdown { background: var(--ds-navy); color: #fff; border-radius: 10px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.countdown__label { font-size: 12px; line-height: 1.25; opacity: .85; }
.countdown__time { font-stretch: 125%; font-weight: 900; font-size: 24px; letter-spacing: -0.03em; white-space: nowrap; }
.countdown__time .u { font-size: 14px; color: var(--ds-gold); margin-left: 1px; }
.countdown__time .sec { color: var(--ds-gold); }
.countdown__time .sep { opacity: .5; }

/* Na żywo */
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ds-live); display: inline-block;
  animation: ds-pulse 1.6s ease-out infinite; }
@keyframes ds-pulse { 0% { box-shadow: 0 0 0 0 rgba(61,220,132,.6); } 100% { box-shadow: 0 0 0 10px rgba(61,220,132,0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.live-label { font: 700 13px var(--ds-font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ds-live); display: inline-flex; align-items: center; gap: 8px; }

/* Blok daty w liście wystaw */
.datebox { width: 54px; flex: none; text-align: center; }
.datebox__d { font-stretch: 125%; font-weight: 900; font-size: 24px; line-height: 1; letter-spacing: -0.03em; }
.datebox__m { font: 700 11px var(--ds-font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ds-muted); }

/* Awatar */
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--ds-navy); color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 13px; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--lg { width: 56px; height: 56px; font-size: 18px; }
.thumb { border-radius: 8px; object-fit: cover; background: var(--ds-surface-2); flex: none; }

/* Komunikaty Django */
.messages { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.messages li { padding: 12px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; background: var(--ds-neutral-bg); }
.messages .success { background: var(--ds-ok-bg); color: var(--ds-ok-text); }
.messages .warning { background: var(--ds-warn-bg); color: var(--ds-warn-text); }
.messages .error { background: var(--ds-red-bg); color: var(--ds-red-text); }

/* ---------- Układ aplikacji (portal): mobile-first, dolna nawigacja; od 900 px — górny pasek ---------- */
.app { min-height: 100dvh; display: flex; flex-direction: column; }
.app__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px;
  position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--ds-paper) 92%, transparent); backdrop-filter: blur(8px); }
.app__top nav:not(.lp-lang) { display: none; gap: 4px; }
.app__top nav:not(.lp-lang) a { padding: 10px 14px; border-radius: 8px; font-weight: 700; font-size: 15px; color: var(--ds-muted-2); text-decoration: none; }
.app__top nav:not(.lp-lang) a.is-active { color: var(--ds-ink); background: var(--ds-surface-2); }
@media (max-width: 899.98px) { .app__top > .lp-lang, .app__top > .lp-langmenu { margin-left: auto; } }  /* telefon: logo | PL EN DE · konto */
.app__main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 8px 16px 104px; }
.app__main--flush { padding: 0 0 104px; max-width: none; }
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: 72px; padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(4, 1fr); background: var(--ds-surface); border-top: 1px solid var(--ds-line); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; position: relative;
  font: 600 11px var(--ds-font); color: var(--ds-muted-2); text-decoration: none; }
.bottom-nav a.is-active { color: var(--ds-ink); font-weight: 800; }
.bottom-nav svg { width: 22px; height: 22px; }
.bottom-nav .count { position: absolute; top: 10px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #C8322B; color: #fff; font: 800 11px/18px var(--ds-font); text-align: center; }
@media (min-width: 900px) {
  .app__top { padding: 16px 32px; border-bottom: 1px solid var(--ds-line); }
  .app__top nav:not(.lp-lang) { display: flex; }
  .bottom-nav { display: none; }
  .app__main { padding: 24px 32px 64px; }
  .app__main--flush { padding: 0 0 64px; }
}

/* Przyklejony pasek akcji na dole (strona wystawy, kreator) */
.action-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--ds-surface); border-top: 1px solid var(--ds-line); }
.has-action-bar .bottom-nav { display: none; }
@media (min-width: 900px) { .action-bar { position: sticky; border-radius: 14px; margin-top: 24px; box-shadow: var(--ds-shadow-card); } }

/* Siatki responsywne */
.grid { display: grid; gap: var(--gap, 16px); }
@media (min-width: 700px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* Wersja aplikacji w stopkach (templates/_version.html) */
.app-version { font: 500 11px var(--ds-font-mono); color: var(--ds-muted-2); letter-spacing: .02em; }
a.app-version { text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; }
a.app-version:hover, a.app-version:focus-visible { color: inherit; text-decoration-style: solid; }
.app-legal { font-size: 12px; color: var(--ds-muted-2); }
.app-legal a { color: inherit; }
.app-foot { text-align: center; padding: 16px 16px calc(88px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .app-foot { padding-bottom: 20px; } }

/* ---------- Przełącznik języka PL/EN/DE (templates/landing/_lang.html, 0.13.0) ---------- */
/* Znaczek „Ilustracja AI” na zdjęciach wygenerowanych przez AI ({% picture … ai=True %}) — na kontenerze zdjęcia
   (position: relative/absolute), nie w pliku; zdjęcia organizatorów, zrzuty aplikacji i logo go nie mają. */
.ai-badge { position: absolute; right: 12px; bottom: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 6px;
  font: 700 11px/1 var(--ds-font-mono); letter-spacing: .08em; text-transform: uppercase; padding: 6px 9px;
  border-radius: 999px; background: rgba(11,20,38,.20); color: rgba(255,255,255,.5); text-shadow: 0 1px 2px rgba(0,0,0,.35);
  pointer-events: none; white-space: nowrap; }
.ai-badge svg { width: 12px; height: 12px; flex: none; }
@media (max-width: 600px) { .ai-badge { right: 10px; bottom: 10px; padding: 5px 8px; } }
.lp-lang { display: flex; font: 700 13px var(--ds-font-mono); }
.lp-lang a { min-height: 48px; min-width: 44px; display: flex; align-items: center; justify-content: center; text-decoration: none;
  color: var(--ds-muted) !important; border-radius: 6px; position: relative; }
.lp-lang a::before { content: ""; position: absolute; inset: 6px 2px; border-radius: 6px; z-index: -1; }
.lp-lang a span[aria-hidden] { position: relative; }
/* Aktywny język (0.15.1): granatowa pigułka, biały napis (AA: 14:1); na ciemnych stronach (wyniki na żywo) — jasna
   pigułka, ciemny napis. `z-index: 0` na linku — tło nagłówka czy reguły nawigacji nie przykryją pigułki. */
.lp-lang a { z-index: 0; }
.lp-lang a.is-active { color: #fff !important; }
.lp-lang a.is-active::before { background: var(--ds-navy); }
[data-theme="dark"] .lp-lang a.is-active, [data-theme="tv"] .lp-lang a.is-active { color: var(--ds-paper) !important; }
[data-theme="dark"] .lp-lang a.is-active::before, [data-theme="tv"] .lp-lang a.is-active::before { background: var(--ds-ink); }
.lp-lang { isolation: isolate; }
.lp-lang--compact a { min-height: 40px; min-width: 36px; }
/* Zwinięty przełącznik (`{% include "landing/_lang.html" with menu=True %}`, 0.15.1): przycisk „globus + PL” i lista pod nim.
   Domyślnie rząd PL EN DE; zwija się na wąskim pasku — progi niżej (portal) i w backoffice/panel.css (panel). */
.lp-langmenu { display: none; position: relative; }
.lp-langmenu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-height: 40px; min-width: 40px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--ds-line);
  background: var(--ds-surface); color: var(--ds-ink); font: 700 13px var(--ds-font-mono); white-space: nowrap; }
.lp-langmenu > summary::-webkit-details-marker { display: none; }
.lp-langmenu > summary svg { width: 16px; height: 16px; flex: none; }
.lp-langmenu > summary:focus-visible { outline: 3px solid var(--ds-gold); outline-offset: 2px; }
.lp-langmenu[open] > summary { background: var(--ds-navy); border-color: var(--ds-navy); color: #fff; }
.lp-langmenu__pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 45; padding: 4px; border-radius: 10px;
  background: var(--ds-surface); border: 1px solid var(--ds-line); box-shadow: 0 12px 32px rgba(11, 20, 38, .18); }
.lp-langmenu__pop a { min-width: 44px; min-height: 44px; }
@media (max-width: 479.98px) {
  .app__top .lp-langmenu { display: block; }
  .app__top .lp-langmenu__inline { display: none; }
  .app__top .lp-langmenu > summary { padding: 0 8px; gap: 4px; }
}
@media (max-width: 399.98px) {  /* 360 px po niemiecku: logo | globus + DE | Einloggen */
  .app__top { gap: 8px; }
  .app__top .logo__img { height: 28px !important; width: auto; }
}
