/* ===== Biologia · Matura 2027 — styl kart =====
   Wartości 1:1 z talii Anki (kontekst/kontekst.md, sekcja 4). Różnice względem talii:
   - wszystkie selektory zamknięte w .anki-card (w Anki: .card), żeby nie zmieniały wyglądu strony,
   - .figure nie „wychodzi” poza kolumnę (karty stoją w siatce),
   - .zoom-* obsługuje powiększanie grafik na stronie (assets/js/karty.js). */
.anki-card {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1d232a;
  --muted: #6b7280;
  --line: #e6e3dc;
  --accent: #0f766e;
  --accent-soft: #e2f1ee;
  --key: #0b5d57;
  --cloze-bg: #d6efe9;
  --matura: #b45309;
  --matura-soft: #fdf3e6;
  --note: #5b6b80;
  --note-soft: #f1f3f6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, "Noto Sans", sans-serif;
  font-size: 19px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  text-align: left;
}
.anki-card.nightMode {
  --bg: #15171b;
  --surface: #1d2025;
  --text: #e7e9ec;
  --muted: #9aa3ad;
  --line: #2e333a;
  --accent: #4fd1c5;
  --accent-soft: #1b3431;
  --key: #82e3d9;
  --cloze-bg: #1d3d39;
  --matura: #f0a35e;
  --matura-soft: #2c2318;
  --note: #9fb0c4;
  --note-soft: #22262d;
}

.anki-card .wrap { max-width: 680px; margin: 0 auto; padding: 22px 20px 34px; }

.anki-card .crumb {
  font-size: 11.5px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 16px;
}
.anki-card .crumb::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); margin-right: 8px; vertical-align: 1px;
}

.anki-card .q { font-size: 1.12em; font-weight: 600; line-height: 1.45; }
.anki-card .q i { font-weight: 500; }
.anki-card hr#answer, .anki-card hr.answer { border: none; border-top: 1px solid var(--line); margin: 20px 0 18px; }
.anki-card .a > :first-child, .anki-card .cloze-text > :first-child { margin-top: 0; }

.anki-card b, .anki-card strong { font-weight: 650; color: var(--key); }
.anki-card p { margin: .5em 0; }
.anki-card ul, .anki-card ol { margin: .45em 0; padding-left: 1.3em; }
.anki-card li { margin: .3em 0; }
.anki-card li::marker { color: var(--accent); }
.anki-card ol > li::marker { font-weight: 700; }
.anki-card sub, .anki-card sup { line-height: 0; }
.anki-card .seq { font-family: "DejaVu Sans Mono", Menlo, Consolas, monospace; font-size: .94em; word-break: break-all; overflow-wrap: anywhere; }

.anki-card .tbl { overflow-x: auto; margin: .6em 0; }
.anki-card table { border-collapse: collapse; width: 100%; font-size: .86em; line-height: 1.4; }
.anki-card th { text-align: left; font-weight: 650; background: var(--accent-soft); }
.anki-card th, .anki-card td {
  padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top;
  -webkit-hyphens: auto; hyphens: auto;
}
.anki-card tr:last-child td { border-bottom: none; }
.anki-card td:first-child { font-weight: 600; }
.anki-card .sub { display: block; font-size: .85em; font-weight: 400; color: var(--muted); }

.anki-card .ex {
  margin: .75em 0; padding: 8px 12px; background: var(--surface);
  border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; font-size: .92em;
}
.anki-card .ex-l {
  display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 2px;
}
.anki-card .formula {
  margin: .7em 0; padding: 10px 14px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; text-align: center; font-weight: 600;
}

.anki-card .box { margin-top: 16px; padding: 10px 14px 11px; border-radius: 10px; font-size: .88em; line-height: 1.5; }
.anki-card .box-title {
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; margin-bottom: 4px;
}
.anki-card .box b, .anki-card .box strong { color: inherit; }
.anki-card .box-matura { background: var(--matura-soft); border-left: 3px solid var(--matura); }
.anki-card .box-matura .box-title { color: var(--matura); }
.anki-card .box-note { background: var(--note-soft); border-left: 3px solid var(--note); }
.anki-card .box-note .box-title { color: var(--note); }

.anki-card .cloze { font-weight: 700; color: var(--key); background: var(--cloze-bg); padding: 0 .3em; border-radius: 5px; }

.anki-card .figure { margin: 16px 0 4px; text-align: center; width: auto; max-width: 100%; margin-left: 0; transform: none; }
.anki-card .wrap img {
  max-width: 100%; height: auto; border-radius: 12px;
  border: 1px solid var(--line); background: #ffffff;
  cursor: zoom-in;
}
.anki-card .q img { display: block; margin: 12px auto 0; }
.anki-card.nightMode .wrap img { filter: brightness(.9) contrast(1.04); }
.anki-card .zoom-tip { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.anki-card .img-ph {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  margin: 10px 0; padding: 16px; border: 1.5px dashed var(--line); border-radius: 12px;
  background: var(--surface); color: var(--muted); font-size: .82em; text-align: center;
}

@media (max-width: 480px) {
  .anki-card { font-size: 17px; }
  .anki-card .wrap { padding: 16px 14px 26px; }
  .anki-card table { font-size: .8em; }
  .anki-card th, .anki-card td { padding: 6px 6px; }
  .anki-card table.t4, .anki-card table.t5, .anki-card table.t6, .anki-card table.t7 { font-size: .72em; }
  .anki-card table.t4 th, .anki-card table.t4 td, .anki-card table.t5 th, .anki-card table.t5 td,
  .anki-card table.t6 th, .anki-card table.t6 td, .anki-card table.t7 th, .anki-card table.t7 td { padding: 5px 4px; }
}

/* Powiększenie grafiki (jak w talii: ciemne tło, kliknij, aby zamknąć) */
.zoom-ov {
  position: fixed; inset: 0; z-index: 99999; box-sizing: border-box;
  padding: 14px; overflow: auto; -webkit-overflow-scrolling: touch; background: rgba(15, 17, 20, .94);
  cursor: zoom-out; text-align: left;
}
.zoom-ov img {
  display: block; margin: 0 auto; max-width: none; height: auto; border: none;
  border-radius: 10px; background: #ffffff;
}
.zoom-close { color: #e5e7eb; font-size: 12.5px; text-align: center; margin: 10px 0 2px; font-family: system-ui, sans-serif; }
