:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --text: #1c2230;
  --muted: #667085;
  --border: #dde1e8;
  --accent: #2f6fdf;
  --accent-text: #ffffff;
  --accent-soft: #e6eefc;
  --accent-2: #7c4dff;
  --good: #1f8a4c;
  --good-soft: #e3f4ea;
  --mid: #a86a00;
  --mid-soft: #fbf0d9;
  --bad: #c43d3d;
  --bad-soft: #fbe5e5;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151b;
    --surface: #1b2029;
    --text: #e6e9ef;
    --muted: #98a2b3;
    --border: #2d3442;
    --accent: #5b8ff0;
    --accent-text: #0d1117;
    --accent-soft: #1f2d4a;
    --accent-2: #a78bfa;
    --good: #4cc27f;
    --good-soft: #17301f;
    --mid: #e0a640;
    --mid-soft: #33290f;
    --bad: #ef6b6b;
    --bad-soft: #3a1c1c;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
h1 { font-size: 1.5rem; margin: 0.6rem 0 1rem; }
h2 { font-size: 1.1rem; margin: 1.6rem 0 0.6rem; }
main { max-width: 980px; margin: 0 auto; padding: 16px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.error { color: var(--bad); }
.center { text-align: center; padding: 24px 16px; }
.nowrap { white-space: nowrap; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.narrow { max-width: 420px; }

/* nagłówek */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 16px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; text-decoration: none; color: var(--text); }
.subject { color: var(--muted); }
.top nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
.top nav a, .who {
  padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--text);
}
.top nav a.active, .who.active { background: var(--accent-soft); color: var(--accent); }
.who { color: var(--muted); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.banner { background: var(--mid-soft); color: var(--mid); text-align: center; font-size: 0.85rem; padding: 4px 16px; }
.terms-banner { padding: 8px 16px; }
.terms-banner a { color: inherit; text-decoration: underline; }
.terms-banner .btn { margin-left: 8px; }

/* elementy */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow);
}
.card.notice { margin-bottom: 12px; border-color: var(--accent); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; min-height: 38px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text);
  font: inherit; text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.btn.small { padding: 4px 10px; min-height: 30px; font-size: 0.85rem; }
.btn.big { padding: 12px 28px; font-size: 1.05rem; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.danger { color: var(--bad); }
input, select {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; min-height: 38px;
}
input:focus, select:focus, .btn:focus-visible, .opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 0.9rem; }
label.check { flex-direction: row; align-items: center; gap: 6px; }
.ai-tag { display: inline-block; padding: 0 6px; border-radius: 4px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; vertical-align: middle; border: 1px solid currentColor; color: var(--accent); opacity: 0.85; cursor: help; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-weight: 600; font-size: 0.85rem; background: var(--accent-soft); color: var(--accent); }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.mid { background: var(--mid-soft); color: var(--mid); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }

/* logowanie */
.login { max-width: 420px; margin: 8vh auto; display: flex; flex-direction: column; gap: 14px; }
.login h1 { margin: 0; }
.profiles { display: flex; flex-wrap: wrap; gap: 8px; }
.login form.row input { flex: 1; min-width: 0; }

/* filtry i lista testów */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); flex-wrap: wrap; }
.seg button { font: inherit; border: 0; background: transparent; color: var(--text); padding: 8px 12px; cursor: pointer; }
.seg button.on { background: var(--accent); color: var(--accent-text); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.test { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.test-title { font-weight: 600; font-size: 1.05rem; }
.test-main { display: flex; flex-direction: column; gap: 4px; }
.test-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* rozwiązywanie */
.solvebar {
  position: sticky; top: 53px; z-index: 5;
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px 12px; margin-bottom: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.solve-title { font-weight: 600; flex: 1; min-width: 160px; }
.timer { font-variant-numeric: tabular-nums; font-weight: 600; }
.timer.over { color: var(--bad); }
.task { margin-bottom: 14px; }
.task-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.latwosc { margin: 4px 0 8px; }
.task-img { background: #fff; border-radius: 6px; padding: 6px; overflow-x: auto; }
.task-img { cursor: zoom-in; }
.task-img img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.task-img.zoom { cursor: zoom-out; }
.task-img.zoom img { max-width: none; width: max(100%, 640px); }
.task.is-ok { border-left: 4px solid var(--good); }
.task.is-part { border-left: 4px solid var(--mid); }
.task.is-wrong { border-left: 4px solid var(--bad); }
.answers { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 6px; }
.answers.pf { flex-direction: column; align-items: flex-start; gap: 6px; }
.pf-row { display: flex; gap: 8px; align-items: center; }
.pf-n { width: 2.2em; color: var(--muted); text-align: right; }
.pf-n.long { width: auto; min-width: 3em; max-width: 14em; font-size: 0.85rem; }
.opt {
  min-width: 48px; min-height: 44px; padding: 0 14px;
  font: 600 1.05rem/1 inherit; font-family: inherit;
  border: 2px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text); cursor: pointer;
}
.opt:hover:not(:disabled) { border-color: var(--accent); }
.opt.sel { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.opt:disabled { cursor: default; opacity: 0.55; }
.opt.ok { opacity: 1; border-color: var(--good); background: var(--good-soft); color: var(--good); }
.opt.ok.sel { background: var(--good); color: #fff; }
.opt.wrong { opacity: 1; border-color: var(--bad); background: var(--bad); color: #fff; }

.tags { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.tag { display: inline-block; font-size: 0.75rem; padding: 1px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); text-decoration: none; white-space: nowrap; }
a.tag:hover { text-decoration: underline; }
.tag.soft { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.report-dlg { width: min(480px, calc(100vw - 32px)); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 16px; }
.report-dlg::backdrop { background: rgba(0, 0, 0, 0.45); }
.report-dlg h2 { margin: 0; }
.report-dlg textarea { display: block; width: 100%; margin-top: 4px; box-sizing: border-box; }
.report-opts { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.report-err { color: var(--bad, #b42318); margin: 0; }
.report-btn { color: var(--muted); }
.task-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.task-item { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); }
.task-item-link { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; }
.task-item-foot { display: flex; justify-content: flex-end; }
.umiem-btn.good-btn { background: var(--good-soft); color: var(--good); border-color: var(--good); }
.obszar { margin-bottom: 12px; }
.obszar .tiles { margin: 10px 0; }
.obszar-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--border); }
.obszar-bar span { display: block; height: 100%; }
.obszar-bar .good { background: var(--good); }
.obszar-bar .mid { background: var(--mid); }
.obszar-bar .bad { background: var(--bad); }
.obszar-bar .reczne { background: var(--good); opacity: 0.4; }
.obszar-bar .brak { background: transparent; }
.task-item:hover { border-color: var(--accent); }
.task-item-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.task-thumb { background: #fff; border-radius: 6px; max-height: 150px; overflow: hidden; position: relative; }
.task-thumb img { width: 100%; height: auto; display: block; }
.task-thumb::after { content: ""; position: absolute; inset: auto 0 0 0; height: 30px; background: linear-gradient(transparent, #fff); }
.rozw { border: 2px solid var(--good-soft); }
.rozw-det { margin-top: 8px; }

/* notatki */
.note { margin-top: 10px; }
.note summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; padding: 4px 0; }
.note[open] summary { color: var(--text); }
.note textarea {
  width: 100%; margin-top: 6px; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; resize: vertical;
}
.note textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.note-item { display: block; text-decoration: none; color: var(--text); }
.note-item:hover { border-color: var(--accent); }
.note-text { white-space: pre-wrap; margin-top: 4px; }
.task-link { margin-left: auto; }

/* korepetytor AI */
.ai { margin: 14px 0; display: flex; flex-direction: column; gap: 10px; }
.chat { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; padding: 2px; }
.msg { max-width: 92%; border-radius: 12px; padding: 8px 12px; line-height: 1.5; }
.msg.uczen { align-self: flex-end; background: var(--accent); color: var(--accent-text); white-space: pre-wrap; }
.msg.ai { align-self: flex-start; background: var(--bg); border: 1px solid var(--border); }
.msg.err { align-self: stretch; background: var(--bad-soft); color: var(--bad); }
.msg.typing { color: var(--muted); font-style: italic; }
.msg-who { font-size: 0.75rem; color: var(--muted); margin-bottom: 2px; }
.msg-body p { margin: 0 0 6px; }
.msg-body p:last-child { margin-bottom: 0; }
.msg-body ul, .msg-body ol { margin: 4px 0 6px; padding-left: 22px; }
.ai-ask { display: flex; gap: 8px; align-items: flex-end; }
.ai-ask textarea { flex: 1; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; resize: vertical; }
.hint-box { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.hint-box [data-hints] { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.hint-box.hint-chat { align-items: stretch; }
.hint-chat > .card.ai { margin: 0; box-shadow: none; padding: 10px; }
.hint-chat > .card.ai h2 { font-size: 1rem; }
.ai-explain { margin-top: 6px; }
.ai-days { margin: 10px 0; }
.say { border: 0; background: transparent; cursor: pointer; font-size: 0.95rem; padding: 0 4px; border-radius: 6px; color: var(--muted); }
.say:hover, .say.playing { background: var(--accent-soft); color: var(--accent); }
.btn.mic.recording { background: var(--bad); border-color: var(--bad); color: #fff; font-variant-numeric: tabular-nums; }
.ai-auto { margin-left: auto; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50; max-width: min(92vw, 520px);
  background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.25); font-size: .9rem; }
.ai-days summary { cursor: pointer; color: var(--muted); margin-bottom: 6px; }

/* wynik */
.summary { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; margin-bottom: 14px; }
.summary h1 { margin: 2px 0 0; font-size: 1.25rem; }
.summary .row { grid-column: 1 / -1; }
.score { text-align: center; padding: 8px 16px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent); }
.score span { display: block; font-size: 1.6rem; font-weight: 700; }
.score.good { background: var(--good-soft); color: var(--good); }
.score.mid { background: var(--mid-soft); color: var(--mid); }
.score.bad { background: var(--bad-soft); color: var(--bad); }

/* tabele i statystyki */
.tbl { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.tbl th, .tbl td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.tbl th { font-weight: 600; font-size: 0.85rem; color: var(--muted); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.scroll { overflow-x: auto; }
.heat { width: auto; }
.heat td, .heat th { padding: 3px; text-align: center; }
.heat tbody th { text-align: right; padding-right: 8px; white-space: nowrap; }
.heat th.vert { height: 120px; vertical-align: bottom; }
.heat th.vert span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-weight: 500; }
.cell {
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 32px; border-radius: 6px; font-size: 0.8rem; font-weight: 600;
  text-decoration: none; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; font-family: inherit;
}
.cell.good { background: var(--good); color: #fff; border-color: transparent; }
.cell.mid { background: var(--mid); color: #fff; border-color: transparent; }
.cell.bad { background: var(--bad); color: #fff; border-color: transparent; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.big-num { font-size: 1.8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.big-num small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.bar { flex: 1; max-width: 40px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; text-decoration: none; color: var(--muted); }
.bar span { width: 100%; border-radius: 4px 4px 0 0; background: var(--accent); }
.bar.good span { background: var(--good); }
.bar.mid span { background: var(--mid); }
.bar.bad span { background: var(--bad); }
.bar small { font-size: 0.7rem; margin-top: 2px; }

@media (max-width: 600px) {
  main { padding: 12px; }
  .top { gap: 6px; padding: 6px 12px; }
  .top nav { order: 3; flex-basis: 100%; }
  .solvebar { top: 88px; }
  .summary { grid-template-columns: 1fr; }
  .task-img { padding: 2px; }
}

/* zadania z wyborem w nawiasach (matura) */
.answers.nawiasy { display: flex; flex-direction: column; gap: 6px; }
.answers.nawiasy .pf-row { flex-wrap: wrap; }
.opt.txt { width: auto; min-width: 2.6em; padding: 6px 10px; font-size: 0.92rem; }

/* zadania otwarte w teście: samoocena i ocena AI ze zdjęcia */
.open-note { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--bg); border: 1px dashed var(--border); }
.open-key { margin-top: 8px; }
.open-key > summary { cursor: pointer; font-weight: 600; }
.self-grade { margin-top: 8px; align-items: center; }
.key-text { white-space: pre-wrap; font: inherit; font-size: 0.9rem; background: var(--bg); padding: 8px; border-radius: 8px; max-height: 50vh; overflow: auto; }
.ai-grade { margin-top: 8px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); display: flex; flex-direction: column; gap: 6px; }
.ai-grade.low { border-color: var(--bad); }
.ai-grade .warn { color: var(--bad); }
.ai-grade .criteria { margin: 0; padding-left: 0; list-style: none; font-size: 0.92rem; }
.ai-grade .criteria li.ok { color: var(--good, inherit); }
.ai-grade .criteria li.no { color: var(--bad); }
.ai-grade .ocr { white-space: pre-wrap; font-size: 0.85rem; background: var(--surface); padding: 6px 8px; border-radius: 6px; }
.photo-grade { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumb { position: relative; }
.thumb img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.thumb button { position: absolute; top: 2px; right: 2px; padding: 0 6px; line-height: 1.4; }

/* cały arkusz ze zdjęć */
.sheet-grade { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.sheet-grade h3 { margin: 0; }
.thumb-n { position: absolute; left: 4px; bottom: 4px; background: var(--surface); border-radius: 4px; padding: 0 5px; font-size: 0.8rem; }
.assign { display: flex; flex-direction: column; gap: 6px; }
.assign-row { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); }
.assign-label { min-width: 9rem; }
.assign-photos { display: flex; flex-wrap: wrap; gap: 4px; }
.chip-n { min-width: 2.1em; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 0.85rem; cursor: pointer; }
.chip-n.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.grade-progress { margin: 0; padding-left: 1.1em; font-size: 0.92rem; }
.grade-progress li.ok { color: var(--good); }
.grade-progress li.no { color: var(--bad); }
.plan-quick.saved { outline: 2px solid var(--good); }

/* fiszki */
.fx { font-family: inherit; white-space: nowrap; } /* wzory chemiczne: krój tekstu (w kroju o stałej szerokości O myli się z 0) */
.fx sub, .fx sup { font-size: 0.72em; line-height: 0; }
.fc-cats { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.fc-cats .chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 5px 10px; font: inherit; font-size: 0.85rem; cursor: pointer; }
.fc-cats .chip.on { background: var(--accent-soft); border-color: var(--accent); }
.fc-cats .chip small { color: var(--muted); }
.fc-cats .chip.ghost { background: none; color: var(--muted); }
.fc-bar { margin: 8px 0; align-items: center; gap: 8px; }
.fc-bar .seg button { padding: 6px 10px; font-size: 0.85rem; }
.fc-bar .seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); }
.progress { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 10px; }
.progress > div { height: 100%; background: var(--good); }
.fc-card { min-height: 220px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; }
.fc-head { display: flex; justify-content: space-between; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.72rem; }
.fc-q { font-size: 1.2rem; font-weight: 600; margin: 0; line-height: 1.35; }
.fc-a { border-top: 1px dashed var(--border); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.fc-a p { margin: 0; }
.fc-big { font-weight: 700; font-size: 1.08rem; }
.fc-long { font-size: 1.05rem; line-height: 1.45; }
.fc-sw { display: flex; flex-wrap: wrap; gap: 8px; }
.fc-sw span { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--muted); }
.fc-sw i { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border); display: inline-block; }
.fc-answer { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.btn.good { background: var(--good-soft); border-color: var(--good); color: var(--text); }
.btn.bad { background: var(--bad-soft); border-color: var(--bad); color: var(--text); }
.link-btn { border: 0; background: none; color: var(--accent); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
/* fiszki: wzory $…$ (ułamki, pierwiastki), karty sprawdzane (P/F, ABCD, liczba) */
.mx { white-space: nowrap; font-family: "Cambria Math", "STIX Two Math", "Times New Roman", serif; font-size: 1.08em; }
.mx sub, .mx sup { font-size: 0.7em; line-height: 0; }
.mf { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 0.12em; font-size: 0.92em; }
.mf > span { padding: 0 0.15em; line-height: 1.15; }
.mf > span:first-child { border-bottom: 1px solid currentColor; }
.msq > span { border-top: 1px solid currentColor; padding: 0 0.1em; }
.msq-n { font-size: 0.6em; margin-right: -0.35em; vertical-align: 0.9em; }
.fc-card.fc-check { cursor: default; }
.fc-pf { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fc-opts { display: flex; flex-direction: column; gap: 8px; }
.fc-opt { display: flex; gap: 10px; align-items: center; text-align: left; justify-content: flex-start; }
.fc-opt > b { min-width: 1.2em; color: var(--muted); }
.fc-pf .btn[disabled], .fc-opts .btn[disabled] { opacity: 1; cursor: default; }
.fc-num { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fc-num input { font: inherit; font-size: 1.1rem; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); width: 12rem; max-width: 100%; }
.fc-unit { font-weight: 600; }
.fc-verdict { margin: 0; font-weight: 700; }
.fc-verdict.ok { color: var(--good); }
.fc-verdict.no { color: var(--bad); }
.bad-text { color: var(--bad); margin: 0; }
.good-text { color: var(--good); }
.mid-text { color: var(--mid); }
.fc-next { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.fc-links a { margin-right: 2px; }
.fc-print-panel { margin: 10px 0; }
.fc-tab h3 { margin: 18px 0 6px; }
.fc-tab .table-wrap { overflow-x: auto; }
.fc-tab table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.fc-tab th, .fc-tab td { text-align: left; vertical-align: top; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.fc-tab th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.fc-tab td:first-child { width: 34%; }
.fc-tab .fc-sw { margin-top: 4px; }
.fc-tab .fc-sw i { width: 18px; height: 18px; }
.fc-ok { color: var(--good); font-weight: 700; }
.fc-fs { border: 1px solid var(--border); border-radius: 8px; margin: 0 0 10px; padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; }
.fc-fs legend { font-size: 0.85rem; color: var(--muted); padding: 0 4px; }

/* fiszki do druku: A4, 3 × 4 karty; strona parzysta przy druku dwustronnym to odpowiedzi w lustrze */
#fc-print { display: none; }
@media print {
  @page { size: A4; margin: 8mm; }
  body.fc-druk { background: #fff; color: #111; }
  body.fc-druk > *:not(#fc-print) { display: none !important; }
  body.fc-druk #fc-print { display: block; }
  #fc-print { font-size: 9.5pt; color: #111; }
  .pc-sheet { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, 70mm); break-after: page; page-break-after: always; }
  .pc { border: 0.3mm dashed #999; padding: 3.5mm; display: flex; flex-direction: column; gap: 1.5mm; overflow: hidden; }
  .pc.blank { border-color: #e3e3e3; }
  .pc-cat { display: flex; justify-content: space-between; gap: 2mm; font-size: 6.5pt; letter-spacing: 0.05em; text-transform: uppercase; color: #666; }
  .pc-q { font-size: 11.5pt; font-weight: 600; line-height: 1.3; margin-block: auto; }
  .pc.one .pc-q { margin-block: 1mm; font-size: 10pt; }
  .pc-hint { margin: 0; font-size: 9pt; color: #444; }
  .pc-opts { margin: 0; padding: 0; list-style: none; font-size: 9pt; display: flex; flex-direction: column; gap: 0.8mm; }
  .pc-a { display: flex; flex-direction: column; gap: 1.2mm; font-size: 8.8pt; line-height: 1.3; }
  .pc-a p { margin: 0; }
  .pc-a .fc-big { font-size: 10.5pt; }
  .pc-a .fc-long { font-size: 9pt; }
  .pc-a .small { font-size: 7pt; }
  .pc-s { font-size: 7pt; color: #555; border-bottom: 0.2mm solid #ccc; padding-bottom: 1mm; }
  .pc-fold { border-top: 0.3mm dashed #999; margin: 0.5mm 0; }
  .pc .fc-sw i { width: 5mm; height: 5mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pc .fc-sw span { font-size: 7pt; }
}

/* analiza błędów */
.err-list { display: flex; flex-direction: column; gap: 8px; }
.err-type > summary { display: grid; grid-template-columns: minmax(0, 16rem) minmax(0, 1fr) auto; gap: 10px; align-items: center; cursor: pointer; }
.err-name { font-weight: 600; }
.err-bar { height: 10px; background: var(--bg); border-radius: 5px; overflow: hidden; }
.err-bar > span { display: block; height: 100%; background: var(--bad); border-radius: 0 5px 5px 0; }
.err-ex { margin: 6px 0; padding-left: 1.1em; }
.err-pill { font-size: 0.72rem; }
@media (max-width: 560px) { .err-type > summary { grid-template-columns: minmax(0, 1fr) auto; } .err-bar { grid-column: 1 / -1; grid-row: 2; } }
.sheet-grade h4 { margin: 6px 0 0; font-size: 0.95rem; }

/* edytor rysikiem */
html.ink-open, html.ink-open body { overflow: hidden; }
.ink-overlay { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: flex; flex-direction: column;
  /* iPadOS: bez tego szybkie stuknięcia Pencilem są brane za gest zaznaczania tekstu / lupę i gubią kreski */
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.ink-bar { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 8px max(10px, env(safe-area-inset-left, 0px)) 8px max(10px, env(safe-area-inset-right, 0px));
  border-bottom: 1px solid var(--border); background: var(--surface); }
.ink-title { margin-right: auto; }
.ink-tools, .ink-actions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ink-btn { font: inherit; font-size: 0.88rem; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 8px; padding: 6px 9px; min-height: 36px; cursor: pointer; }
.ink-btn.on { background: var(--accent-soft); border-color: var(--accent); }
.ink-col i { display: inline-block; width: 16px; height: 16px; border-radius: 50%; vertical-align: -3px; }
.ink-picker { position: relative; display: inline-flex; align-items: center; }
.ink-picker i { background: conic-gradient(#ef4444, #eab308, #22c55e, #06b6d4, #6366f1, #d946ef, #ef4444); }
.ink-picker.on i, .ink-picker.custom i { background: var(--ink-c); box-shadow: 0 0 0 2px #fff inset; }
.ink-picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.ink-scroll { flex: 1; overflow: auto; padding: 8px; -webkit-overflow-scrolling: touch; }
.ink-page { position: relative; margin: 0 auto; background-color: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15);
  background-image: linear-gradient(#e6ecf5 1px, transparent 1px), linear-gradient(90deg, #e6ecf5 1px, transparent 1px);
  background-size: var(--kratka, 40px) var(--kratka, 40px); }
.ink-bg { position: absolute; left: 0; top: 0; right: 0; height: var(--tlo-h, auto); background: #fff; }
.ink-bg img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-select: none; pointer-events: none; }
.ink-canvas { position: absolute; left: 0; top: 0; touch-action: none; cursor: crosshair; }
.ink-msg { color: var(--muted); }
.pill.small { font-size: 0.7rem; padding: 0 6px; }
.sent-list { display: flex; flex-wrap: wrap; gap: 10px; }
.sent { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.sent-thumb { border: 1px solid var(--border); border-radius: 8px; padding: 0; background: #fff; cursor: zoom-in; overflow: hidden; }
.sent-thumb img { width: 140px; height: 180px; object-fit: cover; object-position: top; display: block; }
.sent.big { flex-basis: 100%; }
.sent.big .sent-thumb img { width: 100%; height: auto; object-fit: contain; }

/* narzędzia: kalkulator i podgląd kart */
/* nad edytorem rysika (.ink-overlay, z-index 100) — kalkulator i tablice są dostępne także przy pisaniu */
.tools-fab { position: fixed; right: calc(12px + env(safe-area-inset-right, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 110; display: flex; flex-direction: column; gap: 8px; }
.fab { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); font-size: 1.3rem; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.tool-panel { position: fixed; z-index: 120; right: calc(70px + env(safe-area-inset-right, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.22); padding: 10px; display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 24px); }
.tool-head { display: flex; gap: 6px; align-items: center; cursor: move; touch-action: none; user-select: none; -webkit-user-select: none; }
.tool-head .grip { color: var(--muted); font-size: 1.1rem; line-height: 1; padding: 0 2px; }
.tool-head b { margin-right: auto; }
.tool-head select { font: inherit; flex: 1; min-width: 0; padding: 4px; margin-right: 4px; }
.tool-panel.dragging { opacity: .92; box-shadow: 0 10px 32px rgba(0,0,0,.3); }
.calc { width: min(330px, calc(100vw - 90px)); }
.calc-in { font: 1.05rem ui-monospace, Menlo, monospace; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); width: 100%; box-sizing: border-box; }
.calc-out { min-height: 1.4em; font: 600 1.15rem ui-monospace, Menlo, monospace; text-align: right; }
.calc-out.err { color: var(--bad); font-size: 0.85rem; font-family: inherit; font-weight: 400; }
.calc-keys { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.ck { font: inherit; font-size: 0.92rem; padding: 9px 2px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--text); cursor: pointer; }
.ck.wide { grid-column: span 3; }
.ck.eq { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.calc-hist { margin: 0; padding-left: 1.2em; max-height: 7em; overflow: auto; }
.viewer { width: min(720px, calc(100vw - 90px)); height: min(80vh, 900px); }
.viewer.landscape { width: min(1000px, calc(100vw - 90px)); }
.viewer-body { flex: 1; min-height: 0; overflow: auto; touch-action: pan-x pan-y pinch-zoom; background: #fff; border-radius: 6px; border: 1px solid var(--border); }
.viewer-body img { display: block; max-width: none; }
@media (max-width: 560px) { .tool-panel { right: 8px; left: 8px; width: auto; bottom: calc(70px + env(safe-area-inset-bottom, 0px)); } .viewer { height: 70vh; } .viewer.landscape { width: auto; } }

/* tryb nauki: przełącznik, chipy zadań, sprawdzanie w trakcie */
.mode-bar { align-items: center; gap: 10px; margin: -4px 0 12px; }
.task-nav { flex-basis: 100%; display: flex; gap: 4px; overflow-x: auto; padding-top: 4px; scrollbar-width: thin; }
.tchip { flex: 0 0 auto; min-width: 2.4em; text-align: center; padding: 3px 6px; border-radius: 6px; font-size: 0.78rem; text-decoration: none;
  border: 1px solid var(--border); background: var(--bg); color: var(--muted); font-variant-numeric: tabular-nums; }
.tchip.ans { color: var(--text); border-color: var(--accent); }
.tchip.ok { background: var(--good-soft); border-color: var(--good); color: var(--text); }
.tchip.part { background: var(--mid-soft); border-color: var(--mid); color: var(--text); }
.tchip.bad { background: var(--bad-soft); border-color: var(--bad); color: var(--text); }
.tchip.nokey { border-style: dashed; color: var(--text); }
.check-row { margin-top: 8px; }
.key-note { margin: 6px 0 0; padding: 6px 10px; border-left: 3px solid var(--mid); background: var(--mid-soft); border-radius: 4px; }
.task-note { margin: 0 0 6px; padding: 6px 10px; border-left: 3px solid var(--accent, var(--mid)); background: var(--mid-soft); border-radius: 4px; }
.check-res { margin-top: 8px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.check-open { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.task[id] { scroll-margin-top: 150px; }

/* odpowiedź tekstowa i dyktowanie */
.txt-answer { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.txt-answer textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; resize: vertical; width: 100%; box-sizing: border-box; }
.txt-tools { align-items: center; }
.btn.mic.recording { background: var(--bad-soft); border-color: var(--bad); }
.sent-text { margin: 0; padding: 8px 10px; max-width: 520px; white-space: pre-wrap; font-size: 0.92rem; background: var(--bg); border-left: 3px solid var(--accent); border-radius: 4px; }
.dz-sum { margin: 10px 0; } .dz-sum > summary { cursor: pointer; }
.dz-sum td.num { white-space: nowrap; }
.zuz td, .zuz th { white-space: nowrap; }
.assign-empty .assign-label > b { opacity: .6; }

/* ------------------------------------------------------------------ strona startowa, logowanie, dokumenty */
.logo-mark { width: 26px; height: 26px; flex: none; }
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand b, .lp-brand b { color: var(--accent); }
.app-foot { max-width: 980px; margin: 0 auto; padding: 0 16px 16px; }
.site-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 18px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.85rem; margin-top: 24px; }
.site-foot nav { display: flex; gap: 16px; }
.site-foot a { color: var(--muted); }
.danger-zone { margin-top: 16px; border-color: var(--bad-soft); }
.danger-zone summary { cursor: pointer; color: var(--bad); }
.danger-zone .btn.danger { border-color: var(--bad); }

.auth-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px 16px;
  background: radial-gradient(60rem 30rem at 10% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent),
              radial-gradient(50rem 30rem at 110% 110%, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent); }
.auth-page .login { margin: 0; width: 100%; }
.auth-brand { font-size: 1.15rem; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.8rem; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.consent-check { align-items: flex-start !important; font-size: 0.85rem; line-height: 1.4; }
.consent-check input { margin-top: 2px; width: 18px; height: 18px; min-height: 0; padding: 0; flex: none; accent-color: var(--accent); }

.lp { --wrap: 1120px; min-height: 100vh; }
.lp-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.lp-narrow { max-width: 760px; }
.lp-top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.lp-top-in { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.lp-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 1.05rem; color: var(--text); text-decoration: none; }
.lp-brand .logo-mark { width: 30px; height: 30px; }
.lp-nav { display: flex; gap: 4px; flex: 1; justify-content: center; }
.lp-nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; }
.lp-nav a:hover { color: var(--text); background: var(--accent-soft); }
.lp-actions { display: flex; gap: 6px; }

.lp-hero { position: relative; overflow: hidden; padding: 64px 0 56px;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 28px 28px; background-position: -1px -1px; }
.lp-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(42rem 26rem at 15% 20%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
              radial-gradient(36rem 26rem at 85% 70%, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 70%),
              linear-gradient(180deg, transparent 60%, var(--bg)); }
.lp-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: color-mix(in srgb, var(--bg) 55%, transparent); z-index: 0; }
.lp-bg { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.lp-f { position: absolute; font: italic 600 1rem/1 "Cambria Math", Georgia, serif; color: var(--accent); opacity: 0.22; white-space: nowrap; animation: lp-float 14s ease-in-out infinite; }
.lp-f.f0 { left: 4%; top: 14%; } .lp-f.f1 { left: 38%; top: 6%; animation-delay: -3s; } .lp-f.f2 { right: 6%; top: 10%; animation-delay: -6s; }
.lp-f.f3 { right: 18%; bottom: 4%; animation-delay: -2s; color: var(--accent-2); } .lp-f.f4 { left: 46%; bottom: 6%; animation-delay: -8s; }
.lp-f.f5 { right: 4%; bottom: 20%; animation-delay: -5s; color: var(--accent-2); } .lp-f.f6 { left: 26%; top: 44%; animation-delay: -10s; opacity: 0.12; }
.lp-f.f7 { right: 32%; top: 34%; animation-delay: -7s; opacity: 0.12; color: var(--accent-2); }
@keyframes lp-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .lp-f { animation: none; } }
.lp-hero-in { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; }
.lp-badge { display: inline-block; padding: 5px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); font-size: 0.85rem; color: var(--muted); }
.lp-hero h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); line-height: 1.08; letter-spacing: -0.02em; margin: 18px 0 16px; }
.lp-grad { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-lead { font-size: 1.1rem; color: var(--muted); max-width: 36rem; margin: 0 0 24px; }
.lp-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.lp-cta .btn.primary { box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 35%, transparent); }
.lp-stats { display: flex; gap: 28px; margin-top: 30px; flex-wrap: wrap; }
.lp-stats div { display: flex; flex-direction: column; }
.lp-stats b { font-size: 1.6rem; letter-spacing: -0.01em; }
.lp-stats span { color: var(--muted); font-size: 0.85rem; }

.lp-mock { position: relative; padding: 18px 10px; }
.lp-mock-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px; box-shadow: 0 24px 60px rgba(16, 24, 40, 0.14); transform: rotate(-1.2deg); }
.lp-mock-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.lp-mock-sheet { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 10px; margin-bottom: 12px;
  font: 1rem/1.3 "Segoe Print", "Comic Sans MS", "Bradley Hand", cursive; color: #2846b8;
  background-color: #fffef6; background-image: linear-gradient(#e7ecf8 1px, transparent 1px), linear-gradient(90deg, #e7ecf8 1px, transparent 1px); background-size: 16px 16px; }
.lp-strike { text-decoration: underline wavy var(--bad); text-underline-offset: 4px; }
.lp-mock-crit { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; }
.lp-mock-crit li::before { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; margin-right: 8px; font-size: 0.75rem; font-weight: 700; }
.lp-mock-crit li.ok::before { content: "✓"; background: var(--good-soft); color: var(--good); }
.lp-mock-crit li.no::before { content: "✗"; background: var(--bad-soft); color: var(--bad); }
.lp-mock-ai { margin: 0; font-size: 0.9rem; background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; }
.lp-mock-ai span { display: inline-block; font-weight: 700; font-size: 0.75rem; color: #fff; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 6px; padding: 1px 6px; margin-right: 6px; }
.lp-mock-chip { position: absolute; background: var(--surface); border: 1px solid var(--border); border-radius: 99px; padding: 6px 12px; font-size: 0.85rem; box-shadow: 0 10px 30px rgba(16, 24, 40, 0.12); }
.lp-mock-chip.c1 { top: -4px; right: 0; transform: rotate(3deg); }
.lp-mock-chip.c2 { bottom: -6px; left: -8px; transform: rotate(-2deg); }

.lp-sec { padding: 64px 0; }
.lp-sec.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.lp-h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.01em; margin: 0 0 8px; text-align: center; }
.lp-sub { text-align: center; color: var(--muted); max-width: 40rem; margin: 0 auto 32px; }
.lp-kol { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.lp-kol-card, .lp-feat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; transition: transform 0.15s, border-color 0.15s; }
.lp-sec.alt .lp-feat-card { background: var(--bg); }
.lp-kol-card:hover, .lp-feat-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.lp-kol-card h3, .lp-feat-card h3 { margin: 10px 0 4px; font-size: 1.1rem; }
.lp-kol-card p { margin: 6px 0 0; }
.lp-kol-ico, .lp-feat-ico { font-size: 1.6rem; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--accent-2) 16%, transparent)); }
.lp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.lp-tags span { font-size: 0.8rem; padding: 2px 9px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.lp-feat { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.lp-feat-card p { color: var(--muted); margin: 0; }
.lp-steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.lp-steps li { counter-increment: s; display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: 14px; border: 1px dashed var(--border); }
.lp-steps li::before { content: counter(s); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); margin-bottom: 4px; }
.lp-steps span { color: var(--muted); }
.lp-faq { border-bottom: 1px solid var(--border); padding: 12px 0; }
.lp-faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.lp-faq summary::after { content: "+"; color: var(--accent); font-weight: 700; }
.lp-faq[open] summary::after { content: "−"; }
.lp-faq p { color: var(--muted); margin: 8px 0 0; }
.lp-final { padding: 64px 0; text-align: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.lp-final h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 8px; }
.lp-final p { opacity: 0.9; margin: 0 0 22px; }
.lp-final .btn.primary { background: #fff; color: var(--accent); border-color: #fff; }
.lp-doc { max-width: 820px; margin: 0 auto; padding: 24px 20px; }
.legal { line-height: 1.6; }
.legal h2 { font-size: 1.05rem; margin-top: 1.4rem; }
.legal ol, .legal ul { padding-left: 1.3rem; }
.legal li { margin: 4px 0; }
.legal mark { background: var(--mid-soft); color: var(--mid); padding: 0 4px; border-radius: 4px; }
.legal-short { background: var(--accent-soft); border: none; margin: 12px 0 4px; }
.legal-short h2 { margin-top: 0; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin: 8px 0; }
.legal-table th, .legal-table td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
@media (max-width: 560px) { .legal-table { font-size: 0.85rem; } .legal-table th, .legal-table td { padding: 4px; } }

@media (max-width: 860px) {
  .lp-hero-in { grid-template-columns: 1fr; }
  .lp-mock { max-width: 460px; }
  .lp-nav { display: none; }
  .lp-top-in { justify-content: space-between; }
}
@media (max-width: 480px) {
  .lp-actions .btn.ghost { display: none; }
  .lp-hero { padding: 36px 0; }
  .lp-stats { gap: 18px; }
  .lp-sec { padding: 44px 0; }
}
.verify-mail { background: var(--mid-soft); border-radius: 8px; padding: 8px 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* omówienie arkusza (AI) */
.omowienie h2 { margin: 0 0 4px; font-size: 1.15rem; }
.omowienie h3 { margin: 12px 0 4px; font-size: 1rem; }
.omowienie ul, .omowienie ol { margin: 4px 0; padding-left: 22px; }
.om-problemy li { margin-bottom: 8px; }

/* czas nauki (web/js/aktywnosc.js) */
.akt-svg { width: 100%; height: auto; max-height: 210px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-top: 12px; }
.akt-bar { fill: var(--accent); opacity: 0.75; }
.akt-trend { fill: none; stroke: var(--mid); stroke-width: 2; }
.akt-os { stroke: var(--border); }
.akt-lbl { font-size: 10px; fill: var(--muted); text-anchor: middle; }
.akt-lbl-y { text-anchor: end; font-size: 9px; }
.akt-wart { font-size: 8.5px; fill: var(--text); }
.akt-siatka { stroke: var(--border); stroke-dasharray: 2 3; }
.akt-skut-bar.good { fill: var(--good); }
.akt-skut-bar.mid { fill: var(--mid); }
.akt-skut-bar.bad { fill: var(--bad); }

/* nawigacja między zadaniami listy (widok zadania) */
.task-nav { margin: 0 0 10px; gap: 8px; align-items: center; }
.task-nav.dol { margin: 10px 0 16px; }
.task-nav .row { gap: 8px; align-items: center; }
.task-nav .btn[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }
.fc-postep .fc-bar-td { width: 30%; min-width: 90px; }
.akt-tab td { vertical-align: top; }
/* fiszki: dzienny cel, seria, podsumowanie sesji */
.fc-cel { gap: 8px; align-items: center; margin: 6px 0 2px; }
.fc-cel > span { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.fc-cel .fc-cel-lbl { display: inline-flex; flex-direction: row; align-items: center; gap: 4px; margin: 0; font-weight: normal; }
.fc-cel select { width: auto; padding: 2px 4px; font-size: inherit; }
.progress.fc-cel-bar { height: 4px; margin-bottom: 10px; }
.progress.fc-cel-bar > div.good { background: var(--good); }
.fc-sesja { text-align: left; margin: 8px 0 12px; }
.fc-sesja-tab td { vertical-align: top; }
.moj-konkurs { margin: 0 0 12px; gap: 8px 16px; align-items: center; }
.moj-konkurs label { display: flex; flex-direction: row; align-items: center; gap: 6px; margin: 0; }
.moj-konkurs select { width: auto; }
.test-src { flex-basis: 100%; margin-top: 2px; }
/* Statystyki: zakładki i „Co dalej” */
.stat-tabs { margin: 4px 0 12px; }
.seg a { color: var(--text); padding: 8px 14px; text-decoration: none; }
.seg a.on { background: var(--accent); color: var(--accent-text); }
.next-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.next-card { display: flex; flex-direction: column; gap: 4px; text-align: left; color: var(--text); text-decoration: none; font: inherit; cursor: pointer; }
.next-card:hover { border-color: var(--accent); }
.lp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 18px 0 10px; }
.lp-stats > div { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.lp-stats b { font-size: 1.5rem; }
.lp-stats span { font-size: 0.9rem; color: var(--muted); }
.lp-stats > div[hidden] { display: none; }
/* trener genetyki (web/js/genetyka.js) */
.gen-filtry { gap: 8px 12px; }
.gen-filtry select { max-width: 100%; }
.gen-licznik { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.gen-card { display: flex; flex-direction: column; gap: 10px; }
.gen-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.72rem; }
.gen-tresc p { margin: 0 0 8px; line-height: 1.5; }
.gen-q { margin: 0; font-weight: 600; font-size: 1.05rem; line-height: 1.45; }
.gen-card sup { font-size: 0.7em; line-height: 0; }
.gen-odp { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.gen-odp input[type="text"] { font-size: 1.15rem; min-height: 48px; width: 14rem; max-width: 100%; flex: 1 1 10rem; }
.gen-odp .btn { min-height: 48px; padding: 8px 20px; }
.gen-podp { margin: 0; }
.gen-multi .gen-check { min-height: 48px; padding: 6px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 1.05rem; cursor: pointer; background: var(--surface); }
.gen-multi .gen-check input { width: 22px; height: 22px; min-height: 0; margin: 0; }
.gen-opcje { display: flex; flex-direction: column; gap: 8px; }
.gen-opt { justify-content: flex-start; text-align: left; min-height: 48px; font-size: 1.05rem; }
.gen-opt:disabled { opacity: 1; cursor: default; }
.gen-opt.good { border-color: var(--good); background: var(--good-soft); color: var(--good); font-weight: 600; }
.gen-opt.bad { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); text-decoration: line-through; }
.gen-verdict { margin: 0; font-weight: 700; min-height: 1.2em; }
.gen-verdict:empty { display: none; }
.gen-verdict.ok { color: var(--good); }
.gen-verdict.no { color: var(--bad); }
.gen-rozw { border-top: 1px dashed var(--border); padding-top: 10px; }
.gen-rozw h3 { margin: 0 0 8px; font-size: 1rem; }
.gen-rozw p { margin: 0 0 8px; line-height: 1.5; }
.gen-wynik { font-size: 1.05rem; }
.gen-pun-wrap { overflow-x: auto; margin: 4px 0 12px; max-width: 100%; }
.gen-pun { border-collapse: collapse; font-size: 0.95rem; }
.gen-pun th, .gen-pun td { border: 1px solid var(--border); padding: 6px 8px; text-align: center; vertical-align: middle; }
.gen-pun th { background: var(--accent-soft); font-weight: 600; }
.gen-pun .gen-pun-rog { font-weight: normal; color: var(--muted); background: transparent; font-size: 0.8rem; }
.gen-pun td small { display: block; color: var(--muted); font-size: 0.75rem; line-height: 1.2; max-width: 9em; margin: 2px auto 0; }
.gen-pun td.hit { background: var(--good-soft); font-weight: 700; }
.gen-pun td.hit small { color: var(--good); }
.gen-pun td.out { color: var(--muted); opacity: 0.55; }
.gen-next { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.gen-next .btn { min-height: 44px; }
@media (max-width: 480px) { .gen-pun { font-size: 0.82rem; } .gen-pun th, .gen-pun td { padding: 4px 5px; } }
