/* strony tematów: /matematyka, /tier-lista, /mapa, /do-druku, /test, /poradniki */
main.site [hidden] { display: none !important; }
.tlead { font-size: 17px; line-height: 1.6; margin: 0 0 8px; }
.tlink { margin: -14px 0 0; font-size: 14px; }
.tlink a { color: var(--ink); font-weight: 500; }

/* skróty między stronami */
.tlinks { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 22px; }
.tlinks a { font-size: 13px; text-decoration: none; padding: 6px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }
.tlinks a:hover { background: var(--soft); }

/* tier */
.tier { width: 26px; height: 26px; flex: none; display: inline-grid; place-items: center; border-radius: 8px; font-size: 12px; font-weight: 700; }
.tier.tS { background: var(--ink); color: var(--bg); }
.tier.tA { box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); }
.tier.tB { background: var(--soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.tier.tC { background: var(--soft); color: var(--muted); }
.tier.tD { color: var(--faint); box-shadow: inset 0 0 0 1px var(--line); }

/* spis tematów */
.tsearch { margin: 0 0 8px; }
.tsearch input { width: 100%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 999px; padding: 12px 18px; font: inherit; font-size: 16px; outline: none; }
.tsearch input:focus { border-color: var(--ink); }
.tdzh { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tdzh .dz { font-size: 13px; color: var(--muted); }
.trow { display: grid; grid-template-columns: 1fr auto 26px; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.trow .nm { display: block; font-weight: 500; }
.trow:hover .nm { text-decoration: underline; }
.trow .dz { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.tcnt { color: var(--muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* strona tematu */
.ptree { list-style: none; margin: 0; padding: 0 0 0 2px; }
.ptree .ptree { padding-left: 22px; border-left: 1px solid var(--line); margin-left: 6px; }
.ptree li { padding: 5px 0 0; }
.ptree a { font-weight: 500; }
.tpaper { margin-top: 12px; }
.stask .fig { margin: 0 0 16px; }

/* tier lista */
.tls { margin-top: 26px; }
.tlh { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.tlh .tier { width: 34px; height: 34px; font-size: 15px; border-radius: 10px; }
.tlh b { display: block; font-size: 17px; }
.tlr { display: grid; grid-template-columns: 1fr 70px 110px 60px; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.tlr .nm { display: block; font-weight: 500; }
.tlr:hover .nm { text-decoration: underline; }
.tlr .dz { color: var(--muted); font-size: 13px; }
.tc { color: var(--muted); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.tmeth { margin: 0; padding-left: 20px; }
.tmeth li { margin: 0 0 8px; }
.tsess { margin: 0; padding-left: 18px; font-size: 14px; }
.tsess li { margin: 3px 0; }

/* mapa */
.tmap { overflow-x: auto; border: 1px solid var(--line); border-radius: 20px; padding: 10px; margin-bottom: 10px; color: var(--muted); }
.tmap svg { display: block; min-width: 820px; width: 100%; height: auto; font-family: var(--sans); }
.tmap .band { fill: var(--bg); }
.tmap .band.alt { fill: var(--soft); }
.tmap .bl { font-size: 12.5px; font-weight: 600; fill: var(--ink); }
.tmap .ch { font-size: 11.5px; fill: var(--muted); }
.tmap .ed { fill: none; stroke: var(--faint); stroke-width: 1.2; transition: opacity .15s; }
.tmap .nd rect { fill: var(--bg); stroke: var(--line); stroke-width: 1.2; }
.tmap .nd .nt { font-size: 12.5px; font-weight: 500; fill: var(--ink); }
.tmap .nd .ntr { font-size: 11px; font-weight: 700; fill: var(--muted); }
.tmap .nd:hover rect, .tmap .nd.on rect, .tmap .nd:focus rect { stroke: var(--ink); stroke-width: 1.6; }
.tmap svg.dim .ed { opacity: .15; }
.tmap svg.dim .ed.on { opacity: 1; stroke: var(--ink); stroke-width: 1.8; }
.tmtext { list-style: none; margin: 0; padding: 0; }
.tmtext li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.tmtext .nm { font-weight: 500; }
.tmtext .dz { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* test online */
.tq { margin-top: 14px; scroll-margin-top: 20px; }
.tqh { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.tqn { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 600; }
.tqh .dz { color: var(--muted); font-size: 13px; }
.topts .opt input { position: absolute; opacity: 0; pointer-events: none; }
.topts .opt { position: relative; }
.topts .opt:has(input:checked) { border-color: var(--ink); }
.topts .opt:has(input:checked) .l { background: var(--ink); color: var(--bg); box-shadow: none; }
.topts .opt:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.topts .opt.good, .topts .opt.good:has(input:checked) { border-color: var(--ok); }
.topts .opt.good .l, .topts .opt.good:has(input:checked) .l { background: var(--ok); color: #fff; box-shadow: none; }
.topts .opt.wrong, .topts .opt.wrong:has(input:checked) { border-color: var(--bad); }
.topts .opt.wrong .l, .topts .opt.wrong:has(input:checked) .l { background: var(--bad); color: #fff; box-shadow: none; }
.tsol { margin-top: 18px; }
.tverd { font-size: 17px; margin-bottom: 10px; }
.tbar { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--bg); padding: 14px 0; margin-top: 18px; border-top: 1px solid var(--line); }
.tres { margin: 14px 0 10px; scroll-margin-top: 20px; }
.tscore b { display: block; font-size: 52px; letter-spacing: -.04em; line-height: 1; }
.tscore span { color: var(--muted); font-size: 13px; }
.trlist { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; margin: 14px 0 4px; }
.trr { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 14px; }
.trr b.ok { color: var(--ok); }
.trr b.bad { color: var(--bad); }

/* poradniki */
.guide .gl { padding-left: 20px; margin: 0 0 12px; }
.guide .gl li { margin: 0 0 8px; }
.guide p { margin: 0 0 12px; }
.gt { margin: 4px 0 14px; font-size: 15px; }
.gt th, .gt td { padding: 11px 12px 11px 0; }
.gt tbody th { color: var(--ink); font-weight: 600; font-size: 15px; width: 44%; }
.gsrc ul { padding-left: 18px; margin: 0; font-size: 14px; color: var(--muted); }
.gsrc li { margin: 0 0 6px; }
.gsrc a { color: var(--ink); }
.guide ol.gl { padding-left: 22px; }
.gbox { background: var(--soft); border-radius: 16px; padding: 16px 20px; margin: 4px 0 16px; }
.gbox p:last-child, .gbox ol:last-child { margin-bottom: 0; }
.gbox > b { display: block; margin-bottom: 6px; }
.gbox ol.gl { margin-top: 6px; }

/* strony docelowe: /dla-rodzicow, /dla-korepetytorow, /dla-szkol, /edukacja-domowa, /korepetytor-ai */
.seghero { display: grid; grid-template-columns: 1fr 180px; gap: 28px; align-items: start; margin: 6px 0 8px; }
.seghero .tlead { color: var(--muted); margin: 6px 0 18px; }
.seghero .row { flex-wrap: wrap; }
.segcount { border: 1px solid var(--line); border-radius: 20px; padding: 18px 18px 16px; margin-top: 10px; }
.segcount b { display: block; font-size: 46px; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.segcount > span { display: block; margin-top: 8px; font-size: 13px; line-height: 1.45; }
.segsec p { margin: 0 0 12px; }
.segl { list-style: none; margin: 0; padding: 0; }
.segl li { padding: 10px 0 10px 22px; border-bottom: 1px solid var(--line); position: relative; }
.segl li:last-child { border-bottom: 0; }
.segl li::before { content: ""; position: absolute; left: 2px; top: 19px; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.segl .soon { margin-left: 4px; }
.segprice { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 8px; }
.segprice > div b { display: block; font-size: 36px; letter-spacing: -.03em; line-height: 1.1; white-space: nowrap; }
.segprice > div span { color: var(--muted); font-size: 13px; }
.segprice p { margin: 0; color: var(--muted); }
.segfaq { margin-top: 10px; }
.seglinks { margin-top: 26px; }

@media (max-width: 640px) {
  .seghero { grid-template-columns: 1fr; gap: 4px; }
  .segcount { display: flex; gap: 14px; align-items: center; margin-top: 4px; }
  .segcount b { font-size: 36px; }
  .segcount > span { margin-top: 0; }
  .segprice { flex-direction: column; gap: 8px; }
}

/* do druku */
.sheet { border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; margin-top: 22px; }
.shh h2 { font-size: 20px; margin: 0 0 4px; letter-spacing: -.02em; }
.shh p { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.pchk td, .pchk th { padding: 5px 8px 5px 0; vertical-align: middle; }
.pchk .pdz th { padding-top: 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid var(--ink); }
.pbx { width: 26px; }
.sq { display: inline-block; width: 15px; height: 15px; border: 1.5px solid var(--ink); border-radius: 3px; vertical-align: middle; }
.pnm { font-weight: 500; width: 36%; }
.pkey { font-size: 13px; }
.ptl td { padding: 10px 10px 10px 0; vertical-align: top; }
.ptl td div { font-size: 14px; margin-top: 2px; }
.ptier { width: 40px; }
.pfoot { margin: 14px 0 0; font-size: 12px; color: var(--muted); }

@media (max-width: 640px) {
  .trow { grid-template-columns: 1fr 26px; }
  .trow .tcnt { display: none; }
  .tlr { grid-template-columns: 1fr 56px; }
  .tlr .tc { display: none; }
  .trlist { grid-template-columns: 1fr; }
  .gt tbody th { width: auto; }
  .sheet { padding: 16px; }
  .pkey { display: block; }
}

@media print {
  @page { size: A4; margin: 12mm; }
  html, body { background: #fff; color: #000; }
  header.top, footer.gfoot, .chatw, .noprint, .crumb { display: none !important; }
  main.site { max-width: none; padding: 0; margin: 0; }
  .sheet { border: 0; border-radius: 0; padding: 0; margin: 0; break-after: page; page-break-after: always; }
  .sheet:last-child { break-after: auto; page-break-after: auto; }
  .shh h2 { font-size: 15pt; }
  .shh p { font-size: 9pt; margin-bottom: 6px; }
  .pchk { font-size: 9pt; }
  .pchk td, .pchk th { padding: 2.2px 6px 2.2px 0; border-bottom: .5px solid #ccc; }
  .pchk .pdz th { padding-top: 6px; font-size: 8pt; border-bottom: 1px solid #000; }
  .pkey { font-size: 8.5pt; }
  .pchk .katex { font-size: 1em; }
  .sq { width: 11px; height: 11px; border-color: #000; }
  .ptl { font-size: 10pt; }
  .ptl td { padding: 7px 8px 7px 0; border-bottom: .5px solid #ccc; }
  .ptl td div { font-size: 10pt; }
  .tier.tS { background: #000 !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .muted { color: #555; }
  tr, li { break-inside: avoid; }
}
@media screen and (max-width: 560px) {
  .pchk { display: block; overflow-x: auto; }
  .pchk td:last-child { min-width: 0; }
}
