/* Zestawienia (moduł toplist): strona zestawienia, lista zestawień, strona podpisów zdjęć.
   Kolory i fonty ze zmiennych projektu – projekt może nadpisać --tl-*: */
.tl {
  --tl-bg: var(--paper, var(--surface, var(--bg, #fff)));
  --tl-bg-2: var(--paper-2, var(--surface-2, color-mix(in srgb, var(--tl-ink) 5%, var(--tl-bg))));
  --tl-ink: var(--ink, #1c1c1c);
  --tl-muted: var(--muted, #666);
  --tl-line: var(--line, var(--rule, color-mix(in srgb, var(--tl-ink) 16%, transparent)));
  --tl-accent: var(--accent, #b5532c);
  --tl-accent-ink: var(--accent-ink, #fff);
  --tl-radius: 12px;
  display: block;
  max-width: 1120px;
  margin: 0 auto;
  color: var(--tl-ink);
}
.tl a { color: inherit; }
.tl [hidden] { display: none !important; }
.tl-hero { margin: 0 0 24px; }
.tl-hero h1 { margin: 6px 0 12px; line-height: 1.12; }
.tl-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; color: var(--tl-muted); font-weight: 600; }
.tl-badge {
  display: inline-block; padding: 2px 10px; border-radius: 6px; background: var(--tl-accent); color: var(--tl-accent-ink);
  font-weight: 800; letter-spacing: .04em; text-transform: uppercase; font-size: .85em;
}
.tl-intro { font-size: 1.12rem; line-height: 1.55; max-width: 68ch; margin: 0 0 16px; }
.tl-method {
  border: 1px solid var(--tl-line); border-radius: var(--tl-radius); background: var(--tl-bg-2); padding: 14px 18px; max-width: 760px;
}
.tl-method h2 { font-size: 1rem; margin: 0 0 8px; }
.tl-method dl { display: grid; gap: 4px; margin: 0; }
.tl-method dl div { display: grid; grid-template-columns: minmax(110px, 160px) 1fr; gap: 10px; }
.tl-method dt { color: var(--tl-muted); }
.tl-method dd { margin: 0; }
.tl-editorial { margin: 0 0 8px; }
.tl-note { color: var(--tl-muted); margin: 8px 0 0; font-size: .95rem; }

.tl-map-wrap { margin: 0 0 28px; }
.tl-map { width: 100%; aspect-ratio: 2 / 1; max-height: 520px; border-radius: var(--tl-radius); overflow: hidden; border: 1px solid var(--tl-line); }
.tl-map-wrap figcaption { color: var(--tl-muted); font-size: .9rem; margin-top: 6px; }
.tl-map .tl-mk circle { fill: var(--tl-accent); stroke: var(--tl-bg); stroke-width: 1.5px; vector-effect: non-scaling-stroke; cursor: pointer; }
.tl-map .tl-mk text { fill: var(--tl-accent-ink); font-weight: 800; pointer-events: none; font-family: inherit; }
.tl-map .tl-mk.is-hot circle { fill: var(--tl-ink); }
.tl-map .tl-mk.is-hot text { fill: var(--tl-bg); }

.tl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.tl-item {
  display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); gap: 22px; align-items: start;
  scroll-margin-top: 80px;
}
.tl-photo { margin: 0; }
.tl-photo img, .tl-nophoto {
  display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--tl-radius); background: var(--tl-bg-2);
}
.tl-nophoto { display: grid; place-items: center; font-size: 4rem; font-weight: 800; color: var(--tl-muted); }
.tl-photo figcaption { font-size: .8rem; color: var(--tl-muted); margin-top: 6px; overflow-wrap: break-word; }
.tl-body { position: relative; padding-left: 64px; }
.tl-rank {
  position: absolute; left: 0; top: 0; width: 50px; height: 50px; margin: 0; border-radius: 50%;
  display: grid; place-items: center; background: var(--tl-accent); color: var(--tl-accent-ink); font-weight: 800; font-size: 1.4rem;
}
.tl-body h2 { margin: 4px 0 4px; line-height: 1.15; }
.tl-body h2 a { text-decoration: none; }
.tl-body h2 a:hover { text-decoration: underline; }
.tl-place { margin: 0 0 6px; color: var(--tl-muted); }
.tl-value { margin: 0 0 8px; font-weight: 700; color: var(--tl-accent); }
.tl-facts { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 8px; font-size: .92rem; }
.tl-facts div { display: flex; gap: 6px; }
.tl-facts dt { color: var(--tl-muted); }
.tl-facts dt::after { content: ':'; }
.tl-facts dd { margin: 0; }
.tl-comment, .tl-desc { margin: 0 0 8px; line-height: 1.55; }
.tl-comment { border-left: 3px solid var(--tl-accent); padding-left: 10px; }
.tl-open { margin: 6px 0 0; }
.tl-open a { font-weight: 700; color: var(--tl-accent); }

.tl-share, .tl-others { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--tl-line); }
.tl-lead { color: var(--tl-muted); max-width: 70ch; }
.tl-make, .tl-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.tl-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 16px; border-radius: 10px;
  border: 1px solid var(--tl-line); background: var(--tl-bg-2); color: var(--tl-ink); font: inherit; font-weight: 700;
  cursor: pointer; text-decoration: none;
}
.tl-btn:hover { border-color: var(--tl-accent); }
.tl-btn:focus-visible { outline: 3px solid var(--tl-accent); outline-offset: 2px; }
.tl-btn[disabled] { opacity: .6; cursor: progress; }
.tl-primary { background: var(--tl-accent); color: var(--tl-accent-ink); border-color: var(--tl-accent); }
.tl-small { min-height: 36px; padding: 4px 10px; font-size: .8rem; font-weight: 600; overflow-wrap: anywhere; }
.tl-status { min-height: 1.4em; color: var(--tl-muted); }
.tl-hint { color: var(--tl-muted); font-size: .9rem; }
.tl-previews { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tl-previews li { display: grid; gap: 6px; }
.tl-previews img { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--tl-line); }
.tl-post textarea {
  width: 100%; box-sizing: border-box; font: inherit; font-size: .92rem; line-height: 1.45; padding: 10px 12px;
  border-radius: 10px; border: 1px solid var(--tl-line); background: var(--tl-bg-2); color: var(--tl-ink); resize: vertical;
}
.tl-post h3 { margin: 18px 0 4px; }

.tl-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.tl-card a {
  display: grid; gap: 6px; height: 100%; text-decoration: none; padding-bottom: 12px; border-radius: var(--tl-radius);
  border: 1px solid var(--tl-line); background: var(--tl-bg-2); overflow: hidden;
}
.tl-card a:hover { border-color: var(--tl-accent); }
.tl-card img, .tl-card-blank { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--tl-line); }
.tl-card-kicker, .tl-card strong, .tl-card-names { padding: 0 14px; }
.tl-card-kicker { color: var(--tl-muted); font-size: .85rem; font-weight: 600; margin-top: 6px; }
.tl-card strong { font-size: 1.1rem; line-height: 1.25; }
.tl-card-names { color: var(--tl-muted); font-size: .88rem; }

.tl-table-wrap { overflow-x: auto; }
.tl-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tl-table th, .tl-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--tl-line); overflow-wrap: break-word; }
.tl-table th { color: var(--tl-muted); font-weight: 600; }
.tl-table img { width: 96px; height: 64px; object-fit: cover; border-radius: 6px; display: block; }

@media (max-width: 760px) {
  .tl-item { grid-template-columns: 1fr; gap: 12px; }
  .tl-body { padding-left: 58px; }
  .tl-method dl div { grid-template-columns: 1fr; gap: 0; }
  .tl-map { aspect-ratio: 4 / 3; }
  /* Strona podpisów na telefonie: wiersz tabeli jako karta (miniatura, numer i miejsce, potem pola z etykietami). */
  .tl-table thead { display: none; }
  .tl-table, .tl-table tbody, .tl-table tr { display: block; }
  .tl-table tr { display: grid; grid-template-columns: 96px 1fr; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--tl-line); }
  .tl-table td { display: block; padding: 0; border: 0; grid-column: 2; }
  .tl-table td.tl-td-img { grid-column: 1; grid-row: 1 / span 6; }
  .tl-table td.tl-td-no { display: none; }
  .tl-table td.tl-td-place { font-weight: 700; }
  .tl-table td.tl-td-place::before { content: attr(data-rank); }
  .tl-table td[data-label]::before { content: attr(data-label) ': '; color: var(--tl-muted); }
}
