@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-latin-wght-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-latin-ext-wght-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
:root {
  /* Violet Professional — TV Zbiorowa identity (distinct from tv-cyfrowa.eu navy/blue) */
  --navy: #302047;
  --nav: #49316b;
  --ink: #26232d;
  --title: #26232d;
  --text: #26232d;
  --strong: #26232d;
  --accent: #6d43b5;
  --accent-ink: #6436a7;
  --accent-hover: #51308a;
  --accent-soft: #f0eaf8;
  --bg: #f6f4f9;
  --surface: #ffffff;
  --muted: #635a6d;
  --line: #e0d9eb;
  --line-strong: #c9bed9;
  --control-line: #635a6d;
  --on-dark: #ffffff;
  --on-dark-muted: #f0eaf8;
  --shadow: 0 8px 24px rgba(48, 32, 71, 0.08);
  --content: 1320px;
  --sans: "Source Sans 3", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-ink); }
a:hover { color: var(--accent-hover); }
button, input { font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.skip {
  position: absolute;
  left: var(--space-2);
  top: -48px;
  background: var(--navy);
  color: var(--on-dark);
  padding: var(--space-2) var(--space-3);
  border-radius: 8px;
  z-index: 5;
}
.skip:focus { top: var(--space-2); }
.wrap { width: min(var(--content), calc(100% - 48px)); margin: 0 auto; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.icon { width: 18px; height: 18px; display: block; flex: 0 0 auto; }

.site-header { background: var(--navy); color: var(--on-dark); }
.header-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(280px, 460px) minmax(180px, 1fr);
  align-items: center;
  gap: var(--space-5);
  min-height: 76px;
}
.brand { color: inherit; text-decoration: none; justify-self: start; }
.brand small {
  display: block;
  color: var(--on-dark-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.brand strong { display: block; font-size: 1.2rem; letter-spacing: -0.03em; line-height: 1.15; }
.search-form {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  justify-self: center;
}
.search-form label, .search-page label {
  margin: 0;
  color: var(--on-dark-muted);
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1;
}
.search-field { position: relative; flex: 1 1 auto; display: flex; align-items: center; min-width: 0; }
.search-field .icon { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.search-form input, .search-page input, .consent-ghost { border-color: var(--control-line); }
.search-form input, .search-page input {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 10px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--ink);
}
.search-field input { padding-left: 38px; }
.search-page input { border: 1px solid var(--control-line); }
.search-form input:focus, .search-page input:focus { outline: 3px solid var(--accent); outline-offset: 2px; }
.langs {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}
.langs a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  text-decoration: none;
  border-radius: 9px;
  color: var(--on-dark);
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
}
.flag { width: 16px; height: 12px; display: block; flex: 0 0 auto; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35); }
.langs a:hover { background: var(--accent-hover); color: var(--on-dark); }
.langs a[aria-current="true"] { background: var(--accent); color: var(--on-dark); }

.nav-toggle {
  display: none;
  margin: 8px 0;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: var(--on-dark);
  font-weight: 700;
  cursor: pointer;
}
.site-nav { background: var(--nav); border-top: 1px solid rgba(255, 255, 255, 0.08); }
.site-nav ul { list-style: none; margin: 0; padding: 4px 0; display: flex; flex-wrap: wrap; align-items: center; }
.site-nav a {
  color: var(--on-dark);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 12px;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.25;
}
.site-nav > .wrap > ul > li > a:hover,
.site-nav > .wrap > ul > li > a[aria-current="page"] {
  background: rgba(109, 67, 181, 0.55);
  border-radius: 8px;
}
.site-nav li { position: relative; }
.site-nav .sub {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: auto;
  z-index: 25;
  width: max-content;
  max-width: min(100vw - 24px, 36rem);
  min-width: 0;
  padding: 6px 0;
  background: var(--nav);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
}
.site-nav .sub li {
  width: 100%;
}
.site-nav .sub a {
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  white-space: nowrap;
  border-radius: 0;
}
.site-nav .sub a:hover,
.site-nav .sub a[aria-current="page"] {
  background: rgba(109, 67, 181, 0.55);
}
.site-nav li:hover > .sub,
.site-nav li:focus-within > .sub { display: flex; }

.partner-banner { padding: var(--space-5) 0 0; }
.partner-banner .slides {
  position: relative;
  aspect-ratio: 1170 / 122;
}
.partner-banner a {
  position: absolute;
  inset: 0;
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  visibility: hidden;
}
.partner-banner a.is-active { visibility: visible; z-index: 1; }
.partner-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 2.6fr) minmax(240px, 1fr);
  gap: 28px;
  padding: var(--space-6) 0 var(--space-7);
}
.layout > * { min-width: 0; }
.stack { display: grid; gap: var(--space-4); }
.card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { border-color: var(--line-strong); box-shadow: 0 6px 16px rgba(48, 32, 71, 0.06); }
.card:focus-within { border-color: var(--accent); }
.card .media {
  display: block;
  background: transparent;
  border-radius: 10px;
  min-height: 0;
  overflow: hidden;
  align-self: start;
}
.card img { width: 100%; height: auto; object-fit: contain; display: block; border-radius: 10px; }
.card-copy { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; padding: 0; }
.card h2, .article-body h2, .article-body h3, h1 {
  font-family: var(--sans);
  overflow-wrap: anywhere;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.card h2 { font-size: 1.45rem; font-weight: 600; line-height: 1.28; margin: 0 0 8px; color: var(--title); }
.card h2 a, .side-list a { color: var(--title); text-decoration: none; }
.card h2 a:hover, .side-list a:hover { color: var(--accent-ink); }
.card .excerpt {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}
.card-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.3;
}
.icon-calendar { width: 14px; height: 14px; display: block; flex: 0 0 auto; }
.more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}
.more:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-hover); }
.more:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.meta { color: var(--muted); font-size: 0.84rem; margin: 0 0 6px; }
.pager { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.pager a, .pager span {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--title);
  font-weight: 600;
}
.pager a:hover { border-color: var(--accent); color: var(--accent-ink); }
.pager [aria-current="page"] { background: var(--accent); border-color: var(--accent); color: white; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: var(--space-4) var(--space-4) var(--space-2);
  box-shadow: var(--shadow);
}
.panel h2 {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 var(--space-3);
  color: var(--muted);
  font-weight: 600;
}
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { padding: 11px 0; border-top: 1px solid var(--line); }
.side-list li:first-child { border-top: 0; padding-top: 0; }
.side-list a { display: block; font-weight: 550; font-size: 0.95rem; line-height: 1.4; }
.side-list a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.side-list .meta { margin: 3px 0 0; font-size: 0.84rem; font-weight: 400; color: var(--muted); }

main h1 { font-size: 2rem; font-weight: 650; color: var(--title); margin: 0 0 var(--space-4); }
.article-sheet {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 32px;
  box-shadow: none;
}
.article-sheet > nav.meta { margin: 0 0 14px; font-size: 0.84rem; }
.article-sheet > h1 {
  font-size: clamp(1.75rem, 1.15rem + 1.5vw, 2.3rem);
  font-weight: 650;
  line-height: 1.18;
  color: var(--title);
  margin: 0 0 8px;
}
.article-sheet > p.meta { margin: 0 0 18px; font-size: 0.875rem; color: var(--muted); }
.article-body { width: 100%; max-width: none; min-width: 0; color: var(--text); font-size: 1.125rem; font-weight: 400; line-height: 1.7; }
.article-sheet { margin: 28px 0 48px; }
.page-main { margin: 28px 0 48px; }
.page-main > h1 { font-size: clamp(1.75rem, 1.15rem + 1.5vw, 2.3rem); font-weight: 650; color: var(--title); margin: 0 0 20px; letter-spacing: -0.02em; }
.lede { margin: 0 0 12px; font-size: 1.125rem; color: var(--text); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 1.4rem 0; }
.search-results { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.search-results a { font-weight: 650; text-decoration: none; }
.article-body h2 {
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--title);
  margin: 2.1rem 0 0.8rem;
  padding: 1.15rem 0 0 12px;
  border-top: 1px solid var(--line);
  box-shadow: inset 3px 0 0 var(--accent);
}
.article-body h3 { font-size: 1.3rem; font-weight: 600; line-height: 1.35; color: var(--title); margin: 1.6rem 0 0.55rem; }
.article-body p { margin: 0 0 1.15em; }
.article-body strong, .article-body b { font-weight: 600; color: var(--strong); }
.article-body p, .article-body li { overflow-wrap: anywhere; }
.article-body ul, .article-body ol { margin: 0 0 1.15em; padding-left: 1.3em; }
.article-body li { margin: 0.35em 0; }
.article-body li::marker { color: var(--accent); }
.article-body blockquote {
  margin: 1.25em 0;
  padding: 0.15em 0 0.15em 14px;
  border-left: 3px solid var(--accent);
  color: var(--strong);
}
.article-body figcaption { margin-top: 6px; color: var(--muted); font-size: 0.84rem; line-height: 1.4; }
.article-body a[href$=".pdf"] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}
.article-figure { margin: 0 0 var(--space-5); background: transparent; }
.article-figure img { width: 100%; max-width: 100%; height: auto; border-radius: 12px; }
.article-body img { width: auto; max-width: 100%; height: auto; border-radius: 12px; }
.video-hold iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 12px; }
.video-hold.is-loaded .video-fallback { display: none; }
.video-fallback { display: grid; gap: var(--space-2); padding: var(--space-4); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.table-scroll { overflow-x: auto; max-width: 100%; }
.article-body table { width: 100%; border-collapse: collapse; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; color: var(--text); }
.article-body th { background: var(--accent-soft); color: var(--title); font-weight: 600; }
.video-hold { display: grid; gap: var(--space-2); margin: var(--space-4) 0; }
.search-page { display: flex; align-items: center; gap: var(--space-3); margin: 0 0 var(--space-5); }
.search-page button {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-dark);
  font-weight: 700;
  padding: 0 14px;
  cursor: pointer;
}
.search-page button:hover { background: var(--accent-hover); }
.search-page label { color: var(--ink); }

.site-footer { background: var(--navy); color: var(--on-dark); padding: var(--space-6) 0 var(--space-4); }
.site-footer a { color: var(--on-dark); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr);
  gap: var(--space-6);
  align-items: start;
}
.site-footer h2 {
  margin: 0 0 var(--space-3);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}
.partner-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}
.partner-list a { text-decoration: none; font-weight: 650; }
.partner-list a:hover, .contact-line:hover { color: var(--on-dark-muted); }
.contact { justify-self: end; width: min(100%, 320px); display: grid; gap: var(--space-3); }
.contact-line {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 40px;
  text-decoration: none;
  font-weight: 650;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  flex-wrap: wrap;
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-bottom p { margin: 0; color: var(--on-dark-muted); font-size: 0.92rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 0 auto; }
.footer-links a { color: var(--on-dark-muted); text-decoration: none; font-weight: 650; }
.footer-links a:hover { color: var(--on-dark); }

.consent, .consent-panel {
  position: fixed;
  z-index: 40;
  left: 16px;
  right: 16px;
  bottom: 16px;
  width: min(880px, calc(100% - 32px));
  margin: 0 auto;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(48, 32, 71, 0.16);
  padding: 16px;
}
.consent h2, .consent-panel h2 { margin: 0 0 8px; font-size: 1.05rem; color: var(--navy); }
.consent p, .consent-choice { margin: 0 0 12px; color: var(--text); font-size: 0.95rem; line-height: 1.5; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.consent-actions button {
  flex: 1 1 160px;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
}
.consent-accept { background: var(--accent); color: var(--on-dark); }
.consent-accept:hover { background: var(--accent-hover); }
.consent-reject { background: var(--navy); color: var(--on-dark); }
.consent-reject:hover { background: var(--nav); }
.consent-actions button.consent-ghost { background: var(--surface); color: var(--ink); border-color: var(--control-line); }
.consent-choice { display: flex; gap: 10px; align-items: flex-start; }
.consent-choice input { width: 18px; height: 18px; margin-top: 3px; flex: 0 0 auto; }
body:has(.consent:not([hidden])) { padding-bottom: 240px; }

@media (max-width: 1080px) {
  .header-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-3);
    min-height: 0;
    padding: var(--space-3) 0;
  }
  .search-form { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .wrap { width: min(var(--content), calc(100% - 32px)); }
  .search-form label { color: var(--on-dark-muted); }
  .layout, .card, .footer-grid, .partner-list { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-nav ul { display: none; }
  .site-nav.is-open > .wrap > ul { display: flex; flex-direction: column; align-items: stretch; }
  .site-nav.is-open .sub {
    position: static;
    display: flex;
    width: 100%;
    max-width: none;
    min-width: 0;
    border: 0;
    padding: 0 0 0 12px;
    background: transparent;
    align-items: stretch;
    text-align: left;
  }
  .site-nav.is-open .sub a { white-space: normal; }
  .site-nav a { white-space: normal; }
  .contact { justify-self: start; width: 100%; }
  .card-copy { padding: 0 0 var(--space-2); }
}
@media (max-width: 560px) {
  .langs { grid-column: 1 / -1; justify-self: stretch; }
  .langs a { flex: 1 1 0; padding: 0 8px; font-size: 0.78rem; }
  .consent-actions button { flex-basis: 100%; }
  .footer-bottom { align-items: flex-start; }
  .footer-links { margin-left: 0; }
  .article-sheet { padding: 16px; }
  .article-sheet h1, .article-sheet > h1 { font-size: 1.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
