/* Strony wiedzy: #/metodologia[/temat], #/czego-nie-wiemy, #/slownik[/haslo]. Tylko zmienne z style.css (tryb ciemny). */

.met-page { min-width: 0; }
.met-page .page-lead { max-width: 720px; }
.met-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.met-num { font-family: var(--mono); font-size: .92em; overflow-wrap: anywhere; }
.met-uwaga { font-size: 14px; color: var(--muted); margin: 18px 0 0; max-width: 720px; }
.met-page section, .met-brak, .met-haslo { scroll-margin-top: 80px; }

/* strona główna: karty tematów */
.met-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.met-card {
  display: block; text-decoration: none; color: var(--fg); background: var(--bg);
  border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px;
}
.met-card:hover { border-color: color-mix(in srgb, var(--fg) 30%, var(--border)); }
.met-card h3 { font-size: 16px; margin: 0 0 4px; }
.met-card p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.met-prose { max-width: 720px; margin-top: 8px; }
.met-prose h2:first-child { margin-top: 28px; }

/* podstrona tematu: spis treści + treść */
.met-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 40px; align-items: start; margin-top: 24px; }
.met-toc { position: sticky; top: 80px; font-size: 14px; }
.met-toc ol, .met-toc ul { margin: 0 0 18px; padding-left: 20px; }
.met-toc ul { list-style: none; padding-left: 0; }
.met-toc li { margin: 0 0 6px; line-height: 1.4; }
.met-toc a { color: var(--muted); text-decoration: none; }
.met-toc a:hover { color: var(--fg); text-decoration: underline; }
.met-toc-other { margin-top: 6px; }
.met-main { min-width: 0; max-width: 720px; }

/* ramka „W skrócie” */
.met-skrot { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.met-skrot h2 { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.met-skrot dl, .met-brak dl, .met-haslo dl { margin: 0; display: grid; gap: 10px; }
.met-skrot dl > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; }
.met-skrot dt { font-weight: 600; font-size: 14px; }
.met-skrot dd { margin: 0; font-size: 15px; line-height: 1.5; }

/* przykład krok po kroku */
.met-kroki { counter-reset: krok; list-style: none; padding-left: 0 !important; }
.met-kroki li { counter-increment: krok; position: relative; padding: 0 0 0 40px; margin-bottom: 12px; }
.met-kroki li::before {
  content: counter(krok); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--mono); font-size: 13px;
  background: var(--accent-tint); color: var(--accent); font-weight: 600;
}
.met-wzor {
  font-size: 18px; text-align: center; padding: 14px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg-alt); margin: 0 0 16px;
}
.met-gdzie span { color: var(--muted); }

/* palety i klasy mapy */
.met-ramp { display: flex; height: 22px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); margin: 0 0 16px; max-width: 420px; }
.met-ramp i { flex: 1; }
.prose table.met-klasy { display: table; width: 100%; max-width: 480px; font-size: 14px; margin: 16px 0 8px; }
.met-klasy caption { text-align: left; font-size: 13px; color: var(--muted); padding-bottom: 6px; }
.met-klasy td, .prose .met-klasy th { font-family: var(--font); font-size: 13.5px; }
.met-sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-right: 8px; vertical-align: -2px; border: 1px solid var(--border); }

.met-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 36px; }
.met-pager a { display: block; text-decoration: none; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; font-weight: 600; }
.met-pager a:hover { background: var(--bg-alt); }
.met-pager a.next { text-align: right; }
.met-pager small { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted); }

/* Czego nie wiemy */
.met-braki-toc { margin: 22px 0 0; padding-left: 22px; columns: 2 280px; column-gap: 32px; font-size: 15px; }
.met-braki-toc li { margin-bottom: 6px; break-inside: avoid; }
.met-braki { display: grid; gap: 16px; margin-top: 24px; max-width: 900px; }
.met-brak { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.met-brak h2 { font-size: 20px; margin: 0 0 12px; display: flex; gap: 10px; align-items: baseline; }
.met-brak-nr { font-family: var(--mono); font-size: 14px; color: var(--accent); font-weight: 600; }
.met-brak dl > div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.met-brak dt, .met-haslo dt { font-weight: 600; font-size: 14px; }
.met-brak dd, .met-haslo dd { margin: 0; font-size: 15px; line-height: 1.55; }

/* Słownik */
.met-slownik-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 22px 0 10px; }
.met-szukaj { display: block; flex: 1 1 260px; max-width: 420px; }
.met-licznik { margin: 0; font-size: 14px; color: var(--muted); font-family: var(--mono); }
.met-alfabet { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; }
.met-alfabet a { font-size: 13px; text-decoration: none; padding: 3px 9px; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); }
.met-alfabet a:hover { color: var(--fg); background: var(--bg-alt); }
.met-slownik { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 820px; }
.met-litera { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .08em; margin: 10px 0 -4px; }
.met-haslo { border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; background: var(--bg); transition: border-color .3s, background .3s; }
.met-haslo h2 { font-size: 19px; margin: 0 0 6px; }
.met-haslo h2 a { text-decoration: none; }
.met-haslo h2 a:hover { text-decoration: underline; }
.met-haslo > p { margin: 0 0 12px; font-size: 15.5px; line-height: 1.6; }
.met-haslo dl > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; }
.met-haslo.met-hl { border-color: var(--accent); background: var(--accent-tint); box-shadow: inset 3px 0 0 var(--accent); }
.met-haslo.met-hl dd, .met-haslo.met-hl > p { color: var(--fg); }

.met-page a[target="_blank"] { overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .met-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .met-toc { position: static; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
  .met-toc ul, .met-toc-other { display: none; }
  .met-toc ol { margin-bottom: 0; }
}
@media (max-width: 560px) {
  .met-skrot dl > div, .met-brak dl > div, .met-haslo dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .met-pager { grid-template-columns: minmax(0, 1fr); }
  .met-pager a.next { text-align: left; }
  .met-brak h2 { font-size: 18px; }
  .met-wzor { font-size: 16px; }
}
@media print {
  .met-toc, .met-pager, .met-slownik-tools, .met-alfabet { display: none !important; }
  .met-layout { display: block !important; }
}
