/* ===== Teori D – wygląd =====
   Od 2026-11-12: granatowe menu z lewej (na telefonie pasek na dole), jasna treść w kartach, egzamin na pełnym ekranie.
   Kolory TYLKO przez zmienne poniżej. Trzy zestawy: jasny, ciemny automatyczny (z systemu) i ciemny wybrany ręcznie. */
:root {
  --bg: #f3f5f9; --surface: #ffffff; --surface-2: #f2f5fa; --surface-3: #e7ecf4;
  --text: #121d33; --muted: #5a6780; --border: #e1e6ef; --border-strong: #ccd4e1;
  --accent: #2456d3; --accent-hover: #1c47b4; --accent-ink: #ffffff; --accent-soft: #eaf0fd; --accent-line: #bccdf5;
  --brand: #2f66e6; --brand-2: #1d4cc0;
  --good: #15784a; --good-soft: #e3f4ea; --bad: #b6352a; --bad-soft: #fcebe8; --warn: #8d5a05; --warn-soft: #fdf2dc;
  --violet: #6a45c2; --violet-soft: #f0ebfc;
  --mark: #ffec99; --mark-ink: #17202c; --pl-ink: #3a4a63; --pl-bar: #a9c0ee;
  --side-bg: #0f1d3b; --side-text: #c4cee3; --side-muted: #8592ad; --side-hover: rgba(255, 255, 255, .06); --side-on: rgba(130, 165, 255, .17);
  --side-on-ink: #ffffff; --side-ic: #8fb2ff; --side-line: rgba(255, 255, 255, .09); --side-live: #f3bd5d; --side-live-ink: #1d1503;
  --ink-btn: #142240; --ink-btn-hover: #1f3160; --ink-btn-text: #ffffff;
  --d-drive: #2f6fd6; --d-break: #23905a; --d-rest: #7556c4; --d-work: #d07a12; --d-ink: #ffffff;
  /* znaki drogowe i asfalt z liniami (rysunki 6.8) – kolory jak na prawdziwych znakach */
  --sk-red: #d2232a; --sk-yel: #ffd200; --sk-wht: #ffffff; --sk-blu: #1259a8; --sk-blk: #141414; --sk-grn: #13784a; --sk-edge: #9aa3b1; --sk-org: #f39200; --scrim: rgba(15, 29, 59, .45);
  --sk-asf: #555b64; --sk-line: #ffffff; --sk-gline: #ffc61a;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(18, 29, 51, .04), 0 2px 10px rgba(18, 29, 51, .05);
  --shadow-hover: 0 4px 20px rgba(18, 29, 51, .10);
  --shadow-float: 0 10px 30px rgba(18, 29, 51, .20);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-h: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --navh: 0px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1119; --surface: #141b26; --surface-2: #1a2230; --surface-3: #222c3c;
    --text: #e5eaf2; --muted: #98a4b7; --border: #253042; --border-strong: #344257;
    --accent: #7ea6ff; --accent-hover: #9cbbff; --accent-ink: #0a1324; --accent-soft: #1a2747; --accent-line: #34508c;
    --brand: #3d73ee; --brand-2: #2752c4;
    --good: #5cc98f; --good-soft: #12301f; --bad: #ff8a7c; --bad-soft: #3a1d1a; --warn: #f0b75e; --warn-soft: #33270f;
    --violet: #b49cff; --violet-soft: #271f44;
    --mark: #5c4a00; --mark-ink: #fff3c4; --pl-ink: #b5c2d6; --pl-bar: #3d5a8c;
    --side-bg: #090e16; --side-text: #b7c2d5; --side-muted: #717e94; --side-hover: rgba(255, 255, 255, .05); --side-on: rgba(126, 166, 255, .15);
    --side-on-ink: #ffffff; --side-ic: #7ea6ff; --side-line: rgba(255, 255, 255, .07); --side-live: #f0b75e; --side-live-ink: #1d1503;
    --ink-btn: #e5eaf2; --ink-btn-hover: #ffffff; --ink-btn-text: #0c1119;
    --d-drive: #3b78dd; --d-break: #23905a; --d-rest: #7d5fd0; --d-work: #c47414; --d-ink: #ffffff;
    --sk-red: #cf2a30; --sk-yel: #f2c600; --sk-wht: #ececec; --sk-blu: #1a5fae; --sk-blk: #141414; --sk-grn: #17784c; --sk-edge: #5d6878; --sk-org: #e08600; --scrim: rgba(0, 0, 0, .62);
    --sk-asf: #3b4049; --sk-line: #e6e6e6; --sk-gline: #f0b800;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 2px 10px rgba(0, 0, 0, .25);
    --shadow-hover: 0 6px 22px rgba(0, 0, 0, .45);
    --shadow-float: 0 10px 30px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c1119; --surface: #141b26; --surface-2: #1a2230; --surface-3: #222c3c;
  --text: #e5eaf2; --muted: #98a4b7; --border: #253042; --border-strong: #344257;
  --accent: #7ea6ff; --accent-hover: #9cbbff; --accent-ink: #0a1324; --accent-soft: #1a2747; --accent-line: #34508c;
  --brand: #3d73ee; --brand-2: #2752c4;
  --good: #5cc98f; --good-soft: #12301f; --bad: #ff8a7c; --bad-soft: #3a1d1a; --warn: #f0b75e; --warn-soft: #33270f;
  --violet: #b49cff; --violet-soft: #271f44;
  --mark: #5c4a00; --mark-ink: #fff3c4; --pl-ink: #b5c2d6; --pl-bar: #3d5a8c;
  --side-bg: #090e16; --side-text: #b7c2d5; --side-muted: #717e94; --side-hover: rgba(255, 255, 255, .05); --side-on: rgba(126, 166, 255, .15);
  --side-on-ink: #ffffff; --side-ic: #7ea6ff; --side-line: rgba(255, 255, 255, .07); --side-live: #f0b75e; --side-live-ink: #1d1503;
  --ink-btn: #e5eaf2; --ink-btn-hover: #ffffff; --ink-btn-text: #0c1119;
  --d-drive: #3b78dd; --d-break: #23905a; --d-rest: #7d5fd0; --d-work: #c47414; --d-ink: #ffffff;
  --sk-red: #cf2a30; --sk-yel: #f2c600; --sk-wht: #ececec; --sk-blu: #1a5fae; --sk-blk: #141414; --sk-grn: #17784c; --sk-edge: #5d6878; --sk-org: #e08600; --scrim: rgba(0, 0, 0, .62);
  --sk-asf: #3b4049; --sk-line: #e6e6e6; --sk-gline: #f0b800;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 2px 10px rgba(0, 0, 0, .25);
  --shadow-hover: 0 6px 22px rgba(0, 0, 0, .45);
  --shadow-float: 0 10px 30px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: calc(16px * var(--zoom, 1)); } /* --zoom = wielkość tekstu z ustawień (A− / A+) */
body { margin: 0; background: var(--bg); color: var(--text); font: 400 calc(17px * var(--zoom, 1))/1.6 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-h); line-height: 1.25; margin: 0; letter-spacing: -.012em; }
h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.16rem; font-weight: 650; margin-bottom: .75rem; }
h3 { font-size: 1.02rem; font-weight: 650; }
kbd { font: 600 .72rem/1 var(--font); padding: .18rem .35rem; border-radius: 5px; border: 1px solid currentColor; opacity: .6; margin-left: .35rem; }
:focus-visible { outline: 3px solid var(--accent-line); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
/* ikony liniowe (js: ICON.*) */
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ===== układ: menu z lewej + treść ===== */
.app { display: flex; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; width: 250px; flex: none; padding: 20px 14px 16px; background: var(--side-bg); border-right: 1px solid var(--side-line); color: var(--side-text); display: flex; flex-direction: column; gap: 2px; z-index: 20; overflow-y: auto; }
.side a.brand { display: flex; gap: 12px; align-items: center; padding: 4px 10px 20px; margin-bottom: 2px; border-radius: 0; border-bottom: 1px solid var(--side-line); color: var(--side-on-ink); background: none; font-weight: 700; }
.side a.brand:hover { background: none; }
.logo { width: 38px; height: 38px; flex: none; border-radius: 10px; background: var(--brand); color: var(--side-on-ink); display: grid; place-items: center; }
.side a.brand .logo .ico { width: 22px; height: 22px; color: var(--side-on-ink); }
.brand b { font-family: var(--font-h); font-size: 1.3rem; font-weight: 700; line-height: 1; letter-spacing: -.01em; }
.nav-g { padding: 16px 12px 6px; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--side-muted); }
.side a { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--side-text); text-decoration: none; font-weight: 500; font-size: .97rem; transition: background .15s, color .15s; }
.side a .ico { color: var(--side-muted); transition: color .15s; }
.side a:hover { background: var(--side-hover); color: var(--side-on-ink); }
.side a:hover .ico { color: var(--side-text); }
.side a.on { background: var(--side-on); color: var(--side-on-ink); font-weight: 600; }
.side a.on .ico { color: var(--side-ic); }
.side a.on::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--side-ic); }
.nav-t { min-width: 0; }
.nav-b { margin-left: auto; min-width: 22px; height: 21px; padding: 0 7px; border-radius: 99px; background: var(--brand); color: var(--side-on-ink); font-size: .74rem; font-weight: 700; line-height: 21px; text-align: center; font-variant-numeric: tabular-nums; }
.nav-more, .more-sheet { display: none; } /* tylko telefon – patrz @media (max-width: 820px) */
.nav-b.live, .nav-b.live.low { background: var(--side-live); color: var(--side-live-ink); font-size: .78rem; }
.theme-sw { margin-top: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 4px; border-radius: 12px; background: var(--side-hover); border: 1px solid var(--side-line); }
.theme-sw button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px 6px; border: 0; border-radius: 9px; background: none; color: var(--side-muted); font: inherit; font-size: .72rem; font-weight: 600; cursor: pointer; }
.theme-sw .ico { width: 17px; height: 17px; }
.theme-sw button:hover { color: var(--side-on-ink); }
.theme-sw button[aria-pressed="true"] { background: var(--side-on); color: var(--side-on-ink); }
main { flex: 1; min-width: 0; max-width: 1120px; margin: 0 auto; padding: 36px 44px 72px; }
/* egzamin w toku: bez menu, cała szerokość dla pytania */
body.focus .side { display: none; }
body.focus main { max-width: 1240px; padding-top: 26px; }

@media (max-width: 820px) {
  :root { --navh: 62px; } /* wysokość dolnego menu na telefonie – nad nim przykleja się pasek „Dalej” w pytaniach */
  .app { display: block; }
  .side { position: fixed; inset: auto 0 0 0; height: auto; width: auto; flex-direction: row; gap: 0; padding: 5px 2px calc(5px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--side-line); overflow: visible; box-shadow: 0 -6px 20px rgba(0, 0, 0, .12); }
  .side a.brand, .nav-g, .theme-sw, .nav-x { display: none; }
  .side a { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 3px; padding: 6px 0 5px; font-size: .66rem; font-weight: 600; text-align: center; }
  .side a .ico { width: 22px; height: 22px; }
  .side a.on { background: none; }
  .side a.on::before { left: 24%; right: 24%; top: -5px; bottom: auto; width: auto; height: 3px; border-radius: 0 0 3px 3px; }
  .nav-t { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-b { position: absolute; top: 1px; left: 50%; margin-left: 4px; min-width: 18px; height: 17px; line-height: 17px; padding: 0 5px; font-size: .62rem; }
  .nav-b.live { display: none; }
  /* 2026-11-12 (prośba użytkownika: ikonki „pozgniatane i małe”): na dole 5 głównych pozycji + „Więcej”, reszta w panelu */
  .side a.nm { display: none; }
  .side a, .nav-more { font-size: .74rem; }
  .side a .ico, .nav-more .ico { width: 25px; height: 25px; }
  .nav-more { position: relative; display: flex; flex: 1 1 0; min-width: 0; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 5px; border: 0; background: none; color: var(--side-text); font-family: inherit; font-weight: 600; cursor: pointer; }
  .nav-more .ico { color: var(--side-muted); }
  .nav-more.on, .nav-more[aria-expanded="true"] { color: var(--side-on-ink); }
  .nav-more.on .ico, .nav-more[aria-expanded="true"] .ico { color: var(--side-ic); }
  .more-sheet:not([hidden]) { display: block; position: fixed; left: 8px; right: 8px; bottom: calc(var(--navh) + env(safe-area-inset-bottom) + 8px); z-index: 30; padding: 12px; border: 1px solid var(--side-line); border-radius: 18px; background: var(--side-bg); box-shadow: var(--shadow-float); max-height: calc(100dvh - var(--navh) - env(safe-area-inset-bottom) - 20px); overflow-y: auto; }
  .more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .side .more-it { flex-direction: column; gap: 6px; padding: 14px 4px 12px; border-radius: 13px; background: var(--side-hover); font-size: .84rem; white-space: normal; }
  .side .more-it .ico { width: 28px; height: 28px; }
  .side .more-it.on { background: var(--side-on); }
  .side .more-it::before { display: none; }
  .side .more-it .nav-b { left: auto; right: 10px; top: 8px; margin: 0; }
  .more-th { display: flex; align-items: center; gap: 12px; margin-top: 12px; color: var(--side-muted); }
  .side .more-th .theme-sw { display: grid; flex: 1; margin-top: 0; }
  main { padding: 20px 16px calc(var(--navh) + 40px); }
  body.focus { --navh: 0px; }
  body.focus main { padding: 14px 14px 28px; }
  h1 { font-size: 1.6rem; }
}

/* ===== elementy wspólne ===== */
.page-h { margin-bottom: 26px; }
.kicker { color: var(--accent); font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 6px; }
.kicker:empty { display: none; }
.lead { color: var(--muted); margin: .6rem 0 0; max-width: 66ch; font-size: 1.02rem; }
.lead .pill { margin-left: 4px; }
.pl-inline { color: var(--muted); font-weight: 500; font-size: .7em; letter-spacing: 0; }
.pl-line { color: var(--pl-ink); }
.pl-line.big { font-size: 1.15rem; margin-top: .3rem; }
.crumbs { color: var(--muted); font-size: .9rem; margin-bottom: 12px; }
.crumbs a { text-decoration: none; font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 20px; }
.card.empty { color: var(--muted); }
.muted-card { background: var(--surface-2); box-shadow: none; }
.site-footer {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px;
  margin-top: 28px; padding-top: 12px; border-top: 1px solid var(--border); color: var(--muted); font-size: .86rem;
}
.site-footer nav, .more-site-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.site-footer [aria-current="page"], .more-site-links [aria-current="page"] { font-weight: 700; }
body.focus .site-footer { display: none; }
.side .more-site-links { margin-top: 12px; padding-top: 4px; border-top: 1px solid var(--side-line); }
.side .more-site-links a { padding: 6px 4px; font-size: .84rem; text-decoration: underline; }
.legal-doc { max-width: 78ch; }
.legal-doc section + section { border-top: 1px solid var(--border); margin-top: 18px; padding-top: 18px; }
.legal-doc p { margin: .65rem 0 0; }
.voice-privacy { margin: 0; }
.account-sync-status {
  position: fixed; right: 16px; bottom: calc(16px + var(--navh, 0px)); z-index: 50;
  display: grid; gap: 4px; max-width: min(420px, calc(100vw - 32px)); padding: 12px 16px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border-strong);
  border-radius: 12px; box-shadow: var(--shadow-float); font-size: .88rem;
}
.account-sync-status[hidden] { display: none; }
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
@media (max-width: 820px) { .card { padding: 18px; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 18px; border-radius: 11px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-size: .97rem; font-weight: 600; line-height: 1.3; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.btn .ico { width: 18px; height: 18px; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px -8px var(--accent); }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn.primary:disabled { box-shadow: none; }
.btn.dark { background: var(--ink-btn); border-color: var(--ink-btn); color: var(--ink-btn-text); }
.btn.dark:hover { background: var(--ink-btn-hover); border-color: var(--ink-btn-hover); color: var(--ink-btn-text); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-3); border-color: transparent; color: var(--text); }
.btn.sm { min-height: 34px; padding: 5px 12px; font-size: .9rem; border-radius: 9px; }
.btn.wide { width: 100%; min-height: 50px; padding: 12px 16px; font-size: 1.04rem; }
.btn.danger, .btn.danger:hover { color: var(--bad); }
.file-btn { cursor: pointer; }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: .78rem; font-weight: 650; line-height: 1.5; white-space: nowrap; vertical-align: middle; }
.pill .ico { width: 14px; height: 14px; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.warm { background: var(--warn-soft); color: var(--warn); }
.pill.muted { background: var(--surface-3); color: var(--muted); }
.tag { font-size: .8rem; color: var(--muted); }
.ok-note { color: var(--good); font-weight: 600; font-size: .9rem; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.chip { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 99px; padding: 5px 13px; font: inherit; font-size: .92rem; cursor: pointer; transition: border-color .15s, background .15s; }
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chip-k { font-size: .75rem; color: var(--muted); font-weight: 700; }
.chip-n { font-size: .78rem; color: var(--muted); margin-left: 2px; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 12px; margin: 4px 0 14px; }
.facts > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.facts b { display: block; font-family: var(--font-h); font-size: 1.6rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.facts span { display: block; color: var(--muted); font-size: .85rem; line-height: 1.35; }

/* kafelki (Start, Postępy) */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; color: var(--text); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.tile:hover { border-color: var(--accent-line); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.tile-ic { width: 40px; height: 40px; flex: none; border-radius: 11px; display: grid; place-items: center; margin-bottom: 12px; }
.tile-ic .ico { width: 21px; height: 21px; }
.c-blue { background: var(--accent-soft); color: var(--accent); }
.c-violet { background: var(--violet-soft); color: var(--violet); }
.c-green { background: var(--good-soft); color: var(--good); }
.c-amber { background: var(--warn-soft); color: var(--warn); }
.tile-v { font-family: var(--font-h); font-size: 1.9rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile-t { font-weight: 600; margin-top: 3px; }
.tile-s { color: var(--muted); font-size: .85rem; }
@media (max-width: 480px) { .tiles { gap: 10px; } .tile { padding: 14px; } .tile-v { font-size: 1.55rem; } .tile-ic { width: 34px; height: 34px; margin-bottom: 8px; } }

/* dwie kolumny (Start, Pytania, Egzamin): szersza lewa + węższa prawa */
.dash { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 20px; }
.dash > .card { margin-bottom: 0; }
.dash.even { align-items: stretch; }
@media (max-width: 1000px) { .dash { grid-template-columns: minmax(0, 1fr); } }

/* lista „Plan na dziś” i karty-odnośniki */
.todos { display: flex; flex-direction: column; gap: 8px; }
.todo, .link-card { display: flex; align-items: center; gap: 14px; color: var(--text); text-decoration: none; transition: border-color .15s, background .15s, box-shadow .15s; }
.todo { padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.todo:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.todo-ic { width: 40px; height: 40px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.todo:hover .todo-ic { background: var(--surface); }
.todo-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.todo-t small { color: var(--muted); font-size: .87rem; margin-top: 2px; }
.todo-go { flex: none; display: grid; color: var(--muted); transition: transform .15s, color .15s; }
.todo:hover .todo-go, .link-card:hover .todo-go { color: var(--accent); transform: translateX(3px); }
.link-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow-hover); }
.link-card .tile-ic { margin: 0; }
.exam-card .facts { margin-top: 2px; }
.exam-card .btn.wide { margin-top: 6px; }

/* ===== kurs ===== */
.ch-h { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.ch-h h2 { margin: 0; }
.ch-t { flex: 1; min-width: 0; }
.ch-meta { flex: none; color: var(--muted); font-size: .85rem; text-align: right; }
.ch-nr { width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-family: var(--font-h); font-weight: 700; font-size: 1.1rem; display: grid; place-items: center; }
.secs { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.secs li + li { border-top: 1px solid var(--border); }
.sec { display: flex; gap: 14px; align-items: center; padding: 11px 14px; color: var(--text); text-decoration: none; transition: background .15s; }
a.sec:hover { background: var(--accent-soft); }
.sec.off { color: var(--muted); }
.sec-nr { width: 2.6rem; flex: none; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.sec-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.sec-t small { color: var(--pl-ink); font-size: .87rem; }
.sec.off .sec-t small { color: var(--muted); }
.sec-st { flex: none; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 600px) {
  .ch-meta { display: none; }
  .sec { flex-wrap: wrap; row-gap: 4px; }
  .sec-st { width: 100%; justify-content: flex-start; padding-left: calc(2.6rem + 14px); }
}

.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface-3); }
.seg button { border: 0; background: none; color: var(--muted); font: inherit; font-size: .9rem; font-weight: 600; padding: 7px 14px; border-radius: 9px; cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.hint { margin: 10px 0 18px; }

.lesson { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 30px; margin-bottom: 20px; }
.para { margin: 0 0 18px; }
.para.two, .cap.two { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.para .no { font-size: 1.06rem; }
.pl { color: var(--pl-ink); border-left: 3px solid var(--pl-bar); padding-left: 12px; }
.peek { margin-top: 6px; }
.peek summary { cursor: pointer; color: var(--accent); font-size: .88rem; font-weight: 600; }
.peek > div { margin-top: 6px; }
@media (max-width: 760px) { .para.two, .cap.two { grid-template-columns: 1fr; gap: 6px; } .lesson { padding: 20px 18px; } }

/* klikalne słowo (button w tekście, span wewnątrz przycisku odpowiedzi) */
.w { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; border-bottom: 2px dotted var(--accent); border-radius: 0; }
.w:hover { background: var(--accent-soft); border-bottom-style: solid; }
.w.w-ad { border-bottom-color: var(--muted); }
mark { background: var(--mark); color: var(--mark-ink); padding: 0 2px; border-radius: 3px; }

/* głośnik – czytanie po norwesku (zawsze widoczny; bez norweskiego głosu kliknięcie pokazuje, jak go dodać) */
.spk { display: inline-flex; vertical-align: middle; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); color: var(--accent); cursor: pointer; padding: 6px; margin-left: 4px; flex: none; }
.spk svg { width: 100%; height: 100%; display: block; }
.spk:hover { background: var(--accent-soft); border-color: var(--accent); }
.spk.on, [data-act="say"].on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); animation: spk-pulse 1s ease-in-out infinite; }
@keyframes spk-pulse { 50% { box-shadow: 0 0 0 5px var(--accent-soft); } }
.q-opt { position: relative; }
.q-opt .opt { padding-inline-end: 60px; }
.q-opt > .spk { position: absolute; inset-block-start: 10px; inset-inline-end: 12px; width: 34px; height: 34px; margin: 0; }
.q-no .spk { vertical-align: -4px; }
.btn > svg:not(.ico) { width: 18px; height: 18px; flex: none; }
.voice-help { background: var(--warn-soft); border-radius: 10px; padding: 10px 12px; }
.voice-help p { margin: 6px 0 0; }

.rule { border: 1px solid var(--accent-line); border-left: 5px solid var(--accent); background: var(--accent-soft); border-radius: 12px; padding: 14px 18px 2px; margin: 0 0 20px; }
.rule-h { font-weight: 800; color: var(--accent); margin-bottom: 8px; }
.rule-h span { font-weight: 600; }
.rule .para .no { font-weight: 600; }
.tip { display: flex; gap: 12px; align-items: flex-start; background: var(--warn-soft); border-radius: 12px; padding: 12px 16px; margin: 0 0 18px; }
.tip > .ico { color: var(--warn); margin-top: 3px; }
.tip b { color: var(--warn); }
.src { font-size: .86rem; color: var(--muted); margin: 10px 0 0; overflow-wrap: anywhere; }
.fig { margin: 4px 0 22px; padding: 18px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; }
.fig figcaption { margin-top: 10px; font-size: .92rem; }
.fig figcaption .cap { margin: 0; }
.lesson-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 30px; }
.pn { display: flex; gap: 8px; }

/* ----- rysunki SVG ----- */
.dg { width: 100%; height: auto; max-width: 680px; display: block; margin: 0 auto; }
/* Uwaga: bez skrótu „font:” – nadpisałby atrybut font-weight w SVG. Rozmiar zmieniaj klasami .sm .xs .big */
.dg text { fill: var(--text); font-family: var(--font); font-size: 13px; }
.dg text.in { fill: var(--d-ink); font-weight: 600; }
.dg text.sm { fill: var(--muted); font-size: 11.5px; }
.dg text.xs { font-size: 11px; }
.dg text.big { font-size: 20px; font-weight: 700; }
.dg .k { fill: var(--d-drive); } .dg .p { fill: var(--d-break); } .dg .h { fill: var(--d-rest); } .dg .a { fill: var(--d-work); }
.dg .fade { opacity: .45; } .dg .soft { opacity: .8; }
.dg .ax { stroke: var(--muted); stroke-width: 1.5; fill: none; }
.dg .ic { stroke: var(--text); fill: none; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.dg .icf { fill: var(--text); }

/* ----- okienko ze słowem ----- */
.pop { position: absolute; z-index: 60; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-float); padding: 14px 16px; font-size: .95rem; }
.pop-head { display: flex; align-items: center; gap: 6px; }
.pop-no { font-family: var(--font-h); font-size: 1.25rem; font-weight: 700; }
.art { color: var(--muted); font-weight: 500; font-size: .85em; }
.pop-pl { font-size: 1.05rem; color: var(--pl-ink); margin: 2px 0 8px; font-weight: 600; }
.pop-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.bud { font-size: .9rem; margin: 4px 0; }
.ex { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; margin: 8px 0; }
.ex-pl { color: var(--pl-ink); font-size: .9rem; margin-top: 2px; }
.uw { font-size: .88rem; color: var(--warn); margin: 6px 0; }

/* ===== pytania (ćwiczenia i egzamin) ===== */
.q-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 36px; margin-bottom: 10px; }
.q-pos { color: var(--muted); }
.q-pos b { color: var(--text); font-size: 1.12rem; }
.q-mode { display: inline-block; margin-left: 6px; padding: 1px 10px; border-radius: 99px; background: var(--surface-3); color: var(--muted); font-size: .8rem; font-weight: 600; vertical-align: 2px; }
.q-top-r { display: flex; align-items: center; gap: 10px; }
.timer { font-variant-numeric: tabular-nums; font-weight: 750; font-size: 1.15rem; }
.timer.low { color: var(--bad); }
.bar { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin-bottom: 18px; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent)); border-radius: 99px; transition: width .25s; }
.qcard { padding: 26px 28px; }
.q-no { font-size: 1.24rem; font-weight: 600; line-height: 1.5; margin-bottom: 10px; }
.q-pl { color: var(--pl-ink); border-left: 3px solid var(--pl-bar); padding-left: 12px; margin: 6px 0 14px; }
.opts { margin-top: 18px; }
.opt { display: flex; gap: 14px; align-items: flex-start; width: 100%; text-align: left; padding: 13px 16px; margin-bottom: 10px; border: 1.5px solid var(--border); border-radius: 13px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; transition: border-color .12s, background .12s; }
.opt:hover:not([aria-disabled="true"]) { border-color: var(--accent); background: var(--surface-2); }
.opt[aria-disabled="true"] { cursor: default; }
.opt.sel { border-color: var(--accent); background: var(--accent-soft); }
.opt.right { border-color: var(--good); background: var(--good-soft); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.opt-l { flex: none; width: 30px; height: 30px; margin-top: -1px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); display: grid; place-items: center; font-weight: 700; font-size: .85rem; transition: border-color .12s, color .12s; }
.opt:hover:not([aria-disabled="true"]) .opt-l { border-color: var(--accent); color: var(--accent); }
.opt.sel .opt-l, .opt.sel:hover .opt-l { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.opt.right .opt-l { background: var(--good); border-color: var(--good); color: var(--surface); }
.opt.wrong .opt-l { background: var(--bad); border-color: var(--bad); color: var(--surface); }
.opt-t { display: flex; flex-direction: column; gap: 3px; padding-top: 1px; }
.opt .pl { font-size: .93em; border-left: 0; padding-left: 0; }
.why { font-size: .9em; color: var(--muted); }
.opt.right .why { color: var(--good); }
.opt.wrong .why { color: var(--bad); }
/* wyjaśnienie pod odpowiedziami: spokojne tło, kolor tylko w nagłówku */
.fb { margin-top: 16px; padding: 18px 20px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.fb-h { display: flex; align-items: center; gap: 10px; font-family: var(--font-h); font-weight: 700; font-size: 1.12rem; margin-bottom: 6px; }
.fb-h::before { content: "\2713"; width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .95rem; background: var(--good); color: var(--surface); }
.fb.good .fb-h { color: var(--good); }
.fb.bad .fb-h { color: var(--bad); }
.fb.bad .fb-h::before { content: "\2715"; background: var(--bad); }
.fb p { margin: 6px 0; }
.why-box { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-top: 12px; }
.why-h { font-weight: 600; }

/* układ: karta pytania + panel „Dalej” przyklejony po prawej (komputer) albo na dole (wąski ekran) */
.q-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 22px; align-items: start; }
.q-layout .qcard { margin-bottom: 0; }
/* prawa kolumna: przyciski (zawsze na górze, w tym samym miejscu) + ewentualnie panel z tabelami pod nimi */
.q-right { position: sticky; top: 20px; z-index: 10; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.q-layout.wide { grid-template-columns: minmax(0, 1fr) minmax(340px, 480px); }
.q-layout.wide .q-right { height: calc(100vh - 40px); }
.q-layout.wide .q-side-in { flex: none; }
.q-layout.wide .q-keys, .q-layout.wide .q-hint, .q-layout.wide .ex-legend { display: none; }
.q-layout.wide .ex-grid { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.q-right > .hj { flex: 1 1 auto; min-height: 0; overflow: auto; margin: 0; }
.q-side-in { display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; max-height: calc(100vh - 40px); overflow-y: auto; }
.q-go { width: 100%; min-height: 52px; padding: 12px; font-size: 1.04rem; }
.q-hint { margin: -6px 0 0; text-align: center; }
.q-score { display: flex; justify-content: center; gap: 18px; font-weight: 700; padding-top: 10px; border-top: 1px solid var(--border); }
.good-t { color: var(--good); } .bad-t { color: var(--bad); }
.q-keys { margin: 0; }
@media (max-width: 1060px) {
  .q-layout, .q-layout.wide { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  /* wąski ekran: tabele pod pytaniem, a pasek „Dalej” przyklejony do dołu */
  .q-right { display: contents; }
  .q-layout .qcard { order: 1; }
  .q-right > .hj { order: 2; overflow: visible; }
  .q-side { order: 3; position: sticky; z-index: 10; bottom: calc(var(--navh) + env(safe-area-inset-bottom) + 10px); }
  .q-side-in { flex-direction: row; align-items: center; gap: 10px; padding: 10px; box-shadow: var(--shadow-float); max-height: none; overflow: visible; }
  .q-side-in .q-go { flex: 1; width: auto; min-height: 46px; }
  .q-hint, .q-score, .q-keys { display: none; }
}
@media (max-width: 820px) { .qcard { padding: 20px 18px; } .q-no { font-size: 1.14rem; } }
@media (max-width: 480px) { .q-go-long { display: none; } .q-mode { display: none; } } /* na telefonie samo „Następne”, żeby mieściło się w jednej linii */

/* ----- egzamin próbny ----- */
.ex-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.ex-diagnostic { grid-column: 1 / -1; }
.ex-mode { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 0; }
.ex-mode h2 { margin: 0 0 .4rem; }
.ex-mode p { flex: 1; margin: 0 0 16px; color: var(--muted); }
@media (max-width: 700px) { .ex-modes { grid-template-columns: 1fr; } }
.ex-time { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.ex-time .timer { font-size: 1.55rem; }
.ex-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.ex-nav .q-go { flex: 1 1 100%; }
.ex-nav .ex-prev, .ex-nav .ex-flag { flex: 1 1 0; padding-left: 6px; padding-right: 6px; white-space: nowrap; }
.ex-flag.on, .ex-flag.on:hover { color: var(--warn); border-color: var(--warn); background: var(--warn-soft); }
@media (min-width: 1061px) { .q-top .timer { display: none; } } /* na komputerze zegar jest w panelu po prawej */
@media (min-width: 1061px) { .q-top.exam ~ .q-layout.wide .q-side-in { max-height: max(100px, calc(100vh - 14rem)); } }
.ex-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.ex-n { aspect-ratio: 1; min-height: 28px; padding: 0; position: relative; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--muted); font: inherit; font-size: .78rem; font-weight: 650; cursor: pointer; }
.ex-n:hover { border-color: var(--accent); color: var(--accent); }
.ex-n.done { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.ex-n.ok { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.ex-n.bad { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.ex-n.cur { outline: 2px solid var(--text); outline-offset: 1px; }
.ex-n.flag::after { content: ""; position: absolute; top: 2px; right: 2px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.ex-legend { margin: -4px 0 0; }
.ex-count { text-align: center; font-size: .92rem; }
.ex-lever { width: 100%; }
.ex-over { display: none; padding: 0; }
.ex-over > summary { cursor: pointer; padding: 12px 16px; font-weight: 600; }
.ex-over-b { padding: 0 16px 12px; }
.ex-over-b .ex-grid { grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); }
.ex-over-b .ex-lever { width: auto; }
@media (max-width: 1060px) {
  .ex-over { display: block; margin-bottom: 12px; }
  .q-side .ex-time, .q-side .ex-flag, .q-side .ex-grid, .q-side .ex-legend, .q-side .ex-count, .q-side .ex-lever { display: none; }
  .ex-nav { flex: 1; flex-wrap: nowrap; }
  .ex-nav .q-go { flex: 1 1 auto; order: 2; }
  .ex-nav .ex-prev { flex: none; order: 1; min-height: 46px; padding: 10px 14px; }
}
@media (max-width: 480px) { .ex-lbl { display: none; } }

/* historia wyników egzaminu */
.hists { display: flex; flex-direction: column; }
.hist { display: grid; grid-template-columns: 7rem minmax(0, 1fr) minmax(50px, 1fr) 3.2rem auto; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--border); font-size: .92rem; }
.hist:first-child { border-top: 0; }
.hist-d, .hist-k { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-d { font-variant-numeric: tabular-nums; }
.hist-s { text-align: right; font-variant-numeric: tabular-nums; }
.hist-report { border-top: 1px solid var(--border); }
.hist-report:first-child { border-top: 0; }
.hist-report > summary { cursor: pointer; }
.hist-report > summary .hist-d::before { content: '▸ '; }
.hist-report[open] > summary .hist-d::before { content: '▾ '; }
.ex-report caption { padding-block: 8px; text-align: left; font-weight: 700; }
.ex-report tbody th { text-align: left; }
.ex-repeat { display: block; max-width: max-content; }
.exam-report-card { margin-bottom: 20px; }
.exam-local { border-top: 1px solid var(--border); padding-top: 10px; }
.exam-local > summary { cursor: pointer; font-weight: 600; }
@media (max-width: 600px) {
  .hist { grid-template-columns: minmax(0, 1fr) auto auto; row-gap: 6px; }
  .hist-k { grid-column: 1 / -1; grid-row: 2; white-space: normal; }
  .hist .stack { grid-column: 1 / -1; grid-row: 3; }
}

/* przełącznik „Po polsku”: polski tekst jest zawsze na stronie, a klasa .pl-on go pokazuje */
.pl-scope:not(.pl-on) .pl, .pl-scope:not(.pl-on) .q-pl { display: none; }
.pl-scope:not(.pl-on) .para.two, .pl-scope:not(.pl-on) .cap.two { grid-template-columns: minmax(0, 1fr); }
.pl-tog { display: inline-flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 11px; background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s; }
.pl-tog:hover { border-color: var(--accent); }
.pl-tog .sw { position: relative; flex: none; width: 40px; height: 23px; border-radius: 99px; background: var(--border-strong); transition: background .15s; }
.pl-tog .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.pl-tog[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.pl-tog[aria-pressed="true"] .sw { background: var(--accent); }
.pl-tog[aria-pressed="true"] .sw::after { transform: translateX(17px); }
.q-side .pl-tog { justify-content: flex-start; }
@media (max-width: 1060px) { .q-side .pl-tog kbd { display: none; } }

/* rozdział kursu rozwijany w miejscu */
.fold { margin: 14px 0 2px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 11px 14px; font-weight: 600; color: var(--accent); border-radius: 12px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary:hover { background: var(--accent-soft); }
.fold > summary::after { content: ""; flex: none; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.fold[open] > summary { border-bottom: 1px solid var(--border); border-radius: 12px 12px 0 0; }
.fold[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.fold-b { padding: 16px 16px 6px; }
.fold-b .para .no { font-size: 1rem; }
.fold-end { display: flex; justify-content: center; margin: 4px 0 8px; }
.res-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: .75rem; }
.res-h h2 { margin: 0; }
.pl.pl-in { border-left: 0; padding-left: 0; }

/* ćwiczenia: rozdziały rozwijane w miejscu */
.qchs { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.qch + .qch { border-top: 1px solid var(--border); }
.qch > summary { list-style: none; cursor: pointer; display: flex; gap: 14px; align-items: center; padding: 12px 14px; transition: background .15s; }
.qch > summary::-webkit-details-marker { display: none; }
.qch > summary:hover, .qch[open] > summary { background: var(--surface-2); }
.qch > summary::after { content: ""; flex: none; width: 8px; height: 8px; margin: 0 4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.qch[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.qch-b { padding: 6px 14px 12px 70px; }
.qsecs { list-style: none; margin: 0; padding: 0; }
.qsecs li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.qs-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.qs-t small { color: var(--pl-ink); }
.qs-nr { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 2px; }
.qs-meta { flex: none; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .88rem; text-align: right; }
.mini { width: 80px; height: 6px; border-radius: 99px; background: var(--surface-3); display: flex; overflow: hidden; }
@media (max-width: 600px) { .qch-b { padding-left: 14px; } .mini { display: none; } }

/* wynik ćwiczenia / egzaminu */
.result.good { border-top: 4px solid var(--good); }
.result.bad { border-top: 4px solid var(--bad); }
.res-top { display: flex; gap: 28px; align-items: center; }
.ring { --c: var(--accent); flex: none; width: 140px; height: 140px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-3) 0); display: grid; place-items: center; }
.ring.good { --c: var(--good); }
.ring.bad { --c: var(--bad); }
.ring > span { width: 112px; height: 112px; border-radius: 50%; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
.ring b { font-family: var(--font-h); font-size: 1.9rem; font-variant-numeric: tabular-nums; }
.ring small { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.res-sum { flex: 1; min-width: 0; }
.res-sum p { margin: .4rem 0; }
.verdict { font-family: var(--font-h); font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.verdict span { font-size: .62em; font-weight: 600; color: var(--muted); }
.verdict.good { color: var(--good); }
.verdict.bad { color: var(--bad); }
@media (max-width: 560px) {
  .res-top { flex-direction: column; align-items: flex-start; gap: 16px; }
  .ring { width: 116px; height: 116px; }
  .ring > span { width: 92px; height: 92px; }
  .ring b { font-size: 1.55rem; }
}
.res { border-top: 1px solid var(--border); padding: 9px 0; }
.res summary { cursor: pointer; display: flex; gap: 10px; align-items: baseline; }
.res-b { padding: 8px 0 4px 20px; }
.res-b p { margin: 6px 0; }

/* ===== fiszki ===== */
.fc { text-align: center; padding: 40px 28px; min-height: 250px; display: flex; flex-direction: column; justify-content: center; }
.fc-art { color: var(--muted); }
.fc-word { font-family: var(--font-h); font-size: 2.4rem; font-weight: 700; line-height: 1.2; }
.fc-q { font-family: var(--font-h); font-size: 1.7rem; font-weight: 700; color: var(--pl-ink); }
.fc-ex { color: var(--muted); margin: 14px auto 0; max-width: 46ch; }
.fc-back { margin: 24px auto 0; padding-top: 18px; border-top: 1px dashed var(--border-strong); width: 100%; max-width: 52ch; text-align: left; }
.fc-ans { font-size: 1.45rem; font-weight: 700; color: var(--pl-ink); text-align: center; margin-bottom: 10px; }
.fc-ans.no-ans { color: var(--text); }
.grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.grade { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 13px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; box-shadow: var(--shadow); transition: background .15s, transform .1s; }
.grade small { color: var(--muted); font-size: .8rem; }
.grade.bad { border-color: var(--bad); } .grade.bad b { color: var(--bad); }
.grade.warn { border-color: var(--warn); } .grade.warn b { color: var(--warn); }
.grade.good { border-color: var(--good); } .grade.good b { color: var(--good); }
.grade.easy { border-color: var(--accent); } .grade.easy b { color: var(--accent); }
.grade:hover { background: var(--surface-2); }
.grade:active { transform: translateY(1px); }
@media (max-width: 420px) { .grades { grid-template-columns: 1fr 1fr; } }
.start-card .btn.wide { margin-top: 6px; }

/* ===== słownik ===== */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.filters input, .filters select, .settings select { font: inherit; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); }
.filters input:focus, .filters select:focus, .settings select:focus { outline: 3px solid var(--accent-line); outline-offset: 0; border-color: var(--accent); }
.filters input { flex: 1 1 260px; }
.dlist { margin-top: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.dw { border-top: 1px solid var(--border); }
.dw:first-child { border-top: 0; }
.dw summary { display: flex; gap: 12px; align-items: baseline; padding: 11px 16px; cursor: pointer; list-style: none; }
.dw summary::-webkit-details-marker { display: none; }
.dw summary:hover, .dw[open] summary { background: var(--surface-2); }
.dw-no { font-weight: 700; min-width: 0; flex: 0 1 40%; }
.dw-pl { color: var(--pl-ink); flex: 1; }
.dw-body { padding: 4px 16px 12px 38px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--border-strong); display: inline-block; }
.dot.learn { background: var(--warn); } .dot.known { background: var(--good); } .dot.bad { background: var(--bad); }

/* ===== postępy ===== */
.trow { display: grid; grid-template-columns: minmax(0, 1.4fr) 2fr 3.6rem; gap: 12px; align-items: center; padding: 7px 0; }
.tname { font-size: .92rem; }
.stack { height: 10px; border-radius: 99px; background: var(--surface-3); display: flex; overflow: hidden; }
.s-known { background: var(--good); } .s-learn { background: var(--warn); } .s-bad { background: var(--bad); }
.tnum { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: .9rem; }
.legend { font-size: .85rem; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 12px 0 0; }
.lg { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.settings { display: flex; flex-direction: column; gap: 12px; }
.settings label { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.settings label.chk { justify-content: flex-start; }
@media (max-width: 600px) { .trow { grid-template-columns: 1fr 3rem; } .trow .stack { grid-column: 1 / -1; grid-row: 2; } }

/* ===== Start: gotowość do egzaminu ===== */
.ring.warn { --c: var(--warn); }
.verdict.warn { color: var(--warn); }
.rd-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.ready-card .res-top { gap: 20px; }
.ready-card .ring { width: 116px; height: 116px; }
.ready-card .ring > span { width: 92px; height: 92px; }
.ready-card .ring b { font-size: 1.55rem; }
.ready-card .verdict { font-size: 1.3rem; }
.rd-assessment { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 10px; }
.rd-assessment > p { margin: 0 0 6px; }
.rd-h { font-size: 1rem; margin: 18px 0 6px; }
.rd-grid > div > .rd-h:first-child { margin-top: 0; }
.weak { list-style: none; margin: 0; padding: 0; }
.weak li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.weak li:first-child { border-top: 0; }
.wk-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wk-t small { color: var(--muted); font-size: .85rem; }
.rd-row { grid-template-columns: minmax(0, 1.5fr) 1.4fr 3.2rem 3.6rem; padding: 5px 0; }
.rd-row .tnum b { color: var(--text); }
.rd-head { padding: 0; }
.rd-head .tnum { font-size: .75rem; }
@media (max-width: 900px) { .rd-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .rd-row { grid-template-columns: 1fr 3rem 3.6rem; }
  .rd-row .stack { grid-column: 1 / -1; grid-row: 2; }
  .rd-head > div:nth-child(2) { display: none; }
}

/* ===== tabele z przepisów (Hjelpemidler) ===== */
/* polskie tłumaczenie w tabelach: pod tekstem NO, widoczne po włączeniu „Po polsku” */
.pl.tpl { display: block; border-left: 0; padding-left: 0; font-size: .86em; font-weight: 400; color: var(--pl-ink); margin-top: 1px; }
.tb-p { margin: 0 0 12px; font-size: .95rem; }
.tb-p.hp { background: var(--mark); color: var(--mark-ink); border-radius: 8px; padding: 6px 10px; }
.tb-p.hp .tpl { color: var(--mark-ink); }
.tt-wrap { overflow-x: auto; margin: 0 0 14px; border: 1px solid var(--border); border-radius: 12px; }
.tt { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tt th, .tt td { padding: 7px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.tt thead th { background: var(--surface-2); font-weight: 700; white-space: nowrap; }
.tt thead th .tpl { white-space: normal; }
.tt tbody tr:last-child td, .tt tbody tr:last-child th { border-bottom: 0; }
.tt td:not(:first-child) { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tt td:first-child { min-width: 11rem; }
.tt .hc { background: var(--accent-soft); }
.tt tr.hr td { background: var(--warn-soft); }
.tt td.hx { background: var(--mark); color: var(--mark-ink); font-weight: 800; outline: 2px solid var(--warn); outline-offset: -2px; }
.tb-n { list-style: none; margin: 0 0 12px; padding: 0; font-size: .84rem; color: var(--muted); }
.tb-n li { margin: 0 0 6px; }
.tb-n b { color: var(--text); margin-right: 4px; }
.pl.tb-uw { display: flex; gap: 10px; align-items: flex-start; border-left: 0; padding: 10px 12px; margin: 0 0 10px; background: var(--warn-soft); border-radius: 10px; color: var(--text); font-size: .9rem; }
.pl-scope.pl-on .pl.tb-uw { display: flex; }
.tb-uw .ico { color: var(--warn); margin-top: 1px; }
.tb .src { margin-top: 4px; }
/* panel obok pytania */
.hj { padding: 14px 16px; }
.hj-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.hj-sub { display: inline; font-size: .82rem; }
.hj-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.hj-t { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 99px; padding: 4px 12px; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.hj-t.own { border-color: var(--warn); }
.hj-t.own::after { content: " ●"; color: var(--warn); font-size: .7em; vertical-align: 2px; }
.hj-t.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.hj-title { font-size: 1rem; margin: 0 0 8px; }
.aid-sheet input, .aid-calc input, .aid-calc select, .aid-notes textarea {
  box-sizing: border-box; width: 100%; padding: 6px 8px; border: 1px solid var(--border);
  border-radius: 6px; color: inherit; background: var(--bg); font: inherit;
}
.aid-sheet input { min-width: 3.7em; }
.aid-calc { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: end; }
.aid-notes { display: block; margin-top: 12px; }
.aid-notes textarea { display: block; resize: vertical; }
.aid-result output { margin-inline-start: 8px; font-weight: 700; overflow-wrap: anywhere; }
/* w panelu: tabela zwarta (tekst się zawija), żeby wszystkie kolumny Bk mieściły się bez przewijania; tabela przed opisem */
.hj .tb { display: flex; flex-direction: column; }
.hj .tb > .tt-wrap, .hj .tb > .tb-p.hp { order: -1; } /* najpierw tabela i podświetlony przepis (np. „c. Buss”), potem reszta */
.hj .tt { font-size: .82rem; }
.hj .tt th, .hj .tt td { padding: 5px 6px; white-space: normal; }
.hj .tt thead th { white-space: normal; }
.hj .tt td:first-child { min-width: 0; width: 34%; }
.hj .tt td:not(:first-child) { white-space: nowrap; }
.hj .tt td:nth-child(2):not(:last-child) { white-space: normal; }
.hj .tb-p { font-size: .86rem; }
.hj-btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
@media (max-width: 600px) { .hj-lbl { display: none; } }
/* strona Tabele */
.tp-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; margin: -6px 0 14px; background: var(--bg); }
.tp-bar .chips { margin: 0; }
.tcard h2 .tpl { font-size: .8em; margin-top: 2px; }
.steps { margin: 0 0 14px; padding-left: 1.3rem; }
.steps li { margin: 0 0 8px; }
.sub-h { margin: 16px 0 6px; font-size: 1rem; }
.tt.sheet th, .tt.sheet td { text-align: right; }
.tt.sheet th:first-child, .tt.sheet tbody th { text-align: left; background: var(--surface-2); }
.tt.sheet tr.sum td { font-weight: 800; background: var(--good-soft); color: var(--good); }
.fig figcaption b { font-weight: 700; }

/* trener obliczeń obciążenia (#/trener) – tylko istniejące zmienne kolorów, więc tryb ciemny działa sam */
.tr-link { margin-bottom: 18px; }
.tr-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin: -4px 0 14px; }
.tr-bar .chips { margin: 4px 0; }
.tr-bar .pl-tog { margin-left: auto; }
.tr-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 450px); gap: 18px; align-items: start; }
.tr-main > .card { margin-bottom: 18px; }
.tr-side { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
.tr-side .hj { margin: 0; }
@media (max-width: 1060px) { .tr-grid { grid-template-columns: minmax(0, 1fr); } .tr-side { position: static; max-height: none; overflow: visible; } }
.tr-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.tr-h h2 { margin: 0 0 8px; }
.tr-h h2 .tpl { font-size: .72em; }
.tr-no { margin: 6px 0; }
.tr-fig { margin: 10px 0 14px; padding: 10px; }
.tr-docs { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.tr-doc { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); }
.tr-doc h3 { margin: 0 0 6px; font-size: 1rem; }
.tr-dl { margin: 0; }
.tr-r { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.tr-r:last-child { border-bottom: 0; }
.tr-r dt { min-width: 0; }
.tr-r dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.tr-r dd .tpl { font-weight: 400; }
.tr-sub dt { font-weight: 700; padding-top: 6px; }
.tt.sheet.tr-sheet tr.sum td { background: none; }
.tr-sheet td.tr-c { padding: 5px 6px; }
.tr-sheet tbody th { min-width: 8.5rem; }
.tr-in { width: 100%; min-width: 4.8em; box-sizing: border-box; padding: 7px 8px; border: 1.5px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: .95rem; font-variant-numeric: tabular-nums; text-align: right; }
.tr-in.w { width: 9em; }
.tr-in:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.tr-c.ok .tr-in { border-color: var(--good); background: var(--good-soft); color: var(--good); font-weight: 700; }
.tr-c.bad .tr-in { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.tr-c.cur .tr-in { box-shadow: 0 0 0 3px var(--accent-line); }
.tr-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0; }
.tr-lab { display: flex; flex-direction: column; margin-right: auto; }
.tr-q { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.tr-q h3 { margin: 0 0 4px; font-size: 1rem; }
.tr-opts { margin-top: 10px; }
.tr-sum { margin: 12px 0 0; }
.tr-why:empty { display: none; }
.tr-why.why-box { margin: 0 0 14px; border-color: var(--accent-line); }
.tr-why h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 1.05rem; }
.tr-why p { margin: 6px 0; }
.tr-hint { display: flex; gap: 8px; align-items: flex-start; padding: 8px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--text); }
.tr-hint .ico { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--warn); }
.tr-all summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.tr-all ol { padding-left: 1.3em; margin: 8px 0 0; }
.tr-all li { margin: 6px 0; }
@media (max-width: 600px) {
  .tr-bar .pl-tog { margin-left: 0; }
  .tr-bar .pl-tog kbd { display: none; }
  .tr-long { display: none; } /* „Tillatt aksel-/totalvekt” → „Tillatt”, żeby arkusz zmieścił się na telefonie */
  .card.tr-work { padding: 18px 10px; }
  .tr-work > h2, .tr-work > p, .tr-work > .tr-line, .tr-work > .tr-q, .tr-work > .row-btns { margin-left: 6px; margin-right: 6px; }
  .tr-sheet tbody th { min-width: 0; padding: 6px 4px 6px 8px; font-size: .84rem; }
  .tr-sheet thead th { padding: 6px 4px; font-size: .8rem; }
  .tr-sheet .tpl { font-size: .78em; }
  .tr-in { min-width: 3.3em; padding: 6px 4px; font-size: .88rem; }
  .tr-in.w { width: 8em; }
  .tr-sheet td.tr-c { padding: 4px 2px; }
}

/* rysunki autobusów (data/rysunki.js) */
.dg .bb { fill: var(--surface); stroke: var(--text); stroke-width: 2; }
.dg .bw { fill: var(--accent-soft); stroke: var(--text); stroke-width: 1.2; }
.dg .bel { fill: var(--surface-3); stroke: var(--text); stroke-width: 1.2; }
.dg .wh { fill: var(--text); }
.dg .whc { fill: var(--surface-2); }
.dg .dm { stroke: var(--accent); stroke-width: 1.6; fill: none; }
.dg .dsh { stroke-dasharray: 4 3; }
.dg text.ac { fill: var(--accent); font-weight: 700; }
.dg tspan.sm { fill: var(--muted); font-size: 11.5px; font-weight: 400; }
/* rysunki autobusów są często wąskie (karta pytania) – większe litery */
.dg.bus text { font-size: 17px; }
.dg.bus text.sm, .dg.bus tspan.sm { font-size: 14.5px; }

/* rysunki „z góry” (lekcje 1.2, 2.1–2.3): droga, martwe pola, tory kół. Tylko istniejące zmienne kolorów. */
.dg.top text { font-size: 16px; }
.dg.top text.sm, .dg.top tspan.sm { font-size: 14px; }
.dg .rd { fill: var(--surface-3); }
.dg .ln { stroke: var(--muted); stroke-width: 2; stroke-dasharray: 12 10; fill: none; }
.dg .bz { fill: var(--bad); fill-opacity: .16; stroke: var(--bad); stroke-width: 1.5; stroke-dasharray: 6 4; }
.dg text.rt { fill: var(--bad); font-weight: 700; }
.dg text.wt { fill: var(--warn); font-weight: 700; }
.dg .trk { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.dg .trk.b { stroke: var(--bad); }
.dg .trk.o { stroke: var(--warn); stroke-dasharray: 7 5; }
.dg .bl { fill: var(--warn); }
.dg .blr { stroke: var(--warn); stroke-width: 2; stroke-linecap: round; fill: none; }
.dg .sg { fill: var(--surface); stroke: var(--bad); stroke-width: 4; }
.dg text.sgt { font-weight: 800; }
.dg .ghost { opacity: .35; }
.dg text.inl { fill: var(--d-ink); font-weight: 400; }
/* kolory kontrolek (rysunek 3.6) – tylko istniejące zmienne */
.dg .lmr { fill: var(--bad); } .dg .lmy { fill: var(--warn); } .dg .lmg { fill: var(--good); }
/* znaki drogowe (rysunki 6.8, data/rysunki.js – funkcja SK) i oznakowanie poziome */
.dg .skR { fill: var(--sk-red); } .dg .skY { fill: var(--sk-yel); } .dg .skW { fill: var(--sk-wht); }
.dg .skB { fill: var(--sk-blu); } .dg .skO { fill: var(--sk-org); } .dg .skK { fill: var(--sk-blk); } .dg .skG { fill: var(--sk-grn); }
.dg .skRo { fill: var(--sk-red); stroke: var(--sk-red); stroke-width: 8; stroke-linejoin: round; }
.dg .skE { fill: none; stroke: var(--sk-edge); stroke-width: 1.2; }
.dg .skKs { fill: none; stroke: var(--sk-blk); stroke-linecap: round; stroke-linejoin: round; }
.dg .skWs { fill: none; stroke: var(--sk-wht); stroke-linecap: round; stroke-linejoin: round; }
.dg .skRs { fill: none; stroke: var(--sk-red); stroke-linecap: round; }
.dg text.skt { fill: var(--sk-blk); font-weight: 800; }
.dg text.sktw { fill: var(--sk-wht); font-weight: 800; }
.dg .asf { fill: var(--sk-asf); }
.dg .mW { fill: none; stroke: var(--sk-line); } .dg .mY { fill: none; stroke: var(--sk-gline); }
.dg .mWf { fill: var(--sk-line); } .dg .mYf { fill: var(--sk-gline); }
/* pojedynczy znak nad pytaniem – mały, żeby nie zajmował ekranu */
.dg.sk1 { max-width: 150px; }
.dg.skg { max-width: 470px; }
.dg.skg text { font-size: 15px; }
.dg.skg text.sm { font-size: 13px; }
/* schemat etapów (lekcja 1.1) – wąski, żeby na telefonie litery nie były za małe */
.dg.flow { max-width: 560px; }
.dg.flow text { font-size: 15px; }
.dg.flow text.inl { font-size: 13.5px; }

/* lekcja: śródtytuł (blok "h") i tabela z przepisów (blok "tab") */
.l-h { font-size: 1.12rem; margin: 28px 0 14px; padding-top: 20px; border-top: 1px solid var(--border); }
.lesson > .l-h:first-child, .fold-b > .l-h:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.l-h .tpl { margin-top: 2px; }
.ltab { padding: 14px; }
.ltab-h { margin: 0 0 10px; font-size: .95rem; }

/* słowa-pułapki (trening na pytaniach) + komunikat o opanowaniu / powtórce pod pytaniem – od 2026-11-12 */
.q-note { font-weight: 600; color: var(--text); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 10px; padding: 8px 12px; }
.trap-h { display: flex; gap: 10px; align-items: flex-start; background: var(--warn-soft); color: var(--text); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; }
.trap-h .ico { color: var(--warn); flex: none; margin-top: 2px; }
.trap-q { line-height: 2; }
.tw { font: inherit; color: inherit; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 0 5px; margin: 0 1px; cursor: pointer; line-height: 1.6; }
.tw:hover, .tw:focus-visible { background: var(--accent-soft); border-color: var(--accent-line); }
.trap-res { border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; border: 1px solid var(--border); background: var(--surface-2); }
.trap-res.good { background: var(--good-soft); border-color: var(--good); }
.trap-res.good > b { color: var(--good); }
.trap-res.bad > b { color: var(--warn); }
.trap-box p { margin: 4px 0; }
mark.trap-m { padding: 0 2px; }
mark.trap-m .w { color: var(--mark-ink); }
.trap-intro { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; }
.trap-intro > div:first-child { flex: 1 1 320px; }
.trap-intro h2 { margin-bottom: 4px; }

/* ===== Ścieżka – plan nauki, rozdziały i krótkie sesje ===== */
.sc-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sc-top > .card { margin-bottom: 0; }
.sc-goal { display: flex; gap: 16px; align-items: center; }
.sc-goal .ring { width: 96px; height: 96px; }
.sc-goal .ring > span { width: 78px; height: 78px; }
.sc-goal .ring b { font-size: 1.55rem; }
.sc-goal .ring small { font-size: .76rem; }
.sc-goal-t h2 { margin-bottom: 4px; }
.sc-meta, .sc-set { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.sc-set .chip { min-height: 34px; padding: 3px 11px; font-size: .85rem; }
.sc-next { border-color: var(--accent-line); }
.sc-next h2 { margin-bottom: 4px; }
.sc-next-meta { display: grid; gap: 4px; }
.sc-next-meta p, .sc-next-meta h2 { margin: 0; }
.sc-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sc-actions .btn.wide { min-height: 44px; }
@media (max-width: 940px) { .sc-top { grid-template-columns: 1fr; } }

.sc-route { display: grid; gap: 10px; margin-top: 20px; }
.sc-ch { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.sc-ch[open] { border-color: var(--accent-line); }
.sc-ch-h { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 14px; border-radius: var(--radius); list-style: none; cursor: pointer; }
.sc-ch-h::-webkit-details-marker { display: none; }
.sc-ch-h:hover { background: var(--surface-2); }
.sc-ch-h:focus-visible { outline-offset: -4px; }
.sc-ch[open] > .sc-ch-h { border-bottom: 1px solid var(--border); border-end-start-radius: 0; border-end-end-radius: 0; }
.sc-ch-title { min-width: 0; }
.sc-ch-title h2 { margin: 0; font-size: 1.1rem; }
.sc-ch-title .pl-line { font-size: .86rem; }
.sc-ch-progress { display: grid; gap: 3px; min-width: 88px; color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.sc-ch-progress progress { appearance: none; display: block; width: 100%; height: 6px; border: 0; border-radius: 99px; background: var(--surface-3); color: var(--accent); }
.sc-ch-progress progress::-webkit-progress-bar { border-radius: inherit; background: var(--surface-3); }
.sc-ch-progress progress::-webkit-progress-value { border-radius: inherit; background: var(--accent); }
.sc-ch-progress progress::-moz-progress-bar { border-radius: inherit; background: var(--accent); }
.sc-ch-chevron { display: grid; place-items: center; color: var(--muted); }
.sc-ch[open] .sc-ch-chevron { transform: rotate(90deg); }
.sc-ch-chevron .ico { width: 18px; height: 18px; }

.sc-path {
  --stone-size: clamp(52px, 10vw, 68px);
  --sway: clamp(13px, 4vw, 38px);
  --path-width: calc(var(--stone-size) + 4 * var(--sway) + clamp(12px, 3vw, 28px));
  list-style: none;
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 20px 24px;
}
.sc-li {
  --bend: 2;
  --stone-offset: calc(var(--bend) * var(--sway));
  --trail-start: var(--stone-offset);
  --trail-direction: to top right;
  position: relative;
  min-width: 0;
}
.sc-li:nth-child(8n+2), .sc-li:nth-child(8n+4) { --bend: 3; }
.sc-li:nth-child(8n+3) { --bend: 4; }
.sc-li:nth-child(8n+6), .sc-li:nth-child(8n+8) { --bend: 1; }
.sc-li:nth-child(8n+7) { --bend: 0; }
.sc-li:nth-child(8n+3), .sc-li:nth-child(8n+4), .sc-li:nth-child(8n+5), .sc-li:nth-child(8n+6) {
  --trail-start: calc(var(--stone-offset) - var(--sway));
  --trail-direction: to top left;
}
.sc-li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  inset-inline-start: calc(var(--trail-start) + var(--stone-size) / 2);
  inline-size: var(--sway);
  block-size: 100%;
  background: linear-gradient(var(--trail-direction), transparent calc(50% - 1.5px), var(--border-strong) 50%, transparent calc(50% + 1.5px));
  pointer-events: none;
}
.sc-node {
  --step-ink: var(--accent);
  --step-bg: var(--accent-soft);
  --step-edge: var(--border-strong);
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: var(--path-width) minmax(0, 1fr);
  align-items: center;
  min-height: calc(var(--stone-size) + 22px);
  padding: 7px 0 11px;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.sc-node[data-kind="jezyk"] { --step-ink: var(--violet); --step-bg: var(--violet-soft); }
.sc-node[data-kind="decyzje"] { --step-ink: var(--warn); --step-bg: var(--warn-soft); }
.sc-node[data-kind="sprawdzian"] { --step-ink: var(--good); --step-bg: var(--good-soft); }
.sc-node:hover:not(.lock) .sc-c { transform: translateY(-2px); }
.sc-node:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 2px; border-radius: 12px; }
.sc-node.cur .sc-c {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  box-shadow: 0 5px 0 var(--brand-2), 0 1px 0 7px var(--accent-soft);
}
.sc-node.done { --step-bg: var(--good-soft); --step-ink: var(--good); --step-edge: var(--good); }
.sc-node.lock { color: var(--muted); cursor: not-allowed; }
.sc-node.lock .sc-c { background: var(--surface-2); color: var(--muted); box-shadow: 0 4px 0 var(--surface-3); }
.sc-c {
  width: var(--stone-size);
  height: var(--stone-size);
  justify-self: start;
  margin-inline-start: var(--stone-offset);
  display: grid;
  place-items: center;
  border: 2px solid var(--step-edge);
  border-radius: 50%;
  background: var(--step-bg);
  color: var(--step-ink);
  box-shadow: 0 4px 0 var(--step-edge);
}
.sc-c .ico { width: 25px; height: 25px; }
.sc-lbl { display: grid; justify-items: start; gap: 3px; min-width: 0; font-size: .95rem; line-height: 1.25; overflow-wrap: anywhere; }
.sc-lbl small { color: var(--muted); font-size: .86em; }
.sc-node-status { color: var(--muted); font-size: .78rem; font-weight: 600; line-height: 1.25; }
.sc-node.cur .sc-node-status { padding: .16em .6em; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.sc-node-status .sc-stars { white-space: nowrap; }
.sc-stars i { font-style: normal; color: var(--border-strong); font-size: 1.05rem; letter-spacing: 1px; }
.sc-stars i.on { color: var(--warn); }
@media (prefers-reduced-motion: no-preference) {
  .sc-node.cur .sc-c { animation: sc-stone-highlight 1.6s ease-in-out 2; }
}
@keyframes sc-stone-highlight {
  50% { box-shadow: 0 5px 0 var(--brand-2), 0 1px 0 11px var(--accent-soft); }
}

@media (max-width: 600px) {
  .sc-top { gap: 10px; }
  .sc-goal { gap: 10px; }
  .sc-goal .ring { width: 70px; height: 70px; }
  .sc-goal .ring > span { width: 56px; height: 56px; }
  .sc-goal .ring b { font-size: 1.25rem; }
  .sc-goal .ring small { font-size: .68rem; }
  .sc-ch-h { grid-template-columns: auto minmax(0, 1fr) auto; gap: 3px 9px; padding: 10px; }
  .sc-ch-h .ch-nr, .sc-ch-chevron { grid-row: 1 / span 2; }
  .sc-ch-progress { grid-column: 2; grid-row: 2; display: flex; align-items: center; gap: 6px; }
  .sc-ch-progress progress { width: 76px; max-width: 55%; }
  .sc-ch-chevron { grid-column: 3; }
  .sc-path { padding: 12px 10px 18px; }
  .sc-c .ico { width: 22px; height: 22px; }
}

.sc-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sc-bar .sc-prog { flex: 1; margin: 0; height: 12px; }
.sc-card { padding-bottom: 18px; }
.sc-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.sc-h h2 { margin: 0 0 2px; }
.sc-word { font-family: var(--font-h); font-size: 1.7rem; font-weight: 700; margin: 6px 0 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sc-listen { display: flex; align-items: center; gap: 14px; margin: 6px 0 4px; }
.sc-big-spk.spk { width: 76px; height: 76px; border-radius: 22px; background: var(--accent); color: var(--accent-ink); border: 0; box-shadow: 0 5px 0 var(--brand-2); }
.sc-big-spk.spk svg { width: 38px; height: 38px; }
.sc-sent { font-size: 1.25rem; line-height: 1.7; margin: 6px 0 8px; }
.sc-gap { display: inline-block; min-width: 80px; padding: 0 8px; margin: 0 2px; border-bottom: 3px solid var(--accent-line); color: var(--accent); font-weight: 700; text-align: center; }
.sc-gap.good { color: var(--good); border-color: var(--good); }
.sc-gap.bad { color: var(--bad); border-color: var(--bad); }
.sc-write { margin-top: 14px; }
.sc-write label { display: block; margin-bottom: 5px; font-size: .88rem; font-weight: 650; }
.sc-write-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sc-write-row input { flex: 1 1 160px; min-width: 0; min-height: 42px; padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface-2); color: var(--text); font: inherit; }
.sc-letters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.sc-letters .chip { min-width: 40px; min-height: 36px; padding: 3px 8px; border-radius: 9px; font-weight: 700; }
.sc-written-result { overflow-wrap: anywhere; }
.sc-work-link { margin-top: 8px; }
.sc-card .opt.dim, .sc-pic.dim { opacity: .55; }
.sc-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.sc-row .opt { margin: 0; }
.sc-pics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.sc-pic { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px 10px; border: 2px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.sc-pic:hover:not([aria-disabled="true"]) { border-color: var(--accent); }
.sc-pic .opt-l { position: absolute; left: 8px; top: 8px; }
.sc-pic svg { width: 100%; max-width: 150px; height: auto; }
.sc-pic.right { border-color: var(--good); background: var(--good-soft); }
.sc-pic.wrong { border-color: var(--bad); background: var(--bad-soft); }
.sc-pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sc-pairs > div { display: flex; flex-direction: column; gap: 10px; }
.sc-pair { min-height: 52px; padding: 10px 12px; border: 2px solid var(--border); border-bottom-width: 4px; border-radius: 13px; background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-align: center; }
.sc-pair:hover:not([aria-disabled="true"]) { border-color: var(--accent); }
.sc-pair.sel { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.sc-pair.ok { border-color: var(--good-soft); background: var(--good-soft); color: var(--good); opacity: .65; cursor: default; }
.sc-pair.bad { border-color: var(--bad); background: var(--bad-soft); animation: sc-shake .3s; }
@keyframes sc-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.sc-tab { margin-top: 12px; border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; }
.sc-tab summary { cursor: pointer; font-weight: 600; }
.sc-fb { position: sticky; bottom: calc(var(--navh) + env(safe-area-inset-bottom) + 8px); z-index: 20; margin-top: 14px; border-radius: 16px; padding: 14px 18px; border: 2px solid var(--border); background: var(--surface); box-shadow: var(--shadow-float); }
.sc-fb.good { border-color: var(--good); background: var(--good-soft); }
.sc-fb.bad { border-color: var(--bad); background: var(--bad-soft); }
.sc-fb.good b:first-child { color: var(--good); }
.sc-fb.bad > .sc-fb-in > div > b:first-child { color: var(--bad); }
.sc-fb-in { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.sc-fb-in > div { min-width: 0; flex: 1 1 220px; }
.sc-win { position: relative; overflow: hidden; text-align: center; padding: 36px 20px 24px; }
.sc-win h1 { margin: 8px 0 6px; }
.sc-win .sc-stars i { font-size: 2.2rem; }
.sc-trophy { width: 96px; height: 96px; margin: 0 auto; border-radius: 28px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); box-shadow: 0 7px 0 var(--brand-2); animation: sc-pop .5s ease-out; }
.sc-trophy .ico { width: 54px; height: 54px; color: var(--accent-ink); }
@keyframes sc-pop { 0% { transform: scale(.4); } 70% { transform: scale(1.1); } 100% { transform: scale(1); } }
.sc-facts { max-width: 520px; margin: 18px auto 12px; }
.sc-hit { font-size: .95rem; padding: 6px 14px; }
.sc-btns { justify-content: center; margin-top: 18px; }
.sc-conf { position: absolute; inset: 0; pointer-events: none; }
.sc-conf i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; opacity: 0; animation: sc-fall 2.2s ease-in forwards; }
.sc-conf i:nth-child(3n) { background: var(--accent); } .sc-conf i:nth-child(3n+1) { background: var(--good); } .sc-conf i:nth-child(3n+2) { background: var(--warn); }
.sc-conf i:nth-child(1) { left: 6%; animation-delay: .05s; } .sc-conf i:nth-child(2) { left: 13%; animation-delay: .3s; } .sc-conf i:nth-child(3) { left: 20%; animation-delay: .15s; }
.sc-conf i:nth-child(4) { left: 27%; animation-delay: .45s; } .sc-conf i:nth-child(5) { left: 34%; animation-delay: .1s; } .sc-conf i:nth-child(6) { left: 41%; animation-delay: .35s; }
.sc-conf i:nth-child(7) { left: 48%; animation-delay: .2s; } .sc-conf i:nth-child(8) { left: 55%; animation-delay: .5s; } .sc-conf i:nth-child(9) { left: 62%; animation-delay: .05s; }
.sc-conf i:nth-child(10) { left: 69%; animation-delay: .4s; } .sc-conf i:nth-child(11) { left: 76%; animation-delay: .25s; } .sc-conf i:nth-child(12) { left: 83%; animation-delay: .55s; }
.sc-conf i:nth-child(13) { left: 90%; animation-delay: .12s; } .sc-conf i:nth-child(14) { left: 96%; animation-delay: .38s; }
@keyframes sc-fall { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 0; transform: translateY(340px) rotate(540deg); } }
@media (prefers-reduced-motion: reduce) { .sc-conf i, .sc-trophy, .sc-pair.bad { animation: none; } }
.sc-pic.nolbl svg text { display: none; }
.sc-row .opt-t { min-width: 0; overflow-wrap: anywhere; }

/* ===== Okienko „Czy na pewno?” w stronie (zamiast confirm() – 2026-11-12, zad. 15) i kopia postępów jako tekst ===== */
.ask { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: var(--scrim); }
.ask[hidden] { display: none; }
.ask-box { width: min(440px, 100%); background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 16px; padding: 20px 22px 12px; box-shadow: var(--shadow-float); }
.ask-box p { margin: 0 0 6px; font-size: 1.02rem; }
.bk-ta { width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface-2); color: var(--text); font: .8rem/1.4 ui-monospace, Consolas, monospace; resize: vertical; }
/* ===== Telefon – zwarty wygląd (2026-11-12, prośba użytkownika po pierwszym użyciu na telefonie: „za duże ikonki i tekst,
   pytanie i odpowiedzi mają się mieścić bez przewijania w dół”). Na telefonie z claude.ai górne paski zabierają ok. 140 px. ===== */
@media (max-width: 600px) {
  :root { --navh: 50px; }
  body { font-size: calc(15px * var(--zoom, 1)); line-height: 1.45; }
  h1 { font-size: 1.5rem; }
  main { padding: 10px 10px calc(var(--navh) + 64px); }
  .card { padding: 14px; }
  /* pytania (ćwiczenia, egzamin, Ścieżka) */
  .q-top { min-height: 30px; margin-bottom: 6px; font-size: .9rem; gap: 8px; }
  .q-top .btn.sm { min-height: 32px; padding: 4px 10px; }
  .bar { height: 5px; margin-bottom: 8px; }
  .qcard, .sc-card { padding: 12px 12px 10px; }
  .q-no { font-size: 1.02rem; line-height: 1.4; margin-bottom: 6px; }
  .q-pl { font-size: .9rem; margin: 4px 0 8px; padding-left: 9px; }
  .opts { margin-top: 10px; }
  .opt { gap: 9px; padding: 7px 10px; margin-bottom: 6px; border-radius: 11px; font-size: .95rem; line-height: 1.35; }
  .opt-l { width: 24px; height: 24px; margin-top: 0; border-radius: 7px; font-size: .78rem; }
  .opt-t { gap: 2px; padding-top: 0; }
  .spk { width: 26px; height: 26px; padding: 5px; }
  .q-opt .opt { min-height: 40px; padding-inline-end: 46px; }
  .q-opt > .spk { inset-block-start: 4px; inset-inline-end: 7px; width: 32px; height: 32px; }
  .fb { margin-top: 10px; padding: 12px; }
  .fb-h { font-size: 1rem; }
  .q-side { bottom: calc(var(--navh) + env(safe-area-inset-bottom) + 6px); }
  .q-side-in { gap: 6px; padding: 6px; border-radius: 13px; }
  .q-side-in .q-go { min-height: 40px; padding: 6px 10px; font-size: .95rem; }
  .q-side .pl-tog, .sc-h .pl-tog { gap: 7px; padding: 6px 9px; font-size: .9rem; }
  .pl-tog .sw { width: 34px; height: 20px; }
  .pl-tog .sw::after { width: 14px; height: 14px; }
  .pl-tog[aria-pressed="true"] .sw::after { transform: translateX(14px); }
  /* dolne menu – niższe, mniejsze ikonki i napisy */
  .side { padding: 2px 2px calc(2px + env(safe-area-inset-bottom)); }
  .side a, .nav-more { gap: 2px; padding: 4px 0 3px; font-size: .64rem; }
  .side a .ico, .nav-more .ico { width: 21px; height: 21px; }
  .side a.on::before { top: -2px; }
  .side .more-it { padding: 10px 4px 8px; font-size: .8rem; }
  .side .more-it .ico { width: 24px; height: 24px; }
  /* Ścieżka */
  .sc-bar { margin-bottom: 8px; }
  .sc-h { margin-bottom: 8px; }
  .sc-h h2 { font-size: 1.02rem; }
  .sc-word { font-size: 1.35rem; margin: 2px 0; }
  .sc-sent { font-size: 1.06rem; }
  .sc-big-spk.spk { width: 58px; height: 58px; border-radius: 18px; }
  .sc-big-spk.spk svg { width: 30px; height: 30px; }
  .sc-pair { min-height: 42px; padding: 7px 8px; }
  .sc-pairs > div { gap: 7px; }
  .sc-fb { margin-top: 10px; padding: 9px 12px; }
  .q-keys { display: none; }
}

/* ===== Wielkość tekstu A− / A+ (2026-11-12): na komputerze na dole menu nad motywem, na telefonie w panelu „Więcej” ===== */
.zoom-sw { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 3px; margin-top: auto; margin-bottom: 6px; padding: 4px; border-radius: 12px; background: var(--side-hover); border: 1px solid var(--side-line); }
.zoom-sw + .theme-sw { margin-top: 0; }
.zoom-sw button { padding: 6px 2px; border: 0; border-radius: 9px; background: none; color: var(--side-text); font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; }
.zoom-sw button:hover:not(:disabled) { background: var(--side-on); color: var(--side-on-ink); }
.zoom-sw button:disabled { opacity: .35; cursor: default; }
.zoom-v { min-width: 3.2em; text-align: center; color: var(--side-muted); font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 820px) {
  .side > .zoom-sw { display: none; }
  .side .more-th .zoom-sw { flex: 1; margin: 0; }
  .more-th + .more-th { margin-top: 8px; }
}@media (max-width: 820px) { .more-th > .small { min-width: 3.6em; } }
