/* Panel usługi zgody – kierunek C „Wyrazisty i przyjazny” (WYGLAD.md).
 * Czcionki Inter i Space Grotesk z własnego serwera (SIL OFL 1.1, pliki w static/fonts) – bez Google Fonts
 * (to przekazywałoby adres IP właściciela do Google; CSP i tak pozwala tylko na font-src 'self'). */
@font-face { font-family: 'Hub Inter'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url('/static/fonts/inter-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: 'Hub Inter'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url('/static/fonts/inter-latin-wght-normal.woff2') format('woff2');
  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: 'Hub Grotesk'; font-style: normal; font-display: swap; font-weight: 300 700;
  src: url('/static/fonts/space-grotesk-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: 'Hub Grotesk'; font-style: normal; font-display: swap; font-weight: 300 700;
  src: url('/static/fonts/space-grotesk-latin-wght-normal.woff2') format('woff2');
  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; }

:root {
  --ink: #14213d; --ink2: #3a4561; --muted: #5a6480; --act: #c2410c; --act-h: #9a3412; --acc: #f59e0b;
  --att: #fff4e5; --ok-bg: #e3f6e8; --ok-bg2: #e9f7ee; --ok: #1b6b33; --bad-bg: #fde6dc; --bad-bg2: #fdf0ea; --bad: #9a3412;
  --info-bg: #eaf1ff; --info: #1d3f8f; --new-line: #e0a458; --new-ink: #7a4a00;
  --line: #e3e7ef; --line2: #eef0f4; --bg: #f6f8fb; --card: #ffffff; --off: #d9dee8;
  --font: 'Hub Inter', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --head: 'Hub Grotesk', 'Hub Inter', system-ui, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', SFMono-Regular, Menlo, Consolas, monospace;
}
* , *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
a { color: var(--act); }
a:hover { color: var(--act-h); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
code { font: 13px/1.4 var(--mono); background: var(--line2); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.wrap { overflow-wrap: anywhere; }
small, .muted { color: var(--muted); }
.small { font-size: 13px; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(26px, 5vw, 34px); letter-spacing: -0.02em; }
h2 { font-size: 21px; }
h3 { font-size: 18px; }
p { margin: 0; }
.lead { font-size: 16px; color: var(--ink2); max-width: 75ch; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
main { max-width: 1160px; margin: 0 auto; padding: 28px 16px 120px; display: flex; flex-direction: column; gap: 22px; }
main:focus { outline: none; }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 10px 16px 30px; }

/* --- nagłówek, menu-pigułki --- */
.top { background: var(--ink); color: #fff; padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.logo { color: #fff; text-decoration: none; font: 700 20px var(--head); display: flex; align-items: center; gap: 10px; }
.logo:hover { color: #fff; }
.dot { width: 16px; height: 16px; border-radius: 50%; background: var(--acc); display: inline-block; box-shadow: 0 0 0 4px rgba(245, 158, 11, .25); }
.pills { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pills a, .pill-btn { color: #fff; text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; border: 0; background: transparent; font-family: inherit; cursor: pointer; min-height: 40px; display: inline-flex; align-items: center; white-space: nowrap; }
.pills a[aria-current="page"] { background: #fff; color: var(--ink); }
.pills a:hover, .pill-btn:hover { background: rgba(255,255,255,.14); color: #fff; }
.pills a[aria-current="page"]:hover { background: #fff; color: var(--ink); }
.pill-btn { border: 1px solid rgba(255,255,255,.3); }
form.inline { display: inline-flex; margin: 0; }
@media (max-width: 760px) {
  .pills { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 4px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
  main { padding-top: 20px; }
}

/* --- zdanie główne --- */
.hero { border-radius: 20px; padding: 24px 28px; display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; background: var(--att); border: 2px solid var(--act); }
.hero.ok { background: var(--ok-bg2); border-color: transparent; }
.hero.ok h1 { color: var(--ok); }
.hero.plain { background: transparent; border: 0; padding: 0; }
.hero-text { flex: 1 1 380px; max-width: 760px; }
.hero-text p { margin-top: 8px; font-size: 16px; color: var(--ink2); }
.hero h1 { font-size: clamp(22px, 4.2vw, 30px); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 560px) { .hero { padding: 18px; } .hero-actions, .hero-actions > *, .hero-actions .btn { width: 100%; } }

/* --- sekcje i karty --- */
.section { display: flex; flex-direction: column; gap: 14px; }
.section-head { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; justify-content: space-between; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card.narrow { max-width: 600px; width: 100%; margin: 0 auto; }
.card.danger { border: 2px solid var(--act); }
.card.attention { border: 2px solid var(--act); padding: 19px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 18px; }
.mt { margin-top: 6px; }
.row, .row-end { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row-end { justify-content: flex-end; }
.login { margin-top: 6vh; }

/* --- karty stron na pulpicie --- */
.sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.site-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.site-head h3 a { color: var(--ink); text-decoration: none; }
.site-head h3 a:hover { text-decoration: underline; }
.site-hosts { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; margin-top: -6px; }
.site-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.site-stats div { display: flex; flex-direction: column; }
.site-stats strong { font: 700 22px var(--head); }
.site-stats span { font-size: 12px; color: var(--muted); }
.spark { width: 100%; height: 48px; display: block; }
.bar-0 { fill: var(--line); }
.site-flags { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.site-flags a { text-decoration: none; color: var(--ink2); }
.site-flags a:hover .badge { filter: brightness(.96); }
.site-foot { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.card.add { border: 2px dashed #cbd2de; align-items: center; justify-content: center; flex-direction: row; text-decoration: none; color: var(--ink); font-weight: 600; min-height: 160px; background: transparent; }
.card.add:hover { border-color: var(--ink); background: #fff; color: var(--ink); }
.plus { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; }

/* --- przyciski --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 12px; border: 2px solid var(--act); background: var(--act); color: #fff; font: 600 15px/1.2 var(--font); cursor: pointer; text-decoration: none; text-align: center; }
.btn:hover { background: var(--act-h); border-color: var(--act-h); color: #fff; }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--bg); color: var(--ink); }
.btn.accent { background: var(--acc); border-color: var(--acc); color: var(--ink); }
.btn.accent:hover { background: #fbbf24; border-color: #fbbf24; color: var(--ink); }
.btn.danger { background: #fff; color: var(--bad); border-color: var(--bad); }
.btn.danger:hover { background: var(--bad-bg2); color: var(--bad); }
.btn.link { background: none; border-color: transparent; color: var(--act); text-decoration: underline; padding-left: 6px; padding-right: 6px; }
.btn.link:hover { background: none; color: var(--act-h); }
.btn.small { min-height: 38px; padding: 6px 14px; font-size: 14px; border-radius: 10px; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .65; cursor: progress; }
.btn[aria-busy="true"]::before { content: ""; width: 16px; height: 16px; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- komunikaty --- */
.notice { border-radius: 14px; padding: 12px 16px; background: var(--bg); font-size: 14px; }
.notice.bad { background: var(--bad-bg2); color: var(--bad); border: 1px solid var(--act); }
.notice.info { background: var(--info-bg); color: var(--info); }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.notice.warn { background: var(--att); color: var(--bad); border: 1px solid var(--new-line); }
progress { width: 100%; height: 10px; margin-top: 8px; accent-color: var(--acc); }
.stat.is-bad strong { color: var(--bad); }
.notice ul { margin: 6px 0 0; padding-left: 20px; }
.flash { padding: 12px 16px; border-radius: 12px; background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.flash.bad { background: var(--bad-bg); color: var(--bad); }
.js .flash[data-toast] { display: none; }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: flex; flex-direction: column; gap: 8px; max-width: min(440px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14px; box-shadow: 0 10px 30px rgba(20,33,61,.3); display: flex; gap: 12px; align-items: flex-start; animation: toast-in .2s ease-out; }
.toast.bad { background: var(--bad); }
.toast button { background: none; border: 0; color: #fff; font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px; margin-left: auto; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .toast, .btn[aria-busy="true"]::before { animation: none; } }

/* --- plakietki --- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--line2); color: var(--ink2); white-space: nowrap; text-decoration: none; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.warn { background: var(--att); color: var(--bad); border: 1px solid var(--new-line); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.new { background: #fff; color: var(--new-ink); border: 1px dashed var(--new-line); }
.badge.accent { background: var(--acc); color: var(--ink); }
.badge.off { background: var(--line2); color: var(--muted); }
.count { display: inline-flex; min-width: 22px; justify-content: center; font: 700 12px var(--font); padding: 1px 7px; border-radius: 999px; background: var(--line2); color: var(--ink2); vertical-align: middle; }
.tabs .count { background: var(--act); color: #fff; }
.cat { display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.cat-necessary { background: #e9f7ee; color: #1b6b33; }
.cat-functional { background: #f1ecff; color: #4c2e9e; }
.cat-analytics { background: #eaf1ff; color: #1d3f8f; }
.cat-performance { background: #e6f6f8; color: #0f5a66; }
.cat-advertisement { background: #fff0e6; color: #9a3412; }
.cat-others { background: #eef0f4; color: #3a4561; }
.cat-none { background: #fff; border: 1px dashed var(--new-line); color: var(--new-ink); }
.src { display: inline-flex; font-size: 12px; background: var(--line2); color: var(--ink2); border-radius: 6px; padding: 1px 7px; white-space: nowrap; }

/* --- formularze --- */
.stack { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 14px; }
label small { font-weight: 400; }
label.check, .inline-label { flex-direction: row; gap: 8px; align-items: center; font-weight: 500; }
input, select, textarea { font: 15px var(--font); color: var(--ink); border: 1px solid #cbd2de; border-radius: 10px; padding: 9px 12px; min-height: 44px; background: #fff; width: 100%; max-width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: 2px solid var(--ink); outline-offset: 0; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; accent-color: var(--act); flex: 0 0 auto; margin: 0; }
input[type=file] { border: 0; padding: 0; min-height: 0; }
.inline-label select { width: auto; min-height: 38px; padding: 4px 8px; }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
legend { font: 700 15px var(--head); padding: 0 6px; }
.row2, .row3 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.choice { flex-direction: row; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--act); background: #fff; }
.choice span { display: flex; flex-direction: column; gap: 2px; }
.choice small { font-weight: 400; }
.radio-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.rcard { flex-direction: row; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; }
.rcard:has(input:checked) { border-color: var(--act); background: var(--att); }
.rcard span { display: flex; flex-direction: column; gap: 2px; }
.rcard small { font-weight: 400; }
/* przełącznik 48×28 */
.switch { flex-direction: row; align-items: center; gap: 12px; font-weight: 500; cursor: pointer; position: relative; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { flex: 0 0 auto; width: 48px; height: 28px; border-radius: 14px; background: var(--off); position: relative; transition: background .15s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(20,33,61,.25); transition: transform .15s; }
.switch input:checked + .track { background: var(--act); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid var(--ink); outline-offset: 2px; }
.switchrow { display: flex; flex-wrap: wrap; gap: 12px 20px; justify-content: space-between; align-items: center; }
.switchrow > div { flex: 1 1 300px; display: flex; flex-direction: column; gap: 6px; }

/* --- okruszki, tytuł, zakładki --- */
.crumb { color: var(--muted); font-size: 14px; margin-bottom: -12px; }
.crumb a { color: var(--muted); }
.titlerow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: -8px; }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 12px 14px; text-decoration: none; color: var(--ink2); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--act); }

/* --- kreator --- */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 14px; }
.steps li { display: flex; gap: 8px; align-items: center; }
.steps span { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--line2); font-weight: 700; color: var(--ink2); }
.steps li.on { color: var(--ink); font-weight: 600; }
.steps li.on span { background: var(--act); color: #fff; }
.steps li.done span { background: var(--ok-bg); color: var(--ok); }
.snippet { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--ink); color: #fff; border-radius: 14px; padding: 14px; }
.snippet code { background: transparent; color: #ffd28a; flex: 1 1 260px; font-size: 14px; padding: 0; }
.howto { display: flex; flex-direction: column; gap: 6px; }
.howto details, details.more { border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; }
.howto summary, details.more > summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
.howto ol { margin: 0 0 12px; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.howto p { margin-bottom: 12px; }
.next { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* --- statystyki i wykres --- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
a.stat:hover { border-color: var(--ink); color: var(--ink); }
.stat span { color: var(--muted); font-size: 13px; }
.stat strong { font: 700 26px var(--head); }
.stat.bad strong { color: var(--bad); }
.stat.warn { border: 2px solid var(--act); background: var(--att); }
.chart { width: 100%; height: auto; display: block; }
.bar-a { fill: var(--act); }
.bar-b { fill: var(--ink); }
.axis { stroke: var(--line); }
.ct { font: 600 13px var(--font); fill: var(--ink); }
.cl { font: 12px var(--font); fill: var(--muted); }
.bar-p { fill: var(--acc); }

/* --- v2: rejestr zgód, podstrony, instalacja --- */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
.filters.row-wrap { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.filters.row-wrap label { flex: 1 1 160px; }
.cat.off { opacity: .55; text-decoration: line-through; }
.block { display: block; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } .facts dd { margin-bottom: 8px; } }
.snippet code { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }

/* --- listy --- */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.list > li { padding: 12px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.list > li.is-bad { background: var(--bad-bg2); border-color: #f3c7b3; }
.list.compact > li { flex-direction: row; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 10px 14px; }
.list-meta { margin-left: auto; font-weight: 700; }
.ev-top { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.ev-top .muted { font-size: 13px; }
.empty { text-align: center; padding: 28px 16px; border: 2px dashed var(--line); border-radius: 18px; color: var(--ink2); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.empty.big { padding: 44px 20px; background: #fff; }
.empty.big p { max-width: 60ch; }

/* --- lista ciasteczek / bazy --- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 10px 0; }
.search { flex: 1 1 260px; max-width: 420px; }
.search input { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%235a6480' stroke-width='2'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") no-repeat 12px center; padding-left: 38px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 600 13px var(--font); border: 1px solid #cbd2de; background: #fff; color: var(--ink); border-radius: 999px; padding: 7px 12px; cursor: pointer; min-height: 36px; display: inline-flex; gap: 6px; align-items: center; }
.chip span { color: var(--muted); font-weight: 600; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip[aria-pressed="true"] span { color: #c9d1e3; }
@media (max-width: 760px) { .toolbar { position: static; } .chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 4px; } .chip { white-space: nowrap; } }
.listhead { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: -10px; }
.nojs .js-only { display: none; }
.js .nojs-only { display: none; }
.catgroup { display: flex; flex-direction: column; gap: 8px; }
.cg-head { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; padding: 4px 2px; border-left: 6px solid var(--line); padding-left: 12px; }
.cg-head h2 { font-size: 18px; display: flex; gap: 8px; align-items: center; }
.cg-none .cg-head { border-left-color: var(--new-line); }
.cg-necessary .cg-head { border-left-color: #1b6b33; }
.cg-functional .cg-head { border-left-color: #4c2e9e; }
.cg-analytics .cg-head { border-left-color: #1d3f8f; }
.cg-performance .cg-head { border-left-color: #0f5a66; }
.cg-advertisement .cg-head { border-left-color: var(--act); }
.cg-others .cg-head { border-left-color: var(--ink2); }
.items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.item.is-new { border: 1px dashed var(--new-line); background: #fffdf8; }
.item:has(.pick input:checked) { border-color: var(--act); box-shadow: 0 0 0 1px var(--act) inset; background: #fffaf5; }
.pick { padding: 2px 0; cursor: pointer; flex-direction: row; }
.pick input { width: 22px; height: 22px; }
.item-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.item-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.name { font-size: 14px; font-weight: 600; background: var(--line2); }
.kind { font-size: 12px; color: var(--muted); }
.item-meta { font-size: 13px; color: var(--ink2); overflow-wrap: anywhere; }
.item-desc { font-size: 14px; }
.item-cat { padding-top: 2px; }
@media (max-width: 560px) { .item { grid-template-columns: auto minmax(0, 1fr); } .item-cat { grid-column: 2; grid-row: 1; justify-self: end; } .item-main { grid-column: 1 / -1; } }
details.inline-edit > summary { list-style: none; width: max-content; margin-top: 4px; }
details.inline-edit > summary::-webkit-details-marker { display: none; }
details.inline-edit[open] > summary { background: var(--ink); color: #fff; }
details.inline-edit > form, details.inline-edit > .row { margin-top: 10px; }
details.inline-edit > form.stack { background: var(--bg); padding: 14px; border-radius: 12px; }

/* propozycja AI */
.proposal { margin-top: 6px; border: 2px solid var(--info); background: #f5f8ff; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.proposal-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ai-mark { font: 700 11px var(--font); background: var(--info); color: #fff; border-radius: 6px; padding: 2px 6px; letter-spacing: .04em; }
.proposal-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.proposal-actions details.inline-edit { flex-basis: auto; }
.proposal-actions details.inline-edit[open] { flex-basis: 100%; order: 5; }

/* pasek działań na zaznaczonych */
.bulkbar { position: sticky; bottom: 12px; z-index: 20; display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; background: var(--ink); color: #fff; border-radius: 16px; padding: 10px 14px; box-shadow: 0 12px 30px rgba(20,33,61,.3); }
.js .bulkbar[data-empty] { display: none; }
.bulk-count { display: flex; flex-direction: column; margin-right: auto; }
.bulk-count small { color: #c9d1e3; }
.bulk-cat { display: inline-flex; gap: 6px; align-items: center; }
.bulk-cat select { min-height: 38px; padding: 4px 8px; width: auto; max-width: 52vw; }
.bulkbar .btn.ghost { background: transparent; color: #fff; border-color: #fff; }
.bulkbar .btn.ghost:hover { background: rgba(255,255,255,.12); }
.bulkbar .btn.danger { background: transparent; color: #ffb38a; border-color: #ffb38a; }
.bulkbar .btn.link { color: #fff; }
.bulkbar .check { color: #fff; }
@media (max-width: 560px) { .bulkbar { bottom: 8px; } .bulk-count { width: 100%; } }

/* --- wygląd --- */
.appear { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 20px; align-items: start; }
.appear-form > .card { gap: 14px; }
.presets { display: flex; flex-wrap: wrap; gap: 10px; }
.preset { display: inline-flex; gap: 10px; align-items: center; border: 2px solid var(--line); border-radius: 12px; padding: 8px 14px; text-decoration: none; color: var(--ink); font-weight: 600; background: #fff; }
.preset:hover { border-color: var(--ink); color: var(--ink); }
.swatch { width: 28px; height: 20px; border-radius: 6px; border: 1px solid var(--line); }
.preset-wyrazisty .swatch { background: linear-gradient(90deg, #14213d 60%, #f59e0b 60%); }
.preset-jasny .swatch { background: linear-gradient(90deg, #ffffff 60%, #14213d 60%); }
.preset-ciemny .swatch { background: linear-gradient(90deg, #111827 60%, #f3f4f6 60%); }
.layouts { border: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.layouts legend { font: 600 14px var(--font); padding: 0 0 6px; }
.layout-opt { gap: 6px; padding: 10px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 500; font-size: 13px; position: relative; }
.layout-opt input { position: absolute; opacity: 0; }
.layout-opt:has(input:checked) { border-color: var(--act); background: var(--att); }
.layout-opt:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.lo-pic { display: block; height: 56px; border-radius: 8px; background: var(--line2); position: relative; overflow: hidden; }
.lo-pic i { position: absolute; background: var(--ink); border-radius: 3px; }
.lo-bar .lo-pic i { left: 0; right: 0; bottom: 0; height: 14px; }
.lo-box-left .lo-pic i { left: 6px; bottom: 6px; width: 42%; height: 24px; }
.lo-box-right .lo-pic i { right: 6px; bottom: 6px; width: 42%; height: 24px; }
.lo-modal .lo-pic { background: #b9c0cf; }
.lo-modal .lo-pic i { left: 25%; right: 25%; top: 14px; height: 28px; }
.colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px 14px; }
.colorpick { display: flex; flex-direction: column; gap: 4px; }
.colorpick > label { font-size: 13px; }
.colorpair { display: flex; gap: 6px; align-items: center; }
.colorpair input[type=color] { width: 44px; height: 44px; padding: 3px; flex: 0 0 auto; cursor: pointer; }
.nojs .colorpair input[type=color] { display: none; }
.hex { font-family: var(--mono); font-size: 14px; text-transform: lowercase; }
.btnrow { gap: 8px; }
.savebar { position: sticky; bottom: 12px; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; box-shadow: 0 10px 24px rgba(20,33,61,.12); }
.preview-col { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 10px; }
.preview-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.seg { display: inline-flex; border: 1px solid #cbd2de; border-radius: 10px; overflow: hidden; }
.seg button { font: 600 13px var(--font); border: 0; background: #fff; color: var(--ink); padding: 8px 12px; cursor: pointer; min-height: 38px; }
.seg button.on { background: var(--ink); color: #fff; }
.preview-stage { background: #dfe3ea; border-radius: 18px; padding: 12px; display: flex; justify-content: center; }
.preview { position: relative; width: 100%; min-height: 460px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line);
  background: repeating-linear-gradient(0deg, #fff 0 26px, #f1f3f7 26px 27px); transition: width .2s; }
.preview.phone { width: 375px; max-width: 100%; min-height: 640px; }
.preview::before { content: attr(data-label); position: absolute; top: 8px; left: 12px; font-size: 12px; font-weight: 700; color: var(--muted); }
.preview-fake { padding: 40px 16px; color: #9aa3b8; }
.preview-nojs { padding: 0 16px; color: var(--muted); font-size: 13px; }
.js .preview-nojs { display: none; }
@media (max-width: 900px) {
  .appear { grid-template-columns: 1fr; }
  .preview-col { position: static; order: -1; }
  .preview { min-height: 380px; }
  .preview.phone { min-height: 560px; }
}

/* --- okno potwierdzenia --- */
dialog.confirm { border: 0; border-radius: 20px; padding: 24px; max-width: min(460px, calc(100vw - 32px)); color: var(--ink); box-shadow: 0 20px 60px rgba(20,33,61,.35); }
dialog.confirm::backdrop { background: rgba(20,33,61,.45); }
dialog.confirm h2 { font-size: 20px; margin-bottom: 8px; }
dialog.confirm .row-end { margin-top: 18px; }
