/* Układ: wąska kolumna tekstu (65ch) w ramie 72rem; każde czasopismo ma własny kolor „okładki" (--acc). */
:root {
  --paper: #f4f6f8;
  --surface: #ffffff;
  --ink: #17202b;
  --muted: #586273;
  --rule: #d8dde4;
  --hatch: #c3cad3;
  --j-ppse: #1d6b57;
  --j-kpse: #23457d;
  --j-pp: #8a5c0c;
  --j-prss: #6b3a6b;
  --acc: #23457d;
  --f-display: "Spectral", "Georgia", "Times New Roman", serif;
  --f-body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "IBM Plex Mono", "Consolas", ui-monospace, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #11151b; --surface: #19202a; --ink: #e5e9ef; --muted: #9ba6b5; --rule: #2b3441; --hatch: #3a4554;
    --j-ppse: #5fc4a5; --j-kpse: #91b2ef; --j-pp: #e2b65c; --j-prss: #d39fd4; --acc: #91b2ef;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #11151b; --surface: #19202a; --ink: #e5e9ef; --muted: #9ba6b5; --rule: #2b3441; --hatch: #3a4554;
  --j-ppse: #5fc4a5; --j-kpse: #91b2ef; --j-pp: #e2b65c; --j-prss: #d39fd4; --acc: #91b2ef;
  color-scheme: dark;
}
.j-ppse { --acc: var(--j-ppse); }
.j-kpse { --acc: var(--j-kpse); }
.j-pp { --acc: var(--j-pp); }
.j-prss { --acc: var(--j-prss); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-body); font-size: 1rem; line-height: 1.6;
}
a { color: var(--acc); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 2px; }
.wrap { max-width: 72rem; margin-inline: auto; padding-inline: 1.25rem; }
.mono { font-family: var(--f-mono); font-size: 0.9em; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.2; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem); letter-spacing: -0.01em; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }
.eyebrow { font-size: 0.78rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); font-weight: 500; }

/* Nagłówek i zakładki */
.site-head { background: var(--surface); border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: flex; flex-direction: column; gap: 0.6rem; padding-block: 1rem 0; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.lang { display: flex; gap: 0.25rem; font-family: var(--f-mono); font-size: 0.82rem; }
.lang a { padding: 0.15rem 0.5rem; border: 1px solid var(--rule); border-radius: 4px; text-decoration: none; color: var(--muted); }
.lang a:hover { color: var(--ink); border-color: var(--muted); }
.lang a[aria-current="true"] { color: var(--surface); background: var(--ink); border-color: var(--ink); }
.brand { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; text-decoration: none; color: var(--ink); }
.brand b { font-family: var(--f-display); font-size: 1.3rem; font-weight: 600; }
.brand span { font-size: 0.85rem; color: var(--muted); }
.tabs { display: flex; gap: 0.25rem; overflow-x: auto; scrollbar-width: thin; margin-bottom: -1px; }
.tabs a {
  flex: none; display: block; padding: 0.55rem 0.9rem 0.6rem; text-decoration: none; color: var(--muted);
  border: 1px solid transparent; border-bottom: none; border-radius: 6px 6px 0 0; font-size: 0.92rem; white-space: nowrap;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] {
  color: var(--ink); background: var(--paper); border-color: var(--rule); font-weight: 500;
  box-shadow: inset 0 3px 0 var(--tab-acc, var(--ink));
}
.tabs a.j-ppse { --tab-acc: var(--j-ppse); }
.tabs a.j-kpse { --tab-acc: var(--j-kpse); }
.tabs a.j-pp { --tab-acc: var(--j-pp); }
.tabs a.j-prss { --tab-acc: var(--j-prss); }

main { padding-block: 2rem 4rem; display: flex; flex-direction: column; gap: 2.75rem; }
.crumbs { font-size: 0.88rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.35rem; }
.crumbs a { color: var(--muted); }

/* Strona główna */
.lead { max-width: 65ch; font-size: 1.1rem; color: var(--ink); }
.intro { display: flex; flex-direction: column; gap: 1rem; }
.timeline-box { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 1.25rem; }
.timeline { display: grid; grid-template-columns: minmax(11rem, 14rem) repeat(10, minmax(3.2rem, 1fr)); min-width: 46rem; row-gap: 0.75rem; align-items: center; }
.timeline .yr { font-family: var(--f-mono); font-size: 0.8rem; color: var(--muted); text-align: center; border-bottom: 1px solid var(--rule); padding-bottom: 0.35rem; }
.timeline .jn { font-size: 0.88rem; font-weight: 500; padding-right: 1rem; }
.timeline .jn a { color: var(--ink); text-decoration: none; }
.timeline .jn a:hover { text-decoration: underline; }
.timeline .cell { display: flex; gap: 3px; justify-content: center; flex-wrap: wrap; padding-inline: 2px; }
.dot { width: 0.7rem; height: 1rem; border-radius: 2px; background: var(--acc); display: block; }
.dot.gap { background: transparent; border: 1.5px dashed var(--muted); }
.dot.maybe { background: transparent; border: 1.5px dotted var(--hatch); }
.legend { display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: 0.82rem; color: var(--muted); margin-top: 1rem; }
.legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.legend .dot { --acc: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr)); gap: 1.25rem; }
.card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 1.4rem 1.5rem;
  display: flex; flex-direction: column; gap: 0.6rem; border-top: 4px solid var(--acc); min-width: 0;
}
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--acc); }
.facts { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; font-size: 0.88rem; color: var(--muted); }
.card p { margin: 0; max-width: 65ch; }

/* Strona czasopisma */
.jhead { display: flex; flex-direction: column; gap: 0.8rem; border-left: 5px solid var(--acc); padding-left: 1.25rem; }
.jhead p { margin: 0; max-width: 65ch; }
.meta-row { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; font-size: 0.9rem; color: var(--muted); }
.meta-row b { color: var(--ink); font-weight: 500; }
section { display: flex; flex-direction: column; gap: 1.1rem; }
.shelf { display: flex; flex-direction: column; gap: 0.6rem; }
.shelf-row { display: grid; grid-template-columns: 4.5rem 1fr; gap: 0.75rem; align-items: start; }
.shelf-row .y { font-family: var(--f-mono); font-size: 0.95rem; padding-top: 0.6rem; color: var(--muted); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.5rem; }
.slot {
  display: flex; flex-direction: column; gap: 0.1rem; padding: 0.55rem 0.75rem; border-radius: 6px;
  background: var(--surface); border: 1px solid var(--rule); text-decoration: none; color: var(--ink); min-height: 3.6rem;
}
a.slot { border-left: 4px solid var(--acc); }
a.slot:hover { border-color: var(--acc); }
.slot .n { font-weight: 600; font-variant-numeric: tabular-nums; }
.slot .c { font-size: 0.8rem; color: var(--muted); }
.slot.gap {
  background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--hatch) 45%, transparent) 6px 7px);
  border: 1.5px dashed var(--hatch); color: var(--muted);
}

/* Spis treści */
.issue { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: 0.9rem; scroll-margin-top: 1rem; }
.issue-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; }
.issue-head h3 a { color: var(--ink); text-decoration: none; }
.issue-head h3 a:hover { color: var(--acc); }
.issue.gap { background: transparent; border-style: dashed; color: var(--muted); }
.issue.gap p { margin: 0; }
.pdf { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.88rem; font-weight: 500; text-decoration: none; padding: 0.3rem 0.7rem; border: 1px solid var(--acc); border-radius: 4px; white-space: nowrap; }
.pdf:hover { background: color-mix(in srgb, var(--acc) 12%, transparent); }
.toc { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.toc-sec { font-size: 0.75rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 0.9rem 0 0.3rem; }
.toc li { display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 1.25rem; padding: 0.6rem 0; border-top: 1px solid var(--rule); }
.toc li.toc-sec { display: block; border-top: none; }
.toc .who { grid-column: 1; font-size: 0.88rem; color: var(--muted); }
.toc .what { grid-column: 1; min-width: 0; }
.toc .what a { color: var(--ink); text-decoration: none; font-family: var(--f-display); font-size: 1.08rem; font-weight: 500; }
.toc .what a:hover { color: var(--acc); text-decoration: underline; }
.toc .pp { grid-column: 2; grid-row: 1 / span 2; font-family: var(--f-mono); font-size: 0.82rem; color: var(--muted); align-self: center; white-space: nowrap; }

/* Artykuł */
.article { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 2.5rem; align-items: start; }
.article-main { display: flex; flex-direction: column; gap: 1.2rem; min-width: 0; }
.article-main h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); }
.authors { font-size: 1.1rem; }
.title-en { font-family: var(--f-display); color: var(--muted); font-size: 1.1rem; margin: 0; }
.authors { margin: 0; }
.mt { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--rule); border-radius: 3px; padding: 0 0.3rem; margin-left: 0.4rem; white-space: nowrap; vertical-align: 0.15em; }
.mt-label { margin: 0 0 -0.6rem; font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.orig-label { font-family: var(--f-body); font-size: 0.85rem; }
.btns { display: flex; flex-direction: column; gap: 0.5rem; }
.btns .btn.ghost { font-size: 0.9rem; padding: 0.55rem 1rem; }
.abstract { max-width: 65ch; margin: 0; }
.abs { display: flex; flex-direction: column; gap: 0.5rem; }
.kw { margin: 0; font-size: 0.92rem; color: var(--muted); max-width: 65ch; }
.kw-head { color: var(--ink); font-weight: 500; }
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; border-top: 4px solid var(--acc); }
dl.meta { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.45rem 1rem; font-size: 0.9rem; }
dl.meta dt { color: var(--muted); }
dl.meta dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 0.5rem; padding: 0.65rem 1rem; border-radius: 6px; background: var(--acc); color: var(--surface); text-decoration: none; font-weight: 500; border: none; font: inherit; cursor: pointer; }
.btn:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; color: var(--acc); border: 1px solid var(--acc); font-size: 0.85rem; padding: 0.35rem 0.75rem; }
.cite { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: 0.6rem; }
.cite p { margin: 0; font-size: 0.95rem; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; border-top: 1px solid var(--rule); padding-top: 1rem; font-size: 0.9rem; }
.pager a { display: flex; flex-direction: column; gap: 0.15rem; text-decoration: none; min-width: 0; }
.pager a span { color: var(--muted); font-size: 0.8rem; }
.pager .next { text-align: right; grid-column: 2; }

/* Autorzy */
.letters { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.letters a { font-family: var(--f-mono); padding: 0.2rem 0.55rem; border: 1px solid var(--rule); border-radius: 4px; text-decoration: none; color: var(--ink); background: var(--surface); }
.alist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 0.6rem 2rem; list-style: none; margin: 0; padding: 0; }
.alist > li { padding: 0.6rem 0; border-top: 1px solid var(--rule); min-width: 0; }
.alist .name { font-weight: 600; }
.alist ul { margin: 0.25rem 0 0; padding-left: 1rem; font-size: 0.88rem; }
.alist ul li { margin-bottom: 0.2rem; }
.tag { font-family: var(--f-mono); font-size: 0.78rem; color: var(--acc); }

.site-foot { border-top: 1px solid var(--rule); background: var(--surface); font-size: 0.85rem; color: var(--muted); }
.site-foot .wrap { padding-block: 1.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.site-foot p { margin: 0; }

@media (max-width: 56rem) {
  .article { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 30rem) {
  .shelf-row { grid-template-columns: 1fr; gap: 0.3rem; }
  .shelf-row .y { padding-top: 0; }
  .toc li { grid-template-columns: 1fr; }
  .toc .pp { grid-column: 1; grid-row: auto; }
  .issue { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
