/* regulacje.ai — design system v2.0 „editorial"
   Biel, czerń, fioletowy akcent, zielone chipy. Typografia: Archivo (display) + Source Serif 4 (treść). */

:root {
  --bg: #FFFFFF;
  --bg-soft: #F6F6F4;
  --text: #111111;
  --text-muted: #575757;
  --accent: #4F52FF;
  --accent-hover: #3538E0;
  --accent-soft: #ECEDFF;
  --chip: #CFF5C2;
  --border: #E6E6E4;
  --card: #FFFFFF;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SF Mono", "Cascadia Code", "JetBrains Mono", ui-monospace, "Consolas", monospace;
  --shadow-sm: 0 1px 2px rgba(17, 17, 17, 0.05);
  --shadow-md: 0 8px 28px -10px rgba(17, 17, 17, 0.18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #fff; }

a { color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; transition: color 0.15s ease; }
a:hover { color: var(--accent-hover); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 18px;
  font-weight: 700; text-decoration: none; border-radius: 0 0 4px 0;
}
.skip-link:focus { left: 0; color: #fff; }

.container { max-width: 680px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1000px; margin: 0 auto; padding: 0 24px; }

/* ---------- Nagłówek / nawigacja ---------- */
header.site-header {
  border-bottom: 2px solid var(--text);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  max-width: 1000px; margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
}
.logo {
  font-family: var(--sans); font-weight: 900; font-size: 25px;
  color: var(--text); text-decoration: none; letter-spacing: -0.035em;
}
.logo:hover { color: var(--text); }
.logo .dot-ai { color: var(--accent); }
nav.main-nav { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
nav.main-nav a {
  font-size: 15px; font-weight: 600; color: var(--text);
  text-decoration: none; letter-spacing: 0.005em;
}
nav.main-nav a:hover { color: var(--accent); }
nav.main-nav a.nav-cta {
  background: var(--accent); color: #fff; padding: 9px 18px;
  border-radius: 4px; font-weight: 700;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
nav.main-nav a.nav-cta:hover {
  background: var(--accent-hover); color: #fff;
  transform: translateY(-1px); box-shadow: var(--shadow-md);
}

/* ---------- Hero ---------- */
.hero {
  padding: 84px 0 72px;
  border-bottom: 1px solid var(--border);
}
.hero-kicker {
  font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--text);
  text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 24px;
  display: inline-block; background: var(--chip);
  padding: 7px 13px; border-radius: 3px;
}
.hero h1 {
  font-family: var(--sans); font-size: clamp(40px, 6.6vw, 72px); font-weight: 900;
  line-height: 1.0; letter-spacing: -0.03em; margin-bottom: 26px;
  max-width: 720px;
}
.hero .subtitle {
  font-family: var(--serif);
  font-size: 20px; color: var(--text-muted); max-width: 580px; margin-bottom: 40px;
  line-height: 1.6;
}

/* ---------- Formularz newslettera ---------- */
form.newsletter-form { display: flex; gap: 10px; max-width: 500px; flex-wrap: wrap; }
form.newsletter-form input[type="email"] {
  flex: 1 1 250px; padding: 13px 16px; font-size: 16px; font-family: var(--sans);
  border: 2px solid var(--text); border-radius: 4px; background: var(--card);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
form.newsletter-form input[type="email"]::placeholder { color: #999; }
form.newsletter-form input[type="email"]:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
form.newsletter-form button {
  padding: 13px 26px; font-size: 16px; font-weight: 700; font-family: var(--sans);
  background: var(--accent); color: #fff; border: none; border-radius: 4px; cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
form.newsletter-form button:hover {
  background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-md);
}
.form-note { font-size: 14px; color: var(--text-muted); margin-top: 12px; }
.form-success {
  font-size: 16px !important; font-weight: 600; color: var(--text) !important;
  background: var(--chip); padding: 14px 18px; border-radius: 6px; max-width: 500px;
}

/* ---------- Pasek kluczowych dat ---------- */
.dates {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.dates-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.date-item {
  padding: 38px 32px 34px;
  border-left: 1px solid var(--border);
}
.date-item:first-child { border-left: none; }
.date-num {
  font-family: var(--mono); font-size: clamp(24px, 2.8vw, 33px); font-weight: 700;
  color: var(--accent); letter-spacing: -0.01em; display: block;
}
.date-item h3 {
  font-family: var(--sans); font-size: 13px; font-weight: 800; color: var(--text);
  text-transform: uppercase; letter-spacing: 0.09em; margin: 12px 0 10px;
}
.date-item p { font-size: 15px; color: var(--text-muted); line-height: 1.6; }

@media (max-width: 860px) {
  .dates-grid { grid-template-columns: 1fr; }
  .date-item { border-left: none; border-top: 1px solid var(--border); padding: 28px 32px 26px; }
  .date-item:first-child { border-top: none; }
}

/* ---------- Sekcje ---------- */
.section-title {
  font-family: var(--sans); font-size: 26px; font-weight: 800; margin-bottom: 8px;
  letter-spacing: -0.015em; text-transform: uppercase;
}
.section-title::after {
  content: ""; display: block; width: 52px; height: 4px;
  background: var(--accent); margin-top: 10px;
}

/* ---------- Feed briefów ---------- */
.feed { padding: 60px 0 64px; }
.feed .section-title { margin-bottom: 28px; }
.feed-item { padding: 26px 0; border-bottom: 1px solid var(--border); }
.feed-item:first-of-type { border-top: 2px solid var(--text); }
.feed-meta {
  font-family: var(--mono); font-size: 12.5px; color: var(--accent); margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600;
}
.feed-item h3 {
  font-family: var(--sans); font-size: 24px; font-weight: 800;
  line-height: 1.22; margin-bottom: 10px; letter-spacing: -0.018em;
}
.feed-item h3 a { color: var(--text); text-decoration: none; transition: color 0.15s ease; }
.feed-item h3 a:hover { color: var(--accent); }
.feed-item .lead { font-family: var(--serif); font-size: 17px; color: var(--text-muted); line-height: 1.6; }
.feed-more { margin-top: 26px; font-weight: 700; font-size: 16px; }
.feed-more a { text-decoration: none; }
.feed-more a:hover { text-decoration: underline; }
.feed-empty {
  border: 1px dashed #CCC; border-radius: 6px; padding: 30px 28px;
  color: var(--text-muted); font-size: 16.5px; background: var(--bg-soft);
  line-height: 1.65;
}

/* ---------- Sekcja o autorze (skrót) ---------- */
.author-blurb { padding: 8px 0 64px; }
.author-blurb .section-title { margin-bottom: 24px; }
.author-blurb blockquote {
  border-left: 4px solid var(--accent); padding: 6px 0 6px 24px;
  font-family: var(--serif);
  font-size: 18px; color: var(--text); line-height: 1.7;
}
.author-blurb blockquote strong { font-family: var(--sans); font-weight: 800; }
.author-blurb blockquote a { font-weight: 600; text-decoration: none; }
.author-blurb blockquote a:hover { text-decoration: underline; }

/* ---------- Zamknięcie CTA ---------- */
.closing-cta {
  background: var(--text); color: #fff; padding: 64px 0;
}
.closing-cta h2 {
  font-family: var(--sans); font-size: clamp(28px, 4vw, 38px); font-weight: 900;
  margin-bottom: 10px; letter-spacing: -0.025em;
}
.closing-cta p { color: rgba(255, 255, 255, 0.7); margin-bottom: 28px; font-size: 17px; }
.closing-cta form.newsletter-form input[type="email"] { border-color: transparent; }
.closing-cta form.newsletter-form input[type="email"]:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}
.closing-cta .form-note { color: rgba(255, 255, 255, 0.6); }

/* ---------- Treść artykułu / stron statycznych ---------- */
article.prose, .prose { padding: 60px 0 80px; }
.prose h1 {
  font-family: var(--sans); font-size: clamp(32px, 5vw, 46px); font-weight: 900;
  line-height: 1.08; margin-bottom: 18px; letter-spacing: -0.028em;
}
.prose h2 {
  font-family: var(--sans); font-size: 25px; font-weight: 800;
  margin: 44px 0 16px; letter-spacing: -0.018em;
}
.prose h3 { font-family: var(--sans); font-size: 19px; font-weight: 700; margin: 32px 0 10px; }
.prose p, .prose ul, .prose ol { font-family: var(--serif); font-size: 19px; line-height: 1.7; margin-bottom: 20px; }
.prose ul, .prose ol { padding-left: 26px; }
.prose li { margin-bottom: 10px; }
.prose li::marker { color: var(--accent); }
.prose strong { font-weight: 700; }
.prose .article-meta {
  font-family: var(--mono); font-size: 12.5px; color: var(--accent); margin-bottom: 14px;
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600;
}
.prose .article-lead {
  font-family: var(--serif); font-size: 22px; color: var(--text-muted);
  margin-bottom: 32px; line-height: 1.55;
}

.summary-box {
  background: var(--accent-soft); border: none; border-left: 4px solid var(--accent);
  border-radius: 6px; padding: 24px 28px; margin: 32px 0;
}
.summary-box h2 {
  font-family: var(--sans); font-size: 13px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.09em; margin: 0 0 14px; color: var(--accent);
}
.summary-box ul { font-family: var(--sans); font-size: 15.5px; margin-bottom: 0; line-height: 1.6; }
.summary-box li { margin-bottom: 10px; }
.summary-box li:last-child { margin-bottom: 0; }

/* ---------- Diagramy ---------- */
figure.diagram {
  /* wyłamanie z kolumny tekstu: szerokość do 980px, wyśrodkowane w oknie */
  position: relative; left: 50%; transform: translateX(-50%);
  width: min(94vw, 980px);
  margin: 40px 0; padding: 32px 28px 22px;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 6px;
  overflow-x: auto; cursor: zoom-in;
}
figure.diagram svg { width: 100%; height: auto; display: block; min-width: 560px; }
figure.diagram figcaption {
  font-family: var(--mono); font-size: 12.5px; color: var(--text-muted);
  margin-top: 16px; text-transform: uppercase; letter-spacing: 0.06em;
}
figure.diagram figcaption::after {
  content: " · kliknij, aby powiększyć";
  color: var(--accent);
}

/* pełnoekranowy podgląd diagramu */
.diagram-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(255, 255, 255, 0.98);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px; padding: 4vh 3vw; cursor: zoom-out;
}
.diagram-overlay svg { width: min(96vw, 1700px); height: auto; max-height: 86vh; }
.diagram-overlay figcaption {
  font-family: var(--mono); font-size: 13px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em; text-align: center;
}
.diagram-overlay figcaption::after { content: " · esc lub kliknij, aby zamknąć"; color: var(--accent); }

.ops-section {
  border-top: 4px solid var(--accent); margin-top: 48px; padding-top: 8px;
}
.article-cta {
  margin-top: 40px; padding: 24px 28px; background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: 6px;
  font-family: var(--sans) !important; font-size: 16.5px !important;
}
.article-cta a { font-weight: 700; }
.author-footer {
  margin-top: 40px; font-family: var(--sans) !important; font-size: 15px !important;
  color: var(--text-muted);
  border-top: 1px solid var(--border); padding-top: 20px;
}
.post-nav {
  display: flex; justify-content: space-between; gap: 16px; margin-top: 32px;
  font-family: var(--sans); font-size: 15.5px;
}
.post-nav a { text-decoration: none; font-weight: 600; }
.post-nav a:hover { text-decoration: underline; }

/* ---------- Archiwum ---------- */
.archive-year {
  font-family: var(--mono) !important; font-size: 14px !important; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent) !important;
  margin: 40px 0 12px !important;
}
ul.archive-list { list-style: none; padding: 0 !important; font-family: var(--sans) !important; }
ul.archive-list li {
  padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 17px;
  display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 0 !important;
}
ul.archive-list time { font-family: var(--mono); color: var(--text-muted); font-size: 13px !important; min-width: 110px; padding-top: 3px; }
ul.archive-list a { text-decoration: none; font-weight: 600; }
ul.archive-list a:hover { text-decoration: underline; }

/* ---------- FAQ (accordion) ---------- */
details.faq {
  border: 1px solid var(--border); border-radius: 6px; background: var(--card);
  padding: 18px 22px; margin-bottom: 12px;
}
details.faq summary { font-weight: 700; cursor: pointer; font-size: 17px; font-family: var(--sans); }
details.faq summary::marker { color: var(--accent); }
details.faq p { margin-top: 12px; font-size: 16px !important; color: var(--text-muted); font-family: var(--sans) !important; margin-bottom: 0 !important; }

/* ---------- Stopka ---------- */
footer.site-footer {
  border-top: 2px solid var(--text); background: var(--bg);
  padding: 40px 0 48px; margin-top: 0;
  font-size: 15px; color: var(--text-muted);
}
.footer-inner {
  max-width: 1000px; margin: 0 auto; padding: 0 24px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-nav a { color: var(--text); text-decoration: none; font-weight: 500; }
.footer-nav a:hover { color: var(--accent); }
.footer-disclosure {
  max-width: 1000px; margin: 18px auto 0; padding: 0 24px;
  font-size: 13.5px; color: #8A8A8A; line-height: 1.6;
}

@media (max-width: 560px) {
  .hero { padding: 56px 0 44px; }
  nav.main-nav { gap: 16px; }
  .closing-cta { padding: 48px 0; }
}

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

/* ===== Samoocena AI Act (v1.0) ===== */
.so-btn {
  font-family: var(--sans); font-weight: 700; font-size: 16px;
  background: var(--accent); color: #fff; border: 2px solid var(--accent);
  padding: 12px 24px; cursor: pointer; text-decoration: none; display: inline-block;
}
.so-btn:hover { background: #3a3de0; border-color: #3a3de0; }
.so-btn:disabled { opacity: .6; cursor: wait; }
.so-btn-duzy { font-size: 19px; padding: 16px 32px; }
.so-btn-sec {
  font-family: var(--sans); font-weight: 600; font-size: 16px;
  background: #fff; color: var(--ink); border: 2px solid var(--ink);
  padding: 12px 24px; cursor: pointer; text-decoration: none; display: inline-block;
}
.so-btn-sec:hover { background: var(--ink); color: #fff; }
.so-progress { height: 6px; background: #ECECEA; margin-top: 8px; }
.so-progress-bar { height: 100%; background: var(--accent); transition: width .3s; }
.so-progress-label { font-family: var(--mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 8px 0 24px; }
.so-kicker { font-family: var(--mono); font-size: 13px; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 4px; }
.so-h { font-family: var(--sans); font-weight: 800; font-size: clamp(26px, 4vw, 34px); line-height: 1.15; margin: 0 0 8px; }
.so-h3 { font-family: var(--sans); font-weight: 700; font-size: 20px; margin: 32px 0 8px; }
.so-opis { font-size: 18px; color: var(--muted); margin: 0 0 28px; }
.so-pytanie { border: 1px solid #DEDEDC; padding: 20px 22px; margin: 0 0 18px; }
.so-pytanie legend { font-family: var(--sans); font-weight: 600; font-size: 17px; line-height: 1.4; padding: 0 6px; }
.so-odp { display: flex; gap: 10px; align-items: baseline; font-family: var(--sans); font-size: 16px; padding: 7px 4px; cursor: pointer; }
.so-odp:hover { background: #F6F6F4; }
.so-odp input { accent-color: var(--accent); }
.so-nav { display: flex; gap: 12px; justify-content: space-between; margin: 28px 0; flex-wrap: wrap; }
.so-nav .so-btn:only-child { margin-left: auto; }
.so-err { font-family: var(--sans); color: #C0182B; font-weight: 600; }
.so-field { display: block; font-family: var(--sans); font-weight: 600; font-size: 15px; margin: 0 0 16px; }
.so-field input { display: block; width: 100%; max-width: 460px; font-size: 17px; padding: 11px 12px; border: 2px solid var(--ink); margin-top: 6px; font-family: var(--sans); }
.so-field input:focus { outline: 3px solid var(--accent); outline-offset: 1px; }
.so-zgoda { display: flex; gap: 10px; align-items: baseline; font-family: var(--sans); font-size: 14px; color: var(--muted); max-width: 560px; margin: 18px 0; }
.so-wykres { margin: 24px 0 8px; }
.so-bar-row { display: grid; grid-template-columns: minmax(140px, 260px) 1fr 48px; gap: 12px; align-items: center; margin: 0 0 10px; font-family: var(--sans); font-size: 14px; }
.so-bar-label { line-height: 1.25; }
.so-bar-track { height: 14px; background: #ECECEA; }
.so-bar-fill { height: 100%; background: var(--accent); }
.so-bar-val { font-family: var(--mono); font-size: 13px; text-align: right; }
.so-lista li { margin: 0 0 10px; font-size: 17px; }
.so-note { font-family: var(--sans); font-size: 15px; color: var(--muted); }
.so-stopka-raport { font-family: var(--mono); font-size: 12px; color: var(--muted); border-top: 1px solid #DEDEDC; padding-top: 14px; margin-top: 32px; }
.so-akcje { justify-content: flex-start; }
@media (max-width: 560px) { .so-bar-row { grid-template-columns: 1fr 56px; } .so-bar-label { grid-column: 1 / -1; margin-bottom: -4px; } }

/* Druk raportu samooceny (Pobierz PDF = window.print) */
@media print {
  .site-header, .site-footer, .so-akcje, .so-note:last-child, .skip-link { display: none !important; }
  body { background: #fff; }
  #so-raport { display: block; }
  #so-raport .so-bar-fill { background: #4F52FF !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #so-raport .so-bar-track { background: #ECECEA !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #so-raport::before { content: "regulacje.ai — samoocena AI Act"; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #4F52FF; display: block; margin-bottom: 16px; }
}
