/* Montserrat – wersja zmienna 100–900 (SIL OFL, licencja: montserrat-OFL.txt), latin + latin-ext (polskie znaki) */
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('montserrat-latin.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('montserrat-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root {
  --bg: #0B1016;
  --panel: #121A23;
  --panel-2: #1B2632;
  --line: #223041;
  --line-2: #2D3E52;
  --text: #E6EDF3;
  --text-2: #C9D3DC;
  --muted: #9AA7B4;
  --accent: #7CC4FF;
  --ok: #3DD68C;
  --ok-bg: #10261C;
  --red: #D92D20;
  --red-2: #F04438;
  --red-bg: #2A1214;
  --red-bg-2: #3A1416;
  --amber: #F5A524;
  --magenta: #C11574;
  --sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  /* Jedna czcionka na całej stronie; dawne miejsca „mono” (kody, zegary, liczby) mają cyfry równej szerokości */
  --mono: var(--sans);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-variant-numeric: tabular-nums; }
a { color: var(--accent); }
a:hover { color: #B5DCFF; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); font-size: 13px; }
.muted-strong { color: var(--text-2); font-size: 15px; }
.label { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.1em; color: var(--muted); }
.hint { margin: 4px 0 0; font-size: 12px; color: var(--muted); }

.page { max-width: 1400px; margin: 0 auto; padding: 20px 24px 28px; display: flex; flex-direction: column; gap: 18px; }

/* Górny pasek */
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: 0.08em; }
.brand-domain { color: var(--accent); font-weight: 600; letter-spacing: 0.02em; }
.brand-sub { font-size: 13px; color: var(--muted); }
.topbar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pill { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 13px; color: var(--text-2); }
.status-pill { min-height: 44px; flex-wrap: wrap; gap: 6px 14px; padding: 6px 14px; }
.status-src { display: inline-flex; align-items: center; gap: 8px; }
.status-sep { width: 1px; align-self: stretch; background: var(--line-2); }
.status-clock { font-size: 15px; font-weight: 500; color: var(--text); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot.ok { background: var(--ok); }
.dot.err { background: var(--red-2); }
.btn { height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; background: var(--panel); color: var(--text); border: 1px solid var(--line-2); border-radius: 8px; font: inherit; font-size: 14px; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--accent); }
.btn[aria-pressed="true"] { border-color: var(--ok); color: var(--ok); }
/* Pasek wsparcia na samej górze – wysokość jak pasek pogody na dole */
.support-bar { min-height: 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 16px; padding: 6px 16px; background: #FFDD00; color: #1A1203; font-size: 14px; font-weight: 600; line-height: 1.3; text-decoration: none; }
.support-bar:hover { background: #FFE74D; color: #1A1203; }
.fund-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fund-head svg { flex-shrink: 0; }
.fund-side { display: flex; align-items: center; gap: 16px; }
.fund-progress { display: flex; align-items: center; gap: 10px; }
.fund-progress[hidden] { display: none; }
.fund-track { position: relative; width: 160px; height: 10px; background: rgba(26, 18, 3, 0.16); border-radius: 5px; overflow: hidden; }
/* Minimalny pasek (4 px), żeby przy 0 zł było widać, gdzie zaczyna się postęp */
.fund-fill { position: absolute; inset: 0 auto 0 0; width: 0; min-width: 4px; background: #1A1203; border-radius: 5px; transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }
.fund-amount { font-weight: 700; white-space: nowrap; }
.fund-amount small { font-size: 12px; font-weight: 600; opacity: 0.75; }
.fund-cta { padding: 3px 10px; background: #1A1203; border-radius: 6px; color: #FFDD00; white-space: nowrap; }
.support-bar:hover .fund-cta { background: #3A2A06; }
.support-bar:hover .fund-fill { background: #3A2A06; }
@media (prefers-reduced-motion: reduce) { .fund-fill { transition: none; } }
@media (max-width: 380px) { .fund-head svg { display: none; } }
.support-bar:focus-visible { outline: 2px solid #1A1203; outline-offset: -4px; }
.btn:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Alarmy */
.alerts { display: flex; flex-direction: column; gap: 12px; }
/* Wąski baner kanału alarmowego na Telegramie – między nagłówkiem a kafelkiem stanu */
.tg-bar { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 40px; padding: 6px 16px; background: #229ED9; border-radius: 8px; color: #FFFFFF; font-size: 14px; line-height: 1.35; text-decoration: none; }
.tg-bar:hover { background: #1B8BC2; color: #FFFFFF; }
.tg-bar:focus-visible { outline: 2px solid #FFFFFF; outline-offset: -4px; }
.tg-bar svg { flex-shrink: 0; }
.tg-bar strong { font-weight: 700; }
.tg-bar-short { display: none; }
.tg-bar-cta { flex-shrink: 0; padding: 3px 10px; background: rgba(255, 255, 255, 0.18); border-radius: 6px; font-weight: 600; white-space: nowrap; }
.alert { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; background: var(--red-bg-2); border: 2px solid var(--red-2); border-radius: 12px; padding: 16px 20px; }
.alert.radio { background: #2E2210; border-color: var(--amber); }
.alert.hijack { background: #2E0F22; border-color: #E0479B; }
.alert.other { background: #1C232B; border-color: #8B98A5; }
.alert.ok { background: var(--ok-bg); border-color: var(--ok); }
.alert.ok .alert-code { display: flex; align-items: center; justify-content: center; background: var(--ok); color: #06200F; padding: 7px 16px; }
.alert.ok .alert-kicker { color: #8FF0BF; }
.alert.ok .alert-detail { color: #CDEFDC; font-family: var(--sans); }
.alert.acked { opacity: 0.75; border-style: dashed; }
.alert-code { background: var(--red); color: #fff; border-radius: 10px; padding: 10px 16px; font-family: var(--mono); font-size: 30px; font-weight: 600; letter-spacing: 0.04em; }
.alert.radio .alert-code { background: var(--amber); color: #1A1203; }
.alert.hijack .alert-code { background: var(--magenta); color: #fff; }
.alert.other .alert-code { background: #8B98A5; color: #0B1016; }
.alert-body { flex: 1 1 320px; display: flex; flex-direction: column; gap: 4px; }
.alert-kicker { font-size: 13px; font-weight: 600; letter-spacing: 0.1em; color: #FFB4AB; }
.alert.radio .alert-kicker { color: #FFD48A; }
.alert.hijack .alert-kicker { color: #FFB3DA; }
.alert.other .alert-kicker { color: var(--text-2); }
.alert.other .alert-detail { color: var(--text-2); }
.alert-title { font-size: 20px; font-weight: 600; }
.alert-detail { font-size: 14px; color: #F2D6D3; font-family: var(--mono); }
.alert-actions { display: flex; flex-wrap: wrap; gap: 10px; }
[hidden] { display: none !important; }
.btn-push { width: 100%; background: var(--accent); border-color: var(--accent); color: #06131F; font-weight: 600; }
.btn-push[aria-pressed="true"] { background: var(--panel); color: var(--ok); border-color: var(--ok); font-weight: 500; }
.btn-push:disabled { opacity: 0.6; cursor: wait; }
.btn-ghost { background: transparent; border-color: #F2A49E; color: #fff; }
.alert.flash { animation: flash 1s ease-in-out 3; }
@keyframes flash { 50% { background: #5A1A1C; } }
.alert.other .btn-ghost { border-color: var(--muted); }
.alert.other.flash { animation-name: flash-gray; }
@keyframes flash-gray { 50% { background: #36414D; } }
@media (prefers-reduced-motion: reduce) { .alert.flash { animation: none; } }

/* Układ */
.layout { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }

/* Tranzyt */
.transit { flex-direction: row; flex-wrap: wrap; gap: 24px; padding: 20px; }
.transit-left { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.big-row { display: flex; align-items: baseline; gap: 10px; }
.big { font-size: 56px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.transit-status { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ok); }
.transit-status.bad { color: #FF8A80; }
.transit-status:empty { display: none; }
.levels { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.level { display: grid; grid-template-columns: 110px minmax(0, 1fr) 44px; gap: 12px; align-items: center; font-size: 13px; }
.level-name { color: var(--muted); }
.bar { height: 10px; background: var(--panel-2); border-radius: 5px; overflow: hidden; }
.bar > div { height: 100%; border-radius: 5px; background: var(--accent); transition: width 0.4s; }
.level-count { text-align: right; font-variant-numeric: tabular-nums; }

/* Radar samolotów z alarmem */
.tracks { display: flex; flex-direction: column; gap: 18px; }
.tracks:empty { display: none; }
.track { flex-direction: row; flex-wrap: wrap; gap: 18px; border: 2px solid var(--red-2); }
.track.radio { border-color: var(--amber); }
.track.hijack { border-color: var(--magenta); }
.track.other { border-color: #8B98A5; }
.track-map { flex: 3 1 340px; min-width: 0; min-height: 340px; border-radius: 8px; overflow: hidden; background: #0B0F14; }
.track-info { flex: 2 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.track-head { display: flex; align-items: center; gap: 12px; }
.track-head .chip { font-size: 18px; padding: 6px 10px; }
.track-title { display: flex; flex-direction: column; min-width: 0; }
.track-call { font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
.track-kicker { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; color: #FF8A80; }
.track.radio .track-kicker { color: var(--amber); }
.track.hijack .track-kicker { color: #F48FD0; }
.track.other .track-kicker { color: var(--text-2); }
.track-data { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 14px; margin: 0; font-size: 14px; }
.track-data dt { color: var(--muted); }
.track-data dd { margin: 0; overflow-wrap: anywhere; }
.track-data .sub { display: block; font-size: 12px; color: var(--muted); }
.track-note { font-size: 11px; color: var(--muted); margin: 0; }
.plane { background: none; border: 0; }
.plane svg { display: block; transform-origin: 50% 50%; }
.leaflet-container { background: #0B0F14; font: inherit; }
/* Jasne kafelki OSM przyciemnione do ciemnego motywu strony */
.leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9) saturate(0.4); }
.leaflet-control-attribution { font-size: 10px; }

/* Lotniska */
.ap-box { display: block; }
.ap-bar { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; min-height: 52px; padding: 10px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; list-style: none; }
.ap-bar::-webkit-details-marker { display: none; }
.ap-bar .label { font-size: 15px; }
.ap-bar .fold { margin-left: auto; }
.ap-bar:hover { border-color: var(--line-2); }
.ap-bar:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Zamknięte lotnisko: listwa jak kafelek zamkniętego lotniska */
.ap-box.has-closed .ap-bar { border: 2px solid #F97316; padding: 9px 17px; background: repeating-linear-gradient(135deg, rgba(249, 115, 22, 0.16) 0 14px, rgba(154, 167, 180, 0.10) 14px 28px), var(--panel); }
.ap-box.has-closed .ap-bar .label { color: #FDBA8C; }
.ap-zone { margin: 12px 0 10px; }
.airports { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.ap { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.ap.alarm { background: var(--red-bg); border: 2px solid var(--red-2); padding: 13px 15px; }
.ap.closed { border: 2px solid #F97316; padding: 13px 15px; background: repeating-linear-gradient(135deg, rgba(249, 115, 22, 0.16) 0 14px, rgba(154, 167, 180, 0.10) 14px 28px), var(--panel); }
.badge.closed { color: #1A0D03; background: #F97316; }
.ap-closed { background: rgba(11, 16, 22, 0.75); color: #FDBA8C; border-radius: 6px; padding: 5px 8px; font-size: 13px; font-weight: 600; }
.ap-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ap-icao { font-size: 20px; font-weight: 600; letter-spacing: 0.02em; }
.badge { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; border-radius: 4px; padding: 3px 7px; color: var(--ok); background: var(--ok-bg); }
.badge.alarm { color: #fff; background: var(--red); }
.ap-city { font-size: 14px; color: var(--text-2); }
.ap-count { display: flex; align-items: baseline; gap: 6px; }
.ap-count .num { font-size: 28px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.ap-flow { display: flex; gap: 14px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ap-alert { background: var(--red); color: #fff; border-radius: 6px; padding: 6px 8px; font-size: 13px; font-weight: 500; }

/* Kody */
.codes { display: flex; flex-direction: column; gap: 4px; }
.code-row { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.code-row.off { opacity: 0.55; }
.chip { font-family: var(--mono); font-size: 14px; font-weight: 600; border-radius: 6px; padding: 6px 8px; min-width: 52px; text-align: center; }
.c-emergency { background: var(--red); color: #fff; }
.c-radio { background: var(--amber); color: #1A1203; }
.c-hijack { background: var(--magenta); color: #fff; }
.c-other { background: #8B98A5; color: #0B1016; }
.c-gray { background: var(--line-2); color: var(--text); }
.c-closed { background: #F97316; color: #1A0D03; }
.code-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.code-name { font-size: 14px; font-weight: 500; overflow-wrap: break-word; }
.code-desc { font-size: 12px; color: var(--muted); }
.code-state { flex-shrink: 0; white-space: nowrap; min-height: 32px; padding: 0 10px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 6px; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; }
.code-state:hover { border-color: var(--accent); }
.code-state:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.code-state.on { color: var(--ok); border-color: var(--ok); background: var(--ok-bg); }
.code-state.static { display: inline-flex; align-items: center; cursor: default; border-color: transparent; background: none; }

/* Dziennik */
.log { display: flex; flex-direction: column; max-height: 420px; overflow-y: auto; }
.log-row { display: grid; grid-template-columns: 80px 52px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--panel-2); font-size: 13px; }
.log-time { font-family: var(--mono); color: var(--muted); }
.log-date { display: block; color: var(--text-2); }
.log-code { font-family: var(--mono); font-size: 12px; font-weight: 600; border-radius: 4px; padding: 2px 0; text-align: center; }
.log-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.log-title { font-weight: 500; }
.log-detail { color: var(--muted); overflow-wrap: anywhere; }
.empty { font-size: 13px; color: var(--muted); padding: 6px 0; }

.kv { display: flex; flex-direction: column; gap: 10px; }
.kv-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.kv-row .on { color: var(--ok); }
.kv-row .off { color: var(--muted); }

.footer { display: flex; flex-direction: column; gap: 16px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
/* Menu w stopce: dwie grupy przycisków z ikonami, bieżąca strona podświetlona */
.footer-nav { display: flex; flex-wrap: wrap; gap: 16px 40px; }
.footer-group { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.footer-head { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-link { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; color: var(--text-2); font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; transition: border-color 0.15s, color 0.15s, background 0.15s; }
.footer-link svg { flex-shrink: 0; color: var(--accent); }
.footer-link:hover { border-color: var(--accent); color: var(--text); background: var(--panel-2); }
.footer-link[aria-current="page"] { border-color: var(--accent); color: var(--accent); background: var(--panel-2); }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding-top: 12px; border-top: 1px solid var(--panel-2); line-height: 1.5; }
@media (max-width: 680px) {
  .footer-nav, .footer-group { width: 100%; }
  .footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-link { height: 44px; padding: 0 12px; white-space: normal; line-height: 1.25; }
}

/* Pasek pogody na dole ekranu – tekst przesuwa się od prawej do lewej */
body { padding-bottom: 44px; }
.wxbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1100; height: 40px; display: flex; align-items: center; background: #1E3A52; border-top: 1px solid var(--accent); font-size: 13px; }
.wxbar-label { flex: none; height: 100%; display: flex; align-items: center; padding: 0 12px; font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; color: #06131F; background: var(--accent); }
.wxbar-view { flex: 1; min-width: 0; overflow: hidden; height: 100%; display: flex; align-items: center; }
.wxbar-track { display: flex; width: max-content; white-space: nowrap; will-change: transform; }
.wx-copy { display: contents; }
.wxbar-track.run { animation: wx-scroll linear infinite; }
.wxbar:hover .wxbar-track, .wxbar:focus-within .wxbar-track { animation-play-state: paused; }
@keyframes wx-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.wx-item { display: inline-flex; align-items: center; gap: 8px; padding: 0 22px; border-right: 1px solid #2F5070; }
.wx-icao { font-family: var(--mono); font-weight: 600; color: var(--text); }
.wx-city { color: var(--text-2); }
.wx-data { font-family: var(--mono); color: var(--text); }
.wx-data.muted { color: var(--muted); }
.wx-cat { font-family: var(--mono); font-size: 11px; font-weight: 600; border-radius: 4px; padding: 1px 6px; }
.wx-cat.VFR { color: var(--ok); background: var(--ok-bg); }
.wx-cat.MVFR { color: #06131F; background: var(--accent); }
.wx-cat.IFR { color: #fff; background: var(--red); }
.wx-cat.LIFR { color: #fff; background: var(--magenta); }
@media (prefers-reduced-motion: reduce) {
  .wxbar-view { overflow-x: auto; }
  .wxbar-track.run { animation: none; }
}

/* Opis „Jak to działa?” na dole strony – rozwijany (<details>) */
.howto { display: block; }
.howto summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; cursor: pointer; list-style: none; }
.howto summary::-webkit-details-marker { display: none; }
.howto summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
/* Strzałka rozwijania (Lotniska, Jak to działa?) */
.fold { flex: none; width: 10px; height: 10px; margin-right: 6px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.2s; }
details[open] > summary .fold { transform: rotate(-135deg) translate(-2px, -2px); }
.howto[open] summary { margin-bottom: 12px; }
.howto-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1100px) { .howto-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .howto-grid { grid-template-columns: 1fr; } }
.howto .badge { white-space: nowrap; }
.howto article { background: var(--panel-2); border-radius: 10px; padding: 16px 18px; }
.howto h3 { margin: 0 0 8px; font-size: 16px; font-weight: 600; color: var(--text); }
.howto p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-2); }
.howto ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.howto li .chip { display: inline-block; min-width: 0; font-size: 12px; padding: 2px 6px; margin-right: 4px; }
.howto .wx-cat { white-space: nowrap; }

/* Archiwum alarmów (/alarmy, /alarm/…) */
a.brand { color: inherit; text-decoration: none; }
body.arch { padding-bottom: 0; }
.crumbs { font-size: 13px; color: var(--muted); }
.arch-title { margin: 0; font-size: 22px; line-height: 1.3; font-weight: 600; }
.arch-lead, .arch-text { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-2); max-width: 900px; }
.arch-text.muted { font-size: 13px; color: var(--muted); }
.arch-alarm { border: 2px solid var(--red-2); }
.arch-alarm.radio { border-color: var(--amber); }
.arch-alarm.hijack { border-color: var(--magenta); }
.arch-alarm.other { border-color: var(--line-2); }
.arch-grid { display: flex; flex-wrap: wrap; gap: 18px; }
.arch-grid .track-map { flex: 3 1 340px; min-height: 380px; }
.arch-grid .track-data { flex: 2 1 280px; align-content: start; }
.sub-inline { font-size: 12px; color: var(--muted); }
.arch-list { display: flex; flex-direction: column; }
.arch-row { display: grid; grid-template-columns: 92px 64px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 6px; border-top: 1px solid var(--panel-2); color: inherit; text-decoration: none; font-size: 14px; border-radius: 6px; }
.arch-row:hover { background: var(--panel-2); }
.arch-row .chip { text-align: center; }
.log-link { font-size: 13px; }
.closure-row { cursor: default; }
/* Zakładki archiwum: alarmy i zamknięcia lotnisk */
.arch-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.arch-tab { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; color: var(--text-2); font-size: 14px; font-weight: 500; text-decoration: none; }
.arch-tab:hover { border-color: var(--accent); color: var(--text); }
.arch-tab[aria-current="page"] { border-color: var(--accent); color: var(--accent); background: var(--panel-2); font-weight: 600; }
.closure-row:hover { background: none; }
.closure-text { display: block; margin-top: 4px; font-family: var(--mono); font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.faq-toc { margin: 4px 0 0; padding-left: 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; font-size: 14px; line-height: 1.5; }
@media (max-width: 760px) { .faq-toc { grid-template-columns: 1fr; } }
.faq { gap: 0; }
.faq-item { padding: 16px 0; border-top: 1px solid var(--panel-2); scroll-margin-top: 16px; }
.faq-item:first-child { border-top: 0; padding-top: 0; }
.faq-item h2 { margin: 0 0 8px; font-size: 17px; font-weight: 600; line-height: 1.4; color: var(--text); }
.faq-item p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--text-2); max-width: 900px; }

/* Strony po angielsku (/en/, /en/api) */
.en-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.en-actions .btn-push { width: auto; }
/* Przełącznik języka na stronie API (/dla-programistow ↔ /en/api) */
.api-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 16px; }
.api-head .track-head { flex: 1 1 320px; min-width: 0; }
.lang-switch { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border: 1px solid var(--accent); border-radius: 18px; color: var(--accent); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.lang-switch:hover { background: var(--panel-2); }
.api-endpoints { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 18px; font-size: 15px; line-height: 1.5; }
.api-endpoints dt { margin: 0; }
.api-endpoints dd { margin: 0; color: var(--text-2); }
.api-endpoints code, .api-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; color: var(--accent); }
.api-code { min-width: 0; max-width: 100%; margin: 0; padding: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; line-height: 1.5; color: var(--text-2); }
.api-plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.api-plan { padding: 14px; background: var(--panel-2); border-radius: 8px; }
.api-plan h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.api-plan p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-2); }
@media (max-width: 960px) { .api-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .api-endpoints { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .api-endpoints dt { margin-top: 8px; }
  .api-endpoints code { overflow-wrap: anywhere; }
}
@media (max-width: 680px) { .api-plans { grid-template-columns: minmax(0, 1fr); } }

/* Telefon / wąski ekran: jedna kolumna w kolejności: nagłówek, kafelek stanu, radar alarmu,
   przestrzeń powietrzna, kody, alarm w tle, dziennik, lotniska (zwinięte), „Jak to działa?” (zwinięte) */
@media (max-width: 960px) {
  .layout, .main, .side { display: contents; }
  .topbar { order: 0; }
  .tg-bar { order: 0; }
  .alerts { order: 1; }
  .tracks { order: 2; }
  .transit { order: 3; }
  .panel-codes { order: 4; }
  .panel-push { order: 5; }
  .panel-log { order: 6; }
  .ap-box { order: 7; }
  .howto { order: 9; }
  .footer { order: 10; }
}

/* Telefon: górny pasek w wierszach – kawa, nazwa, „Dane na żywo” + dźwięk, dwa zegary */
@media (max-width: 720px) {
  /* Telefon: karta – tytuł na całą szerokość, pod nim kwota z paskiem postępu i przycisk „Wesprzyj” */
  .support-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; min-height: 44px; margin: 16px 16px 0; padding: 10px 12px; border-radius: 8px; font-size: 13px; }
  .fund-head { grid-column: 1 / -1; }
  /* Bez „nowy” (a na najwęższych ekranach bez kubka) tytuł mieści się w jednym wierszu */
  .fund-opt { display: none; }
  .fund-side { display: contents; }
  .fund-progress { flex-direction: column; align-items: stretch; gap: 4px; min-width: 0; }
  .fund-amount { order: -1; }
  .fund-track { width: 100%; }
  .fund-cta { grid-column: 2; min-height: 36px; display: flex; align-items: center; justify-self: end; }
  .tg-bar { min-height: 44px; justify-content: space-between; text-align: left; }
  .tg-bar-sub { display: none; }
  .tg-bar-short { display: block; font-size: 12px; opacity: 0.9; }
  .page { padding-top: 10px; }
  .topbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .topbar-right, .status-pill { display: contents; }
  .status-sep { display: none; }
  .brand { order: -1; grid-column: 1 / -1; margin: 4px 0; }
  .status-src, .status-clock { min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
  .status-src { color: var(--text-2); }
  .status-clock { order: 1; }
  .btn { padding: 0 10px; }
  .brand-name { font-size: 18px; letter-spacing: 0.06em; }
  .brand-domain { white-space: nowrap; }
}

/* Bardzo wąski telefon: domena w osobnym wierszu, kody bez łamania słów w środku */
@media (max-width: 400px) {
  .brand-domain { display: block; }
  .brand-dot { display: none; }
  .topbar .btn { gap: 6px; padding: 0 8px; }
  .code-row { flex-wrap: wrap; row-gap: 2px; padding: 4px 0; }
  .code-text { flex: 1 1 130px; }
  .code-name { overflow-wrap: normal; }
  .code-state { margin-left: auto; }
}

@media (max-width: 520px) {
  .track-map { min-height: 280px; }
  .page { padding: 16px; }
  .big { font-size: 44px; }
  .alert-code { font-size: 24px; }
}
