/* Logiczne — wspólny wygląd (motyw, czcionka i rozmiar tekstu, pasek u góry, karty, stopka) */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
[hidden] { display: none !important; }
.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; }

:root {
  --bg: #f1f5f9; --card: #ffffff; --ink: #0f172a; --soft: #475569; --line: #cbd5e1; --hover: #e2e8f0;
  --accent: #2563eb; --brand-text: #1d4ed8; --btn: #2563eb; --btn-h: #1d4ed8; --btn-ink: #ffffff;
  --good: #15803d; --bad: #b91c1c; --siatka: #94a3b8; --pole: #ffffff; --sel: #dbeafe;
  color-scheme: light;
}
html.dark {
  --bg: #0f172a; --card: #1e293b; --ink: #f1f5f9; --soft: #cbd5e1; --line: #334155; --hover: #0f172a;
  --accent: #60a5fa; --brand-text: #93c5fd; --btn: #2563eb; --btn-h: #1d4ed8; --btn-ink: #ffffff;
  --good: #4ade80; --bad: #fca5a5; --siatka: #475569; --pole: #0f172a; --sel: #1e3a5f;
  color-scheme: dark;
}

/* Czcionka i rozmiar tekstu (okienko „Aa”, js/wyglad.js); Atkinson +6%, bo ma niższe małe litery */
@font-face { font-family: 'Atkinson Hyperlegible Next'; font-weight: 200 800; font-display: swap; src: url('/fonts/atkinson-hyperlegible-next-latin-ext-wght-normal.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; }
@font-face { font-family: 'Atkinson Hyperlegible Next'; font-weight: 200 800; font-display: swap; src: url('/fonts/atkinson-hyperlegible-next-latin-wght-normal.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; }
:root { --txt: 1; --fadj: 1; }
html[data-font="wyrazna"] { --fadj: 1.06; }
html[data-size="wiekszy"] { --txt: 1.125; }
html[data-size="najwiekszy"] { --txt: 1.25; }
html { font-size: calc(100% * var(--txt) * var(--fadj)); }
html[data-font="wyrazna"] body, html[data-font="wyrazna"] button, html[data-font="wyrazna"] select { font-family: 'Atkinson Hyperlegible Next', system-ui, sans-serif; }

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg); color: var(--ink);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  overflow-x: hidden; overflow-y: auto; padding: 8px;
  padding-top: max(8px, env(safe-area-inset-top)); padding-bottom: max(8px, env(safe-area-inset-bottom));
  padding-left: max(8px, env(safe-area-inset-left)); padding-right: max(8px, env(safe-area-inset-right));
}
button, input, select { font: inherit; color: inherit; }

/* Pasek u góry: znaczek powrotu, nazwa, przyciski */
.top-bar { width: 100%; max-width: 720px; flex-shrink: 0; display: flex; align-items: center; justify-content: flex-start; flex-wrap: nowrap; gap: 8px; }
html[data-size] .top-bar { flex-wrap: wrap; }
.brand { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 1.25rem; font-weight: 800; color: var(--ink); text-decoration: none; border-radius: 6px; }
.brand-name { line-height: 1.1; min-width: 0; }
.brand-sub { font-size: .8em; font-weight: 600; color: var(--soft); white-space: nowrap; }
.brand .logo { display: none; width: 28px; height: 28px; border-radius: 7px; }
@media (min-width: 1024px) { .brand .logo { display: block; } }
.bar-actions { display: flex; flex-wrap: nowrap; flex-shrink: 0; justify-content: flex-end; gap: 6px; margin-left: auto; }
.bar-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font-weight: 700; cursor: pointer; }
.bar-btn:hover, .bar-btn[aria-expanded="true"] { background: var(--hover); }
.bar-btn svg { width: 1.25rem; height: 1.25rem; display: block; }
.bar-btn small { font-size: 0.75em; }
.sun { display: none !important; color: #fbbf24; }
html.dark .sun { display: block !important; }
html.dark .moon { display: none !important; }
.wyglad { position: relative; }

/* Powrót na stronę główną ivoca.org: kwadratowy znaczek „i”, skrajnie po lewej w pasku u góry */
a.ivoca-dom { display: inline-grid; place-items: center; flex: none; width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 12px; background: #2563eb; color: #fff; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; line-height: 1; text-decoration: none; }
a.ivoca-dom::before { content: "i"; font-size: 1.25rem; font-weight: 700; }
a.ivoca-dom:hover { background: #1d4ed8; }
a.ivoca-dom:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
@media (max-width: 480px) { .top-bar { row-gap: 0; } }

button:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

main { width: 100%; max-width: 720px; flex: 1 0 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.card { border: 1px solid var(--line); border-radius: 16px; background: var(--card); padding: 12px; }
details.card > summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; border-radius: 8px; }
details.card[open] > summary { margin-bottom: 6px; }
details.card p, details.card li { line-height: 1.5; font-size: 0.9375rem; }
details.card ul, details.card ol { padding-left: 1.25rem; display: grid; gap: 6px; }
details.card p + ul, details.card p + ol, details.card ul + p, details.card ol + p { margin-top: 8px; }
.card a, main p a { color: var(--brand-text); text-decoration: underline 1px color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: .2em; }
.card a:hover, .card a:focus-visible { text-decoration-color: currentColor; text-decoration-thickness: 2px; }

.site-footer { flex-shrink: 0; text-align: center; color: var(--soft); font-size: 0.75rem; line-height: 1.6; }
.site-footer a { color: var(--brand-text); font-weight: 600; text-decoration: underline 2px transparent; text-underline-offset: .25em; border-radius: 4px; transition: text-decoration-color .15s; }
.site-footer a:hover, .site-footer a:focus-visible { text-decoration-color: currentColor; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

