/* TrojmiastoFlow — nowy szablon (etap 4, 2026-10). Mobile first, jednostki rem. */

/* ── Tokeny ─────────────────────────────────────────────── */
:root {
  --bg: #f3f5f7;
  --surface: #ffffff;
  --ink: #0f1b24;
  --ink-2: #3b4954;
  --muted: #6a7782;
  --line: #e2e7eb;
  --brand: #0e7490;
  --head-bg: #ffffff;
  --top-bg: #0f1b24;
  --shadow: 0 .0625rem .125rem rgba(15, 27, 36, .06), 0 .25rem 1rem rgba(15, 27, 36, .05);
  /* kolory działów */
  --t-brand: #0e7490;
  --t-news: #2563eb;
  --t-events: #7c3aed;
  --t-gdansk: #c2410c;
  --t-sopot: #059669;
  --t-gdynia: #0284c7;
  --t-food: #ea580c;
  --t-history: #a16207;
  --t-home: #0f766e;
  --f: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: .75rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d151b; --surface: #15212a; --ink: #e8eef2; --ink-2: #c3ced6; --muted: #91a0ab; --line: #24333d;
    --brand: #38bdd8; --head-bg: #15212a; --top-bg: #080e12; --shadow: none;
    --t-brand: #38bdd8; --t-news: #7aa7ff; --t-events: #b394ff; --t-gdansk: #f59061; --t-sopot: #34d399;
    --t-gdynia: #56c1f5; --t-food: #fb9a4b; --t-history: #e0b44c; --t-home: #2dd4bf; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d151b; --surface: #15212a; --ink: #e8eef2; --ink-2: #c3ced6; --muted: #91a0ab; --line: #24333d;
  --brand: #38bdd8; --head-bg: #15212a; --top-bg: #080e12; --shadow: none;
  --t-brand: #38bdd8; --t-news: #7aa7ff; --t-events: #b394ff; --t-gdansk: #f59061; --t-sopot: #34d399;
  --t-gdynia: #56c1f5; --t-food: #fb9a4b; --t-history: #e0b44c; --t-home: #2dd4bf; color-scheme: dark;
}
.t-brand { --t: var(--t-brand); } .t-news { --t: var(--t-news); } .t-events { --t: var(--t-events); }
.t-gdansk { --t: var(--t-gdansk); } .t-sopot { --t: var(--t-sopot); } .t-gdynia { --t: var(--t-gdynia); }
.t-food { --t: var(--t-food); } .t-history { --t: var(--t-history); } .t-home { --t: var(--t-home); }

/* ── Podstawy ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.5 var(--f); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: .1875rem solid var(--brand); outline-offset: .125rem; border-radius: .25rem; }
.wrap { width: 100%; max-width: 80rem; margin: 0 auto; padding: 0 1rem; }
.sr-only { position: absolute; width: .0625rem; height: .0625rem; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -100rem; top: .5rem; background: var(--brand); color: #fff; padding: .5rem .75rem; z-index: 60; border-radius: .375rem; }
.skip:focus { left: .5rem; }

/* ── Nagłówek ───────────────────────────────────────────── */
.site-head { position: sticky; top: 0; z-index: 40; background: var(--head-bg); box-shadow: 0 .0625rem 0 var(--line); }
.topbar { background: var(--top-bg); color: #c9d4db; font-size: .8125rem; }
.topbar-row { display: flex; justify-content: space-between; gap: 1rem; padding-top: .375rem; padding-bottom: .375rem; }
.topbar-tag { display: none; }
.head-row { display: flex; align-items: center; gap: 1rem; min-height: 3.75rem; }
.brand { font: 800 1.5rem/1 var(--f); letter-spacing: -.035em; color: var(--ink); flex: none; }
.brand span { color: var(--brand); }
/* Menu na telefonie: panel pod nagłówkiem, podmenu rozwijane strzałką */
.menu { display: none; }
.menu.is-open {
  display: block; position: absolute; left: 0; right: 0; top: 100%; background: var(--head-bg);
  border-top: .0625rem solid var(--line); box-shadow: 0 .75rem 1.5rem rgba(15, 27, 36, .12); padding: .25rem 1rem 1rem;
  max-height: calc(100dvh - 6.5rem); overflow-y: auto;
}
.menu-item { display: flex; flex-wrap: wrap; align-items: center; border-bottom: .0625rem solid var(--line); }
.menu-link { flex: 1; padding: .8125rem .25rem; font: 600 1.0625rem/1.2 var(--f); }
.menu-link[aria-current] { color: var(--brand); }
.sub-toggle { width: 2.75rem; height: 2.75rem; border: 0; background: none; display: grid; place-items: center; cursor: pointer; color: var(--muted); border-radius: .5rem; }
.sub-toggle:hover { color: var(--ink); }
.sub-toggle svg { transition: transform .2s; }
.has-sub.is-open > .sub-toggle svg { transform: rotate(180deg); }
.sub { display: none; flex-basis: 100%; padding: 0 0 .625rem .75rem; }
.has-sub.is-open > .sub { display: block; }
.sub a { display: block; padding: .5rem .5rem; font: 500 .9375rem/1.3 var(--f); color: var(--ink-2); border-radius: .5rem; }
.sub a:hover { color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.head-tools { margin-left: auto; display: flex; gap: .5rem; }
.icon-btn { width: 2.5rem; height: 2.5rem; border-radius: 50%; border: .0625rem solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { color: var(--ink); border-color: var(--muted); }

/* ── Nagłówki sekcji ────────────────────────────────────── */
.block { margin-top: 2.25rem; margin-bottom: 2.25rem; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.125rem; padding-bottom: .625rem; border-bottom: .125rem solid var(--line); position: relative; }
.sec-head::after { content: ""; position: absolute; left: 0; bottom: -.125rem; width: 4rem; height: .125rem; background: var(--t); }
.sec-head h2 { display: flex; align-items: center; gap: .625rem; font: 800 1.375rem/1.15 var(--f); letter-spacing: -.02em; }
.sec-head h2::before { content: ""; width: .375rem; height: 1.25rem; border-radius: .1875rem; background: var(--t); flex: none; }
.sec-more { font: 600 .875rem/1.2 var(--f); color: var(--t); white-space: nowrap; }
.sec-more:hover { text-decoration: underline; text-underline-offset: .2em; }

/* ── Etykieta działu, metadane ──────────────────────────── */
.badge { display: inline-block; align-self: flex-start; font: 700 .75rem/1 var(--f); letter-spacing: .01em; color: var(--t); background: color-mix(in srgb, var(--t) 12%, transparent); padding: .3125rem .5rem; border-radius: .3125rem; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; font-size: .8125rem; color: var(--muted); }
.views { display: inline-flex; align-items: center; gap: .3125rem; }
.views svg { opacity: .8; }
.excerpt { color: var(--ink-2); font-size: .9375rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Karty ──────────────────────────────────────────────── */
.card { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; transition: box-shadow .2s; }
.card:hover { box-shadow: 0 .125rem .25rem rgba(15, 27, 36, .06), 0 .75rem 1.75rem rgba(15, 27, 36, .1); }
.card-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--line); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { display: flex; flex-direction: column; gap: .5rem; padding: .875rem 1rem 1rem; flex: 1; }
.card-title { font: 700 1.125rem/1.28 var(--f); letter-spacing: -.01em; }
.card-title a:hover { color: var(--brand); }
.card .meta { margin-top: auto; padding-top: .25rem; }
.ph { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 22%, var(--surface)), color-mix(in srgb, var(--brand) 6%, var(--surface))); }
.ph span { font: 800 1.75rem/1 var(--f); color: color-mix(in srgb, var(--brand) 55%, transparent); letter-spacing: -.04em; }
.ph em { font-style: normal; color: var(--brand); }
.date-chip { position: absolute; left: .75rem; top: .75rem; background: var(--surface); color: var(--t-events); border-radius: .5rem; padding: .375rem .5625rem; text-align: center; font: 700 .75rem/1 var(--f); box-shadow: var(--shadow); min-width: 2.875rem; }
.date-chip b { display: block; font-size: 1.375rem; font-weight: 800; color: var(--ink); margin-bottom: .125rem; }

.card--big .card-title { font-size: 1.5rem; line-height: 1.18; letter-spacing: -.02em; }
.card--big .excerpt { font-size: 1rem; -webkit-line-clamp: 4; line-clamp: 4; }

.card--row { flex-direction: row; align-items: stretch; }
.card--row .card-media { flex: none; width: 7.5rem; aspect-ratio: auto; min-height: 6rem; }
.card--row .card-body { padding: .75rem .875rem; gap: .375rem; }
.card--row .card-title { font-size: 1rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card--row .card-media img, .card--row .card-media .ph { position: absolute; inset: 0; }
.card--row .excerpt { display: none; }

.stack { display: grid; gap: .875rem; }

/* ── Strona główna ──────────────────────────────────────── */
.top-grid { display: grid; gap: 1rem; }
.top-side { display: grid; gap: 1rem; }
.top-more { margin-top: 1rem; }
.grid-4 { display: grid; gap: 1rem; }
.split { display: grid; gap: 1rem; }
.cities { display: grid; gap: 2.25rem; }
.city { display: grid; gap: .875rem; align-content: start; }
.city .sec-head { margin-bottom: .25rem; }

.popular { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 1.125rem 1.125rem .5rem; }
.popular h2 { font: 800 1.125rem/1.2 var(--f); margin-bottom: .5rem; }
.popular li { display: grid; grid-template-columns: 2rem 1fr; gap: .625rem; padding: .75rem 0; border-top: .0625rem solid var(--line); }
.popular li:first-child { border-top: 0; }
.popular .rank { font: 800 1.5rem/1 var(--f); color: var(--brand); }
.popular a { font: 600 .9375rem/1.32 var(--f); }
.popular a:hover { color: var(--brand); }
.popular .meta { margin-top: .3125rem; }

/* ── Artykuł ────────────────────────────────────────────── */
.art-layout { display: grid; gap: 2.5rem; padding-top: 1.5rem; padding-bottom: 1rem; }
.art { min-width: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .875rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a:hover { color: var(--brand); }
.crumbs a + a::before { content: "/"; margin-right: .5rem; color: var(--line); }
.art .badge { margin-bottom: .875rem; }
.art h1 { font: 800 2rem/1.12 var(--f); letter-spacing: -.03em; margin-bottom: 1rem; }
.art-lead { font-size: 1.1875rem; line-height: 1.55; color: var(--ink-2); font-weight: 500; margin-bottom: 1.25rem; }
.art-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem 1.25rem; font-size: .875rem; color: var(--muted); padding: .875rem 0; border-top: .0625rem solid var(--line); border-bottom: .0625rem solid var(--line); margin-bottom: 1.5rem; }
.art-meta a { color: var(--ink); font-weight: 600; }
.art-meta a:hover { color: var(--brand); }
.art-cover { margin: 0 0 1.75rem; }
.art-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r); }
.art-cover figcaption { font-size: .8125rem; color: var(--muted); margin-top: .5rem; }
.ev-box { background: color-mix(in srgb, var(--t-events) 8%, var(--surface)); border-left: .25rem solid var(--t-events); border-radius: 0 var(--r) var(--r) 0; padding: 1rem 1.25rem; margin-bottom: 1.75rem; display: grid; gap: .375rem; }
.ev-note { font-size: .8125rem; color: var(--muted); }
.toc { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 1rem 1.25rem; margin-bottom: 1.75rem; }
.toc h2 { font: 700 .9375rem/1.2 var(--f); margin-bottom: .5rem; }
.toc ol { list-style: decimal; padding-left: 1.25rem; color: var(--muted); }
.toc li { padding: .25rem 0; }
.toc a { color: var(--brand); font-weight: 500; }
.toc a:hover { text-decoration: underline; }

.prose { font-size: 1.125rem; line-height: 1.75; color: var(--ink); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font: 800 1.5rem/1.22 var(--f); letter-spacing: -.02em; margin-top: 2em; scroll-margin-top: 6rem; }
.prose h3 { font: 700 1.25rem/1.3 var(--f); margin-top: 1.6em; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose ul, .prose ol { padding-left: 1.4em; list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .35em; }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: .18em; }
.prose strong { font-weight: 700; }

.sources { margin-top: 2.25rem; padding: 1rem 1.25rem; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); }
.sources h2 { font: 700 .9375rem/1.2 var(--f); margin-bottom: .5rem; }
.sources ul { display: flex; flex-wrap: wrap; gap: .375rem 1.25rem; }
.sources a { color: var(--brand); font-size: .9375rem; }
.sources a:hover { text-decoration: underline; }
.art-foot { display: grid; gap: 1rem; margin-top: 1.5rem; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.tags a { display: inline-block; font: 500 .875rem/1 var(--f); padding: .5rem .8125rem; border-radius: 2rem; background: var(--surface); border: .0625rem solid var(--line); }
.tags a:hover { border-color: var(--brand); color: var(--brand); }
.share { display: flex; flex-wrap: wrap; gap: .75rem; }
.share a, .share button { font: 600 .875rem/1 var(--f); padding: .625rem 1rem; border-radius: 2rem; border: .0625rem solid var(--line); background: var(--surface); cursor: pointer; }
.share a:hover, .share button:hover { border-color: var(--brand); color: var(--brand); }

.art-aside { display: grid; gap: 1.5rem; align-content: start; }
.side-box h2 { font: 800 1.125rem/1.2 var(--f); margin-bottom: .75rem; }
.related { margin-top: 1rem; }

.notfound { padding: 4rem 1rem; }
.notfound h1 { font: 800 2rem/1.1 var(--f); margin-bottom: 1rem; }
.notfound a { color: var(--brand); text-decoration: underline; }

/* ── Stopka ─────────────────────────────────────────────── */
.site-foot { margin-top: 3rem; background: var(--top-bg); color: #b9c6cf; padding: 2.5rem 0 1.5rem; }
.site-foot .brand { color: #fff; }
.site-foot .brand span { color: #38bdd8; }
.foot-grid { display: grid; gap: 2rem; }
.foot-about p { margin-top: .75rem; max-width: 22rem; line-height: 1.55; }
.site-foot h2 { font: 700 .9375rem/1.2 var(--f); color: #fff; margin-bottom: .75rem; }
.site-foot ul { display: grid; gap: .5rem; font-size: .9375rem; }
.site-foot a:hover { color: #fff; }
.foot-bottom { margin-top: 2.25rem; padding-top: 1rem; border-top: .0625rem solid rgba(255, 255, 255, .1); font-size: .8125rem; }

/* ── Tablet ─────────────────────────────────────────────── */
@media (min-width: 40rem) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .top-side { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: repeat(2, 1fr); }
  .card--row .card-media { width: 9rem; }
  .card--row .excerpt { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; font-size: .875rem; }
}
@media (min-width: 48rem) {
  .wrap { padding-left: 1.5rem; padding-right: 1.5rem; }
  .topbar-tag { display: block; }
  .art h1 { font-size: 2.625rem; }
  .art-lead { font-size: 1.3125rem; }
  .card--big .card-title { font-size: 1.875rem; }
}

/* ── Desktop ────────────────────────────────────────────── */
@media (min-width: 64rem) {
  /* Menu na komputerze: podmenu po najechaniu, z klawiatury albo po kliknięciu strzałki */
  .menu { display: block; margin-left: 1.25rem; }
  .menu-list { display: flex; gap: .125rem; }
  .menu-item { position: relative; flex-wrap: nowrap; border-bottom: 0; }
  .menu-link { flex: none; padding: 1.25rem .125rem 1.25rem .625rem; font: 600 .9375rem/1 var(--f); color: var(--ink-2); border-bottom: .1875rem solid transparent; margin-bottom: -.0625rem; }
  .menu-item:not(.has-sub) .menu-link { padding-right: .625rem; }
  .menu-link:hover { color: var(--ink); }
  .menu-link[aria-current] { color: var(--brand); border-bottom-color: var(--brand); }
  .sub-toggle { width: 1.5rem; height: 1.5rem; margin-right: .25rem; border-radius: .375rem; }
  .sub {
    position: absolute; top: 100%; left: 0; z-index: 50; min-width: 15rem; padding: .5rem;
    background: var(--head-bg); border: .0625rem solid var(--line); border-radius: .75rem;
    box-shadow: 0 .75rem 2rem rgba(15, 27, 36, .14);
  }
  .has-sub:hover > .sub, .has-sub:focus-within > .sub, .has-sub.is-open > .sub { display: block; }
  .has-sub:hover > .sub-toggle svg { transform: rotate(180deg); }
  .sub a { padding: .5625rem .75rem; white-space: nowrap; }
  .menu-btn { display: none; }
  .brand { font-size: 1.625rem; }

  /* „Na czasie”: trzy kolumny tej samej wysokości — zdjęcia wypełniają wolne miejsce */
  .top-grid { grid-template-columns: 2fr 1fr 1fr; align-items: stretch; }
  .top-lead .card, .top-side .card { height: 100%; }
  .top-lead .card-media, .top-side .card-media { flex: 1 1 auto; aspect-ratio: auto; }
  .top-lead .card-media { min-height: 16rem; }
  .top-side .card-media { min-height: 7.5rem; }
  .top-grid .card-media img, .top-grid .card-media .ph { position: absolute; inset: 0; }
  .top-side { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .top-side .excerpt { -webkit-line-clamp: 2; line-clamp: 2; }
  .top-grid .popular { height: 100%; display: flex; flex-direction: column; padding-bottom: 1.125rem; }
  .top-grid .popular ol { flex: 1; display: flex; flex-direction: column; }
  .top-grid .popular li { flex: 1; align-items: center; }
  .top-grid .card-body { flex: none; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  /* Wiadomości: duży tekst i 4 mniejsze — obie kolumny tej samej wysokości */
  .split { grid-template-columns: 1.35fr 1fr; align-items: stretch; }
  .split > .card { height: 100%; }
  .split > .card .card-media { flex: 1 1 auto; aspect-ratio: auto; min-height: 16rem; }
  .split > .card .card-media img, .split > .card .card-media .ph { position: absolute; inset: 0; }
  .split > .card .card-body { flex: none; }
  .split .stack { grid-template-rows: repeat(4, 1fr); }
  .cities { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  /* Miasta: równe karty — stałe miejsce na tytuł i zajawkę, mniejsze teksty o stałej wysokości */
  .cities .card--row .card-media { width: 7.5rem; }
  .cities .card--row { height: 7.75rem; }
  .cities .card--std .card-title { min-height: calc(3 * 1.28em); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .cities .card--std .excerpt { min-height: 4.5em; }
  .cities .card--row .excerpt { display: none; }
  .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }

  .art-layout { grid-template-columns: minmax(0, 1fr) 20rem; gap: 3rem; padding-top: 2rem; }
  .art { max-width: 48rem; }
  .art-aside .card--row .card-media { width: 6.5rem; }
  .art-aside .card--row .excerpt { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ══ Podstrony (etap 4): nagłówek, filtry, układ z panelem, stronicowanie ══ */
.page-head { background: var(--surface); border-bottom: .0625rem solid var(--line); padding: 1.5rem 0 1.25rem; }
.page-head .crumbs { margin-bottom: .75rem; }
.page-head h1 { font: 800 1.875rem/1.12 var(--f); letter-spacing: -.03em; display: flex; align-items: center; gap: .75rem; }
.page-head h1::before { content: ""; width: .375rem; height: 1.6rem; border-radius: .1875rem; background: var(--t); flex: none; }
.page-desc { margin-top: .625rem; max-width: 46rem; color: var(--ink-2); font-size: 1.0625rem; line-height: 1.55; }
.page-extra { margin-top: 1rem; display: grid; gap: .875rem; }
.page-count { font-size: .875rem; color: var(--muted); }
.crumbs span[aria-current]::before { content: "/"; margin-right: .5rem; color: var(--line); }

.chips { display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; padding-bottom: .125rem; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; font: 600 .875rem/1 var(--f); padding: .5625rem .9375rem; border-radius: 2rem; border: .0625rem solid var(--line); background: var(--surface); color: var(--ink-2); white-space: nowrap; }
.chip:hover { border-color: var(--t, var(--brand)); color: var(--t, var(--brand)); }
.chip.is-active { background: var(--t, var(--brand)); border-color: var(--t, var(--brand)); color: #fff; }

.layout-aside { display: grid; gap: 2.5rem; padding-top: 1.75rem; }
.main-col { min-width: 0; }
.aside-col { display: grid; gap: 1.5rem; align-content: start; }
.grid-3 { display: grid; gap: 1rem; }
.side-box { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 1.125rem; }
.side-box h2 { font: 800 1.125rem/1.2 var(--f); margin-bottom: .75rem; }
.links-box li { border-top: .0625rem solid var(--line); }
.links-box li:first-child { border-top: 0; }
.links-box a { display: block; padding: .5625rem 0; font-weight: 600; font-size: .9375rem; }
.links-box a:hover { color: var(--brand); }
.empty { background: var(--surface); border-radius: var(--r); padding: 1.5rem; color: var(--ink-2); }
.empty a { color: var(--brand); text-decoration: underline; }

.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: .375rem; margin-top: 2rem; }
.pg { min-width: 2.5rem; height: 2.5rem; padding: 0 .75rem; display: inline-grid; place-items: center; border-radius: .5rem; background: var(--surface); border: .0625rem solid var(--line); font-weight: 600; font-size: .9375rem; }
a.pg:hover { border-color: var(--brand); color: var(--brand); }
.pg.is-cur { background: var(--brand); border-color: var(--brand); color: #fff; }
.pg.is-off { opacity: .45; }
.pg-gap { align-self: center; color: var(--muted); }

.static { padding-top: 2rem; }
.static .prose, .landing-prose { max-width: 46rem; }
.static .prose > :first-child, .landing-prose > :first-child { margin-top: 0; }

/* ══ Kalendarz ══ */
.tabs { display: flex; gap: .375rem; margin-bottom: 1.125rem; overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: none; font: 600 .9375rem/1 var(--f); padding: .6875rem 1.125rem; border-radius: .625rem; border: .0625rem solid var(--line); background: var(--surface); cursor: pointer; color: var(--ink-2); }
.tabs button:hover { border-color: var(--t-events); color: var(--t-events); }
.tabs button[aria-selected="true"] { background: var(--t-events); border-color: var(--t-events); color: #fff; }
.soon-empty { background: var(--surface); border-radius: var(--r); padding: 1.25rem; color: var(--ink-2); }
.count-chip { position: absolute; right: .75rem; top: .75rem; background: var(--t-events); color: #fff; font: 700 .75rem/1 var(--f); padding: .375rem .5625rem; border-radius: 2rem; }
.ev-card .date-chip { color: var(--t); }
.ev-place { font-size: .875rem; color: var(--muted); }
.ev-actions { display: flex; flex-wrap: wrap; gap: .375rem .875rem; margin-top: auto; padding-top: .375rem; align-items: center; }
.ev-actions a { font: 600 .8125rem/1.2 var(--f); color: var(--brand); }
.ev-actions a:hover { text-decoration: underline; }
.save {
  font: 700 .8125rem/1 var(--f); padding: .4375rem .75rem .4375rem 1.875rem; border-radius: 2rem; border: .0625rem solid var(--line);
  background: var(--surface) no-repeat .625rem 50% / .875rem; cursor: pointer; color: var(--ink-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.2C.9 8.4 3 4.5 6.7 4.5c2.2 0 3.6 1.2 5.3 3 1.7-1.8 3.1-3 5.3-3 3.7 0 5.8 3.9 4.3 7.3C19.5 16.4 12 21 12 21z' fill='none' stroke='%23e11d48' stroke-width='2'/%3E%3C/svg%3E");
}
.save[aria-pressed="true"] {
  color: #fff; background-color: #e11d48; border-color: #e11d48;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.2C.9 8.4 3 4.5 6.7 4.5c2.2 0 3.6 1.2 5.3 3 1.7-1.8 3.1-3 5.3-3 3.7 0 5.8 3.9 4.3 7.3C19.5 16.4 12 21 12 21z' fill='%23fff'/%3E%3C/svg%3E");
}

.cal { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .875rem 1rem; border-bottom: .0625rem solid var(--line); }
.cal-head h2 { font: 800 1.375rem/1.1 var(--f); letter-spacing: -.02em; text-align: center; }
.cal-nav { display: inline-flex; align-items: center; gap: .25rem; font: 600 .875rem/1 var(--f); color: var(--ink-2); padding: .5rem; border-radius: .5rem; }
.cal-nav span { display: none; }
.cal-nav:hover { background: var(--bg); color: var(--brand); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { padding: .625rem .25rem; text-align: center; font: 700 .75rem/1 var(--f); color: var(--muted); border-bottom: .0625rem solid var(--line); }
.cal-dow.is-we { color: var(--t-events); }
.cal-day {
  min-height: 3.5rem; padding: .375rem; border: 0; border-right: .0625rem solid var(--line); border-bottom: .0625rem solid var(--line);
  text-align: left; background: none; font: inherit; color: inherit; display: flex; flex-direction: column; gap: .25rem; min-width: 0;
}
.cal-grid > :nth-child(7n) { border-right: 0; }
.cal-day.is-we { background: color-mix(in srgb, var(--t-events) 4%, transparent); }
.cal-day.is-past .num { color: var(--muted); }
.cal-day .num { font: 700 .875rem/1 var(--f); }
.cal-day.is-today .num { background: var(--brand); color: #fff; border-radius: 50%; width: 1.625rem; height: 1.625rem; display: grid; place-items: center; margin: -.125rem 0 0 -.125rem; }
.cal-day.has-ev { cursor: pointer; }
.cal-day.has-ev:hover, .cal-day.is-picked { background: color-mix(in srgb, var(--t-events) 10%, transparent); }
.cal-day.is-picked { box-shadow: inset 0 0 0 .125rem var(--t-events); }
.dots { display: flex; gap: .1875rem; flex-wrap: wrap; }
.dots i, .cal-legend i { width: .5rem; height: .5rem; border-radius: 50%; background: var(--t); display: inline-block; }
.cal-first, .cal-more { display: none; }
.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.125rem; padding: .75rem 1rem; font-size: .8125rem; color: var(--ink-2); }
.cal-legend span { display: inline-flex; align-items: center; gap: .375rem; }
.cal-clear { margin-left: auto; font: 600 .8125rem/1 var(--f); padding: .4375rem .75rem; border-radius: 2rem; border: .0625rem solid var(--line); background: var(--surface); cursor: pointer; color: var(--brand); }

.ev-list { margin-top: 2rem; }
.ev-row { display: grid; grid-template-columns: 3.5rem 1fr; gap: .875rem; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: .875rem; border-left: .25rem solid var(--t); }
.ev-date { text-align: center; font: 700 .75rem/1 var(--f); color: var(--t); padding-top: .25rem; }
.ev-date b { display: block; font-size: 1.75rem; font-weight: 800; color: var(--ink); margin-bottom: .1875rem; }
.ev-thumb { display: none; }
.ev-body { display: grid; gap: .375rem; min-width: 0; }
.ev-top { display: flex; align-items: center; gap: .625rem; }
.ev-when { font: 700 .75rem/1 var(--f); color: var(--t-events); }
.ev-body h3 { font: 700 1.0625rem/1.3 var(--f); }
.ev-body h3 a:hover { color: var(--brand); }
.ev-body .excerpt { -webkit-line-clamp: 2; line-clamp: 2; }

.plans-list { display: grid; gap: .625rem; margin-bottom: .25rem; }
.plans-list li { display: grid; gap: .1875rem; padding-bottom: .625rem; border-bottom: .0625rem solid var(--line); }
.plans-list a { font-weight: 600; font-size: .9375rem; line-height: 1.3; }
.plans-list a:hover { color: var(--brand); }
.plans-when { font: 700 .75rem/1 var(--f); color: #e11d48; }
.plans-empty { font-size: .875rem; color: var(--muted); line-height: 1.5; }
.subscribe p { font-size: .9375rem; color: var(--ink-2); line-height: 1.5; margin-bottom: .875rem; }
.btn { display: block; text-align: center; font: 700 .9375rem/1 var(--f); padding: .75rem 1rem; border-radius: .625rem; background: var(--brand); color: #fff; }
.btn + .btn { margin-top: .5rem; }
.btn:hover { filter: brightness(1.08); }
.btn--ghost { background: var(--surface); color: var(--brand); border: .0625rem solid var(--brand); }
.months { display: grid; grid-template-columns: repeat(4, 1fr); gap: .375rem; }
.months a { text-align: center; padding: .5rem 0; border-radius: .5rem; font-weight: 600; font-size: .875rem; background: var(--bg); }
.months a:hover { color: var(--brand); }
.months a[aria-current] { background: var(--brand); color: #fff; }

@media (min-width: 40rem) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .cal-day { min-height: 5.5rem; padding: .5rem; }
  .cal-first { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .6875rem; line-height: 1.3; color: var(--ink-2); }
  .cal-more { display: block; font-size: .6875rem; font-weight: 700; color: var(--t-events); }
  .cal-nav span { display: inline; }
  .ev-row { grid-template-columns: 3.5rem 8.5rem 1fr; }
  .ev-thumb { display: block; position: relative; border-radius: .5rem; overflow: hidden; min-height: 6.5rem; background: var(--line); }
  .ev-thumb img, .ev-thumb .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
}
@media (min-width: 48rem) {
  .page-head { padding: 2rem 0 1.5rem; }
  .page-head h1 { font-size: 2.375rem; }
}
@media (min-width: 64rem) {
  .layout-aside { grid-template-columns: minmax(0, 1fr) 20rem; gap: 2.5rem; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .cal-day { min-height: 6.5rem; }
}

/* Kalendarz: wydarzenia z oficjalnych kalendarzy miast (bez zdjęcia) */
.ev-card--text .card-media { aspect-ratio: auto; height: 4.25rem; background: color-mix(in srgb, var(--t, var(--t-events)) 14%, var(--surface)); }
.ev-card--text .card-media .ph { display: none; }
.ev-src { font-size: .8125rem; color: var(--muted); margin-top: .25rem; }
.ev-src a { color: inherit; text-decoration: underline; text-underline-offset: .15em; }
.long-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.long-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .625rem; padding: .625rem 0; border-bottom: .0625rem solid var(--line); }
.long-list a { font-weight: 600; color: var(--ink); text-decoration: none; }
.long-list a:hover { text-decoration: underline; }
.long-when { font-size: .8125rem; color: var(--muted); }

/* Atrybut hidden zawsze ukrywa (komponenty z własnym display: flex/grid nadpisywały go — zakładki kalendarza) */
[hidden] { display: none !important; }

/* Wiersz wydarzenia ze źródła (bez miniatury): data + treść na całą szerokość */
.ev-row.ev-row--text { grid-template-columns: 3.5rem 1fr; }

/* Menu: wyróżniony „Kalendarz” (2026-10-20) */
.menu-item--cal .menu-link { display: inline-flex; align-items: center; gap: .4rem; color: var(--t-events); }
.cal-ico { flex: none; }
.sub-sep { height: .0625rem; background: var(--line); margin: .375rem .75rem; }
.cal-btn { color: var(--t-events); border-color: color-mix(in srgb, var(--t-events) 35%, var(--line)); }
.cal-btn:hover { color: var(--t-events); border-color: var(--t-events); }
@media (min-width: 64rem) {
  .cal-btn { display: none; }
  .menu-item--cal { margin-left: .5rem; }
  .menu-item--cal .menu-link { padding: .5rem .25rem .5rem .875rem; margin: .6875rem 0; border: 0; border-radius: 2rem 0 0 2rem;
    background: color-mix(in srgb, var(--t-events) 12%, transparent); color: var(--t-events); font-weight: 700; }
  .menu-item--cal:has(.menu-link[aria-current]) .menu-link, .menu-item--cal:has(.menu-link[aria-current]) .sub-toggle { background: color-mix(in srgb, var(--t-events) 22%, transparent); }
  .menu-item--cal .sub-toggle { height: auto; align-self: stretch; margin: .6875rem 0; border-radius: 0 2rem 2rem 0; width: 1.875rem;
    background: color-mix(in srgb, var(--t-events) 12%, transparent); color: var(--t-events); }
  .menu-item--cal .sub { left: auto; right: 0; }
}
.subscribe { scroll-margin-top: 6rem; }
.soon { scroll-margin-top: 5rem; }

/* Zdjęcia w treści artykułu (np. plakat wydarzenia) */
.prose figure { margin: 1.75em auto; }
.prose figure.poster { max-width: 30rem; }
.prose figure img { display: block; width: 100%; height: auto; border-radius: var(--r); }
.prose figcaption { font-size: .8125rem; color: var(--muted); margin-top: .5em; }
