:root {
  --primary: #1a5276;
  --secondary: #2e86c1;
  --accent: #e74c3c;
  --bg: #fafafa;
  --text: #2c3e50;
  --border: #ddd;
  --za: #27ae60;
  --przeciw: #e74c3c;
  --wstrzym: #f39c12;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--text); background: var(--bg); line-height: 1.7; }
.container { max-width: 960px; margin: 0 auto; padding: 0 1.5rem; }
.container--wide { max-width: none; width: 100%; margin: 0; padding-left: 1rem; padding-right: 1rem; }
a { color: var(--secondary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.3; margin-bottom: 0.5em; }

/* Header */
.site-header { background: var(--primary); color: #fff; padding: 1rem 0; margin-bottom: 2rem; }
.site-header a { color: #fff; }
.site-title { font-size: 1.3rem; margin-bottom: 0.5rem; }
.site-title a:hover { text-decoration: none; opacity: 0.9; }
.main-nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; font-size: 0.9rem; }
.main-nav a { opacity: 0.85; }
.main-nav a:hover { opacity: 1; text-decoration: underline; }

/* Site search */
.site-search { margin-top: 0.5rem; position: relative; max-width: 340px; }
.site-search input { width: 100%; padding: 0.4rem 0.7rem; border: none; border-radius: 5px; font-size: 0.9rem; background: rgba(255,255,255,0.15); color: #fff; }
.site-search input::placeholder { color: rgba(255,255,255,0.6); }
.site-search input:focus { background: #fff; color: var(--text); outline: none; }
.search-results { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid var(--border); border-radius: 0 0 8px 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.12); z-index: 100; max-height: 60vh; overflow-y: auto; }
.search-results a { display: block; padding: 0.6rem 0.8rem; color: var(--text); border-bottom: 1px solid #f0f0f0; font-size: 0.9rem; text-decoration: none; }
.search-results a:hover { background: #f4f8fb; }
.search-results small { color: #888; margin-left: 0.4rem; }
.sr-type { display: inline-block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; padding: 0.1em 0.4em; border-radius: 3px; background: var(--secondary); color: #fff; margin-right: 0.3rem; vertical-align: middle; }
.sr-empty { display: block; padding: 0.8rem; color: #888; font-size: 0.9rem; }

/* Footer */
.site-footer { margin-top: 3rem; padding: 1.5rem 0; border-top: 1px solid var(--border); font-size: 0.85rem; color: #666; text-align: center; }

/* Badges and tags */
.badge { display: inline-block; padding: 0.15em 0.6em; border-radius: 3px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.dokument-typ { background: var(--secondary); color: #fff; }
.badge-wpf { background: #fef3c7; color: #92400e; margin-left: 0.35rem; }
.badge-rio { background: #fee2e2; color: #991b1b; margin-left: 0.35rem; }
.tag { display: inline-block; padding: 0.1em 0.5em; margin: 0.15em; border-radius: 3px; font-size: 0.8rem; }
.tag-region { background: #d5f5e3; color: #1e8449; }
.tag-osoba { background: #d6eaf8; color: #1a5276; }
.tag-duplicate { background: #fdebd0; color: #9c640c; }
.tag-wpf { background: #fef3c7; color: #92400e; }
.tag-rio { background: #fee2e2; color: #991b1b; }

/* Document page */
.dokument-header, .sesja-header { margin-bottom: 1.5rem; }
.dokument-header h2, .sesja-header h2 { font-size: 1.5rem; margin-top: 0.5rem; }
.meta { color: #666; font-size: 0.9rem; display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.3rem; }
.tagi, .osoby, .zrodlo, .zalaczniki { margin: 0.5rem 0; }
.zalaczniki ul { list-style: none; padding-left: 0; }
.zalaczniki li::before { content: "📎 "; }
.tresc { margin-top: 1.5rem; }
.tresc h3 { margin-top: 1.5rem; }
.tresc p { margin-bottom: 1em; }
.tresc ul, .tresc ol { margin-bottom: 1em; padding-left: 1.5em; }
.tresc .table-scroll { margin: 1rem 0; overflow-x: auto; }
.tresc table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); border-radius: 8px; }
.tresc th,
.tresc td { padding: 0.8rem 0.9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.tresc thead th { background: #f4f8fb; color: var(--primary); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.tresc tbody tr:nth-child(even) { background: #fcfcfc; }
.tresc tbody tr:hover { background: #f8fbfe; }
.tresc tbody tr:last-child td { border-bottom: none; }
.tresc .table-scroll table { min-width: 42rem; margin: 0; }
.attachment-ocr { margin: 1rem 0; border: 1px solid var(--border); border-radius: 8px; background: #fff; overflow: hidden; }
.attachment-ocr summary { cursor: pointer; padding: 0.85rem 1rem; font-weight: 600; color: var(--primary); background: #f7fbff; }
.attachment-ocr[open] summary { border-bottom: 1px solid var(--border); }
.attachment-source { margin: 0.85rem 1rem 0 1rem; font-size: 0.9rem; color: #667; }
.ocr-text { margin: 0.85rem 1rem 1rem 1rem; padding: 1rem; border-radius: 6px; background: #fcfcfc; border: 1px solid #eef2f5; word-break: break-word; font-size: 0.96rem; line-height: 1.7; }
.ocr-text p:last-child { margin-bottom: 0; }
.ocr-document, .ocr-transcript { background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%); }
.ocr-page { padding: 0.35rem 1rem 1rem 1rem; border-top: 1px solid #eef2f5; }
.ocr-page:first-child { border-top: none; }
.ocr-page-title { margin: 0.9rem 0 0.8rem 0; color: #667; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.ocr-paragraph { margin-bottom: 0.85rem; scroll-margin-top: 6rem; }
.ocr-entry { margin-bottom: 0.95rem; scroll-margin-top: 6rem; }
.ocr-anchor { display: inline-flex; align-items: baseline; gap: 0.3rem; margin-right: 0.45rem; color: var(--primary); font-weight: 700; text-decoration: none; }
.ocr-anchor:hover { text-decoration: underline; }
.ocr-anchor time { font-variant-numeric: tabular-nums; }

/* Transcript semantic structure */
.speech { margin-bottom: 0.95rem; scroll-margin-top: 6rem; padding: 0.4rem 0.6rem; border-left: 3px solid transparent; border-radius: 4px; transition: background 0.2s; }
.speech:target { background: #fef9e7; border-left-color: var(--accent); }
.speech.highlight { background: #fffde7; }
.speech.hidden { display: none; }
.speech p { display: inline; margin: 0; }
.transcript-block { margin: 1.5rem 0 0.5rem 0; padding: 0.4rem 0; border-bottom: 1px solid var(--border); color: var(--secondary); font-size: 0.9rem; scroll-margin-top: 5rem; }
.transcript-block.hidden { display: none; }
.transcript-block a { color: inherit; }

/* Transcript toolbar */
.transcript-toolbar { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1rem; padding: 0.6rem 0; }
#transcript-search { flex: 1; max-width: 400px; padding: 0.5rem 0.8rem; border: 1px solid var(--border); border-radius: 6px; font-size: 0.95rem; }
#transcript-search:focus { outline: none; border-color: var(--secondary); box-shadow: 0 0 0 2px rgba(46, 134, 193, 0.15); }
#transcript-search-count { font-size: 0.85rem; color: #666; white-space: nowrap; }

/* Block navigation */
.transcript-block-nav { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-bottom: 1rem; font-size: 0.85rem; }
.transcript-block-nav strong { margin-right: 0.3rem; }
.transcript-block-nav a { padding: 0.2rem 0.6rem; border: 1px solid var(--border); border-radius: 4px; background: #fff; color: var(--secondary); white-space: nowrap; }
.transcript-block-nav a:hover { background: #eef6fb; text-decoration: none; }

/* Video sync links */
.video-sync-link { display: inline-flex; align-items: center; justify-content: center; width: 1.3rem; height: 1.3rem; margin-left: 0.3rem; font-size: 0.65rem; color: var(--secondary); border: 1px solid var(--border); border-radius: 50%; text-decoration: none; vertical-align: middle; }
.video-sync-link:hover { background: var(--secondary); color: #fff; text-decoration: none; }

/* AI-generated content note */
.ai-generated-note { margin: 1rem 0; border: 1px solid #fdebd0; border-radius: 8px; background: #fef9e7; }
.ai-generated-note summary { cursor: pointer; padding: 0.7rem 1rem; font-weight: 600; color: #935116; }
.ai-generated-note[open] summary { border-bottom: 1px solid #fdebd0; }
.ai-generated-note > :not(summary) { padding: 0 1rem; }

/* Transcript embed on session page */
.transcript-embed { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.transcript-load-btn { padding: 0.6rem 1.5rem; border: 2px solid var(--primary); border-radius: 6px; background: #fff; color: var(--primary); font-weight: 600; font-size: 0.95rem; cursor: pointer; }
.transcript-load-btn:hover { background: var(--primary); color: #fff; }
.transcript-load-btn:disabled { opacity: 0.6; cursor: wait; }

/* Radny page */
.radny-header { display: flex; gap: 1.5rem; align-items: center; margin-bottom: 1.5rem; }
.radny-foto { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid var(--border); }
.komisje { color: #666; font-size: 0.9rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; margin: 1rem 0; }
.stat { padding: 1rem; border-radius: 8px; text-align: center; border: 1px solid var(--border); background: #fff; }
.stat-label { display: block; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.3rem; }
.stat-value { font-size: 1.8rem; font-weight: 700; display: block; }
.stat-pct { font-size: 0.85rem; color: #666; }
.stat.za .stat-value { color: var(--za); }
.stat.przeciw .stat-value { color: var(--przeciw); }
.stat.wstrzym .stat-value { color: var(--wstrzym); }

/* Index/listing pages */
.listing { margin-top: 1rem; }
.listing-item { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.listing-item:last-child { border-bottom: none; }
.listing-item h3 { font-size: 1.1rem; margin-bottom: 0.3rem; }
.listing-item .meta { font-size: 0.8rem; }
.listing-item .teaser { color: #555; font-size: 0.9rem; margin-top: 0.3rem; }
.listing-special-tags { display: flex; gap: 0.35rem; align-items: center; flex-wrap: wrap; }
.listing-duplicate-note { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.transcript-listing-item p:last-child { margin-top: 0.45rem; }

/* Radni table */
.radni-table-wrap { margin-top: 1.5rem; overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: 8px; }
.radni-table { width: 100%; border-collapse: collapse; min-width: 820px; }
.radni-table th,
.radni-table td { padding: 0.9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.radni-table thead th { position: sticky; top: 0; background: #f4f8fb; color: var(--primary); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; z-index: 1; }
.radni-table tbody tr:nth-child(even) { background: #fcfcfc; }
.radni-table tbody tr:hover { background: #f8fbfe; }
.radni-table td strong { color: var(--text); }
.radny-row-summary { cursor: pointer; }
.radny-row-summary[aria-expanded="true"] { background: #eef6fb; }
.radny-row-subtitle { margin-top: 0.2rem; color: #667; font-size: 0.85rem; }
.radny-toggle { padding: 0.4rem 0.75rem; border: 1px solid var(--secondary); border-radius: 999px; background: #fff; color: var(--secondary); font-weight: 600; cursor: pointer; }
.radny-toggle:hover { background: #f0f7fc; }
.radny-row-details td { background: #fbfdff; }
.radny-details-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.radny-detail-box { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 1rem; }
.radny-detail-box h3 { font-size: 1rem; margin-bottom: 0.75rem; }
.radny-detail-box-wide { grid-column: 1 / -1; }
.radny-meta-list { display: grid; gap: 0.75rem; }
.radny-meta-list dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: #667; margin-bottom: 0.15rem; }
.radny-meta-list dd { margin: 0; }
.radny-stats-inline { display: grid; gap: 0.2rem; font-size: 0.9rem; }
.radny-topics-list { margin: 0; padding-left: 1.2rem; }
.radny-topics-list li { margin-bottom: 0.35rem; }

/* Radni analysis pages */
.analysis-page { display: grid; gap: 1.5rem; }
.analysis-hero { padding: 1.4rem; border: 1px solid #d8e3f0; border-radius: 12px; background: linear-gradient(180deg, #f8fbfe 0%, #ffffff 100%); }
.analysis-kicker { margin: 0 0 0.35rem 0; color: var(--secondary); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.analysis-hub { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1.25rem 0 0.5rem 0; }
.analysis-link-card { padding: 1.1rem 1.15rem; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.analysis-link-card h3 { margin-bottom: 0.45rem; font-size: 1.05rem; }
.analysis-link-card p:last-child { margin-bottom: 0; }
.analysis-legend { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.analysis-pill { display: inline-flex; align-items: center; padding: 0.3rem 0.75rem; border-radius: 999px; font-size: 0.82rem; font-weight: 700; }
.analysis-pill-za { background: #dcfce7; color: #166534; }
.analysis-pill-przeciw { background: #fee2e2; color: #991b1b; }
.analysis-pill-wstrzym { background: #fef3c7; color: #92400e; }
.analysis-pill-neutral { background: #f3f4f6; color: #6b7280; }
.analysis-pill-rada { background: #dbeafe; color: #1d4ed8; }
.analysis-pill-wojt { background: #fee2e2; color: #b91c1c; }
.analysis-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.analysis-stat-card { padding: 1rem; border: 1px solid var(--border); border-radius: 10px; background: #fff; text-align: center; }
.analysis-stat-card strong { display: block; font-size: 1.8rem; line-height: 1.1; color: var(--primary); }
.analysis-stat-card span { display: block; margin-top: 0.35rem; font-size: 0.88rem; color: #667; }
.analysis-callout { padding: 1rem 1.1rem; border-left: 4px solid var(--secondary); border-radius: 0 10px 10px 0; background: #eff6ff; }
.analysis-callout h3 { margin-bottom: 0.35rem; color: var(--primary); }
.analysis-section { display: grid; gap: 0.9rem; }
.analysis-details { border: 1px solid var(--border); border-radius: 10px; background: #fff; overflow: hidden; }
.analysis-details summary { display: grid; grid-template-columns: 7rem 8rem 1fr; gap: 0.8rem; align-items: center; padding: 0.95rem 1rem; cursor: pointer; list-style: none; }
.analysis-details summary::-webkit-details-marker { display: none; }
.analysis-details[open] summary { border-bottom: 1px solid var(--border); background: #f9fcfe; }
.analysis-details-body { padding: 1rem; display: grid; gap: 0.9rem; }
.analysis-item { padding: 0.95rem 1rem; border: 1px solid #eef2f5; border-radius: 8px; background: #fcfdff; }
.analysis-item h4 { margin-bottom: 0.45rem; }
.analysis-item p:last-child, .analysis-item ul:last-child { margin-bottom: 0; }
.analysis-item ul { padding-left: 1.25rem; }
.analysis-tag-row { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-bottom: 0.55rem; }
.analysis-tag { display: inline-flex; align-items: center; padding: 0.2rem 0.55rem; border-radius: 999px; background: #eef6fb; color: var(--primary); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.analysis-result { display: inline-flex; align-items: center; padding: 0.2rem 0.55rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; }
.analysis-result-pass { background: #dcfce7; color: #166534; }
.analysis-result-fail { background: #fee2e2; color: #991b1b; }
.analysis-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.analysis-summary-card { padding: 1rem 1.05rem; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.analysis-summary-card ul { padding-left: 1.25rem; margin-top: 0.7rem; }
.analysis-source-note { color: #667; font-size: 0.88rem; }

/* Session page extras */
.porzadek { margin: 1.5rem 0; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 1.2rem; }
.porzadek h3 { margin-bottom: 0.8rem; }
.porzadek ol { padding-left: 1.5em; }
.porzadek li { margin-bottom: 0.3rem; }
.transkrypcja-link { margin-top: 2rem; padding: 0.9rem 1rem; border: 1px solid var(--border); border-radius: 8px; background: #f8fbfd; }
.transkrypcja-link p { margin: 0; color: var(--text); }
.transkrypcja-link a { color: var(--secondary); font-weight: 600; }
.transkrypcja-link a:hover { text-decoration: underline; }

/* FB posts */
.fb-author-badge { display: inline-block; padding: 0.15em 0.6em; border-radius: 3px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.5px; }
.fb-author-badge.wojt { background: #1a5276; color: #fff; }
.fb-author-badge.radny { background: #27ae60; color: #fff; }
.fb-author-badge.gmina { background: #8e44ad; color: #fff; }
.fb-reactions { display: flex; gap: 1.2rem; margin: 0.8rem 0; font-size: 0.85rem; color: #666; }
.fb-reactions span::before { margin-right: 0.2em; }
.fb-topics { margin: 0.5rem 0; }
.tag-topic { background: #fdebd0; color: #935116; }
.tag-mention { background: #f5b7b1; color: #922b21; }
.fb-relevance { display: inline-block; padding: 0.15em 0.5em; border-radius: 3px; font-size: 0.7rem; font-weight: 700; }
.fb-relevance.high { background: #e74c3c; color: #fff; }
.fb-relevance.medium { background: #f39c12; color: #fff; }
.fb-relevance.low { background: #bdc3c7; color: #2c3e50; }
.fb-timeline-item { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.fb-timeline-item:last-child { border-bottom: none; }
.fb-post-text { white-space: pre-wrap; line-height: 1.6; }
.fb-source-link { display: inline-block; margin-top: 0.5rem; color: #3b5998; font-size: 0.85rem; }
.fb-filter-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.fb-filter-btn { padding: 0.3rem 0.8rem; border: 1px solid var(--border); border-radius: 20px; background: #fff; cursor: pointer; font-size: 0.8rem; }
.fb-filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* AI context page */
.ai-context { font-size: 0.9rem; }
.ai-context pre { background: #f4f4f4; padding: 1rem; overflow-x: auto; border-radius: 5px; }

/* Search/filter */
.search-box { width: 100%; padding: 0.6rem 1rem; border: 1px solid var(--border); border-radius: 5px; font-size: 1rem; margin-bottom: 1rem; }

/* Spatial planning landing page */
.planowanie-intro { display: grid; gap: 1rem; margin: 1.25rem 0 1.75rem 0; }
.planowanie-note { padding: 1rem 1.1rem; border: 1px solid #d7e6f2; border-radius: 10px; background: linear-gradient(180deg, #f7fbfe 0%, #ffffff 100%); }
.planowanie-steps { margin: 0.8rem 0 0 1.15rem; display: grid; gap: 0.35rem; }
.planowanie-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin: 1.25rem 0 1.75rem 0; }
.planowanie-card { display: flex; flex-direction: column; gap: 0.45rem; padding: 1rem 1.05rem; border: 1px solid var(--border); border-radius: 10px; background: #fff; scroll-margin-top: 5rem; }
.planowanie-kicker { margin: 0 0 0.35rem 0; color: var(--secondary); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.planowanie-purpose { padding: 0.75rem 0.8rem; border-radius: 8px; background: #f7fbfe; color: #38586c; font-size: 0.92rem; }
.planowanie-purpose strong { color: var(--primary); }
.planowanie-links { display: grid; gap: 0.6rem; margin-top: auto; padding-top: 0.45rem; }
.planowanie-link-item { padding: 0.75rem 0.8rem; border: 1px solid #e6edf3; border-radius: 8px; background: #fcfdff; }
.planowanie-link-item a { display: inline-block; font-weight: 700; }
.planowanie-link-note { margin-top: 0.3rem; font-size: 0.88rem; color: #5f7483; }
.planowanie-list { margin: 1.5rem 0; padding: 1rem 1.1rem; border: 1px solid #e6edf3; border-radius: 10px; background: #fcfdff; }
.planowanie-list ul { margin: 0.8rem 0 0 0; padding-left: 1.2rem; }
.planowanie-list li { margin-bottom: 0.4rem; }
.planowanie-directory { margin: 1.5rem 0 1.25rem 0; padding: 1rem 1.1rem; border: 1px solid #d8e3f0; border-radius: 12px; background: linear-gradient(180deg, #f8fbfe 0%, #ffffff 100%); }
.planowanie-directory-links { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.95rem; }
.planowanie-directory-links a { display: inline-flex; align-items: center; padding: 0.45rem 0.8rem; border: 1px solid #cfe1ee; border-radius: 999px; background: #fff; color: var(--primary); font-size: 0.88rem; font-weight: 700; }
.planowanie-directory-links a:hover { text-decoration: none; background: #eef6fb; }
.planowanie-cluster { margin: 2rem 0 2.25rem 0; }
.planowanie-cluster-heading { display: grid; gap: 0.35rem; margin-bottom: 0.95rem; }
.planowanie-cluster-heading p:last-child { color: #5f7483; max-width: 52rem; }

/* Timeline for planowanie przestrzenne */
.pp-timeline { position: relative; padding-left: 1.5rem; border-left: 3px solid #d8e3f0; margin: 0.5rem 0 1.5rem 0.6rem; }
.pp-timeline-item { position: relative; padding: 0.6rem 0 1.2rem 0; }
.pp-timeline-item:last-child { padding-bottom: 0; }
.pp-timeline-item::before { content: ''; position: absolute; left: -1.72rem; top: 0.85rem; width: 10px; height: 10px; border-radius: 50%; background: #b0c8d8; border: 2px solid #fff; }
.pp-timeline-item--highlight::before { background: var(--primary); width: 12px; height: 12px; left: -1.78rem; }
.pp-timeline-date { font-size: 0.78rem; font-weight: 700; color: var(--secondary); letter-spacing: 0.04em; }
.pp-timeline-body { margin-top: 0.2rem; }
.pp-timeline-body strong { display: block; margin-bottom: 0.25rem; }
.pp-timeline-body p { margin: 0 0 0.3rem 0; font-size: 0.92rem; color: #486273; }
.pp-timeline-body a { font-size: 0.88rem; }

/* Search controls for planowanie */
.pp-search-controls { margin-bottom: 1rem; }
.pp-search-filters { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.5rem; }
.pp-search-filters select { padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: 5px; font-size: 0.92rem; background: #fff; }
.pp-search-count { margin-top: 0.5rem; font-size: 0.85rem; color: #5f7483; }

/* Budget grid prototype */
.budget-grid-prototype { margin: 1.5rem 0 2rem 0; padding: 1.25rem; border: 1px solid #cfe1ee; border-radius: 12px; background: linear-gradient(180deg, #f8fbfe 0%, #ffffff 100%); }
.budget-grid-prototype__intro p { margin-bottom: 0; color: #486273; }
.budget-grid-prototype__status { margin-top: 0.9rem; padding: 0.8rem 0.9rem; border-radius: 8px; background: #eef6fb; color: var(--primary); font-size: 0.95rem; }
.budget-grid-prototype__status.is-ready { background: #edf8f1; color: #1e8449; }
.budget-grid-prototype__status.is-error { background: #fdf0ee; color: #922b21; }
.budget-grid-prototype__panels { display: grid; gap: 1rem; margin-top: 1rem; }
.budget-grid-prototype__panel { border: 1px solid var(--border); border-radius: 10px; background: #fff; overflow: hidden; }
.budget-grid-prototype__panel header { padding: 0.95rem 1rem 0.7rem 1rem; border-bottom: 1px solid #edf1f4; }
.budget-grid-prototype__panel header p { margin: 0.3rem 0 0 0; color: #667; font-size: 0.92rem; }
.budget-grid-prototype__host { padding: 1rem; overflow-x: auto; }
.budget-grid-prototype__table { min-width: 100%; }
.budget-grid-prototype .gridjs-container { font-family: inherit; color: var(--text); min-width: 840px; }
.budget-grid-prototype .gridjs-head { box-shadow: none; }
.budget-grid-prototype .gridjs-search { float: none; margin-bottom: 0.9rem; }
.budget-grid-prototype .gridjs-search-input { width: min(100%, 24rem); border: 1px solid var(--border); border-radius: 8px; padding: 0.55rem 0.75rem; }
.budget-grid-prototype .gridjs-wrapper { border: 1px solid #e7eef3; border-radius: 8px; box-shadow: none; }
.budget-grid-prototype .gridjs-table { white-space: nowrap; }
.budget-grid-prototype .gridjs-th { background: #f4f8fb; color: var(--primary); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; border-color: #e7eef3; }
.budget-grid-prototype .gridjs-td { border-color: #eef2f5; vertical-align: top; white-space: normal; }
.budget-grid-prototype .gridjs-tr:hover .gridjs-td { background: #f9fcfe; }
.budget-grid-prototype .gridjs-footer { border-top: 1px solid #e7eef3; box-shadow: none; }
.budget-grid-prototype .gridjs-pagination .gridjs-pages button { border-radius: 6px; }

.budget-feature-link { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 1.35rem 0 1.5rem 0; padding: 1.05rem 1.15rem; border: 1px solid #cfe1ee; border-radius: 12px; background: linear-gradient(180deg, #f8fbfe 0%, #ffffff 100%); }
.budget-feature-link h3 { margin: 0; font-size: 1.15rem; }
.budget-feature-link h3 a { color: var(--text); }
.budget-feature-link h3 a:hover { color: var(--primary); }
.budget-feature-link p:last-child { margin-bottom: 0; color: #486273; }
.budget-feature-link__kicker { margin: 0 0 0.35rem 0; color: var(--secondary); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.budget-feature-link__cta { display: inline-flex; align-items: center; justify-content: center; padding: 0.7rem 1rem; border-radius: 999px; background: var(--primary); color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; }
.budget-feature-link__cta:hover { text-decoration: none; background: #154866; }

.investment-tracker-page { display: grid; gap: 1.5rem; width: 100%; max-width: 100%; min-width: 0; }
.investment-tracker-hero { padding: 1.35rem 1.45rem; border: 1px solid #d8e3f0; border-radius: 16px; background: radial-gradient(circle at top right, rgba(26,82,118,0.08), transparent 28%), linear-gradient(180deg, #f8fbfe 0%, #ffffff 100%); }
.investment-tracker-kicker { margin: 0 0 0.35rem 0; color: var(--secondary); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.investment-tracker-hero h1 { margin: 0; }
.investment-tracker-lead { max-width: 50rem; color: #486273; font-size: 1rem; }
.investment-tracker-glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.75rem; margin-top: 1rem; }
.investment-tracker-card { padding: 0.85rem 0.95rem; border: 1px solid #d8e3f0; border-radius: 12px; background: rgba(255,255,255,0.85); }
.investment-tracker-card strong { display: block; font-size: 1.1rem; color: var(--primary); }
.investment-tracker-card__label { display: block; margin-bottom: 0.18rem; color: #627786; font-size: 0.8rem; }
.investment-tracker-note { padding: 1rem 1.1rem; border: 1px solid #e7eef3; border-radius: 12px; background: #fcfdff; }
.investment-tracker-note p { margin: 0.2rem 0; color: #486273; }
.investment-tracker-summary,
.investment-tracker-solectwa,
.investment-tracker-sources { min-width: 0; }
.investment-tracker-controls { display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: end; padding: 1rem 1.1rem; border: 1px solid #e7eef3; border-radius: 12px; background: #fff; }
.investment-tracker-field { display: grid; gap: 0.35rem; flex: 1 1 18rem; }
.investment-tracker-field--compact { flex: 0 1 14rem; }
.investment-tracker-field span { font-size: 0.86rem; font-weight: 700; color: #4d6575; }
.investment-tracker-field input,
.investment-tracker-field select { width: 100%; padding: 0.65rem 0.75rem; border: 1px solid var(--border); border-radius: 8px; font: inherit; background: #fff; }
.investment-tracker-count { margin: 0 0 0 auto; color: #627786; font-size: 0.9rem; font-weight: 600; }
.investment-tracker-table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 0.2rem; border: 1px solid #e7eef3; border-radius: 12px; background: #fff; }
.investment-tracker-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; }
.investment-tracker-table th,
.investment-tracker-table td { padding: 0.7rem 0.75rem; border-bottom: 1px solid #eef2f5; vertical-align: top; text-align: left; white-space: nowrap; }
.investment-tracker-table thead th { position: sticky; top: 0; background: #f4f8fb; color: var(--primary); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; z-index: 1; }
.investment-tracker-table tbody tr:nth-child(even) { background: #fcfdff; }
.investment-tracker-table tbody tr:hover { background: #f8fbfe; }
.investment-tracker-table td:nth-child(4) { min-width: 18rem; }
.investment-tracker-table td:nth-child(12) a { font-weight: 700; }
.investment-tracker-table--summary { min-width: 860px; }
.investment-tracker-table--solectwa { min-width: 34rem; }
.investment-tracker-summary p { color: #486273; }
.investment-tracker-sources { padding: 1rem 1.1rem; border: 1px solid #e7eef3; border-radius: 12px; background: #fcfdff; }
.investment-tracker-sources p { color: #486273; }
.investment-tracker-sources ul { margin: 0.8rem 0 0 0; padding-left: 1.2rem; }
.investment-tracker-sources li { margin-bottom: 0.35rem; }
.investment-tracker-footnote { margin: 0.9rem 0 0 0; font-size: 0.92rem; }
.investment-status { display: inline-flex; align-items: center; padding: 0.24rem 0.6rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.investment-status.is-plan { background: #eef6fb; color: #1a5276; }
.investment-status.is-docs { background: #fff5e6; color: #8a5714; }
.investment-status.is-tender { background: #fdf0ee; color: #922b21; }
.investment-status.is-offers { background: #fcefdc; color: #9a6700; }
.investment-status.is-contract { background: #ece8fb; color: #5b45a3; }
.investment-status.is-live { background: #edf8f1; color: #1e8449; }
.investment-status.is-review { background: #eef2f5; color: #4b5563; }
.investment-status.is-done { background: #e7f7ef; color: #1f7a46; }
.investment-status.is-hold { background: #f6e8ea; color: #8d3848; }
.investment-status.is-symbolic { background: #f3f4f6; color: #4b5563; }
.investment-status.is-missing { background: #fdecea; color: #b42318; }

.action-tracker-analysis { padding: 1rem 1.1rem; border: 1px solid #e7eef3; border-radius: 12px; background: #fff; }
.action-tracker-analysis p { color: #486273; }
.action-tracker-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; }
.action-tracker-table th,
.action-tracker-table td { padding: 0.7rem 0.75rem; border-bottom: 1px solid #eef2f5; vertical-align: top; text-align: left; }
.action-tracker-table thead th { position: sticky; top: 0; background: #f4f8fb; color: var(--primary); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; z-index: 1; white-space: nowrap; }
.action-tracker-table tbody tr:nth-child(even) { background: #fcfdff; }
.action-tracker-table tbody tr:hover { background: #f8fbfe; }
.action-tracker-table td:nth-child(5) { min-width: 24rem; }
.action-tracker-table td:nth-child(8) { min-width: 22rem; color: #486273; }
.action-tracker-table td:nth-child(9) a { font-weight: 700; white-space: nowrap; }
.action-tracker-table--summary { min-width: 52rem; }
.action-status { display: inline-flex; align-items: center; padding: 0.24rem 0.6rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.action-status.is-done { background: #e7f7ef; color: #1f7a46; }
.action-status.is-partial { background: #fff5e6; color: #8a5714; }
.action-status.is-open { background: #fdecea; color: #b42318; }
.action-status.is-verify { background: #eef2f5; color: #4b5563; }

/* Solec­twa — landing */
.solectwa-page { max-width: 72rem; margin: 0 auto; }
.solectwa-header { margin-bottom: 2rem; }
.solectwa-header h1 { margin: 0.3rem 0 0.5rem; }
.solectwa-header-sub { max-width: 44rem; color: #486273; margin: 0; }
.solectwa-kicker { margin: 0; color: var(--secondary); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.solectwa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr)); gap: 1.1rem; }
.solectwo-card { display: flex; flex-direction: column; padding: 1.15rem 1.2rem; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: 0 2px 12px rgba(26,82,118,0.05); transition: box-shadow 0.18s, border-color 0.18s; }
.solectwo-card:hover { box-shadow: 0 8px 24px rgba(26,82,118,0.10); border-color: #bfd7e6; }
.solectwo-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.55rem; }
.solectwo-card-badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px; background: #e9f4fb; color: var(--primary); font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.solectwo-card-turnout { font-size: 0.82rem; font-weight: 700; color: var(--primary); }
.solectwo-card-title { margin: 0 0 0.4rem; font-size: 1.15rem; }
.solectwo-card-title a { color: var(--text); text-decoration: none; }
.solectwo-card-title a:hover { color: var(--primary); text-decoration: underline; }
.solectwo-card-desc { margin: 0 0 0.7rem; color: #486273; font-size: 0.92rem; line-height: 1.45; }
.solectwo-card-details { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.7rem; font-size: 0.87rem; }
.solectwo-card-row { display: flex; gap: 0.5rem; }
.solectwo-card-label { flex-shrink: 0; min-width: 5.5rem; color: #7a8f9e; font-weight: 600; }
.solectwo-card-muted { color: #9ba8b3; }
.solectwo-card-links { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-bottom: 0.7rem; }
.solectwo-card-links a { display: inline-flex; align-items: center; padding: 0.25rem 0.6rem; border-radius: 8px; border: 1px solid #d8e3f0; background: #f8fbfe; color: var(--primary); font-size: 0.8rem; font-weight: 600; text-decoration: none; }
.solectwo-card-links a:hover { background: #eaf3fb; text-decoration: none; }
.solectwo-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 0.6rem; border-top: 1px solid #eef2f5; font-size: 0.82rem; color: #7a8f9e; }
.solectwo-card-more { color: var(--primary); font-weight: 700; text-decoration: none; }
.solectwo-card-more:hover { text-decoration: underline; }
.solectwa-footnote { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid #e0e8ee; }
.solectwa-footnote h2 { font-size: 1.1rem; }

/* Solec­twa — detail page */
.solectwo-page { display: grid; gap: 1.4rem; }
.solectwo-hero { padding: 1.4rem 1.45rem; border: 1px solid #d8e3f0; border-radius: 16px; background: radial-gradient(circle at top right, rgba(231,76,60,0.10), transparent 26%), linear-gradient(180deg, #f8fbfe 0%, #ffffff 100%); }
.solectwo-eyebrow { margin: 0 0 0.35rem 0; color: var(--secondary); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.solectwo-lead { max-width: 52rem; color: #486273; font-size: 1.02rem; }
.solectwo-meta { display: flex; gap: 0.55rem; flex-wrap: wrap; margin-top: 0.95rem; }
.status-pill.muted { background: #eef2f5; color: #5f7483; }

.solectwo-sections { display: grid; gap: 1.5rem; }

.solectwo-section { border: 1px solid var(--border); border-radius: 14px; background: #fff; overflow: hidden; }
.solectwo-section-body .solectwo-section { border: none; border-radius: 0; background: transparent; overflow: visible; }
.solectwo-section-header { display: flex; gap: 0.75rem; align-items: flex-start; padding: 1rem 1.2rem; border-bottom: 1px solid #edf1f4; background: #f8fafc; }
.solectwo-section-header h2 { margin: 0; font-size: 1.1rem; line-height: 1.35; }
.solectwo-section-icon { font-size: 1.25rem; flex-shrink: 0; line-height: 1.4; }
.solectwo-section-sub { margin: 0.2rem 0 0; color: #627786; font-size: 0.9rem; }
.solectwo-section-body { padding: 1.1rem 1.2rem; }
.solectwo-section--compact .solectwo-section-body { padding: 0.9rem 1.1rem; }
.solectwo-muted { color: #627786; font-size: 0.9rem; margin-top: 0.5rem; }

.solectwo-stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 1.1rem; }

/* Reps */
.solectwo-reps { display: grid; gap: 0.65rem; }
.solectwo-rep-card { padding: 0.8rem 0.9rem; border: 1px solid #e7eef3; border-radius: 10px; background: #fcfdff; }
.solectwo-rep-card h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.solectwo-rep-card h3 a { color: var(--primary); }
.solectwo-rep-note { margin: 0.4rem 0 0; color: #4b5563; font-size: 0.9rem; }
.solectwo-rep-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.solectwo-pill { display: inline-flex; align-items: center; padding: 0.22rem 0.6rem; border-radius: 999px; background: #e9f4fb; color: var(--primary); font-size: 0.78rem; font-weight: 700; }
.solectwo-pill.is-soft { background: #f3f4f6; color: #4b5563; }
.solectwo-extra-list { margin-top: 1rem; padding-top: 0.85rem; border-top: 1px solid #eef2f5; }
.solectwo-extra-list h3 { margin: 0 0 0.45rem; font-size: 0.95rem; }
.solectwo-extra-list ul { margin: 0; padding-left: 1.2rem; }
.solectwo-extra-list li { margin-bottom: 0.35rem; font-size: 0.92rem; }

/* Stats */
.solectwo-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.55rem; }
.solectwo-stat-card { padding: 0.75rem 0.5rem; border-radius: 10px; background: #f4f8fb; text-align: center; }
.solectwo-stat-value { display: block; color: var(--primary); font-size: 1.3rem; font-weight: 700; line-height: 1.15; }
.solectwo-stat-label { display: block; margin-top: 0.2rem; color: #637988; font-size: 0.72rem; }
.solectwo-signal-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }
.solectwo-signal { padding: 0.65rem 0.75rem; border-radius: 10px; background: #f8fafc; border: 1px solid #edf1f4; }
.solectwo-signal strong { display: block; color: var(--text); font-size: 0.92rem; }
.solectwo-signal span { display: block; margin-top: 0.12rem; color: #667; font-size: 0.78rem; }

/* Analysis */
.solectwo-analysis-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 0.75rem; }
.solectwo-analysis-item { padding: 0.85rem 0.9rem; border: 1px solid #edf1f4; border-radius: 10px; background: #fcfdff; }
.solectwo-analysis-item h3 { margin: 0 0 0.3rem; font-size: 0.95rem; }
.solectwo-analysis-item p { margin: 0; color: #4b5563; font-size: 0.9rem; line-height: 1.5; }

/* Quick links */
.solectwo-quick-links { display: flex; gap: 0.55rem; flex-wrap: wrap; }
.solectwo-quick-links a { display: inline-flex; align-items: center; padding: 0.5rem 0.85rem; border: 1px solid #d8e3f0; border-radius: 10px; background: #f8fbfe; color: var(--primary); font-weight: 700; font-size: 0.88rem; text-decoration: none; }
.solectwo-quick-links a:hover { background: #eaf3fb; text-decoration: none; }

/* Legacy toggle */
.solectwo-legacy { border: 1px solid var(--border); border-radius: 14px; background: #fff; overflow: hidden; }
.solectwo-legacy summary { cursor: pointer; padding: 0.85rem 1.1rem; font-weight: 700; color: var(--primary); background: #f7fbfe; }
.solectwo-legacy[open] summary { border-bottom: 1px solid var(--border); }
.solectwo-legacy-body { padding: 1rem 1.1rem; }
.solectwo-legacy-body > :last-child { margin-bottom: 0; }

@media (max-width: 600px) {
  .solectwa-grid { grid-template-columns: 1fr; }
  .solectwo-stat-grid { grid-template-columns: repeat(3, 1fr); }
  .solectwo-signal-list { grid-template-columns: 1fr; }
  .solectwo-stats-row { grid-template-columns: 1fr; }
  .solectwo-analysis-grid { grid-template-columns: 1fr; }
}

/* Breadcrumbs */
.breadcrumbs { margin-bottom: 1rem; font-size: 0.85rem; color: #666; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.2rem; padding: 0; margin: 0; }
.breadcrumbs li + li::before { content: "\203A"; margin-right: 0.4rem; color: #999; }
.breadcrumbs li { display: flex; align-items: center; gap: 0.2rem; }
.breadcrumbs [aria-current] { color: var(--text); font-weight: 600; }

/* Hamburger toggle */
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.6rem; cursor: pointer; padding: 0.2rem 0.5rem; line-height: 1; }

/* Responsive */
@media (max-width: 600px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; flex-direction: column; gap: 0.3rem; font-size: 0.9rem; }
  .main-nav.open { display: flex; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .solectwa-landing-hero,
  .solectwo-dashboard { grid-template-columns: 1fr; }
  .solectwo-card-meta { align-items: flex-start; }
  .solectwo-stat-grid { grid-template-columns: 1fr; }
  .radny-header { flex-direction: column; text-align: center; }
  .radni-table th,
  .radni-table td { padding: 0.7rem; font-size: 0.9rem; }
  .radny-details-grid { grid-template-columns: 1fr; }
  .analysis-hub,
  .analysis-stat-grid,
  .analysis-summary-grid { grid-template-columns: 1fr; }
  .analysis-details summary { grid-template-columns: 1fr; }
  .transcript-toolbar { flex-direction: column; }
  #transcript-search { max-width: 100%; }
  .tresc th,
  .tresc td { padding: 0.7rem; font-size: 0.9rem; }
  .budget-grid-prototype { padding: 1rem; }
  .budget-grid-prototype__host { padding: 0.75rem; }
  .budget-grid-prototype .gridjs-container { min-width: 720px; }
  .budget-feature-link { flex-direction: column; align-items: flex-start; }
  .budget-feature-link__cta { width: 100%; }
  .investment-tracker-hero { padding: 1.1rem; }
  .investment-tracker-controls { padding: 0.95rem; }
  .investment-tracker-field,
  .investment-tracker-field--compact { flex-basis: 100%; }
  .investment-tracker-count { margin-left: 0; }
  .container--wide { padding-left: 0.75rem; padding-right: 0.75rem; }
  .investment-tracker-table--solectwa { min-width: 30rem; }
  .action-tracker-table td:nth-child(5),
  .action-tracker-table td:nth-child(8) { min-width: 16rem; }
  .action-tracker-table--summary { min-width: 34rem; }
  .planowanie-directory { padding: 0.9rem 0.95rem; }
  .planowanie-directory-links { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.25rem; }
  .planowanie-directory-links a { white-space: nowrap; }
}

.public-board-page {
  --board-ink: #10233f;
  --board-muted: #5a6980;
  --board-border: rgba(16, 35, 63, 0.12);
  --board-panel: rgba(255, 255, 255, 0.92);
  --board-accent: #0b7a75;
  --board-warm: #d88d2f;
  --board-danger: #b4442f;
  --board-lane-width: minmax(20rem, 24rem);
  display: grid;
  gap: 1.5rem;
}

.public-board-hero {
  position: relative;
  overflow: hidden;
  padding: 2rem;
  border: 1px solid var(--board-border);
  border-radius: 28px;
  background: radial-gradient(circle at top right, rgba(11,122,117,0.22), transparent 34%), radial-gradient(circle at left bottom, rgba(216,141,47,0.18), transparent 28%), linear-gradient(135deg, #f6f2e8 0%, #fcfbf7 56%, #eef6f5 100%);
}

.public-board-hero-main {
  display: grid;
  gap: 1.25rem;
}

.public-board-hero-copy {
  display: grid;
  gap: 0.75rem;
}

.public-board-hero-aside {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.public-board-hero h1 { margin: 0 0 0.75rem; color: var(--board-ink); }
.public-board-hero p { max-width: 52rem; margin: 0; color: var(--board-muted); }

.public-board-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.public-board-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(16,35,63,0.1);
  color: var(--board-ink);
  font-size: 0.95rem;
}

.public-board-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.public-board-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1rem;
  border-radius: 999px;
  background: var(--board-ink);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.public-board-cta:hover {
  color: #fff;
  text-decoration: none;
  background: #193456;
}

.public-board-secondary-link {
  display: inline-flex;
  align-items: center;
  padding: 0.78rem 0.15rem;
  color: var(--board-ink);
  font-weight: 700;
  text-decoration: none;
}

.public-board-secondary-link:hover { text-decoration: underline; }

.public-board-controls {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.public-board-control,
.public-board-search {
  display: grid;
  gap: 0.45rem;
  padding: 1rem;
  border: 1px solid var(--board-border);
  border-radius: 20px;
  background: var(--board-panel);
}

.public-board-control label,
.public-board-search label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--board-ink);
}

.public-board-control select,
.public-board-search input {
  width: 100%;
  border: 1px solid rgba(16,35,63,0.16);
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  background: #fff;
  color: var(--board-ink);
}

.public-board-stage {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--board-border);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(243,247,250,0.92) 0%, rgba(252,250,245,0.82) 100%);
}

.public-board-stage-header {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 0.9rem;
}

.public-board-stage-header h2 {
  margin: 0 0 0.25rem;
  color: var(--board-ink);
  font-size: 1.15rem;
}

.public-board-stage-header p {
  margin: 0;
  color: var(--board-muted);
}

.public-board-stage-count {
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(16,35,63,0.08);
  font-size: 0.92rem;
}

.public-board-columns {
  display: grid;
  gap: 1rem;
  grid-auto-flow: column;
  grid-auto-columns: var(--board-lane-width);
  align-items: start;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x proximity;
}

.public-board-columns::-webkit-scrollbar { height: 0.8rem; }
.public-board-columns::-webkit-scrollbar-thumb { background: rgba(16,35,63,0.18); border-radius: 999px; }
.public-board-columns::-webkit-scrollbar-track { background: rgba(16,35,63,0.06); border-radius: 999px; }

.public-board-column {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  min-height: 100%;
  border-radius: 24px;
  border: 1px solid var(--board-border);
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(248,245,239,0.92) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
  scroll-snap-align: start;
}

.public-board-column--nowe { border-top: 5px solid #6a7bd1; }
.public-board-column--do-weryfikacji { border-top: 5px solid var(--board-warm); }
.public-board-column--czeka-na-odpowiedz { border-top: 5px solid #2e7d77; }
.public-board-column--odpowiedz-przyszla { border-top: 5px solid #2e6fd3; }
.public-board-column--w-toku { border-top: 5px solid #7a4cc2; }
.public-board-column--zamkniete { border-top: 5px solid #5f6c7a; }

.public-board-column-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.public-board-column-header h2 { margin: 0; font-size: 1.05rem; color: var(--board-ink); }
.public-board-column-header span {
  color: var(--board-muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

.public-board-empty {
  padding: 1rem;
  border-radius: 18px;
  border: 1px dashed rgba(16,35,63,0.18);
  color: var(--board-muted);
}

.public-board-card {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(16,35,63,0.1);
  box-shadow: 0 12px 30px rgba(16,35,63,0.06);
  min-height: 14rem;
}

.public-board-card-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

.public-board-card h3 { margin: 0; color: var(--board-ink); font-size: 1.05rem; }

.public-board-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.public-board-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: #eef3f8;
  color: var(--board-ink);
}

.public-board-tag--priority-Wysoki { background: rgba(180,68,47,0.12); color: var(--board-danger); }
.public-board-tag--priority-Średni { background: rgba(216,141,47,0.16); color: #8a5a16; }
.public-board-tag--status-Czeka-na-odpowiedź,
.public-board-tag--status-Do-weryfikacji { background: rgba(11,122,117,0.12); color: var(--board-accent); }

.public-board-meta {
  display: grid;
  gap: 0.35rem;
  color: var(--board-muted);
  font-size: 0.92rem;
}

.public-board-card p { margin: 0; }

.public-board-details {
  border-top: 1px solid rgba(16,35,63,0.08);
  padding-top: 0.85rem;
}

.public-board-details summary { cursor: pointer; font-weight: 700; color: var(--board-ink); }

.public-board-documents {
  display: grid;
  gap: 0.6rem;
}

.public-board-documents-section {
  display: grid;
  gap: 0.7rem;
}

.public-board-documents-section h4 {
  margin: 0;
  color: var(--board-ink);
  font-size: 0.95rem;
}

.public-board-document {
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid rgba(16,35,63,0.08);
  overflow: hidden;
}

.public-board-document summary {
  display: grid;
  gap: 0.2rem;
  padding: 0.8rem 0.9rem;
  cursor: pointer;
  list-style: none;
}

.public-board-document summary::-webkit-details-marker { display: none; }

.public-board-document summary::after {
  content: 'Pokaż detale';
  margin-top: 0.2rem;
  color: var(--board-accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.public-board-document[open] summary::after { content: 'Ukryj detale'; }

.public-board-document__title {
  color: var(--board-ink);
  font-weight: 700;
  line-height: 1.35;
}

.public-board-document__meta {
  color: var(--board-muted);
  font-size: 0.88rem;
}

.public-board-document__details {
  display: grid;
  gap: 0.45rem;
  padding: 0 0.9rem 0.85rem;
  border-top: 1px solid rgba(16,35,63,0.08);
}

.public-board-document__details p {
  margin: 0.75rem 0 0;
}

.public-board-document a { color: var(--board-accent); font-weight: 700; }

.public-board-loading,
.public-board-error {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid var(--board-border);
  background: var(--board-panel);
}

.public-board-error { color: var(--board-danger); }

.public-board-doc-page ul {
  margin-top: 0;
  padding-left: 1.2rem;
}

.public-board-doc-page li + li {
  margin-top: 0.45rem;
}

@media (min-width: 980px) {
  .public-board-hero-main {
    grid-template-columns: minmax(0, 1.8fr) minmax(18rem, 0.95fr);
  }
}

@media (max-width: 900px) {
  .public-board-page { --board-lane-width: minmax(84vw, 21rem); }
  .public-board-hero { padding: 1.25rem; }
  .public-board-stage { padding: 0.85rem; }
}

/* Print */
@media print {
  .site-header, .site-footer, .nav-toggle, .site-search,
  .transcript-toolbar, .transcript-block-nav, .video-sync-link,
  .transcript-embed, .breadcrumbs, #site-search { display: none !important; }
  body { font-size: 11pt; line-height: 1.5; color: #000; }
  .container { max-width: 100%; padding: 0; }
  a { color: #000; text-decoration: underline; }
  .speech { break-inside: avoid; border-left: none !important; }
  .ai-generated-note { border-color: #999; }
  .ai-generated-note[open] > :not(summary) { display: block; }
}

/* ═══════════ PROCEDURY GMINY ═══════════ */
.proc-page { --proc-accent: #1a5276; --proc-soft: #2e86c1; --proc-bg-card: #fff; --proc-muted: #627786; }

/* Hero */
.proc-hero { padding: 1.5rem 1.6rem; border: 1px solid #d8e3f0; border-radius: 16px; background: radial-gradient(circle at top right, rgba(26,82,118,0.07), transparent 30%), linear-gradient(180deg, #f8fbfe 0%, #fff 100%); margin-bottom: 1.8rem; }
.proc-kicker { margin: 0 0 0.3rem; color: var(--proc-soft); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.proc-hero h1 { margin: 0 0 0.5rem; }
.proc-lead { max-width: 52rem; color: var(--proc-muted); font-size: 1.02rem; margin: 0; }

/* TOC */
.proc-toc { margin-bottom: 2rem; }
.proc-toc-title { font-size: 1rem; margin-bottom: 0.7rem; }
.proc-toc-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.proc-toc-item { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.85rem; border: 1px solid #d8e3f0; border-radius: 999px; font-size: 0.88rem; font-weight: 600; color: var(--proc-accent); background: #f8fbfe; transition: background 0.15s, border-color 0.15s; text-decoration: none; }
.proc-toc-item:hover { background: #e9f4fb; border-color: var(--proc-soft); text-decoration: none; }
.proc-toc-icon { font-size: 1rem; line-height: 1; }

/* Law pills */
.proc-law-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.proc-law-pill { display: inline-block; padding: 0.3rem 0.7rem; border-radius: 6px; background: #edf5fa; color: var(--proc-accent); font-size: 0.82rem; font-weight: 600; }

/* Section cards */
.proc-section { border: 1px solid var(--border); border-radius: 14px; background: var(--proc-bg-card); overflow: hidden; margin-bottom: 2rem; }
.proc-section--intro { border: none; background: transparent; padding: 0; margin-bottom: 1rem; }
.proc-section--intro .proc-section-body { padding: 0; }
.proc-section-header { display: flex; gap: 0.65rem; align-items: center; padding: 1.1rem 1.4rem; border-bottom: 1px solid #edf1f4; background: #f8fafc; }
.proc-section-header h2 { margin: 0; font-size: 1.12rem; line-height: 1.35; }
.proc-section-icon { font-size: 1.25rem; flex-shrink: 0; line-height: 1; }
.proc-section-sub { margin: 0.15rem 0 0; color: var(--proc-muted); font-size: 0.88rem; }
.proc-section-body { padding: 1.3rem 1.4rem; }
.proc-section-body h3 { font-size: 1rem; margin-top: 1.4rem; margin-bottom: 0.45rem; color: var(--proc-accent); }
.proc-section-body h3:first-child { margin-top: 0; }
.proc-section-body ul, .proc-section-body ol { padding-left: 1.15rem; margin-left: 0; }
.proc-section-body li { margin-bottom: 0.3rem; }

/* Callout */
.proc-callout { padding: 1.1rem 1.3rem; border-left: 4px solid var(--proc-soft); border-radius: 0 10px 10px 0; background: #eff6ff; margin: 1.2rem 0; }
.proc-callout h4 { margin: 0 0 0.3rem; color: var(--proc-accent); font-size: 0.95rem; }
.proc-callout p { margin: 0; }

/* Two-col mini cards */
.proc-two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0.9rem; margin: 1rem 0; }
.proc-mini-card { padding: 1rem 1.1rem; border: 1px solid #e3eaf0; border-radius: 10px; background: #fafcfe; }
.proc-mini-card h4 { margin: 0 0 0.5rem; font-size: 0.95rem; }
.proc-mini-card ul { padding-left: 1.15rem; margin-left: 0; }
.proc-ref { font-weight: 400; font-size: 0.78rem; color: var(--proc-muted); }

/* Tables */
.proc-table-wrap { overflow-x: auto; margin: 0.8rem 0; -webkit-overflow-scrolling: touch; }
.proc-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.proc-table th { text-align: left; padding: 0.55rem 0.65rem; background: #f0f5fa; border-bottom: 2px solid #d0dbe5; color: var(--proc-accent); font-weight: 700; white-space: nowrap; }
.proc-table td { padding: 0.5rem 0.65rem; border-bottom: 1px solid #edf1f4; }
.proc-table tbody tr:hover { background: #f8fbfe; }
.proc-table--compact td, .proc-table--compact th { padding: 0.4rem 0.55rem; font-size: 0.85rem; }

/* Steps */
.proc-steps { list-style: none; counter-reset: step; padding-left: 0; margin-left: 0; }
.proc-steps li { position: relative; padding: 0.6rem 0 0.6rem 2.6rem; border-left: 2px solid #d8e3f0; margin-left: 0.75rem; counter-increment: step; }
.proc-steps li::before { content: counter(step); position: absolute; left: -0.75rem; top: 0.5rem; width: 1.4rem; height: 1.4rem; background: var(--proc-soft); color: #fff; border-radius: 50%; font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.proc-steps li:last-child { border-left-color: transparent; }
.proc-step-date { display: inline-block; padding: 0.15rem 0.5rem; background: #e9f4fb; border-radius: 4px; font-size: 0.78rem; font-weight: 700; color: var(--proc-accent); margin-right: 0.4rem; }

/* Checklist */
.proc-checklist { display: grid; gap: 0.4rem; margin: 0; padding: 0; }
.proc-check-item { position: relative; padding: 0.45rem 0 0.45rem 1.8rem; }
.proc-check-item::before { content: "✓"; position: absolute; left: 0; top: 0.45rem; width: 1.2rem; height: 1.2rem; background: #dcfce7; color: #166534; border-radius: 50%; font-size: 0.72rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.proc-note-inline { font-size: 0.82rem; color: var(--proc-muted); }

/* Timeline mini */
.proc-timeline-mini { display: grid; gap: 0.55rem; margin: 0.8rem 0; padding: 0; }
.proc-tl-item { padding: 0.5rem 0 0.5rem 5.5rem; position: relative; border-left: 2px solid #d8e3f0; margin-left: 0.75rem; }
.proc-tl-label { position: absolute; left: -0.4rem; top: 0.4rem; display: inline-block; padding: 0.18rem 0.55rem; background: var(--proc-soft); color: #fff; border-radius: 4px; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }

/* Calendar */
.proc-calendar { display: grid; gap: 0.7rem; }
.proc-month { display: grid; grid-template-columns: 4.2rem 1fr; border: 1px solid #e3eaf0; border-radius: 10px; overflow: hidden; }
.proc-month-label { padding: 0.7rem 0.5rem; background: #f0f5fa; color: var(--proc-accent); font-weight: 800; font-size: 0.88rem; display: flex; align-items: center; justify-content: center; text-align: center; }
.proc-month--hot .proc-month-label { background: #fef3c7; color: #92400e; }
.proc-month-body { padding: 0.5rem 0.8rem; }
.proc-month-item { padding: 0.25rem 0; font-size: 0.9rem; }
.proc-deadline { display: inline-block; padding: 0.1rem 0.4rem; background: #fee2e2; color: #991b1b; border-radius: 3px; font-size: 0.75rem; font-weight: 700; margin-left: 0.3rem; }
.proc-month--hot .proc-deadline { background: #fef3c7; color: #92400e; }

/* Note */
.proc-note { font-size: 0.85rem; color: var(--proc-muted); margin-top: 0.5rem; }

/* FAQ */
.proc-faq { display: grid; gap: 0.5rem; }
.proc-faq-item { border: 1px solid #e3eaf0; border-radius: 10px; overflow: hidden; }
.proc-faq-item summary { padding: 0.75rem 1rem; cursor: pointer; font-weight: 700; color: var(--proc-accent); background: #f8fafc; }
.proc-faq-item summary:hover { background: #eef5fb; }
.proc-faq-item[open] summary { border-bottom: 1px solid #edf1f4; }
.proc-faq-item p { padding: 0.8rem 1rem; margin: 0; }

/* Doc footer */
.proc-doc-footer { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid #e0e8ee; font-size: 0.82rem; color: var(--proc-muted); }

/* Mobile */
@media (max-width: 600px) {
  .proc-hero { padding: 1.1rem; }
  .proc-section-header { padding: 0.85rem 1rem; }
  .proc-section-body { padding: 1rem; }
  .proc-section-body ul, .proc-section-body ol { padding-left: 1rem; }
  .proc-month { grid-template-columns: 3rem 1fr; }
  .proc-month-label { font-size: 0.75rem; padding: 0.5rem 0.3rem; }
  .proc-toc-item { font-size: 0.82rem; padding: 0.35rem 0.65rem; }
  .proc-two-col { grid-template-columns: 1fr; }
  .proc-steps li { padding-left: 2.4rem; }
  .proc-tl-item { padding-left: 4.8rem; }
  .proc-mini-card ul { padding-left: 1rem; }
}
