@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(vendor/fonts/space-grotesk-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: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(vendor/fonts/space-grotesk-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;
}
/* Wygląd domyślny: granat + bursztyn. Jasny: <html data-theme="light">; jak w systemie: data-theme="auto". */
:root {
  --bg: #0f1720;
  --surface: #18232f;
  --surface-2: #1f2c3a;
  --ink: #f1f5f9;
  --ink-2: #b6c0cc;
  --ink-3: #8a97a8;
  --line: #2a3848;
  --brand: #f59e0b;      /* akcent: tylko to, co prowadzi do działania */
  --brand-ink: #1a1204;
  --accent: #f59e0b;
  --accent-ink: #1a1204;
  --link: #8fb4dc;       /* odnośniki w tekście – spokojne, żeby nie odciągały przy czytaniu */
  --hero-bg: #1f2c3a;
  --hero-ink: #f1f5f9;
  --hero-num: #f59e0b;
  --nav-on-bg: #243241;
  --nav-on-ink: #f1f5f9;
  --nav-on-ico: #f59e0b;
  --mark: #5a4b10;
  --good: #5ccf8a;
  --good-bg: #173326;
  --bad: #ff8a80;
  --bad-bg: #3a1d1b;
  --warn-bg: #3a2f17;
  --focus: #3b82f6;
  --viz-1: #5b93d6; /* wykres: odpowiedzi (sprawdzone walidatorem palety) */
  --viz-2: #c98a2a; /* wykres: fiszki */
  --radius: 16px;
  --shadow: none;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f3f1ec;
  --surface: #ffffff;
  --surface-2: #f8f7f3;
  --ink: #1b2430;
  --ink-2: #4a5566;
  --ink-3: #6b7585;
  --line: #e2ded4;
  --brand: #16324f;
  --brand-ink: #ffffff;
  --accent: #b7791f;
  --accent-ink: #ffffff;
  --link: #16324f;
  --hero-bg: #16324f;
  --hero-ink: #ffffff;
  --hero-num: #ffffff;
  --nav-on-bg: #16324f;
  --nav-on-ink: #ffffff;
  --nav-on-ico: #ffffff;
  --mark: #fff1a8;
  --good: #1f7a45;
  --good-bg: #e6f4eb;
  --bad: #b3261e;
  --bad-bg: #fbe9e7;
  --warn-bg: #fff4dc;
  --shadow: 0 1px 2px rgba(20, 30, 45, .06), 0 2px 8px rgba(20, 30, 45, .05);
  --viz-1: #2f6aa3;
  --viz-2: #c08a2c;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] {
    --bg: #f3f1ec;
    --surface: #ffffff;
    --surface-2: #f8f7f3;
    --ink: #1b2430;
    --ink-2: #4a5566;
    --ink-3: #6b7585;
    --line: #e2ded4;
    --brand: #16324f;
    --brand-ink: #ffffff;
    --accent: #b7791f;
    --accent-ink: #ffffff;
    --link: #16324f;
    --hero-bg: #16324f;
    --hero-ink: #ffffff;
    --hero-num: #ffffff;
    --nav-on-bg: #16324f;
    --nav-on-ink: #ffffff;
    --nav-on-ico: #ffffff;
    --mark: #fff1a8;
    --good: #1f7a45;
    --good-bg: #e6f4eb;
    --bad: #b3261e;
    --bad-bg: #fbe9e7;
    --warn-bg: #fff4dc;
    --shadow: 0 1px 2px rgba(20, 30, 45, .06), 0 2px 8px rgba(20, 30, 45, .05);
    --viz-1: #2f6aa3;
    --viz-2: #c08a2c;
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  -webkit-text-size-adjust: 100%;
}
a { color: var(--link); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: var(--brand); color: var(--brand-ink); font: 700 20px/1 var(--display);
}
.brand-name { font: 700 18px/1 var(--display); letter-spacing: 0; }
.sync {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line);
  background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--ink-2); cursor: pointer;
}
.sync .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.sync.pending .dot { background: var(--accent); }
.sync.off .dot { background: var(--ink-3); }
.sync.err .dot { background: var(--bad); }

.view { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 18px 16px 110px; outline: none; }
.loading { color: var(--ink-3); }

h1, h2, h3 { font-family: var(--display); line-height: 1.25; margin: 0 0 10px; letter-spacing: -.01em; }
h1 { font-size: 26px; }
h2 { font-size: 20px; margin-top: 26px; }
h3 { font-size: 17px; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; color: var(--ink-3); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); margin: 12px 0;
}
.card.hero { background: var(--hero-bg); color: var(--hero-ink); border-color: transparent; }
.card.hero .muted { color: inherit; opacity: .8; }
.hero-num { font: 700 44px/1 var(--display); }
.hero .hero-num { color: var(--hero-num); }
.grid { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 12px 0; }
.grid > .card { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.grid > .card .btn.block { margin-top: auto; }
.grid > .card > * { margin: 0; }
@media (min-width: 560px) { .grid.two { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: repeat(3, 1fr); } }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat b { font: 700 28px/1.1 var(--display); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 16px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); text-decoration: none; cursor: pointer; font-weight: 600;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .45; cursor: default; }
.hero .btn { background: rgba(255,255,255,.14); color: inherit; border-color: rgba(255,255,255,.3); }

.bar { height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; background: var(--good); border-radius: inherit; transition: width .3s; }
.hero .bar { background: rgba(255,255,255,.15); border-color: transparent; }
.hero .bar > span { background: var(--accent); }

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.pill.now { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pill.done { background: var(--good-bg); color: var(--good); border-color: transparent; }

/* quiz */
.qhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.stem { font-size: 18px; line-height: 1.55; white-space: pre-line; margin: 8px 0 16px; }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt {
  text-align: left; display: flex; gap: 12px; align-items: flex-start; width: 100%;
  padding: 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; line-height: 1.45;
}
.opt:hover:not(:disabled) { border-color: var(--brand); }
.opt .l { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); font-weight: 700; }
.opt.right { border-color: var(--good); background: var(--good-bg); }
.opt.right .l { background: var(--good); color: var(--surface); }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.opt.wrong .l { background: var(--bad); color: var(--surface); }
.opt:disabled { cursor: default; }
.feedback { margin-top: 16px; border-radius: 12px; padding: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.feedback .verdict { font-weight: 700; margin-bottom: 6px; }
.feedback .verdict.ok { color: var(--good); }
.feedback .verdict.no { color: var(--bad); }
.feedback p { margin: 6px 0; white-space: pre-line; }
.label { font-size: 12.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-3); font-weight: 700; }
.sticky-actions { position: sticky; bottom: 76px; padding-top: 12px; background: linear-gradient(transparent, var(--bg) 30%); }
@media (min-width: 900px) { .sticky-actions { bottom: 12px; } }

/* odnośniki do aktów */
.refs { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.ref { padding: 8px 0; }
.ref + .ref { border-top: 1px dashed var(--line); }
.ref-name { font-weight: 600; font-size: 14.5px; margin-bottom: 6px; }
.ref .row, .list .row { gap: 8px; }
.ref .tiny { margin-top: 6px; }
.btn.sm.primary { color: var(--brand-ink); }
.back .refs { margin-top: 10px; }

/* fiszki */
.flash { min-height: 220px; display: flex; flex-direction: column; gap: 12px; }
.flash .front { font: 600 19px/1.45 var(--serif); white-space: pre-line; }
.flash .back { white-space: pre-line; border-top: 1px dashed var(--line); padding-top: 12px; }
.grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.grades .btn { flex-direction: column; gap: 0; padding: 8px 4px; font-size: 14px; }
.grades .btn small { font-weight: 400; color: var(--ink-3); font-size: 12px; }
.grades .g0 { color: var(--bad); }
.grades .g3 { color: var(--good); }

/* lista tygodni */
.week { border-left: 4px solid transparent; scroll-margin-top: 66px; }
.week.current { border-left-color: var(--accent); }
.week .meta { font-size: 14px; color: var(--ink-2); margin: 4px 0; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); cursor: pointer; }
.check:first-child { border-top: 0; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--good); }
.check .t { line-height: 1.4; }
.check.done .t { color: var(--ink-3); }
details.week summary { cursor: pointer; list-style: none; }
details.week summary::-webkit-details-marker { display: none; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 10px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }

.form label { display: block; font-weight: 600; margin: 12px 0 4px; }
.form input[type=text], .form input[type=password], .form input[type=date], .form input[type=number] {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
}
.notice { padding: 12px 14px; border-radius: 12px; background: var(--warn-bg); margin: 12px 0; font-size: 14.5px; }
.err { color: var(--bad); }

.login { max-width: 420px; margin: 8vh auto 0; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + env(safe-area-inset-bottom));
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; max-width: min(92vw, 520px);
  box-shadow: 0 6px 24px rgba(0,0,0,.2); z-index: 50; font-size: 14.5px;
}

/* nawigacja: dolny pasek i wysuwany panel na telefonie, stały panel boczny na komputerze */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.menu-btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; width: 40px; height: 36px; font-size: 18px; line-height: 1; cursor: pointer; }
.topbar { gap: 12px; }
.topbar .sync { margin-left: auto; }
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.nav[hidden] { display: none; }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 9px; text-decoration: none; color: var(--ink-3); font-size: 12px; }
.nav a .ico { font-size: 19px; line-height: 1; font-weight: 700; }
.nav a.on { color: var(--brand); }
.side {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 40; width: min(290px, 86vw);
  background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto;
  padding: calc(14px + env(safe-area-inset-top)) 12px calc(20px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left));
  transform: translateX(-104%); transition: transform .22s ease; display: flex; flex-direction: column; gap: 6px;
}
.side[hidden] { display: none; }
body.side-open .side { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.25); }
.side .brand { padding: 4px 8px 12px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-size: 15px; }
.side-nav a .ico { width: 20px; text-align: center; font-weight: 700; color: var(--ink-3); }
.side-nav a:hover { background: var(--surface-2); color: var(--ink); }
.side-nav a.on { background: var(--nav-on-bg); color: var(--nav-on-ink); font-weight: 600; }
.side-nav a.on .ico { color: var(--nav-on-ico); }
.sn-group { margin: 14px 10px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--ink-3); }
.sn-sep { height: 1px; background: var(--line); margin: 12px 6px; }
.side-upd { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; border: 0; background: transparent; color: var(--ink-2); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.side-upd .ico { width: 20px; text-align: center; font-weight: 700; color: var(--ink-3); }
.side-upd:hover { background: var(--surface-2); color: var(--ink); }
.upd { margin-left: auto; border: 0; border-radius: 999px; padding: 7px 12px; background: var(--brand); color: var(--brand-ink); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.upd[hidden] { display: none; }
.upd:not([hidden]) + .sync { margin-left: 8px; }
.upd .upd-s { display: none; }
@media (max-width: 599px) {
  .upd .upd-l { display: none; }
  .upd .upd-s { display: inline; }
  .topbar:has(.upd:not([hidden])) .brand-top .brand-name { display: none; }
}
.scrim { position: fixed; inset: 0; background: rgba(10, 16, 24, .38); z-index: 35; }
.scrim[hidden] { display: none; }
@media (min-width: 1000px) {
  .app { flex-direction: row; }
  .side { position: sticky; top: 0; height: 100vh; transform: none; transition: none; flex: 0 0 248px; width: 248px; z-index: 5; }
  .nav, .menu-btn, .brand-top { display: none !important; }
  .scrim { display: none !important; }
  .topbar { justify-content: flex-end; background: transparent; border-bottom: 0; position: static; padding-top: 12px; }
  .view { padding-bottom: 40px; padding-top: 4px; }
  .toast { bottom: 24px; }
}

/* ---------- tryb Nauka ---------- */
.view.wide { max-width: 920px; }
.lessons { padding: 6px 14px; }
.lesson-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.lesson-row:first-child { border-top: 0; }
.lesson-row .ln { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--ink-2); }
.lesson-row .lt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lesson-row:hover .lt > span:first-child { color: var(--link); }
.pill.warn { background: var(--warn-bg); border-color: transparent; color: var(--ink); }
.lesson-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.lesson h1 { margin-top: 4px; }
.lesson-tools { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 6px; }
.tog { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 6px 12px; font-size: 13.5px; cursor: pointer; min-height: 36px; }
.tog.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.lesson-part { margin-top: 18px; }
.lesson-part h2 { font-size: 18.5px; margin-top: 8px; }
.lesson-part p { margin: 8px 0; line-height: 1.6; }
.lesson .dt.lt td { line-height: 1.5; }
.lesson .dt.lt td.lt-ref { white-space: normal; width: 22%; }
button.ref { display: inline; font: inherit; font-weight: 600; color: var(--link); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; margin: 0 1px; cursor: pointer; line-height: 1.5; text-align: left; }
button.ref:hover { border-color: var(--link); }
button.ref.hid { color: transparent; background: var(--line); border-color: var(--line); user-select: none; min-width: 3.2em; }
button.ref.hid::after { content: '?'; color: var(--ink-3); }
.cl { display: inline; font: inherit; color: transparent; background: var(--warn-bg); border: 1px dashed var(--accent); border-radius: 5px; padding: 0 4px; cursor: pointer; user-select: none; }
.cl.open { color: inherit; border-style: solid; cursor: default; user-select: auto; }
.check-yourself { margin-top: 26px; }
.lesson-nav { margin: 18px 0 8px; }

/* panel z treścią przepisu */
.law {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 45; width: min(560px, 100vw);
  background: var(--surface); border-left: 1px solid var(--line); box-shadow: -12px 0 40px rgba(0,0,0,.18);
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom);
}
.law[hidden] { display: none; }
.law-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.law-head strong { font: 600 16px/1.3 var(--serif); }
.law-x { font-size: 16px; }
.law-body { overflow-y: auto; padding: 12px 18px 28px; flex: 1; -webkit-overflow-scrolling: touch; }
.law-load { padding: 10px 0; }
.law-art { padding: 10px 0 14px; border-bottom: 1px solid var(--line); }
.law-art h3 { margin: 2px 0 6px; font-size: 17px; }
.law-art .lu { margin: 6px 0; line-height: 1.58; font-family: var(--serif); font-size: 16px; }
.law-art .lu.pkt { padding-left: 1.4em; }
.law-art .lu.lit { padding-left: 2.8em; }
.law-art .lu.tir { padding-left: 3.8em; }
.law-art .lu.hit { background: var(--warn-bg); border-radius: 6px; padding: 4px 8px; margin-left: -8px; }
.law-art .lu.pkt.hit { padding-left: calc(1.4em + 8px); }
.law-art .future, .law-art.future h3 { color: var(--ink-2); }
.law-art .lu.future { border-left: 3px solid var(--accent); padding-left: 10px; }
.law-src { margin-top: 14px; display: flex; flex-direction: column; gap: 4px; }
@media (min-width: 1360px) {
  body.law-open .view.wide { width: auto; max-width: none; margin-right: 584px; margin-left: 24px; }
  body.law-open .law { box-shadow: none; }
}
@media (max-width: 640px) {
  .lesson .dt.lt td.lt-ref { width: auto; }
  .law { width: 100vw; border-left: 0; }
}

/* ---------- 2.0: pola formularzy ---------- */
textarea, select { font: inherit; color: inherit; }
.form select, .card select, textarea, input[type=search] {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
}
.card select { width: auto; min-width: 180px; max-width: 100%; }
textarea { resize: vertical; line-height: 1.5; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; margin: 6px 0; }
.switch input { width: 20px; height: 20px; accent-color: var(--brand); }
.form .switch { display: flex; }
.code { display: block; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; margin: 4px 0 8px; user-select: all; }
b.ok { color: var(--good); }
b.no { color: var(--bad); }

/* ---------- wybór tygodnia nauki ---------- */
.wpick { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; margin: 6px 0 4px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.wchip { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 44px; padding: 6px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.wchip small { font-weight: 400; font-size: 12px; color: var(--ink-3); }
.wchip:hover { border-color: var(--brand); }
.wchip.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.wchip.on small { color: var(--brand-ink); opacity: .8; }
.pill.sel { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.row.tight { gap: 6px; flex-wrap: nowrap; }

/* ---------- hub Więcej ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); min-height: 92px; }
.tile strong { font: 600 16px/1.3 var(--display); color: var(--ink); }
.tile:hover { border-color: var(--brand); }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(3, 1fr); } }

/* ---------- zegary, chipy, notatki ---------- */
.timer { font: 700 17px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.timer.low { color: var(--bad); border-color: var(--bad); background: var(--bad-bg); }
.sticky-top { position: sticky; top: calc(58px + env(safe-area-inset-top)); z-index: 5; background: var(--bg); padding: 8px 0; margin-top: -8px; }
.chips { gap: 6px; margin: 4px 0 8px; }
.chip { font-size: 12.5px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); }
.chip.warn { background: var(--warn-bg); border-color: transparent; color: var(--ink); }
.note { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.note.empty > :not(.btn) { display: none; }
.note .row { margin: 0; }
.notebox { background: var(--warn-bg); border-radius: 8px; padding: 6px 8px; margin-top: 4px; }

/* ---------- symulacja testu ---------- */
.facts { margin: 0 0 8px; padding-left: 20px; }
.facts li { margin: 3px 0; }
.opt.sel { border-color: var(--brand); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--brand); }
.opt.sel .l { background: var(--brand); color: var(--brand-ink); }
.exam-nav { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 14px 0 6px; }
.exam-nav .btn { padding-left: 6px; padding-right: 6px; white-space: nowrap; }
.btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.btn-grid .btn { text-align: center; justify-content: center; }
@media (min-width: 640px) { .btn-grid { grid-template-columns: repeat(4, 1fr); } }
.qhead .btn { white-space: nowrap; }
.qhead > .small { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.variants { list-style: none; padding: 0; margin: -6px 0 12px; }
.variants li { margin: 3px 0; }
.btn.marked { color: var(--accent); border-color: var(--accent); }
.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; margin-top: 10px; }
.qn { height: 38px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 14px; position: relative; }
.qn.done { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.qn.cur { outline: 2px solid var(--ink); outline-offset: 2px; }
.qn.marked::after { content: '★'; position: absolute; top: -7px; right: -4px; font-size: 12px; color: var(--accent); }
details.card > summary { cursor: pointer; }
details.review summary { list-style: none; }
details.review summary::-webkit-details-marker { display: none; }
details.review { border-left: 4px solid var(--line); }
details.review.ok { border-left-color: var(--good); }
details.review.no { border-left-color: var(--bad); }
details.review[open] summary { margin-bottom: 8px; }
details.review[open] summary .small { display: none; }
details.review .list li.right { color: var(--good); }
details.review .list li.wrong { color: var(--bad); }
details.review p { white-space: pre-line; }
.hist { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 14px; }
.hist:first-of-type { border-top: 0; }
.hbar { position: relative; display: block; height: 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.hbar > span { display: block; height: 100%; background: var(--brand); }
.hbar > i { position: absolute; left: 80%; top: -2px; bottom: -2px; width: 2px; background: var(--ink); }
a.hist .small { color: var(--ink-2); }

/* ---------- wyniki ---------- */
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.three .stat b { font-size: 22px; }
.weak { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.weak:first-child { border-top: 0; }
.wk { padding: 10px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.wk:first-child { border-top: 0; }
.regitem { padding: 10px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.regitem:first-child { border-top: 0; }

/* ---------- tabele i bloki z notatek ---------- */
.dt { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 8px 0; }
.dt th, .dt td { text-align: left; vertical-align: top; padding: 8px 10px; border-top: 1px solid var(--line); }
.dt th { background: var(--surface-2); font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-3); border-top: 0; }
@media (max-width: 640px) {
  .dt, .dt tbody, .dt tr, .dt td { display: block; width: 100%; }
  .dt thead { display: none; }
  .dt tr { border-top: 1px solid var(--line); padding: 6px 0; }
  .dt tr:first-child { border-top: 0; }
  .dt td { border: 0; padding: 3px 12px; }
  .dt td::before { content: attr(data-label); display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-3); font-weight: 700; }
  .grid.three { gap: 8px; }
  .grid.three .card { padding: 10px; }
  .grid.three .label { font-size: 10.5px; letter-spacing: .3px; }
  .grid.three .stat b { font-size: 19px; }
}
.doc p { margin: 8px 0; white-space: pre-line; }
.doc ul, .doc ol { margin: 6px 0; padding-left: 22px; }
.doc li { margin: 4px 0; }
.doc ul.checklist { list-style: '☐  '; }
.doc .dt { font-size: 13.5px; }

/* ---------- terminy ---------- */
.filters .row { margin-bottom: 8px; }
.termsec { margin: 20px 0 4px; font-size: 15.5px; color: var(--ink-2); }
.term { padding: 12px 14px; margin: 8px 0; }
.term-head { font-weight: 700; margin-bottom: 4px; }
.term-cell { margin-top: 6px; }
.term-cell .label { display: block; }
.term-val { font-weight: 600; }
.reveal { margin-top: 4px; }

/* ---------- zadania ---------- */
.editor { width: 100%; min-height: 55vh; padding: 14px; font: 16px/1.6 var(--serif); border-radius: 10px; }
.editor-card { padding: 10px; }
.editor-card .row { margin-top: 8px; }
.prompt-ta { min-height: 120px; }
.note-ta { min-height: 64px; }
.scores { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 6px 0 10px; }
.scores .btn { padding: 6px 0; }
.oral-q { font: 600 17px/1.5 var(--serif); margin: 6px 0 10px; white-space: pre-line; }
.task .check .tiny { margin-top: 2px; }


/* ---------- Nauka 2.3: zakładki rozdziału, przepisy, czytnik aktów ---------- */
.tabs { display: flex; gap: 2px; margin: 6px 0 14px; border-bottom: 1px solid var(--line); }
@media (min-width: 700px) { .tab { flex: 0 0 auto; padding: 10px 16px; } }
.tab { flex: 1 1 0; justify-content: center; display: inline-flex; align-items: center; gap: 7px; padding: 10px 6px; text-decoration: none; color: var(--ink-2); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab .tab-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-3); }
.tab.on { color: var(--brand); border-bottom-color: var(--brand); }
.tab.on .tab-n { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.law-group { margin-top: 10px; }
.law-group > h2 { font-size: 18px; position: sticky; top: calc(58px + env(safe-area-inset-top)); background: var(--bg); padding: 6px 0; z-index: 2; }
.lesson-laws .law-art { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: 10px 0; }
.law-art-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.law-art .lu { cursor: pointer; border-radius: 6px; }
.law-art .lu.mark { background: var(--mark); box-shadow: 0 0 0 3px var(--mark); }
.art-note { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.art-note.empty > :not(.btn) { display: none; }
.note-view { background: var(--warn-bg); border-radius: 8px; padding: 8px 10px; white-space: pre-line; font-size: 14.5px; }
.art-note .row { margin: 0; }
.art-in { margin-top: 6px; }
.tts.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.les-grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.les-grades .btn { flex-direction: column; display: flex; align-items: center; gap: 2px; padding: 8px 4px; }
.les-grades small { font-size: 12px; opacity: .8; }
.due-card { border-left: 4px solid var(--accent); }
.act-bar { display: flex; flex-direction: column; gap: 8px; }
.act-bar .row { margin: 0; flex-wrap: nowrap; }
.go-art { width: 120px; flex: 0 0 auto; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 16px; }
.act-q { font-size: 16px; }
.toc { padding: 8px 14px; }
.toc-dz-h { font: 600 15px/1.3 var(--serif); margin: 12px 0 4px; color: var(--ink); }
.toc-rz { border-top: 1px solid var(--line); padding: 6px 0; }
.toc-rz summary { cursor: pointer; font-size: 14.5px; color: var(--ink-2); padding: 4px 0; }
.toc-arts { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 6px; }
.toc-art { min-width: 44px; text-align: center; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); text-decoration: none; color: var(--ink-2); font-size: 14px; position: relative; }
.toc-art.in-notes { font-weight: 700; color: var(--link); border-color: var(--link); }
.toc-art.has-hl::after { content: ''; position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.flash .front, .flash .back > div { white-space: pre-line; }
.act .law-art { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }

/* ---------- druk rejestru błędów ---------- */
@media print {
  .topbar, .nav, .side, .law, .scrim, .toast, .no-print, .btn, .tiles { display: none !important; }
  body, .card { background: #fff !important; color: #000 !important; box-shadow: none !important; }
  .view { max-width: none; padding: 0; }
  .card { border: 0; padding: 0; }
  .regitem { break-inside: avoid; }
}
[hidden] { display: none !important; }

/* 2.3.1 – ustawienia czytania na głos */
#tts-voice { width: 100%; min-width: 0; }
.card input[type=range] { width: 100%; accent-color: var(--brand); margin: 4px 0 10px; }
#tts-voice { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
#tts-engine, #tts-gvoice { width: 100%; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }

/* 2.4.1 – „Na start tygodnia” i „Jak się uczyć” */
.src-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); border-left: 4px solid var(--link); }
.src-card-t { font-weight: 700; font-size: 17px; }
.src-card:hover .src-card-t { color: var(--link); }
.howto h3 { margin-top: 0; }
.howto-steps { margin: 8px 0 12px; padding-left: 22px; }
.howto-steps li { margin: 6px 0; line-height: 1.45; }
.src-acts, .src-changes { margin: 18px 0; }
.src-act, .src-change { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.src-act-name { font-weight: 700; }
.src-btns { flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.src-when { align-self: flex-start; }
.src-what { line-height: 1.45; }
.src-link { margin-left: 6px; }

/* 2.5.0 – wykład */
.lecture { margin-top: 4px; }
.lecture > p, .lec-part p { line-height: 1.6; }
.lec-part h2 { display: flex; align-items: center; gap: 10px; }
.lec-n { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-size: 14px; font-family: inherit; }
.lec-box { border-radius: 12px; padding: 10px 14px 4px; margin: 12px 0; border: 1px solid var(--line); background: var(--surface); }
.lec-box ul { margin: 6px 0 8px; padding-left: 20px; }
.lec-box li { margin: 4px 0; line-height: 1.5; }
.lec-box.key { background: var(--warn-bg); border-color: transparent; }
.lec-box.hooks { border-left: 4px solid var(--link); }
.lec-box.traps { border-left: 4px solid var(--bad); }
.lec-q { border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; margin: 10px 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.lec-q-t { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; line-height: 1.45; }
.lec-q-ico { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; }
.lec-a { line-height: 1.5; }
.lec-notes { margin: 18px 0; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--surface); }
.lec-notes > summary { cursor: pointer; font-weight: 600; }
.howto-why { margin: 0 0 10px; }
.howto-why > summary { cursor: pointer; font-weight: 600; font-size: 14px; }

/* 2.5.2 – plan na dziś, linki do artykułów TFUE, sekcja techniczna */
.chip-link { display: inline-block; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 13.5px; text-decoration: none; color: var(--link); background: var(--surface); }
.chip-link:hover { border-color: var(--link); }
details.tech { margin-top: 12px; }
details.tech > summary { cursor: pointer; font-size: 14px; color: var(--ink-2); }
.ref .row { flex-wrap: wrap; }

.voice-try .row { gap: 6px; margin-bottom: 8px; }
.voice-try .small { margin: 6px 0 4px; }
.voice-try .btn:not(.ghost) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }

.tts-wrap { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* szerszy układ na komputerze */
@media (min-width: 1000px) {
  .view { max-width: 1180px; padding-left: 28px; padding-right: 28px; }
  .view.wide { max-width: 1280px; }
  .home-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .home-grid > * { margin: 0; }
  .home-grid > .notice, .home-grid > .hero { grid-column: 1 / -1; }
  .lecture p, .lecture li { max-width: 100ch; }
}
@media (min-width: 1600px) {
  .view { max-width: 1360px; }
  .view.wide { max-width: 1440px; }
}
/* suwak wykładu */
.tts-box { flex: 1 1 100%; display: flex; flex-direction: column; gap: 8px; }
.tts-player { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tts-player .tts-seek { flex: 1 1 160px; min-width: 120px; }
.tts-player .tts-pos { min-width: 10em; }
.tts-player .tts-play { min-width: 44px; }
/* przed odtwarzaniem steruje przycisk „Słuchaj wykładu” – drugi ▶ tylko w przypiętym pasku */
.tts-player:not(.playing) .tts-play { display: none; }
.tts-player .tts-pos:empty { display: none; }
.tts-player.playing {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(76px + env(safe-area-inset-bottom));
  width: min(94vw, 760px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 8px 12px; box-shadow: 0 6px 24px rgba(0,0,0,.18); flex-wrap: nowrap;
}
.tts-player.playing .tts-pos { min-width: 0; white-space: nowrap; }
@media (max-width: 520px) { .tts-player.playing .tts-pos { display: none; } }
@media (min-width: 1000px) { .tts-player.playing { bottom: 20px; left: calc(50% + 124px); } }

.tts-player .btn { white-space: nowrap; }
.tts-player .tts-seek { accent-color: var(--brand); }
body.tts-playing .view { padding-bottom: 190px; }
@media (min-width: 1000px) { body.tts-playing .view { padding-bottom: 110px; } }

/* Fiszki: tygodnie zwijane; Sprawdź się: dodatkowe fiszki z tabel */
.wk-deck > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wk-deck > summary::-webkit-details-marker { display: none; }
.wk-deck > summary::after { content: '▸'; color: var(--ink-3); font-size: 14px; transition: transform .15s; }
.wk-deck[open] > summary::after { transform: rotate(90deg); }
.wk-deck[open] > summary { margin-bottom: 8px; }
.wk-sum { display: flex; flex-direction: column; gap: 2px; }
.nc-more { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.nc-more > summary { cursor: pointer; font-size: 14px; color: var(--ink-2); }
.nc-more[open] > summary { margin-bottom: 6px; }

/* Dziś: postęp i wykres aktywności */
.progress-card { grid-column: 1 / -1; }
.pmeters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; margin: 10px 0 14px; }
@media (min-width: 700px) { .pmeters { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pmeter { display: flex; flex-direction: column; gap: 4px; }
.pmeter .bar { margin: 2px 0; }
.act { border-top: 1px solid var(--line); padding-top: 12px; }
.act-head { align-items: center; }
.seg-ctl { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg-ctl button { border: 0; background: var(--surface); color: var(--ink-2); font: inherit; font-size: 13px; padding: 5px 10px; cursor: pointer; }
.seg-ctl button + button { border-left: 1px solid var(--line); }
.seg-ctl button.on { background: var(--brand); color: var(--brand-ink); }
.act-legend { display: flex; gap: 16px; flex-wrap: wrap; margin: 8px 0 6px; font-size: 13px; color: var(--ink-2); }
.act-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sw.s1, .seg.s1 { background: var(--viz-1); }
.sw.s2, .seg.s2 { background: var(--viz-2); }
.act-plot { position: relative; padding-top: 18px; }
.act-max { position: absolute; top: 0; left: 0; color: var(--ink-3); }
.act-cols { display: flex; align-items: stretch; gap: 4px; height: 150px; border-bottom: 1px solid var(--line); }
.act-cols.dense { gap: 2px; }
.act-plot.empty .act-cols { height: 60px; }
.act-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; border: 0; background: transparent; padding: 0; cursor: pointer; border-radius: 6px; position: relative; font: inherit; }
.act-col:hover, .act-col.sel { background: var(--surface-2); }
.act-col:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.act-stack { flex: 1 1 auto; width: 100%; max-width: 22px; display: flex; flex-direction: column-reverse; justify-content: flex-start; gap: 2px; }
.act-stack .seg { display: block; width: 100%; min-height: 3px; }
.act-stack .seg:last-child { border-radius: 4px 4px 0 0; }
.act-x { position: absolute; top: 100%; left: 0; right: 0; margin-top: 4px; font-size: 11px; line-height: 1.15; color: var(--ink-3); text-align: center; white-space: pre; }
.act-col.today .act-x { color: var(--ink); font-weight: 700; }
.act-cap { margin-top: 36px; min-height: 1.4em; }
.act-table table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.act-table th, .act-table td { text-align: right; padding: 3px 6px; border-bottom: 1px solid var(--line); }
.act-table th:first-child, .act-table td:first-child { text-align: left; }

/* Symulacja: testy po tygodniu */
.wk-tests > li { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; }
.wk-tests > li > div:first-child { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wt-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.wt-opt { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.wt-opt .btn { grid-row: 1 / 3; grid-column: 2; }
.hist > span:first-child { display: flex; flex-direction: column; }
.hist-sc { color: var(--ink-3); }
.card.hl { border-color: var(--link); box-shadow: inset 4px 0 0 var(--link); }

/* zerowanie postępu */
.reset-btn { color: var(--ink-3); }
.reset-btn:hover { color: var(--bad, #b42318); }
.row.end { justify-content: flex-end; }
.toast { display: flex; align-items: center; gap: 12px; }
.toast[hidden] { display: none; }
.toast-act { border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 2px 4px; white-space: nowrap; }

/* ekran Tydzień i Powtórki */
.step-h { margin-top: 26px; }
.wk-head h2 { margin: 0; font-size: 22px; }
.wk-head p { margin: 6px 0 0; }
.wk-head a { display: inline-block; margin-top: 8px; }
.hero-num.sm { font-size: 36px; margin: 4px 0 2px; }
.more-link { display: inline-block; margin-top: 10px; }
.week-hub .grid.two > .card { display: flex; flex-direction: column; gap: 6px; }
.week-hub .grid.two > .card h3 { margin: 0 0 4px; }
.rec-miss { margin: 6px 0 0; padding-left: 18px; }
.rec-miss li { margin: 2px 0; }
#rec-check:empty { display: none; }

/* ---------- ikony liniowe ---------- */
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; display: block; }
.ic .dot { fill: currentColor; stroke: none; }
.nav a .ico .ic { margin: 0 auto 1px; }
.nav a.on { font-weight: 700; }
.side-nav a .ico .ic { width: 20px; height: 20px; }

/* ---------- Dziś: następny krok, cel dnia, seria, ścieżka tygodnia ---------- */
.today-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.today-top > .card, .today-stats > .card { margin: 0; }
.today-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 12px; flex-wrap: wrap; }
.today-head h1 { font-size: 30px; line-height: 1.15; margin: 0; }
.today-date { margin: 0 0 2px; }
.exam-pill { display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: 13px; text-decoration: none; white-space: nowrap; }
.exam-pill b { color: var(--ink); font-weight: 700; }
.exam-pill:hover { border-color: var(--brand); }
.next-card { padding: 22px; border-radius: 20px; display: flex; flex-direction: column; gap: 8px; }
.next-card > p { margin: 0; }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.next-t { font-size: 24px; line-height: 1.25; margin: 0; overflow-wrap: anywhere; }
.btn.big { min-height: 56px; width: 100%; margin-top: 10px; font-size: 17px; font-weight: 700; border-radius: 14px; gap: 10px; }
.next-then { margin-top: 2px; }
.today-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.stat-card { display: flex; align-items: center; gap: 12px; padding: 14px; }
.ring-wrap { position: relative; width: 56px; height: 56px; flex: 0 0 auto; display: grid; place-items: center; }
.ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring-bg { fill: none; stroke: var(--line); stroke-width: 7; }
.ring-fg { fill: none; stroke: var(--brand); stroke-width: 7; stroke-linecap: round; }
.ring.full .ring-fg { stroke: var(--good); }
.ring-n { position: relative; font-size: 13px; font-weight: 700; }
.stat-ico { width: 48px; height: 48px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); color: var(--brand); display: grid; place-items: center; flex: 0 0 auto; }
.stat-ico .ic { width: 26px; height: 26px; }
.stat-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.stat-txt b { font-size: 15px; font-weight: 600; line-height: 1.3; }
.tile-num { appearance: none; -webkit-appearance: none; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px; text-align: left; cursor: pointer; }
.tile-num b { font: 700 26px/1.15 var(--display); }
.tile-num.bad b { color: var(--bad); }
.tile-num:disabled { cursor: default; }
.tile-num:not(:disabled):hover { border-color: var(--brand); }
.path-card h3 { margin: 0; }
.path-card > p { margin: 0; }
.path { list-style: none; display: flex; align-items: center; margin: 16px 0 12px; padding: 0; }
.path-i { flex: 1 1 0; display: flex; align-items: center; min-width: 0; }
.path-i:last-child { flex: 0 0 auto; }
.path-i::after { content: ''; flex: 1 1 0; height: 3px; background: var(--line); }
.path-i:last-child::after { display: none; }
.path-i:has(+ .path-i.done)::after, .path-i:has(+ .path-i.known)::after { background: var(--brand); }
.path-dot { position: relative; flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--ink-3); color: var(--ink-2); font-size: 14px; font-weight: 600; text-decoration: none; }
.path-dot::before { content: ''; position: absolute; inset: -7px -6px; }
.path-dot .ic { width: 16px; height: 16px; stroke-width: 3; }
.path-i.done .path-dot { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.path-i.known .path-dot { background: var(--good); border-color: var(--good); color: var(--surface); }
.path-i.cur .path-dot { border: 3px solid var(--brand); color: var(--ink); font-weight: 700; }
@media (max-width: 380px) { .path-dot { width: 28px; height: 28px; font-size: 13px; } .stat-card { gap: 10px; padding: 12px; } }
@media (min-width: 700px) { .today-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1000px) {
  .home-grid > .today-top { grid-column: 1 / -1; margin-bottom: 0; }
  .today-top { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; }
  .today-head, .today-top .path-card { grid-column: 1 / -1; }
  .today-top .today-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .next-card { justify-content: center; }
  .next-t { font-size: 28px; }
}
