/* Archiwum publikacji medialnych — arkusz front-endu (identyczny z podglądem)
   Autor: Michał Pajor · GPL-2.0-or-later */

.apm-app {
  --apm-paper: #f2ecdd; --apm-parch: #f9f4e8; --apm-card: #fdfaf1; --apm-ink: #221c11;
  --apm-ink-soft: #574c36; --apm-ink-faint: #8a7a5a; --apm-line: #e0d3b4;
  --apm-gold: #a8781f; --apm-gold-deep: #7c5a16; --apm-gold-bright: #e2b24c;
  --apm-night: #171207; --apm-night-2: #2a2110; --apm-wine: #7e2f3e; --apm-pine: #39604d;
  --apm-lapis: #3d6b9e; --apm-ok: #2f6b40; --apm-warn: #8a6220; --apm-danger: #9c3535;
  --apm-serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --apm-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  position: relative; background: var(--apm-paper); color: var(--apm-ink);
  font-family: var(--apm-sans); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.apm-app::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.9'/%3E%3C/svg%3E");
}
.apm-hero-copy { min-width: 0; }
.apm-app *, .apm-app *::before, .apm-app *::after { box-sizing: border-box; }
.apm-app h1, .apm-app h2, .apm-app h3, .apm-app h4, .apm-app p, .apm-app ul, .apm-app ol, .apm-app dl, .apm-app dd, .apm-app figure { margin: 0; padding: 0; }
.apm-app ul, .apm-app ol { list-style: none; }
.apm-app img { max-width: 100%; height: auto; display: block; border: 0; }
.apm-app button { font-family: inherit; font-size: inherit; border: 0; background: none; color: inherit; cursor: pointer; line-height: inherit; }
.apm-app a { color: inherit; text-decoration: none; }
.apm-app iframe { max-width: 100%; border: 0; }
.apm-app .apm-ico { width: 16px; height: 16px; flex: none; }
.apm-app .apm-ico-sm { width: 14px; height: 14px; flex: none; }
.apm-app .apm-ico-lg { width: 30px; height: 30px; }

/* ————— hero ————— */
.apm-hero { position: relative; overflow: hidden; background: var(--apm-night); color: var(--apm-parch); }
.apm-glow { position: absolute; border-radius: 999px; pointer-events: none; }
.apm-glow-1 { right: -160px; top: -208px; width: 560px; height: 560px; background: radial-gradient(circle, rgba(226,178,76,.22), transparent 62%); animation: apm-drift 26s ease-in-out infinite alternate; }
.apm-glow-2 { left: -96px; bottom: 0; width: 420px; height: 420px; background: radial-gradient(circle, rgba(126,47,62,.3), transparent 65%); animation: apm-flicker 4.5s ease-in-out infinite; }
.apm-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(23,18,7,.2), rgba(23,18,7,.85) 70%); pointer-events: none; }
.apm-hero-in { position: relative; z-index: 2; max-width: 1280px; margin: 0 auto; padding: 48px 16px 64px; display: grid; gap: 40px; }
@media (min-width: 640px) { .apm-hero-in { padding: 56px 24px 72px; } }
@media (min-width: 1024px) { .apm-hero-in { grid-template-columns: 1.05fr .8fr; align-items: center; padding: 64px 24px 80px; } }
.apm-kicker { display: flex; align-items: center; gap: 12px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .3em; color: rgba(226,178,76,.9); animation: apm-rise .7s cubic-bezier(.22,1,.36,1) both; }
.apm-kicker span { display: block; width: 40px; height: 1px; background: rgba(226,178,76,.6); }
.apm-h1 { margin-top: 20px !important; font-family: var(--apm-serif); font-size: clamp(2.35rem, 6vw, 3.75rem); font-weight: 600; line-height: 1.05; letter-spacing: -.02em; color: #f6efdd; animation: apm-rise .7s cubic-bezier(.22,1,.36,1) .09s both; }
.apm-h1 em { display: block; font-style: italic; color: var(--apm-gold-bright); }
.apm-lead { margin-top: 24px !important; max-width: 36rem; font-size: 15px; line-height: 1.65; color: rgba(249,244,232,.75); animation: apm-rise .7s cubic-bezier(.22,1,.36,1) .18s both; }
.apm-lead b { color: var(--apm-parch); font-weight: 600; }
.apm-hero-stats { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 16px 32px; animation: apm-rise .7s cubic-bezier(.22,1,.36,1) .26s both; }
.apm-hero-stats p { font-family: var(--apm-serif); font-size: 30px; font-weight: 700; color: var(--apm-gold-bright); line-height: 1.1; }
.apm-hero-stats span { display: block; margin-top: 2px; font-size: 10px; text-transform: uppercase; letter-spacing: .16em; color: rgba(249,244,232,.55); }
.apm-hero-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; animation: apm-rise .7s cubic-bezier(.22,1,.36,1) .34s both; }
.apm-hero-art { position: relative; width: 100%; max-width: 460px; margin: 0 auto; animation: apm-rise .7s cubic-bezier(.22,1,.36,1) .22s both; }
@media (min-width: 1024px) { .apm-hero-art { max-width: none; } }
.apm-hero-frame { position: relative; overflow: hidden; border-radius: 22px; border: 1px solid rgba(226,178,76,.4); box-shadow: 0 40px 90px -30px rgba(0,0,0,.9), 0 0 50px -18px rgba(226,178,76,.4); }
.apm-hero-frame img { aspect-ratio: 4/3; width: 100%; object-fit: cover; }
.apm-hero-float { display: none; }
@media (min-width: 640px) {
  .apm-hero-float { display: block; position: absolute; left: -24px; bottom: -32px; width: 160px; transform: rotate(-5deg); overflow: hidden; border-radius: 12px; border: 1px solid rgba(226,178,76,.3); box-shadow: 0 24px 50px -16px rgba(0,0,0,.85); }
  .apm-hero-float img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
}
@media (min-width: 1024px) {
  .apm-hero-float { left: -32px; bottom: -40px; width: 230px; }
}

/* ————— przyciski ————— */
.apm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; transition: filter .2s, background .2s, border-color .2s, color .2s; }
.apm-btn-gold { background: linear-gradient(to bottom, var(--apm-gold-bright), var(--apm-gold)); color: var(--apm-night); box-shadow: 0 6px 16px -8px rgba(226,178,76,.8); }
.apm-btn-gold:hover { filter: brightness(1.08); }
.apm-btn-ghost { border: 1px solid var(--apm-line); color: var(--apm-ink-soft); background: transparent; font-weight: 500; }
.apm-btn-ghost:hover { border-color: rgba(168,120,31,.6); color: var(--apm-gold-deep); }
.apm-btn-outline { border: 1px solid rgba(249,244,232,.3); color: rgba(249,244,232,.85); background: transparent; font-weight: 600; }
.apm-btn-outline:hover { border-color: rgba(226,178,76,.6); color: var(--apm-gold-bright); }
.apm-btn-line { border: 1px solid rgba(168,120,31,.5); color: var(--apm-gold-deep); background: transparent; }
.apm-btn-line:hover { background: rgba(168,120,31,.1); }
.apm-btn-lg { padding: 10px 24px; border-radius: 999px; font-size: 13.5px; font-weight: 700; }
.apm-btn-mini { padding: 4px 10px; border-radius: 6px; background: rgba(168,120,31,.12); color: var(--apm-gold-deep); font-size: 11.5px; font-weight: 600; }
.apm-btn-mini:hover { background: rgba(168,120,31,.25); }
.apm-btn-mini.apm-outline { background: transparent; border: 1px solid var(--apm-line); color: var(--apm-ink-soft); font-weight: 500; }
.apm-btn-mini.apm-outline:hover { border-color: rgba(168,120,31,.6); color: var(--apm-gold-deep); }

/* ————— toolbar ————— */
.apm-toolbar-wrap { position: sticky; top: 64px; z-index: 5; margin-top: 8px; background: rgba(242,236,221,.94); border-bottom: 1px solid var(--apm-line); box-shadow: 0 10px 24px -18px rgba(90,66,20,.5); backdrop-filter: blur(12px); }
.admin-bar .apm-toolbar-wrap { top: 96px; }
@media (min-width: 768px) { .apm-toolbar-wrap { top: 68px; } .admin-bar .apm-toolbar-wrap { top: 100px; } }
@media (max-width: 767px) { .apm-toolbar-wrap { top: 0; } }
@media (max-width: 782px) { .admin-bar .apm-toolbar-wrap { top: 46px; } }
.apm-toolbar { max-width: 1280px; margin: 0 auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 640px) { .apm-toolbar { padding: 12px 24px; } }
.apm-toolbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.apm-views { display: flex; padding: 2px; border: 1px solid var(--apm-line); background: var(--apm-card); border-radius: 999px; }
.apm-view { padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--apm-ink-faint); transition: .2s; }
.apm-view:hover { color: var(--apm-ink); }
.apm-view-on { background: var(--apm-ink); color: var(--apm-gold-bright); box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.apm-search { position: relative; flex: 1; min-width: 176px; }
.apm-search .apm-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--apm-ink-faint); }
.apm-search input { width: 100%; height: 36px; padding: 0 60px 0 36px; border: 1px solid var(--apm-line); border-radius: 999px; background: var(--apm-card); font-family: var(--apm-sans); font-size: 13px; color: var(--apm-ink); outline: none; transition: border-color .2s, box-shadow .2s; }
.apm-search input::placeholder { color: rgba(138,122,90,.7); }
.apm-search input:focus { border-color: var(--apm-gold); box-shadow: 0 0 0 2px rgba(168,120,31,.25); }
.apm-search kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: none; padding: 0 6px; border: 1px solid var(--apm-line); border-radius: 4px; background: var(--apm-parch); font-family: var(--apm-sans); font-size: 10px; color: var(--apm-ink-faint); }
@media (min-width: 640px) { .apm-search kbd { display: block; } }
.apm-select { height: 36px; max-width: 100%; padding: 0 10px; border: 1px solid var(--apm-line); border-radius: 8px; background: var(--apm-card); font-family: var(--apm-sans); font-size: 12.5px; color: var(--apm-ink-soft); outline: none; cursor: pointer; }
.apm-select:focus { border-color: var(--apm-gold); box-shadow: 0 0 0 2px rgba(168,120,31,.25); }
.apm-toolbar-filters { gap: 8px; }
.apm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid var(--apm-line); border-radius: 999px; background: var(--apm-card); font-size: 11.5px; font-weight: 600; color: var(--apm-ink-soft); transition: .2s; }
.apm-chip:hover { border-color: rgba(168,120,31,.5); }
.apm-chip i { width: 6px; height: 6px; border-radius: 999px; flex: none; }
.apm-chip em { font-style: normal; opacity: .6; }
.apm-chip.is-on { color: var(--c); background: var(--s, rgba(168,120,31,.1)); border-color: var(--c); box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.apm-chip-typ .apm-ico-sm { color: currentColor; }
.apm-sep { display: none; width: 1px; height: 20px; background: var(--apm-line); margin: 0 4px; }
@media (min-width: 640px) { .apm-sep { display: block; } }
.apm-clear { padding: 4px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: var(--apm-danger); }
.apm-clear:hover { background: rgba(156,53,53,.1); }

/* ————— wyniki ————— */
.apm-main { max-width: 1280px; margin: 0 auto; padding: 32px 16px 96px; scroll-margin-top: 15rem; }
@media (min-width: 640px) { .apm-main { padding: 32px 24px 96px; } }
@media (min-width: 768px) { .apm-main { scroll-margin-top: 11rem; } }
.apm-main-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin-bottom: 24px; }
.apm-h2 { font-family: var(--apm-serif); font-size: 30px; font-weight: 600; color: var(--apm-ink); }
.apm-count { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--apm-ink-faint); }
.apm-count b { color: var(--apm-gold-deep); font-weight: 700; }
.apm-motto { display: none; margin-left: auto; font-size: 11px; text-transform: uppercase; letter-spacing: .2em; color: var(--apm-ink-faint); }
@media (min-width: 768px) { .apm-motto { display: block; } }
.apm-results { transition: opacity .2s; }
.apm-results.is-loading { opacity: .5; pointer-events: none; }
.apm-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .apm-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1280px) { .apm-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }

/* ————— karta ————— */
.apm-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--apm-line); border-radius: 16px; background: var(--apm-card); box-shadow: 0 2px 10px -6px rgba(90,66,20,.25); transition: transform .3s, border-color .3s, box-shadow .3s; animation: apm-rise .6s cubic-bezier(.22,1,.36,1) both; }
.apm-card:hover { transform: translateY(-4px); border-color: rgba(168,120,31,.5); box-shadow: 0 22px 44px -20px rgba(122,90,26,.55); }
.apm-card > .apm-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9.5; flex: none; overflow: hidden; padding: 0; background: linear-gradient(135deg, var(--apm-night), #59431c); line-height: 0; text-align: left; }
.apm-card > .apm-thumb .apm-thumb-img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform .7s; }
.apm-tl-thumb .apm-thumb-img, .apm-dr-thumb .apm-thumb-img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.apm-card:hover .apm-thumb-img { transform: scale(1.05); }
.apm-thumb-fallback { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 100%; color: rgba(226,178,76,.8); background: linear-gradient(135deg, #221c11, var(--apm-tc) 140%); }
.apm-thumb-fallback b { font-size: 24px; font-weight: 400; }
.apm-thumb-alt { background: linear-gradient(135deg, #221c11 1%, #59431c 140%); }
.apm-type-badge { position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(23,18,7,.85); color: var(--apm-gold-bright); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; box-shadow: inset 0 0 0 1px rgba(226,178,76,.3); backdrop-filter: blur(4px); }
.apm-catno { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border-radius: 6px; background: rgba(23,18,7,.88); color: rgba(226,178,76,.95); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9.5px; line-height: 1.4; letter-spacing: .12em; backdrop-filter: blur(4px); }
.apm-catno-plain { position: static; background: none; color: var(--apm-ink-faint); padding: 0; font-size: 10px; }
.apm-copy-flag { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; min-height: 22px; padding: 2px 9px; border: 1px solid rgba(226,178,76,.55); border-radius: 6px; background: rgba(168,120,31,.96); color: var(--apm-night); font-size: 9.5px; font-weight: 700; line-height: 1.4; text-transform: uppercase; letter-spacing: .08em; box-shadow: 0 1px 5px rgba(0,0,0,.24); }
.apm-card-body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 16px; }
@media (min-width: 640px) { .apm-card-body { padding: 20px; } }
.apm-pub-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.apm-mark { width: 22px; height: 22px; flex: none; border-radius: 999px; object-fit: cover; background: #fff; box-shadow: inset 0 0 0 1px var(--apm-line); }
.apm-mark-lit { display: grid; place-items: center; color: var(--apm-parch); font-weight: 600; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.apm-pub-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--apm-ink-faint); }
.apm-tag { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 4px 10px; border-radius: 999px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.apm-tag i { width: 6px; height: 6px; border-radius: 999px; flex: none; }
.apm-tag-sm { padding: 2px 8px; font-size: 9.5px; }
.apm-card-title { font-family: var(--apm-serif); font-size: 1.22rem; font-weight: 600; line-height: 1.32; color: var(--apm-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.apm-title-btn { text-align: left; padding: 0; color: inherit; font: inherit; transition: color .2s; }
.apm-title-btn:hover { color: var(--apm-gold-deep); }
.apm-card-author { font-size: 12.5px; font-style: italic; color: var(--apm-ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apm-card-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid rgba(224,211,180,.7); }
.apm-date-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 11.5px; color: var(--apm-ink-faint); }
.apm-date { font-weight: 500; color: var(--apm-ink-soft); }
.apm-age { display: inline-flex; align-items: center; gap: 4px; color: var(--apm-gold-deep); }
.apm-age .apm-ico { width: 14px; height: 14px; }
.apm-status { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 4px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 600; }
.apm-status i { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.apm-status-aktywny { color: var(--apm-ok); background: #e2efe4; box-shadow: inset 0 0 0 1px rgba(47,107,64,.18); }
.apm-status-aktywny i { animation: apm-flicker 3.5s ease-in-out infinite; }
.apm-status-wygasl { color: var(--apm-danger); background: #f5e2e0; box-shadow: inset 0 0 0 1px rgba(156,53,53,.18); }
.apm-status-nieznany { color: var(--apm-warn); background: #f3e9d2; box-shadow: inset 0 0 0 1px rgba(138,98,32,.18); }
.apm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.apm-actions .apm-btn:last-child { margin-left: auto; }

/* ————— oś czasu ————— */
.apm-timeline { position: relative; padding-bottom: 24px; }
.apm-tl-line { position: absolute; left: 15px; top: 8px; bottom: 0; width: 2px; border-radius: 2px; background: linear-gradient(to bottom, var(--apm-gold-bright), var(--apm-gold), rgba(168,120,31,.15)); }
.apm-tl-year { scroll-margin-top: 15rem; }
.apm-tl-year-head { position: relative; display: flex; align-items: center; gap: 16px; margin: 40px 0 20px; }
.apm-tl-year:first-child .apm-tl-year-head { margin-top: 0; }
.apm-tl-node { position: relative; z-index: 2; width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 999px; border: 2px solid var(--apm-gold); background: var(--apm-paper); color: var(--apm-gold-deep); font-size: 13px; box-shadow: 0 0 0 5px rgba(168,120,31,.12); }
.apm-tl-year-head h3 { font-family: var(--apm-serif); font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; letter-spacing: -.02em; color: var(--apm-gold-deep); line-height: 1; }
.apm-tl-year-head em { align-self: flex-end; margin-bottom: 4px; font-style: normal; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .18em; color: var(--apm-ink-faint); }
.apm-tl-item { position: relative; padding-left: 48px; margin-bottom: 16px; opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1); }
.apm-tl-item.is-in { opacity: 1; transform: none; }
.apm-tl-dot { position: absolute; left: 9px; top: 28px; width: 14px; height: 14px; z-index: 2; border-radius: 999px; border: 3px solid var(--apm-paper); box-shadow: 0 0 0 2px rgba(168,120,31,.35); }
.apm-tl-card { display: flex; gap: 16px; padding: 16px; border: 1px solid var(--apm-line); border-radius: 16px; background: var(--apm-card); box-shadow: 0 2px 8px -5px rgba(90,66,20,.3); transition: .25s; }
@media (min-width: 640px) { .apm-tl-card { padding: 20px; } }
.apm-tl-card:hover { transform: translateY(-2px); border-color: rgba(168,120,31,.5); box-shadow: 0 16px 32px -18px rgba(122,90,26,.5); }
.apm-tl-thumb { display: none; width: 144px; height: 96px; flex: none; overflow: hidden; border-radius: 12px; border: 1px solid var(--apm-line); padding: 0; }
@media (min-width: 640px) { .apm-tl-thumb { display: block; } }
.apm-tl-body { min-width: 0; flex: 1; }
.apm-tl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 11px; color: var(--apm-ink-faint); }
.apm-tl-type, .apm-tl-kat { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.apm-tl-kat i { width: 6px; height: 6px; border-radius: 999px; }
.apm-tl-title { margin-top: 6px !important; font-family: var(--apm-serif); font-size: 18px; font-weight: 600; line-height: 1.35; }
.apm-tl-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
.apm-tl-pub { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--apm-ink-soft); }
.apm-tl-author { font-size: 12px; font-style: italic; color: var(--apm-ink-faint); }
.apm-tl-actions { margin-left: auto; display: flex; gap: 8px; }

/* ————— statystyki ————— */
.apm-stats-note { font-size: 12px; color: var(--apm-ink-faint); margin-bottom: 16px !important; }
.apm-stats-note b { color: var(--apm-gold-deep); }
.apm-stats-tiles { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
@media (min-width: 1024px) { .apm-stats-tiles { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.apm-stat-tile { padding: 20px; text-align: center; border: 1px solid var(--apm-line); border-radius: 16px; background: linear-gradient(to bottom, var(--apm-card), var(--apm-parch)); box-shadow: 0 2px 10px -6px rgba(90,66,20,.25); }
.apm-stat-num { font-family: var(--apm-serif); font-size: clamp(2.1rem, 5vw, 3rem); font-weight: 700; color: var(--apm-gold-deep); line-height: 1.1; }
.apm-stat-lab { margin-top: 6px !important; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--apm-ink-faint); }
.apm-stats-grid { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 1024px) { .apm-stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.apm-panel { padding: 20px; border: 1px solid var(--apm-line); border-radius: 16px; background: var(--apm-card); box-shadow: 0 2px 10px -6px rgba(90,66,20,.25); }
@media (min-width: 640px) { .apm-panel { padding: 24px; } }
.apm-panel-h { margin-bottom: 20px !important; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .22em; color: var(--apm-gold-deep); }
.apm-bars { display: flex; align-items: flex-end; gap: 6px; height: 192px; overflow-x: auto; padding-bottom: 2px; }
.apm-bar { position: relative; flex: 1 1 0; min-width: 18px; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.apm-bar i { width: 100%; max-width: 46px; min-height: 3px; border-radius: 6px 6px 0 0; background: linear-gradient(to top, var(--apm-gold-deep), var(--apm-gold-bright)); transition: filter .25s; }
.apm-bar:hover i { filter: brightness(1.12); }
.apm-bar-n { margin-bottom: 4px; font-size: 10px; font-weight: 700; color: var(--apm-ink-faint); opacity: 0; transition: opacity .2s; }
.apm-bar:hover .apm-bar-n { opacity: 1; }
.apm-bar b { margin-top: 6px; font-size: 9.5px; font-weight: 600; color: var(--apm-ink-faint); }
@media (min-width: 640px) { .apm-bar b { font-size: 10.5px; } }
.apm-donut-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 32px; }
.apm-donut { width: 176px; height: 176px; flex: none; transform: rotate(-90deg); }
.apm-donut-txt { transform: rotate(90deg); transform-origin: 80px 80px; }
.apm-legend { min-width: 208px; }
.apm-legend li { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 12px; }
.apm-legend i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.apm-legend span { color: var(--apm-ink-soft); }
.apm-legend b { margin-left: auto; color: var(--apm-ink); }
.apm-legend em { width: 40px; text-align: right; font-style: normal; font-size: 11px; color: var(--apm-ink-faint); }
.apm-pubs li { display: grid; grid-template-columns: minmax(90px, 170px) 1fr 28px; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 12.5px; }
.apm-pub-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--apm-ink-soft); }
.apm-pub-track { display: block; height: 10px; overflow: hidden; border-radius: 999px; background: var(--apm-parch); box-shadow: inset 0 0 0 1px rgba(224,211,180,.7); }
.apm-pub-track i { display: block; height: 100%; border-radius: 999px; transition: width .7s; }
.apm-pubs b { text-align: right; color: var(--apm-ink); }
.apm-types { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.apm-type-box { padding: 14px; border: 1px solid var(--apm-line); border-radius: 12px; background: var(--apm-parch); }
.apm-type-box > span:first-child { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.apm-type-box p { margin-top: 4px !important; font-family: var(--apm-serif); font-size: 24px; font-weight: 700; color: var(--apm-ink); }
.apm-type-track { display: block; height: 6px; margin-top: 6px; overflow: hidden; border-radius: 999px; background: rgba(224,211,180,.5); }
.apm-type-track i { display: block; height: 100%; border-radius: 999px; }
.apm-mini-h { margin: 20px 0 8px !important; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; color: var(--apm-ink-faint); }
.apm-status-bar { display: flex; height: 12px; overflow: hidden; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(224,211,180,.7); }
.apm-status-legend { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 10px; font-size: 11.5px; color: var(--apm-ink-soft); }
.apm-status-legend span { display: inline-flex; align-items: center; gap: 6px; }
.apm-status-legend i { width: 8px; height: 8px; border-radius: 999px; }

/* ————— szuflada rekordu ————— */
.apm-overlay { position: fixed; inset: 0; z-index: 99998; }
.apm-overlay[hidden] { display: none; }
.apm-backdrop { position: absolute; inset: 0; background: rgba(23,18,7,.65); backdrop-filter: blur(3px); animation: apm-fadein .35s ease both; }
.apm-drawer { position: absolute; top: 0; right: 0; height: 100%; width: 100%; max-width: 672px; display: flex; flex-direction: column; background: var(--apm-parch); box-shadow: -30px 0 80px rgba(0,0,0,.45); animation: apm-slidein .45s cubic-bezier(.22,1,.36,1) both; }
.apm-drawer-inner { display: flex; flex-direction: column; height: 100%; }
.admin-bar .apm-drawer { top: 32px; height: calc(100% - 32px); }
@media (max-width: 782px) { .admin-bar .apm-drawer { top: 46px; height: calc(100% - 46px); } }
.apm-dr-head { flex: none; padding: 20px 20px 16px; border-bottom: 1px solid var(--apm-line); background: rgba(253,250,241,.8); }
@media (min-width: 640px) { .apm-dr-head { padding: 20px 32px 16px; } }
.apm-dr-head-row { display: flex; align-items: flex-start; gap: 12px; }
.apm-dr-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.apm-app .apm-close { appearance: none; margin: 0 0 0 auto; padding: 0; width: 36px; height: 36px; flex: none; display: grid; place-items: center; border: 1px solid rgba(168,120,31,.28); border-radius: 50%; background: var(--apm-ink); color: var(--apm-gold-bright); font-family: var(--apm-sans); font-size: 21px; font-weight: 400; line-height: 1; box-shadow: 0 3px 10px rgba(34,28,17,.16); transition: background .2s, color .2s, border-color .2s, transform .2s; }
.apm-app .apm-close:hover { border-color: rgba(226,178,76,.65); background: var(--apm-night-2); color: #fff3d3; transform: scale(1.04); }
.apm-app .apm-close:focus-visible { outline: 2px solid var(--apm-gold); outline-offset: 3px; }
.apm-dr-title { margin-top: 12px !important; font-family: var(--apm-serif); font-size: 1.7rem; font-weight: 600; line-height: 1.22; color: var(--apm-ink); }
.apm-app .apm-dr-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-top: 14px; font-size: 13px; color: var(--apm-ink-soft); }
.apm-dr-pub { display: inline-flex; align-items: center; gap: 8px; }
.apm-dr-author { font-style: italic; }
.apm-dr-body { flex: 1; overflow-y: auto; padding: 20px; }
@media (min-width: 640px) { .apm-dr-body { padding: 20px 32px; } }
.apm-alert { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; padding: 14px; border: 1px solid rgba(156,53,53,.3); border-radius: 12px; background: rgba(156,53,53,.08); color: var(--apm-danger); font-size: 13px; line-height: 1.55; }
.apm-alert > span { font-size: 16px; }
.apm-app .apm-dr-meta { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); width: 100%; margin: 0 0 16px !important; padding: 16px; gap: 14px 24px; border: 1px solid var(--apm-line); border-radius: 16px; background: var(--apm-card); }
@media (min-width: 640px) { .apm-app .apm-dr-meta { padding: 20px; } }
.apm-app .apm-dr-meta > div { display: block; min-width: 0; margin: 0; padding: 0; }
.apm-app .apm-dr-meta .apm-span2 { grid-column: 1 / -1; }
.apm-app .apm-dr-meta dt { display: block; float: none; width: auto; margin: 0; padding: 0; font-size: 9.5px; font-weight: 700; line-height: 1.4; text-transform: uppercase; letter-spacing: .16em; color: var(--apm-ink-faint); }
.apm-app .apm-dr-meta dd { display: block; float: none; width: auto; margin: 6px 0 0; padding: 0; font-size: 13px; line-height: 1.55; color: var(--apm-ink); }
.apm-app .apm-dr-meta > .apm-dr-url { padding-top: 12px; border-top: 1px solid rgba(224,211,180,.7); }
.apm-app .apm-dr-url dd { min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: var(--apm-lapis); overflow-wrap: anywhere; word-break: normal; }
.apm-age-inline { margin-left: 8px; font-size: 11.5px; font-weight: 600; color: var(--apm-gold-deep); }
.apm-dr-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.apm-dr-actions .apm-btn { padding: 9px 16px; border-radius: 8px; font-size: 13px; }
.apm-dr-actions .apm-gallery-link { border-color: rgba(168,120,31,.38); color: var(--apm-gold-deep); }
.apm-dr-actions .apm-gallery-link:hover { border-color: var(--apm-gold); background: rgba(168,120,31,.08); }
.apm-tabs { display: flex; gap: 4px; margin-top: 24px; border-bottom: 2px solid var(--apm-line); }
.apm-tab { padding: 10px 16px; margin-bottom: -2px; border-radius: 8px 8px 0 0; font-size: 13px; font-weight: 600; color: var(--apm-ink-faint); transition: .2s; }
.apm-tab:hover { color: var(--apm-ink); }
.apm-tab.is-on { border-bottom: 2px solid var(--apm-gold); background: rgba(168,120,31,.1); color: var(--apm-gold-deep); }
.apm-tab-panel { display: none; padding-top: 20px; }
.apm-tab-panel.is-on { display: block; animation: apm-fadein .35s ease both; }
.apm-dr-thumb { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 16px; border: 1px solid var(--apm-line); }
.apm-embed { margin: 12px 0; }
.apm-embed iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border-radius: 12px; }
.apm-embed audio { width: 100%; }
.apm-player { display: flex; align-items: center; gap: 16px; margin-top: 12px; padding: 18px; border-radius: 16px; border: 1px solid var(--apm-line); background: linear-gradient(to right, var(--apm-night), var(--apm-night-2)); color: var(--apm-parch); transition: border-color .2s; }
.apm-player:hover { border-color: rgba(168,120,31,.6); }
.apm-player-ico { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 999px; background: rgba(226,178,76,.15); color: var(--apm-gold-bright); box-shadow: inset 0 0 0 1px rgba(226,178,76,.4); font-size: 20px; }
.apm-player b { display: block; font-size: 14px; }
.apm-player em { display: block; margin-top: 2px; font-style: normal; font-size: 12px; color: rgba(249,244,232,.6); }
.apm-app .apm-note { display: block; box-sizing: border-box; margin: 20px 0 0 !important; padding: 16px; border-radius: 12px; background: rgba(168,120,31,.08); box-shadow: inset 0 0 0 1px rgba(168,120,31,.2); font-size: 12.5px; line-height: 1.65; color: var(--apm-ink-soft); }
.apm-note b { color: var(--apm-gold-deep); }
.apm-app .apm-arch-meta { margin: 0 0 10px !important; font-size: 11.5px; line-height: 1.6; color: var(--apm-ink-faint); }
.apm-reader { position: relative; }
.apm-app .apm-reader-toggle { display: block; margin: 0 0 12px auto; padding: 7px 12px; border: 1px solid var(--apm-line); border-radius: 8px; background: var(--apm-card); color: var(--apm-ink-soft); font-size: 12px; font-weight: 600; transition: background .2s, border-color .2s, color .2s; }
.apm-app .apm-reader-toggle:hover { border-color: var(--apm-gold); background: rgba(168,120,31,.08); color: var(--apm-gold-deep); }
.apm-app .apm-reader:fullscreen, .apm-app .apm-reader.is-fullscreen { position: fixed; inset: 0; z-index: 100000; width: 100%; height: 100%; max-width: none; margin: 0; padding: 28px clamp(20px, 7vw, 100px); overflow: auto; background: var(--apm-parch); color: var(--apm-ink); }
.apm-app .apm-reader:fullscreen .apm-reader-toggle, .apm-app .apm-reader.is-fullscreen .apm-reader-toggle { position: sticky; top: 0; z-index: 1; border-color: var(--apm-gold); background: #fdfaf1; color: #221c11; box-shadow: 0 2px 8px rgba(34,28,17,.22); }
.apm-app .apm-reader:fullscreen .apm-prose, .apm-app .apm-reader.is-fullscreen .apm-prose { max-width: 900px; margin: 24px auto 0; font-size: clamp(1.15rem, 1.8vw, 1.45rem); }
.apm-app .apm-reader:fullscreen .apm-arch-end, .apm-app .apm-reader.is-fullscreen .apm-arch-end { max-width: 900px; margin-right: auto; margin-left: auto; }
.apm-app .apm-reader:fullscreen::backdrop { background: var(--apm-parch); }
.apm-arch-end { margin-top: 24px !important; padding-top: 12px; border-top: 1px solid var(--apm-line); text-align: center; font-size: 11px; text-transform: uppercase; letter-spacing: .2em; color: var(--apm-ink-faint); }
.apm-dr-foot { flex: none; display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--apm-line); background: rgba(253,250,241,.8); font-size: 11px; color: var(--apm-ink-faint); }
@media (min-width: 640px) { .apm-dr-foot { padding: 12px 32px; } }
.apm-dr-edit { margin-left: auto; font-weight: 600; color: var(--apm-gold-deep); }
.apm-dr-edit:hover { text-decoration: underline; }

/* ————— treść archiwalna ————— */
.apm-prose { font-family: var(--apm-serif); font-size: 1.075rem; line-height: 1.78; color: #33291a; }
.apm-prose p { margin: 0 0 1em; }
.apm-prose h2, .apm-prose h3, .apm-prose h4 { margin: 1.4em 0 .5em; font-weight: 600; line-height: 1.3; color: var(--apm-gold-deep); }
.apm-prose h2 { font-size: 1.45em; } .apm-prose h3 { font-size: 1.25em; }
.apm-prose blockquote { margin: 1.2em 0; padding: .65em 1.1em; border-left: 3px solid var(--apm-gold); border-radius: 0 10px 10px 0; background: rgba(168,120,31,.07); font-style: italic; color: #4c4331; }
.apm-prose ul, .apm-prose ol { margin: 0 0 1em; padding-left: 1.4em; }
.apm-prose ul { list-style: disc; } .apm-prose ol { list-style: decimal; }
.apm-prose li { margin: .3em 0; }
.apm-prose a { color: var(--apm-lapis); text-decoration: underline; text-underline-offset: 3px; }
.apm-prose img { max-width: 100%; margin: .6em 0; border-radius: 12px; border: 1px solid var(--apm-line); }
.apm-prose iframe { width: 100%; aspect-ratio: 16/9; height: auto; border-radius: 12px; margin: .8em 0; }
.apm-prose audio { width: 100%; margin: .8em 0; }
.apm-prose hr { margin: 1.6em 0; border: 0; border-top: 1px solid var(--apm-line); }

/* ————— stany puste ————— */
.apm-empty { padding: 64px 20px; border: 1px dashed rgba(168,120,31,.4); border-radius: 24px; background: rgba(253,250,241,.6); text-align: center; animation: apm-fadein .4s ease both; }
.apm-nocopy { padding: 40px 0; text-align: center; }
.apm-empty-mark { font-size: 30px; color: var(--apm-gold); }
.apm-empty-t { margin-top: 12px !important; font-family: var(--apm-serif); font-size: 22px; font-weight: 600; color: var(--apm-ink); }
.apm-empty-d { max-width: 420px; margin: 8px auto 0 !important; font-size: 13.5px; line-height: 1.6; color: var(--apm-ink-faint); }
.apm-empty .apm-btn { margin-top: 20px; padding: 8px 20px; border-radius: 999px; font-size: 13px; }
.apm-loading { padding: 40px 0; text-align: center; color: var(--apm-ink-faint); }

/* ————— stopka ————— */
.apm-footer { position: relative; overflow: hidden; background: var(--apm-night); color: var(--apm-parch); padding: 40px 16px; }
@media (min-width: 640px) { .apm-footer { padding: 40px 24px; } }
.apm-footer::before { content: ""; position: absolute; left: 50%; top: -96px; width: 720px; height: 256px; transform: translateX(-50%); border-radius: 999px; background: radial-gradient(closest-side, rgba(226,178,76,.14), transparent); pointer-events: none; }
.apm-foot-bottom { position: relative; max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; }
.apm-foot-bottom > p { max-width: 672px; font-size: 12.5px; line-height: 1.65; color: rgba(249,244,232,.65); }

/* ————— ochrona przed stylami motywu (spójność z podglądem) ————— */
.apm-app .apm-h1 { margin: 20px 0 0; font-family: var(--apm-serif); font-size: clamp(2.35rem, 6vw, 3.75rem); font-weight: 600; line-height: 1.05; letter-spacing: -.02em; color: #f6efdd; }
.apm-app .apm-h2 { margin: 0; font-family: var(--apm-serif); font-size: 30px; font-weight: 600; line-height: 1.2; color: var(--apm-ink); }
.apm-app .apm-card-title { margin: 0; font-family: var(--apm-serif); font-size: 1.22rem; font-weight: 600; line-height: 1.32; color: var(--apm-ink); letter-spacing: normal; }
.apm-app .apm-tl-title { margin: 6px 0 0; font-family: var(--apm-serif); font-size: 18px; font-weight: 600; line-height: 1.35; color: var(--apm-ink); }
.apm-app .apm-tl-year-head h3 { margin: 0; font-family: var(--apm-serif); font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; line-height: 1; letter-spacing: -.02em; color: var(--apm-gold-deep); }
.apm-app .apm-dr-title { margin: 12px 0 0; font-family: var(--apm-serif); font-size: 1.7rem; font-weight: 600; line-height: 1.22; color: var(--apm-ink); }
.apm-app .apm-empty-t { margin: 12px 0 0; font-family: var(--apm-serif); font-size: 22px; font-weight: 600; color: var(--apm-ink); }
.apm-app .apm-empty-d { margin: 8px auto 0; }
.apm-app .apm-stat-num { margin: 0; font-family: var(--apm-serif); font-size: clamp(2.1rem, 5vw, 3rem); font-weight: 700; line-height: 1.1; color: var(--apm-gold-deep); }
.apm-app .apm-hero-stats p { margin: 0; font-family: var(--apm-serif); font-size: 30px; font-weight: 700; line-height: 1.1; color: var(--apm-gold-bright); }
.apm-app .apm-panel-h { margin: 0 0 20px; }
.apm-app .apm-kicker, .apm-app .apm-pub-name, .apm-app .apm-panel-h, .apm-app .apm-mini-h, .apm-app .apm-type-badge, .apm-app .apm-tag { text-transform: uppercase; }
.apm-app .apm-btn, .apm-app .apm-tag, .apm-app .apm-tab, .apm-app .apm-chip { text-decoration: none; }
.apm-app .apm-prose h2 { font-size: 1.45em; }
.apm-app .apm-prose h3 { font-size: 1.25em; }
.apm-app .apm-prose h4 { font-size: 1.1em; }
.apm-app .apm-prose p { margin: 0 0 1em; }
.apm-app .apm-prose ul { list-style: disc; }
.apm-app .apm-prose ol { list-style: decimal; }
.apm-app .apm-prose blockquote { margin: 1.2em 0; }
.apm-app img.apm-mark, .apm-app .apm-mark { border-radius: 999px; box-shadow: inset 0 0 0 1px var(--apm-line); }
.apm-app input.apm-select, .apm-app select.apm-select { max-width: 100%; margin: 0; }
.apm-app .apm-search input { margin: 0; }
.apm-app .apm-overlay { margin: 0; }
.apm-app .apm-thumb { margin: 0; border: 0; }
.apm-app .apm-embed iframe { margin: 0; }

/* ————— animacje ————— */
@keyframes apm-rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes apm-fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes apm-slidein { from { opacity: .4; transform: translateX(56px); } to { opacity: 1; transform: translateX(0); } }
@keyframes apm-flicker { 0%, 100% { opacity: .85; } 45% { opacity: 1; } 70% { opacity: .72; } }
@keyframes apm-drift { from { transform: translate3d(-4%, -2%, 0); } to { transform: translate3d(4%, 3%, 0); } }
@media (prefers-reduced-motion: reduce) {
  .apm-app *, .apm-app *::before, .apm-app *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .apm-tl-item { opacity: 1; transform: none; }
}
@media (max-width: 480px) {
  .apm-toolbar { padding: 8px 12px; gap: 6px; }
  .apm-toolbar-row { gap: 6px; }
  .apm-view { padding: 5px 10px; font-size: 11px; }
  .apm-search { min-width: 150px; }
  .apm-search input { height: 32px; padding-left: 32px; font-size: 12px; }
  .apm-search .apm-ico { left: 10px; }
  .apm-select { height: 32px; padding: 0 8px; font-size: 11px; }
  .apm-toolbar-filters { gap: 5px; }
  .apm-chip { gap: 4px; padding: 4px 8px; font-size: 10.5px; }
  .apm-clear { padding: 4px 8px; font-size: 10.5px; }
  .apm-app .apm-dr-meta { grid-template-columns: 1fr; }
  .apm-footer { padding-left: 16px; padding-right: 16px; }
}